Simply Beautiful Elixir library for the Plaid API.
I'm working to get this library to a v1
state, until then it is considered un-stable and can
make breaking changes while using the leading-zero 0.x.x
version number according to the semver specification.
- Provide FANTASTIC documentation
- Full plaid API coverage
- Use the plaid API versioning plan
- Return well-defined structs, always
# get auth data
Plaid.Auth.get("access-prod-123xxx", client_id: "123", secret: "abc")
# get item details
Plaid.Item.get("access-prod-123xxx", client_id: "123", secret: "abc", env: :production)
# refresh transactions
Plaid.Transactions.refresh("access-prod-123xxx", client_id: "123", secret: "abc", env: :development)
# get categories
Plaid.Categories.get(env: :production)
Plaid.Accounts
Plaid.AssetReport
Plaid.Auth
Plaid.Categories
Plaid.Employer
Plaid.Identity
Plaid.Institution
Plaid.Investments
Plaid.Item
Plaid.Liabilities
Plaid.LinkToken
Plaid.PaymentInitiation
Plaid.Processor
Plaid.Sandbox
Plaid.Transactions
Plaid.Webhooks
Full Documentation on HexDocs.
Each function takes a Plaid.config
keyword list as it's trailing argument.
Authenticated requests require a client_id
and secert
at minimum for authentication with the plaid API.
You can also pass an env
option as either :production
, :development
, or :sandbox
(default).
The choice to avoid using application configuration is due to the anti-pattern documented by elixir of libraries using application configuration. Passing "configuration" to each function avoids the library touching any global state. As well as making function calls objectively more "functional".
Likely you will need to pass keys dynamically anyway for development/production, overwriting the need for global application config. Therefore using patterns like those outlined in this blog post and using a test mocking library like Mox help aid in making code more clear.
Add elixir_plaid
to your list of dependencies in mix.exs
:
def deps do
[
{:elixir_plaid, "~> 0.1.0"}
]
end
Each major version of elixir_plaid
targets a specific version of the Plaid API:
API version | package version |
---|---|
2020-09-14 (latest) |
0.x.x |
For information about what has changed between API versions, head to the version changelog.
✅ - Full Coverage
🏗 - In Progress
🗺 - On the Roadmap
API | Status |
---|---|
Account | ✅ |
Assets | ✅ |
Auth | ✅ |
Balance | ✅ |
Bank Transfers (beta) | 🗺 |
Deposit Switch (beta) | 🗺 |
Employer | 🏗 |
Identity | ✅ |
Institution | ✅ |
Investments | ✅ |
Item | ✅ |
Liabilities | ✅ |
Payment Initiation (UK and Europe) | ✅ |
Processor | ✅ |
Sandbox | 🏗 |
Token | ✅ |
Transactions | ✅ |
Webhooks | 🏗 |
Bug reports and pull requests are welcome on GitHub. See contributing guidelines for more details.
The package is available as open source under the terms of the MIT License.