increase 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +10 -0
- package/.prettierrc +6 -0
- package/.stats.yml +1 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/api.md +477 -0
- package/bin/check-test-server +50 -0
- package/build +12 -0
- package/check-version.ts +15 -0
- package/core.ts +908 -0
- package/dist/cjs/check-version.d.ts +1 -0
- package/dist/cjs/check-version.js +21 -0
- package/dist/cjs/check-version.js.map +1 -0
- package/dist/cjs/core.d.ts +262 -0
- package/dist/cjs/core.js +978 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/fetch-polyfill.d.ts +5 -0
- package/dist/cjs/fetch-polyfill.js +55 -0
- package/dist/cjs/fetch-polyfill.js.map +1 -0
- package/dist/cjs/index.d.ts +201 -0
- package/dist/cjs/index.js +180 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +28 -0
- package/dist/cjs/pagination.js +30 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +11 -0
- package/dist/cjs/resource.js +17 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/account-numbers.d.ts +103 -0
- package/dist/cjs/resources/account-numbers.js +37 -0
- package/dist/cjs/resources/account-numbers.js.map +1 -0
- package/dist/cjs/resources/account-statements.d.ts +99 -0
- package/dist/cjs/resources/account-statements.js +25 -0
- package/dist/cjs/resources/account-statements.js.map +1 -0
- package/dist/cjs/resources/account-transfers.d.ts +189 -0
- package/dist/cjs/resources/account-transfers.js +43 -0
- package/dist/cjs/resources/account-transfers.js.map +1 -0
- package/dist/cjs/resources/accounts.d.ts +133 -0
- package/dist/cjs/resources/accounts.js +43 -0
- package/dist/cjs/resources/accounts.js.map +1 -0
- package/dist/cjs/resources/ach-prenotifications.d.ts +188 -0
- package/dist/cjs/resources/ach-prenotifications.js +35 -0
- package/dist/cjs/resources/ach-prenotifications.js.map +1 -0
- package/dist/cjs/resources/ach-transfers.d.ts +375 -0
- package/dist/cjs/resources/ach-transfers.js +43 -0
- package/dist/cjs/resources/ach-transfers.js.map +1 -0
- package/dist/cjs/resources/card-disputes.d.ts +143 -0
- package/dist/cjs/resources/card-disputes.js +31 -0
- package/dist/cjs/resources/card-disputes.js.map +1 -0
- package/dist/cjs/resources/card-profiles.d.ts +183 -0
- package/dist/cjs/resources/card-profiles.js +31 -0
- package/dist/cjs/resources/card-profiles.js.map +1 -0
- package/dist/cjs/resources/cards.d.ts +316 -0
- package/dist/cjs/resources/cards.js +43 -0
- package/dist/cjs/resources/cards.js.map +1 -0
- package/dist/cjs/resources/check-deposits.d.ts +241 -0
- package/dist/cjs/resources/check-deposits.js +31 -0
- package/dist/cjs/resources/check-deposits.js.map +1 -0
- package/dist/cjs/resources/check-transfers.d.ts +331 -0
- package/dist/cjs/resources/check-transfers.js +49 -0
- package/dist/cjs/resources/check-transfers.js.map +1 -0
- package/dist/cjs/resources/declined-transactions.d.ts +424 -0
- package/dist/cjs/resources/declined-transactions.js +29 -0
- package/dist/cjs/resources/declined-transactions.js.map +1 -0
- package/dist/cjs/resources/digital-wallet-tokens.d.ts +85 -0
- package/dist/cjs/resources/digital-wallet-tokens.js +29 -0
- package/dist/cjs/resources/digital-wallet-tokens.js.map +1 -0
- package/dist/cjs/resources/documents.d.ts +87 -0
- package/dist/cjs/resources/documents.js +25 -0
- package/dist/cjs/resources/documents.js.map +1 -0
- package/dist/cjs/resources/entities/entities.d.ts +1383 -0
- package/dist/cjs/resources/entities/entities.js +36 -0
- package/dist/cjs/resources/entities/entities.js.map +1 -0
- package/dist/cjs/resources/entities/index.d.ts +2 -0
- package/dist/cjs/resources/entities/index.js +12 -0
- package/dist/cjs/resources/entities/index.js.map +1 -0
- package/dist/cjs/resources/entities/supplemental-documents.d.ts +19 -0
- package/dist/cjs/resources/entities/supplemental-documents.js +15 -0
- package/dist/cjs/resources/entities/supplemental-documents.js.map +1 -0
- package/dist/cjs/resources/event-subscriptions.d.ts +196 -0
- package/dist/cjs/resources/event-subscriptions.js +37 -0
- package/dist/cjs/resources/event-subscriptions.js.map +1 -0
- package/dist/cjs/resources/events.d.ts +183 -0
- package/dist/cjs/resources/events.js +25 -0
- package/dist/cjs/resources/events.js.map +1 -0
- package/dist/cjs/resources/external-accounts.d.ts +121 -0
- package/dist/cjs/resources/external-accounts.js +37 -0
- package/dist/cjs/resources/external-accounts.js.map +1 -0
- package/dist/cjs/resources/files.d.ts +148 -0
- package/dist/cjs/resources/files.js +34 -0
- package/dist/cjs/resources/files.js.map +1 -0
- package/dist/cjs/resources/groups.d.ts +37 -0
- package/dist/cjs/resources/groups.js +15 -0
- package/dist/cjs/resources/groups.js.map +1 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.d.ts +106 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.js +35 -0
- package/dist/cjs/resources/inbound-ach-transfer-returns.js.map +1 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.d.ts +124 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js +29 -0
- package/dist/cjs/resources/inbound-wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +163 -0
- package/dist/cjs/resources/index.js +478 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/limits.d.ts +105 -0
- package/dist/cjs/resources/limits.js +37 -0
- package/dist/cjs/resources/limits.js.map +1 -0
- package/dist/cjs/resources/oauth-connections.d.ts +50 -0
- package/dist/cjs/resources/oauth-connections.js +25 -0
- package/dist/cjs/resources/oauth-connections.js.map +1 -0
- package/dist/cjs/resources/pending-transactions.d.ts +397 -0
- package/dist/cjs/resources/pending-transactions.js +29 -0
- package/dist/cjs/resources/pending-transactions.js.map +1 -0
- package/dist/cjs/resources/real-time-decisions.d.ts +289 -0
- package/dist/cjs/resources/real-time-decisions.js +21 -0
- package/dist/cjs/resources/real-time-decisions.js.map +1 -0
- package/dist/cjs/resources/routing-numbers.d.ts +49 -0
- package/dist/cjs/resources/routing-numbers.js +21 -0
- package/dist/cjs/resources/routing-numbers.js.map +1 -0
- package/dist/cjs/resources/shared.d.ts +15 -0
- package/dist/cjs/resources/shared.js +4 -0
- package/dist/cjs/resources/shared.js.map +1 -0
- package/dist/cjs/resources/simulations/account-statements.d.ts +19 -0
- package/dist/cjs/resources/simulations/account-statements.js +16 -0
- package/dist/cjs/resources/simulations/account-statements.js.map +1 -0
- package/dist/cjs/resources/simulations/account-transfers.d.ts +15 -0
- package/dist/cjs/resources/simulations/account-transfers.js +18 -0
- package/dist/cjs/resources/simulations/account-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/ach-transfers.d.ts +1488 -0
- package/dist/cjs/resources/simulations/ach-transfers.js +39 -0
- package/dist/cjs/resources/simulations/ach-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/card-disputes.d.ts +26 -0
- package/dist/cjs/resources/simulations/card-disputes.js +18 -0
- package/dist/cjs/resources/simulations/card-disputes.js.map +1 -0
- package/dist/cjs/resources/simulations/card-refunds.d.ts +20 -0
- package/dist/cjs/resources/simulations/card-refunds.js +16 -0
- package/dist/cjs/resources/simulations/card-refunds.js.map +1 -0
- package/dist/cjs/resources/simulations/cards.d.ts +793 -0
- package/dist/cjs/resources/simulations/cards.js +31 -0
- package/dist/cjs/resources/simulations/cards.js.map +1 -0
- package/dist/cjs/resources/simulations/check-deposits.d.ts +30 -0
- package/dist/cjs/resources/simulations/check-deposits.js +31 -0
- package/dist/cjs/resources/simulations/check-deposits.js.map +1 -0
- package/dist/cjs/resources/simulations/check-transfers.d.ts +22 -0
- package/dist/cjs/resources/simulations/check-transfers.js +24 -0
- package/dist/cjs/resources/simulations/check-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.d.ts +43 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js +16 -0
- package/dist/cjs/resources/simulations/digital-wallet-token-requests.js.map +1 -0
- package/dist/cjs/resources/simulations/documents.d.ts +18 -0
- package/dist/cjs/resources/simulations/documents.js +15 -0
- package/dist/cjs/resources/simulations/documents.js.map +1 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.d.ts +101 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js +16 -0
- package/dist/cjs/resources/simulations/inbound-wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/simulations/index.d.ts +20 -0
- package/dist/cjs/resources/simulations/index.js +4 -0
- package/dist/cjs/resources/simulations/index.js.map +1 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.d.ts +1431 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js +16 -0
- package/dist/cjs/resources/simulations/real-time-payments-transfers.js.map +1 -0
- package/dist/cjs/resources/simulations/simulations.d.ts +29 -0
- package/dist/cjs/resources/simulations/simulations.js +44 -0
- package/dist/cjs/resources/simulations/simulations.js.map +1 -0
- package/dist/cjs/resources/simulations/wire-transfers.d.ts +1104 -0
- package/dist/cjs/resources/simulations/wire-transfers.js +15 -0
- package/dist/cjs/resources/simulations/wire-transfers.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +1101 -0
- package/dist/cjs/resources/transactions.js +25 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/wire-drawdown-requests.d.ts +148 -0
- package/dist/cjs/resources/wire-drawdown-requests.js +35 -0
- package/dist/cjs/resources/wire-drawdown-requests.js.map +1 -0
- package/dist/cjs/resources/wire-transfers.d.ts +310 -0
- package/dist/cjs/resources/wire-transfers.js +60 -0
- package/dist/cjs/resources/wire-transfers.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.js +104 -0
- package/dist/cjs/tests/api-resources/account-numbers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-statements.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-statements.test.js +101 -0
- package/dist/cjs/tests/api-resources/account-statements.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.js +146 -0
- package/dist/cjs/tests/api-resources/account-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/accounts.test.js +119 -0
- package/dist/cjs/tests/api-resources/accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js +125 -0
- package/dist/cjs/tests/api-resources/ach-prenotifications.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.js +159 -0
- package/dist/cjs/tests/api-resources/ach-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.js +108 -0
- package/dist/cjs/tests/api-resources/card-disputes.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.js +97 -0
- package/dist/cjs/tests/api-resources/card-profiles.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/cards.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/cards.test.js +138 -0
- package/dist/cjs/tests/api-resources/cards.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.js +113 -0
- package/dist/cjs/tests/api-resources/check-deposits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.js +172 -0
- package/dist/cjs/tests/api-resources/check-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.js +105 -0
- package/dist/cjs/tests/api-resources/declined-transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js +103 -0
- package/dist/cjs/tests/api-resources/digital-wallet-tokens.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/documents.test.js +101 -0
- package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.js +280 -0
- package/dist/cjs/tests/api-resources/entities/entities.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js +49 -0
- package/dist/cjs/tests/api-resources/entities/supplemental-documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js +109 -0
- package/dist/cjs/tests/api-resources/event-subscriptions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/events.test.js +101 -0
- package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js +113 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/files.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/files.test.js +117 -0
- package/dist/cjs/tests/api-resources/files.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/groups.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/groups.test.js +54 -0
- package/dist/cjs/tests/api-resources/groups.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js +90 -0
- package/dist/cjs/tests/api-resources/inbound-ach-transfer-returns.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js +83 -0
- package/dist/cjs/tests/api-resources/inbound-wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/limits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/limits.test.js +100 -0
- package/dist/cjs/tests/api-resources/limits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.js +78 -0
- package/dist/cjs/tests/api-resources/oauth-connections.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.js +97 -0
- package/dist/cjs/tests/api-resources/pending-transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js +71 -0
- package/dist/cjs/tests/api-resources/real-time-decisions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.js +55 -0
- package/dist/cjs/tests/api-resources/routing-numbers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/account-statements.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js +60 -0
- package/dist/cjs/tests/api-resources/simulations/account-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js +92 -0
- package/dist/cjs/tests/api-resources/simulations/ach-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js +56 -0
- package/dist/cjs/tests/api-resources/simulations/card-disputes.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/card-refunds.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.js +70 -0
- package/dist/cjs/tests/api-resources/simulations/cards.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js +86 -0
- package/dist/cjs/tests/api-resources/simulations/check-deposits.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js +73 -0
- package/dist/cjs/tests/api-resources/simulations/check-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/digital-wallet-token-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.js +49 -0
- package/dist/cjs/tests/api-resources/simulations/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js +81 -0
- package/dist/cjs/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js +62 -0
- package/dist/cjs/tests/api-resources/simulations/real-time-payments-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js +70 -0
- package/dist/cjs/tests/api-resources/simulations/wire-transfers.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.js +109 -0
- package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js +110 -0
- package/dist/cjs/tests/api-resources/wire-drawdown-requests.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.js +184 -0
- package/dist/cjs/tests/api-resources/wire-transfers.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +1 -0
- package/dist/cjs/tests/form.test.js +60 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +1 -0
- package/dist/cjs/tests/index.test.js +44 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +1 -0
- package/dist/cjs/tests/responses.test.js +59 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/version.js.map +1 -0
- package/fetch-polyfill.ts +69 -0
- package/index.ts +276 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +58 -0
- package/resource.ts +24 -0
- package/resources/account-numbers.ts +141 -0
- package/resources/account-statements.ts +132 -0
- package/resources/account-transfers.ts +244 -0
- package/resources/accounts.ts +179 -0
- package/resources/ach-prenotifications.ts +242 -0
- package/resources/ach-transfers.ts +465 -0
- package/resources/card-disputes.ts +187 -0
- package/resources/card-profiles.ts +236 -0
- package/resources/cards.ts +398 -0
- package/resources/check-deposits.ts +303 -0
- package/resources/check-transfers.ts +422 -0
- package/resources/declined-transactions.ts +547 -0
- package/resources/digital-wallet-tokens.ts +115 -0
- package/resources/documents.ts +119 -0
- package/resources/entities/entities.ts +1668 -0
- package/resources/entities/index.ts +4 -0
- package/resources/entities/supplemental-documents.ts +25 -0
- package/resources/event-subscriptions.ts +232 -0
- package/resources/events.ts +215 -0
- package/resources/external-accounts.ts +162 -0
- package/resources/files.ts +188 -0
- package/resources/groups.ts +47 -0
- package/resources/inbound-ach-transfer-returns.ts +142 -0
- package/resources/inbound-wire-drawdown-requests.ts +168 -0
- package/resources/index.ts +165 -0
- package/resources/limits.ts +144 -0
- package/resources/oauth-connections.ts +74 -0
- package/resources/pending-transactions.ts +491 -0
- package/resources/real-time-decisions.ts +345 -0
- package/resources/routing-numbers.ts +62 -0
- package/resources/shared.ts +17 -0
- package/resources/simulations/account-statements.ts +25 -0
- package/resources/simulations/account-transfers.ts +20 -0
- package/resources/simulations/ach-transfers.ts +1873 -0
- package/resources/simulations/card-disputes.ts +33 -0
- package/resources/simulations/card-refunds.ts +26 -0
- package/resources/simulations/cards.ts +979 -0
- package/resources/simulations/check-deposits.ts +41 -0
- package/resources/simulations/check-transfers.ts +30 -0
- package/resources/simulations/digital-wallet-token-requests.ts +52 -0
- package/resources/simulations/documents.ts +24 -0
- package/resources/simulations/inbound-wire-drawdown-requests.ts +126 -0
- package/resources/simulations/index.ts +22 -0
- package/resources/simulations/real-time-payments-transfers.ts +1809 -0
- package/resources/simulations/simulations.ts +32 -0
- package/resources/simulations/wire-transfers.ts +1391 -0
- package/resources/transactions.ts +1393 -0
- package/resources/wire-drawdown-requests.ts +195 -0
- package/resources/wire-transfers.ts +399 -0
- package/tests/api-resources/account-numbers.test.ts +67 -0
- package/tests/api-resources/account-statements.test.ts +64 -0
- package/tests/api-resources/account-transfers.test.ts +109 -0
- package/tests/api-resources/accounts.test.ts +82 -0
- package/tests/api-resources/ach-prenotifications.test.ts +86 -0
- package/tests/api-resources/ach-transfers.test.ts +120 -0
- package/tests/api-resources/card-disputes.test.ts +71 -0
- package/tests/api-resources/card-profiles.test.ts +60 -0
- package/tests/api-resources/cards.test.ts +101 -0
- package/tests/api-resources/check-deposits.test.ts +74 -0
- package/tests/api-resources/check-transfers.test.ts +135 -0
- package/tests/api-resources/declined-transactions.test.ts +68 -0
- package/tests/api-resources/digital-wallet-tokens.test.ts +64 -0
- package/tests/api-resources/documents.test.ts +64 -0
- package/tests/api-resources/entities/entities.test.ts +243 -0
- package/tests/api-resources/entities/supplemental-documents.test.ts +12 -0
- package/tests/api-resources/event-subscriptions.test.ts +69 -0
- package/tests/api-resources/events.test.ts +64 -0
- package/tests/api-resources/external-accounts.test.ts +76 -0
- package/tests/api-resources/files.test.ts +81 -0
- package/tests/api-resources/groups.test.ts +17 -0
- package/tests/api-resources/inbound-ach-transfer-returns.test.ts +53 -0
- package/tests/api-resources/inbound-wire-drawdown-requests.test.ts +46 -0
- package/tests/api-resources/limits.test.ts +63 -0
- package/tests/api-resources/oauth-connections.test.ts +41 -0
- package/tests/api-resources/pending-transactions.test.ts +58 -0
- package/tests/api-resources/real-time-decisions.test.ts +34 -0
- package/tests/api-resources/routing-numbers.test.ts +18 -0
- package/tests/api-resources/simulations/account-statements.test.ts +12 -0
- package/tests/api-resources/simulations/account-transfers.test.ts +23 -0
- package/tests/api-resources/simulations/ach-transfers.test.ts +52 -0
- package/tests/api-resources/simulations/card-disputes.test.ts +19 -0
- package/tests/api-resources/simulations/card-refunds.test.ts +12 -0
- package/tests/api-resources/simulations/cards.test.ts +33 -0
- package/tests/api-resources/simulations/check-deposits.test.ts +49 -0
- package/tests/api-resources/simulations/check-transfers.test.ts +34 -0
- package/tests/api-resources/simulations/digital-wallet-token-requests.test.ts +12 -0
- package/tests/api-resources/simulations/documents.test.ts +12 -0
- package/tests/api-resources/simulations/inbound-wire-drawdown-requests.test.ts +44 -0
- package/tests/api-resources/simulations/real-time-payments-transfers.test.ts +25 -0
- package/tests/api-resources/simulations/wire-transfers.test.ts +33 -0
- package/tests/api-resources/transactions.test.ts +70 -0
- package/tests/api-resources/wire-drawdown-requests.test.ts +73 -0
- package/tests/api-resources/wire-transfers.test.ts +147 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +47 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +37 -0
- package/typings/digest-fetch/index.d.ts +33 -0
- package/version.ts +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import { isRequestOptions } from '~/core';
|
|
6
|
+
import { Page, PageParams } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class AccountStatements extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve an Account Statement
|
|
11
|
+
*/
|
|
12
|
+
retrieve(
|
|
13
|
+
accountStatementId: string,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Promise<Core.APIResponse<AccountStatement>> {
|
|
16
|
+
return this.get(`/account_statements/${accountStatementId}`, options);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* List Account Statements
|
|
21
|
+
*/
|
|
22
|
+
list(
|
|
23
|
+
query?: AccountStatementListParams,
|
|
24
|
+
options?: Core.RequestOptions,
|
|
25
|
+
): Core.PagePromise<AccountStatementsPage>;
|
|
26
|
+
list(options?: Core.RequestOptions): Core.PagePromise<AccountStatementsPage>;
|
|
27
|
+
list(
|
|
28
|
+
query: AccountStatementListParams | Core.RequestOptions = {},
|
|
29
|
+
options?: Core.RequestOptions,
|
|
30
|
+
): Core.PagePromise<AccountStatementsPage> {
|
|
31
|
+
if (isRequestOptions(query)) {
|
|
32
|
+
return this.list({}, query);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return this.getAPIList('/account_statements', AccountStatementsPage, { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class AccountStatementsPage extends Page<AccountStatement> {}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Account Statements are generated monthly for every active Account. You can
|
|
43
|
+
* access the statement's data via the API or retrieve a PDF with its details via
|
|
44
|
+
* its associated File.
|
|
45
|
+
*/
|
|
46
|
+
export interface AccountStatement {
|
|
47
|
+
/**
|
|
48
|
+
* The identifier for the Account this Account Statement belongs to.
|
|
49
|
+
*/
|
|
50
|
+
account_id: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Account
|
|
54
|
+
* Statement was created.
|
|
55
|
+
*/
|
|
56
|
+
created_at: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The Account's balance at the start of its statement period.
|
|
60
|
+
*/
|
|
61
|
+
ending_balance: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The identifier of the File containing a PDF of the statement.
|
|
65
|
+
*/
|
|
66
|
+
file_id: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Account Statement identifier.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The Account's balance at the start of its statement period.
|
|
75
|
+
*/
|
|
76
|
+
starting_balance: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
|
|
80
|
+
* of the period the Account Statement covers.
|
|
81
|
+
*/
|
|
82
|
+
statement_period_end: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
|
|
86
|
+
* start of the period the Account Statement covers.
|
|
87
|
+
*/
|
|
88
|
+
statement_period_start: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A constant representing the object's type. For this resource it will always be
|
|
92
|
+
* `account_statement`.
|
|
93
|
+
*/
|
|
94
|
+
type: 'account_statement';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface AccountStatementListParams extends PageParams {
|
|
98
|
+
/**
|
|
99
|
+
* Filter Account Statements to those belonging to the specified Account.
|
|
100
|
+
*/
|
|
101
|
+
account_id?: string;
|
|
102
|
+
|
|
103
|
+
statement_period_start?: AccountStatementListParams.StatementPeriodStart;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export namespace AccountStatementListParams {
|
|
107
|
+
export interface StatementPeriodStart {
|
|
108
|
+
/**
|
|
109
|
+
* Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
110
|
+
* timestamp.
|
|
111
|
+
*/
|
|
112
|
+
after?: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
116
|
+
* timestamp.
|
|
117
|
+
*/
|
|
118
|
+
before?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Return results on or after this
|
|
122
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
|
|
123
|
+
*/
|
|
124
|
+
on_or_after?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Return results on or before this
|
|
128
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
|
|
129
|
+
*/
|
|
130
|
+
on_or_before?: string;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import { isRequestOptions } from '~/core';
|
|
6
|
+
import { Page, PageParams } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class AccountTransfers extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create an Account Transfer
|
|
11
|
+
*/
|
|
12
|
+
create(
|
|
13
|
+
body: AccountTransferCreateParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Promise<Core.APIResponse<AccountTransfer>> {
|
|
16
|
+
return this.post('/account_transfers', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve an Account Transfer
|
|
21
|
+
*/
|
|
22
|
+
retrieve(
|
|
23
|
+
accountTransferId: string,
|
|
24
|
+
options?: Core.RequestOptions,
|
|
25
|
+
): Promise<Core.APIResponse<AccountTransfer>> {
|
|
26
|
+
return this.get(`/account_transfers/${accountTransferId}`, options);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List Account Transfers
|
|
31
|
+
*/
|
|
32
|
+
list(
|
|
33
|
+
query?: AccountTransferListParams,
|
|
34
|
+
options?: Core.RequestOptions,
|
|
35
|
+
): Core.PagePromise<AccountTransfersPage>;
|
|
36
|
+
list(options?: Core.RequestOptions): Core.PagePromise<AccountTransfersPage>;
|
|
37
|
+
list(
|
|
38
|
+
query: AccountTransferListParams | Core.RequestOptions = {},
|
|
39
|
+
options?: Core.RequestOptions,
|
|
40
|
+
): Core.PagePromise<AccountTransfersPage> {
|
|
41
|
+
if (isRequestOptions(query)) {
|
|
42
|
+
return this.list({}, query);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return this.getAPIList('/account_transfers', AccountTransfersPage, { query, ...options });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Approve an Account Transfer
|
|
50
|
+
*/
|
|
51
|
+
approve(
|
|
52
|
+
accountTransferId: string,
|
|
53
|
+
options?: Core.RequestOptions,
|
|
54
|
+
): Promise<Core.APIResponse<AccountTransfer>> {
|
|
55
|
+
return this.post(`/account_transfers/${accountTransferId}/approve`, options);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Cancel an Account Transfer
|
|
60
|
+
*/
|
|
61
|
+
cancel(
|
|
62
|
+
accountTransferId: string,
|
|
63
|
+
options?: Core.RequestOptions,
|
|
64
|
+
): Promise<Core.APIResponse<AccountTransfer>> {
|
|
65
|
+
return this.post(`/account_transfers/${accountTransferId}/cancel`, options);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export class AccountTransfersPage extends Page<AccountTransfer> {}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Account transfers move funds between your own accounts at Increase.
|
|
73
|
+
*/
|
|
74
|
+
export interface AccountTransfer {
|
|
75
|
+
/**
|
|
76
|
+
* The Account to which the transfer belongs.
|
|
77
|
+
*/
|
|
78
|
+
account_id: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The transfer amount in the minor unit of the destination account currency. For
|
|
82
|
+
* dollars, for example, this is cents.
|
|
83
|
+
*/
|
|
84
|
+
amount: number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* If your account requires approvals for transfers and the transfer was approved,
|
|
88
|
+
* this will contain details of the approval.
|
|
89
|
+
*/
|
|
90
|
+
approval: AccountTransfer.Approval | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* If your account requires approvals for transfers and the transfer was not
|
|
94
|
+
* approved, this will contain details of the cancellation.
|
|
95
|
+
*/
|
|
96
|
+
cancellation: AccountTransfer.Cancellation | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
|
|
100
|
+
* the transfer was created.
|
|
101
|
+
*/
|
|
102
|
+
created_at: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination
|
|
106
|
+
* account currency.
|
|
107
|
+
*/
|
|
108
|
+
currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The description that will show on the transactions.
|
|
112
|
+
*/
|
|
113
|
+
description: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The destination account's identifier.
|
|
117
|
+
*/
|
|
118
|
+
destination_account_id: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The ID for the transaction receiving the transfer.
|
|
122
|
+
*/
|
|
123
|
+
destination_transaction_id: string | null;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The account transfer's identifier.
|
|
127
|
+
*/
|
|
128
|
+
id: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The transfer's network.
|
|
132
|
+
*/
|
|
133
|
+
network: 'account';
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The lifecycle status of the transfer.
|
|
137
|
+
*/
|
|
138
|
+
status:
|
|
139
|
+
| 'pending_submission'
|
|
140
|
+
| 'pending_approval'
|
|
141
|
+
| 'canceled'
|
|
142
|
+
| 'requires_attention'
|
|
143
|
+
| 'flagged_by_operator'
|
|
144
|
+
| 'complete';
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* If the transfer was created from a template, this will be the template's ID.
|
|
148
|
+
*/
|
|
149
|
+
template_id: string | null;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The ID for the transaction funding the transfer.
|
|
153
|
+
*/
|
|
154
|
+
transaction_id: string | null;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* A constant representing the object's type. For this resource it will always be
|
|
158
|
+
* `account_transfer`.
|
|
159
|
+
*/
|
|
160
|
+
type: 'account_transfer';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export namespace AccountTransfer {
|
|
164
|
+
export interface Approval {
|
|
165
|
+
/**
|
|
166
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
|
|
167
|
+
* the transfer was approved.
|
|
168
|
+
*/
|
|
169
|
+
approved_at: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface Cancellation {
|
|
173
|
+
/**
|
|
174
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
|
|
175
|
+
* the Transfer was canceled.
|
|
176
|
+
*/
|
|
177
|
+
canceled_at: string;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface AccountTransferCreateParams {
|
|
182
|
+
/**
|
|
183
|
+
* The identifier for the account that will send the transfer.
|
|
184
|
+
*/
|
|
185
|
+
account_id: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The transfer amount in the minor unit of the account currency. For dollars, for
|
|
189
|
+
* example, this is cents.
|
|
190
|
+
*/
|
|
191
|
+
amount: number;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The description you choose to give the transfer.
|
|
195
|
+
*/
|
|
196
|
+
description: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The identifier for the account that will receive the transfer.
|
|
200
|
+
*/
|
|
201
|
+
destination_account_id: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Whether the transfer requires explicit approval via the dashboard or API.
|
|
205
|
+
*/
|
|
206
|
+
require_approval?: boolean;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface AccountTransferListParams extends PageParams {
|
|
210
|
+
/**
|
|
211
|
+
* Filter Account Transfers to those that originated from the specified Account.
|
|
212
|
+
*/
|
|
213
|
+
account_id?: string;
|
|
214
|
+
|
|
215
|
+
created_at?: AccountTransferListParams.CreatedAt;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export namespace AccountTransferListParams {
|
|
219
|
+
export interface CreatedAt {
|
|
220
|
+
/**
|
|
221
|
+
* Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
222
|
+
* timestamp.
|
|
223
|
+
*/
|
|
224
|
+
after?: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
|
|
228
|
+
* timestamp.
|
|
229
|
+
*/
|
|
230
|
+
before?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Return results on or after this
|
|
234
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
|
|
235
|
+
*/
|
|
236
|
+
on_or_after?: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Return results on or before this
|
|
240
|
+
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
|
|
241
|
+
*/
|
|
242
|
+
on_or_before?: string;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import { isRequestOptions } from '~/core';
|
|
6
|
+
import { Page, PageParams } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class Accounts extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create an Account
|
|
11
|
+
*/
|
|
12
|
+
create(body: AccountCreateParams, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
|
|
13
|
+
return this.post('/accounts', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve an Account
|
|
18
|
+
*/
|
|
19
|
+
retrieve(accountId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
|
|
20
|
+
return this.get(`/accounts/${accountId}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Update an Account
|
|
25
|
+
*/
|
|
26
|
+
update(
|
|
27
|
+
accountId: string,
|
|
28
|
+
body: AccountUpdateParams,
|
|
29
|
+
options?: Core.RequestOptions,
|
|
30
|
+
): Promise<Core.APIResponse<Account>> {
|
|
31
|
+
return this.patch(`/accounts/${accountId}`, { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* List Accounts
|
|
36
|
+
*/
|
|
37
|
+
list(query?: AccountListParams, options?: Core.RequestOptions): Core.PagePromise<AccountsPage>;
|
|
38
|
+
list(options?: Core.RequestOptions): Core.PagePromise<AccountsPage>;
|
|
39
|
+
list(
|
|
40
|
+
query: AccountListParams | Core.RequestOptions = {},
|
|
41
|
+
options?: Core.RequestOptions,
|
|
42
|
+
): Core.PagePromise<AccountsPage> {
|
|
43
|
+
if (isRequestOptions(query)) {
|
|
44
|
+
return this.list({}, query);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return this.getAPIList('/accounts', AccountsPage, { query, ...options });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Close an Account
|
|
52
|
+
*/
|
|
53
|
+
close(accountId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
|
|
54
|
+
return this.post(`/accounts/${accountId}/close`, options);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export class AccountsPage extends Page<Account> {}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Accounts are your bank accounts with Increase. They store money, receive
|
|
62
|
+
* transfers, and send payments. They earn interest and have depository insurance.
|
|
63
|
+
*/
|
|
64
|
+
export interface Account {
|
|
65
|
+
/**
|
|
66
|
+
* The Account's balances in the minor unit of its currency. For dollars, for
|
|
67
|
+
* example, these values will represent cents.
|
|
68
|
+
*/
|
|
69
|
+
balances: Account.Balances;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Account
|
|
73
|
+
* was created.
|
|
74
|
+
*/
|
|
75
|
+
created_at: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Account
|
|
79
|
+
* currency.
|
|
80
|
+
*/
|
|
81
|
+
currency: 'CAD' | 'CHF' | 'EUR' | 'GBP' | 'JPY' | 'USD';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The identifier for the Entity the Account belongs to.
|
|
85
|
+
*/
|
|
86
|
+
entity_id: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The Account identifier.
|
|
90
|
+
*/
|
|
91
|
+
id: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The identifier of an Entity that, while not owning the Account, is associated
|
|
95
|
+
* with its activity.
|
|
96
|
+
*/
|
|
97
|
+
informational_entity_id: string | null;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The interest accrued but not yet paid, expressed as a string containing a
|
|
101
|
+
* floating-point value.
|
|
102
|
+
*/
|
|
103
|
+
interest_accrued: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The latest [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which
|
|
107
|
+
* interest was accrued.
|
|
108
|
+
*/
|
|
109
|
+
interest_accrued_at: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The name you choose for the Account.
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The status of the Account.
|
|
118
|
+
*/
|
|
119
|
+
status: 'open' | 'closed';
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* A constant representing the object's type. For this resource it will always be
|
|
123
|
+
* `account`.
|
|
124
|
+
*/
|
|
125
|
+
type: 'account';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export namespace Account {
|
|
129
|
+
export interface Balances {
|
|
130
|
+
/**
|
|
131
|
+
* The Account's available balance, representing the current balance less any open
|
|
132
|
+
* Pending Transactions on the Account.
|
|
133
|
+
*/
|
|
134
|
+
available_balance: number;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The Account's current balance, representing the sum of all posted Transactions
|
|
138
|
+
* on the Account.
|
|
139
|
+
*/
|
|
140
|
+
current_balance: number;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface AccountCreateParams {
|
|
145
|
+
/**
|
|
146
|
+
* The name you choose for the Account.
|
|
147
|
+
*/
|
|
148
|
+
name: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The identifier for the Entity that will own the Account.
|
|
152
|
+
*/
|
|
153
|
+
entity_id?: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The identifier of an Entity that, while not owning the Account, is associated
|
|
157
|
+
* with its activity. Its relationship to your group must be `informational`.
|
|
158
|
+
*/
|
|
159
|
+
informational_entity_id?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface AccountUpdateParams {
|
|
163
|
+
/**
|
|
164
|
+
* The new name of the Account.
|
|
165
|
+
*/
|
|
166
|
+
name?: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface AccountListParams extends PageParams {
|
|
170
|
+
/**
|
|
171
|
+
* Filter Accounts for those belonging to the specified Entity.
|
|
172
|
+
*/
|
|
173
|
+
entity_id?: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Filter Accounts for those with the specified status.
|
|
177
|
+
*/
|
|
178
|
+
status?: 'open' | 'closed';
|
|
179
|
+
}
|