increase 0.8.0 → 0.9.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.
Files changed (336) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +37 -13
  3. package/_shims/ReadableStream.d.ts +38 -0
  4. package/_shims/ReadableStream.js +5 -0
  5. package/_shims/ReadableStream.mjs +7 -0
  6. package/_shims/ReadableStream.node.d.ts +6 -0
  7. package/_shims/ReadableStream.node.d.ts.map +1 -0
  8. package/_shims/ReadableStream.node.js +14 -0
  9. package/_shims/ReadableStream.node.js.map +1 -0
  10. package/_shims/ReadableStream.node.mjs +3 -0
  11. package/_shims/ReadableStream.node.mjs.map +1 -0
  12. package/_shims/fetch.d.ts +8 -1
  13. package/_shims/fetch.node.d.ts +11 -1
  14. package/core.d.ts +85 -27
  15. package/core.d.ts.map +1 -1
  16. package/core.js +208 -51
  17. package/core.js.map +1 -1
  18. package/core.mjs +194 -51
  19. package/core.mjs.map +1 -1
  20. package/error.d.ts +1 -0
  21. package/error.d.ts.map +1 -1
  22. package/error.js +12 -3
  23. package/error.js.map +1 -1
  24. package/error.mjs +12 -3
  25. package/error.mjs.map +1 -1
  26. package/index.d.mts +6 -1
  27. package/index.d.ts +6 -1
  28. package/index.d.ts.map +1 -1
  29. package/index.js +11 -8
  30. package/index.js.map +1 -1
  31. package/index.mjs +11 -8
  32. package/index.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/pagination.d.ts +2 -2
  35. package/pagination.d.ts.map +1 -1
  36. package/pagination.js +4 -4
  37. package/pagination.js.map +1 -1
  38. package/pagination.mjs +4 -4
  39. package/pagination.mjs.map +1 -1
  40. package/resources/account-numbers.d.ts +8 -8
  41. package/resources/account-numbers.d.ts.map +1 -1
  42. package/resources/account-numbers.js.map +1 -1
  43. package/resources/account-numbers.mjs.map +1 -1
  44. package/resources/account-statements.d.ts +3 -6
  45. package/resources/account-statements.d.ts.map +1 -1
  46. package/resources/account-statements.js.map +1 -1
  47. package/resources/account-statements.mjs.map +1 -1
  48. package/resources/account-transfers.d.ts +6 -18
  49. package/resources/account-transfers.d.ts.map +1 -1
  50. package/resources/account-transfers.js.map +1 -1
  51. package/resources/account-transfers.mjs.map +1 -1
  52. package/resources/accounts.d.ts +6 -6
  53. package/resources/accounts.d.ts.map +1 -1
  54. package/resources/ach-prenotifications.d.ts +51 -7
  55. package/resources/ach-prenotifications.d.ts.map +1 -1
  56. package/resources/ach-prenotifications.js.map +1 -1
  57. package/resources/ach-prenotifications.mjs.map +1 -1
  58. package/resources/ach-transfers.d.ts +16 -9
  59. package/resources/ach-transfers.d.ts.map +1 -1
  60. package/resources/ach-transfers.js.map +1 -1
  61. package/resources/ach-transfers.mjs.map +1 -1
  62. package/resources/balance-lookups.d.ts +1 -1
  63. package/resources/balance-lookups.d.ts.map +1 -1
  64. package/resources/bookkeeping-accounts.d.ts +3 -3
  65. package/resources/bookkeeping-accounts.d.ts.map +1 -1
  66. package/resources/bookkeeping-entries.d.ts +2 -2
  67. package/resources/bookkeeping-entries.d.ts.map +1 -1
  68. package/resources/bookkeeping-entry-sets.d.ts +1 -1
  69. package/resources/bookkeeping-entry-sets.d.ts.map +1 -1
  70. package/resources/card-disputes.d.ts +7 -7
  71. package/resources/card-disputes.d.ts.map +1 -1
  72. package/resources/card-disputes.js.map +1 -1
  73. package/resources/card-disputes.mjs.map +1 -1
  74. package/resources/card-profiles.d.ts +32 -11
  75. package/resources/card-profiles.d.ts.map +1 -1
  76. package/resources/card-profiles.js +6 -0
  77. package/resources/card-profiles.js.map +1 -1
  78. package/resources/card-profiles.mjs +6 -0
  79. package/resources/card-profiles.mjs.map +1 -1
  80. package/resources/card-purchase-supplements.d.ts +270 -0
  81. package/resources/card-purchase-supplements.d.ts.map +1 -0
  82. package/resources/card-purchase-supplements.js +28 -0
  83. package/resources/card-purchase-supplements.js.map +1 -0
  84. package/resources/card-purchase-supplements.mjs +21 -0
  85. package/resources/card-purchase-supplements.mjs.map +1 -0
  86. package/resources/cards.d.ts +6 -13
  87. package/resources/cards.d.ts.map +1 -1
  88. package/resources/cards.js.map +1 -1
  89. package/resources/cards.mjs.map +1 -1
  90. package/resources/check-deposits.d.ts +7 -7
  91. package/resources/check-deposits.d.ts.map +1 -1
  92. package/resources/check-deposits.js.map +1 -1
  93. package/resources/check-deposits.mjs.map +1 -1
  94. package/resources/check-transfers.d.ts +18 -11
  95. package/resources/check-transfers.d.ts.map +1 -1
  96. package/resources/check-transfers.js.map +1 -1
  97. package/resources/check-transfers.mjs.map +1 -1
  98. package/resources/declined-transactions.d.ts +25 -28
  99. package/resources/declined-transactions.d.ts.map +1 -1
  100. package/resources/declined-transactions.js.map +1 -1
  101. package/resources/declined-transactions.mjs.map +1 -1
  102. package/resources/digital-wallet-tokens.d.ts +3 -6
  103. package/resources/digital-wallet-tokens.d.ts.map +1 -1
  104. package/resources/digital-wallet-tokens.js.map +1 -1
  105. package/resources/digital-wallet-tokens.mjs.map +1 -1
  106. package/resources/documents.d.ts +3 -3
  107. package/resources/documents.d.ts.map +1 -1
  108. package/resources/entities/beneficial-owners.d.ts +215 -0
  109. package/resources/entities/beneficial-owners.d.ts.map +1 -0
  110. package/resources/entities/beneficial-owners.js +18 -0
  111. package/resources/entities/beneficial-owners.js.map +1 -0
  112. package/resources/entities/beneficial-owners.mjs +12 -0
  113. package/resources/entities/beneficial-owners.mjs.map +1 -0
  114. package/resources/entities/entities.d.ts +15 -11
  115. package/resources/entities/entities.d.ts.map +1 -1
  116. package/resources/entities/entities.js +9 -0
  117. package/resources/entities/entities.js.map +1 -1
  118. package/resources/entities/entities.mjs +9 -0
  119. package/resources/entities/entities.mjs.map +1 -1
  120. package/resources/entities/index.d.ts +1 -0
  121. package/resources/entities/index.d.ts.map +1 -1
  122. package/resources/entities/index.js +8 -0
  123. package/resources/entities/index.js.map +1 -1
  124. package/resources/entities/index.mjs +1 -0
  125. package/resources/entities/index.mjs.map +1 -1
  126. package/resources/entities/supplemental-documents.d.ts +2 -2
  127. package/resources/entities/supplemental-documents.d.ts.map +1 -1
  128. package/resources/event-subscriptions.d.ts +5 -8
  129. package/resources/event-subscriptions.d.ts.map +1 -1
  130. package/resources/event-subscriptions.js.map +1 -1
  131. package/resources/event-subscriptions.mjs.map +1 -1
  132. package/resources/events.d.ts +7 -5
  133. package/resources/events.d.ts.map +1 -1
  134. package/resources/events.js.map +1 -1
  135. package/resources/events.mjs.map +1 -1
  136. package/resources/exports.d.ts +4 -4
  137. package/resources/exports.d.ts.map +1 -1
  138. package/resources/external-accounts.d.ts +5 -11
  139. package/resources/external-accounts.d.ts.map +1 -1
  140. package/resources/external-accounts.js.map +1 -1
  141. package/resources/external-accounts.mjs.map +1 -1
  142. package/resources/files.d.ts +9 -4
  143. package/resources/files.d.ts.map +1 -1
  144. package/resources/files.js +2 -2
  145. package/resources/files.js.map +1 -1
  146. package/resources/files.mjs +2 -2
  147. package/resources/files.mjs.map +1 -1
  148. package/resources/groups.d.ts +1 -1
  149. package/resources/groups.d.ts.map +1 -1
  150. package/resources/inbound-ach-transfer-returns.d.ts +6 -4
  151. package/resources/inbound-ach-transfer-returns.d.ts.map +1 -1
  152. package/resources/inbound-ach-transfer-returns.js.map +1 -1
  153. package/resources/inbound-ach-transfer-returns.mjs.map +1 -1
  154. package/resources/inbound-wire-drawdown-requests.d.ts +5 -3
  155. package/resources/inbound-wire-drawdown-requests.d.ts.map +1 -1
  156. package/resources/inbound-wire-drawdown-requests.js.map +1 -1
  157. package/resources/inbound-wire-drawdown-requests.mjs.map +1 -1
  158. package/resources/index.d.ts +6 -0
  159. package/resources/index.d.ts.map +1 -1
  160. package/resources/index.js +18 -3
  161. package/resources/index.js.map +1 -1
  162. package/resources/index.mjs +1 -0
  163. package/resources/index.mjs.map +1 -1
  164. package/resources/limits.d.ts +5 -9
  165. package/resources/limits.d.ts.map +1 -1
  166. package/resources/limits.js.map +1 -1
  167. package/resources/limits.mjs.map +1 -1
  168. package/resources/oauth-connections.d.ts +3 -6
  169. package/resources/oauth-connections.d.ts.map +1 -1
  170. package/resources/oauth-connections.js.map +1 -1
  171. package/resources/oauth-connections.mjs.map +1 -1
  172. package/resources/pending-transactions.d.ts +32 -37
  173. package/resources/pending-transactions.d.ts.map +1 -1
  174. package/resources/pending-transactions.js.map +1 -1
  175. package/resources/pending-transactions.mjs.map +1 -1
  176. package/resources/programs.d.ts +3 -3
  177. package/resources/programs.d.ts.map +1 -1
  178. package/resources/real-time-decisions.d.ts +2 -5
  179. package/resources/real-time-decisions.d.ts.map +1 -1
  180. package/resources/real-time-decisions.js.map +1 -1
  181. package/resources/real-time-decisions.mjs.map +1 -1
  182. package/resources/real-time-payments-transfers.d.ts +6 -4
  183. package/resources/real-time-payments-transfers.d.ts.map +1 -1
  184. package/resources/real-time-payments-transfers.js.map +1 -1
  185. package/resources/real-time-payments-transfers.mjs.map +1 -1
  186. package/resources/routing-numbers.d.ts +4 -1
  187. package/resources/routing-numbers.d.ts.map +1 -1
  188. package/resources/routing-numbers.js.map +1 -1
  189. package/resources/routing-numbers.mjs.map +1 -1
  190. package/resources/simulations/account-statements.d.ts +1 -1
  191. package/resources/simulations/account-statements.d.ts.map +1 -1
  192. package/resources/simulations/account-transfers.d.ts +1 -1
  193. package/resources/simulations/account-transfers.d.ts.map +1 -1
  194. package/resources/simulations/ach-transfers.d.ts +1063 -157
  195. package/resources/simulations/ach-transfers.d.ts.map +1 -1
  196. package/resources/simulations/ach-transfers.js.map +1 -1
  197. package/resources/simulations/ach-transfers.mjs.map +1 -1
  198. package/resources/simulations/card-disputes.d.ts +1 -1
  199. package/resources/simulations/card-disputes.d.ts.map +1 -1
  200. package/resources/simulations/card-profiles.d.ts +1 -4
  201. package/resources/simulations/card-profiles.d.ts.map +1 -1
  202. package/resources/simulations/card-profiles.js.map +1 -1
  203. package/resources/simulations/card-profiles.mjs.map +1 -1
  204. package/resources/simulations/card-refunds.d.ts +1 -1
  205. package/resources/simulations/card-refunds.d.ts.map +1 -1
  206. package/resources/simulations/cards.d.ts +53 -58
  207. package/resources/simulations/cards.d.ts.map +1 -1
  208. package/resources/simulations/cards.js.map +1 -1
  209. package/resources/simulations/cards.mjs.map +1 -1
  210. package/resources/simulations/check-deposits.d.ts +3 -12
  211. package/resources/simulations/check-deposits.d.ts.map +1 -1
  212. package/resources/simulations/check-transfers.d.ts +2 -2
  213. package/resources/simulations/check-transfers.d.ts.map +1 -1
  214. package/resources/simulations/digital-wallet-token-requests.d.ts +1 -1
  215. package/resources/simulations/digital-wallet-token-requests.d.ts.map +1 -1
  216. package/resources/simulations/documents.d.ts +1 -4
  217. package/resources/simulations/documents.d.ts.map +1 -1
  218. package/resources/simulations/documents.js.map +1 -1
  219. package/resources/simulations/documents.mjs.map +1 -1
  220. package/resources/simulations/inbound-funds-holds.d.ts +5 -1
  221. package/resources/simulations/inbound-funds-holds.d.ts.map +1 -1
  222. package/resources/simulations/inbound-funds-holds.js.map +1 -1
  223. package/resources/simulations/inbound-funds-holds.mjs.map +1 -1
  224. package/resources/simulations/inbound-wire-drawdown-requests.d.ts +1 -1
  225. package/resources/simulations/inbound-wire-drawdown-requests.d.ts.map +1 -1
  226. package/resources/simulations/interest-payments.d.ts +1047 -127
  227. package/resources/simulations/interest-payments.d.ts.map +1 -1
  228. package/resources/simulations/interest-payments.js.map +1 -1
  229. package/resources/simulations/interest-payments.mjs.map +1 -1
  230. package/resources/simulations/programs.d.ts +1 -4
  231. package/resources/simulations/programs.d.ts.map +1 -1
  232. package/resources/simulations/programs.js.map +1 -1
  233. package/resources/simulations/programs.mjs.map +1 -1
  234. package/resources/simulations/real-time-payments-transfers.d.ts +1062 -153
  235. package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -1
  236. package/resources/simulations/real-time-payments-transfers.js.map +1 -1
  237. package/resources/simulations/real-time-payments-transfers.mjs.map +1 -1
  238. package/resources/simulations/simulations.d.ts.map +1 -1
  239. package/resources/simulations/simulations.js.map +1 -1
  240. package/resources/simulations/wire-transfers.d.ts +1039 -127
  241. package/resources/simulations/wire-transfers.d.ts.map +1 -1
  242. package/resources/simulations/wire-transfers.js.map +1 -1
  243. package/resources/simulations/wire-transfers.mjs.map +1 -1
  244. package/resources/transactions.d.ts +1044 -130
  245. package/resources/transactions.d.ts.map +1 -1
  246. package/resources/transactions.js.map +1 -1
  247. package/resources/transactions.mjs.map +1 -1
  248. package/resources/wire-drawdown-requests.d.ts +4 -4
  249. package/resources/wire-drawdown-requests.d.ts.map +1 -1
  250. package/resources/wire-transfers.d.ts +11 -11
  251. package/resources/wire-transfers.d.ts.map +1 -1
  252. package/resources/wire-transfers.js.map +1 -1
  253. package/resources/wire-transfers.mjs.map +1 -1
  254. package/src/_shims/ReadableStream.d.ts +38 -0
  255. package/src/_shims/ReadableStream.js +5 -0
  256. package/src/_shims/ReadableStream.mjs +7 -0
  257. package/src/_shims/ReadableStream.node.ts +6 -0
  258. package/src/_shims/fetch.d.ts +8 -1
  259. package/src/_shims/fetch.deno.ts +23 -0
  260. package/src/_shims/fetch.node.d.ts +11 -1
  261. package/src/_shims/formdata.deno.ts +16 -0
  262. package/src/core.ts +270 -74
  263. package/src/error.ts +11 -1
  264. package/src/index.ts +16 -9
  265. package/src/pagination.ts +5 -5
  266. package/src/resources/account-numbers.ts +10 -10
  267. package/src/resources/account-statements.ts +5 -8
  268. package/src/resources/account-transfers.ts +8 -20
  269. package/src/resources/accounts.ts +8 -8
  270. package/src/resources/ach-prenotifications.ts +57 -9
  271. package/src/resources/ach-transfers.ts +19 -11
  272. package/src/resources/balance-lookups.ts +2 -2
  273. package/src/resources/bookkeeping-accounts.ts +5 -5
  274. package/src/resources/bookkeeping-entries.ts +4 -4
  275. package/src/resources/bookkeeping-entry-sets.ts +2 -2
  276. package/src/resources/card-disputes.ts +9 -9
  277. package/src/resources/card-profiles.ts +39 -13
  278. package/src/resources/card-purchase-supplements.ts +331 -0
  279. package/src/resources/cards.ts +8 -15
  280. package/src/resources/check-deposits.ts +9 -9
  281. package/src/resources/check-transfers.ts +21 -13
  282. package/src/resources/declined-transactions.ts +27 -30
  283. package/src/resources/digital-wallet-tokens.ts +5 -8
  284. package/src/resources/documents.ts +5 -5
  285. package/src/resources/entities/beneficial-owners.ts +251 -0
  286. package/src/resources/entities/entities.ts +21 -13
  287. package/src/resources/entities/index.ts +1 -0
  288. package/src/resources/entities/supplemental-documents.ts +3 -3
  289. package/src/resources/event-subscriptions.ts +7 -10
  290. package/src/resources/events.ts +9 -7
  291. package/src/resources/exports.ts +6 -6
  292. package/src/resources/external-accounts.ts +7 -13
  293. package/src/resources/files.ts +12 -7
  294. package/src/resources/groups.ts +2 -2
  295. package/src/resources/inbound-ach-transfer-returns.ts +8 -6
  296. package/src/resources/inbound-wire-drawdown-requests.ts +7 -5
  297. package/src/resources/index.ts +6 -0
  298. package/src/resources/limits.ts +7 -11
  299. package/src/resources/oauth-connections.ts +5 -8
  300. package/src/resources/pending-transactions.ts +35 -39
  301. package/src/resources/programs.ts +5 -5
  302. package/src/resources/real-time-decisions.ts +3 -6
  303. package/src/resources/real-time-payments-transfers.ts +8 -6
  304. package/src/resources/routing-numbers.ts +5 -2
  305. package/src/resources/simulations/account-statements.ts +2 -2
  306. package/src/resources/simulations/account-transfers.ts +1 -1
  307. package/src/resources/simulations/ach-transfers.ts +1200 -160
  308. package/src/resources/simulations/card-disputes.ts +2 -2
  309. package/src/resources/simulations/card-profiles.ts +1 -4
  310. package/src/resources/simulations/card-refunds.ts +2 -2
  311. package/src/resources/simulations/cards.ts +55 -59
  312. package/src/resources/simulations/check-deposits.ts +3 -3
  313. package/src/resources/simulations/check-transfers.ts +2 -2
  314. package/src/resources/simulations/digital-wallet-token-requests.ts +2 -2
  315. package/src/resources/simulations/documents.ts +2 -5
  316. package/src/resources/simulations/inbound-funds-holds.ts +7 -2
  317. package/src/resources/simulations/inbound-wire-drawdown-requests.ts +2 -2
  318. package/src/resources/simulations/interest-payments.ts +1186 -130
  319. package/src/resources/simulations/programs.ts +2 -5
  320. package/src/resources/simulations/real-time-payments-transfers.ts +1199 -156
  321. package/src/resources/simulations/simulations.ts +1 -1
  322. package/src/resources/simulations/wire-transfers.ts +1176 -130
  323. package/src/resources/transactions.ts +1182 -134
  324. package/src/resources/wire-drawdown-requests.ts +6 -6
  325. package/src/resources/wire-transfers.ts +13 -13
  326. package/src/uploads.ts +7 -6
  327. package/src/version.ts +1 -1
  328. package/uploads.d.ts +5 -4
  329. package/uploads.d.ts.map +1 -1
  330. package/uploads.js +2 -2
  331. package/uploads.js.map +1 -1
  332. package/uploads.mjs +2 -2
  333. package/uploads.mjs.map +1 -1
  334. package/version.d.ts +1 -1
  335. package/version.js +1 -1
  336. package/version.mjs +1 -1
@@ -3,17 +3,14 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class AccountStatements extends APIResource {
10
10
  /**
11
11
  * Retrieve an Account Statement
12
12
  */
13
- retrieve(
14
- accountStatementId: string,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<AccountStatement>> {
13
+ retrieve(accountStatementId: string, options?: Core.RequestOptions): Core.APIPromise<AccountStatement> {
17
14
  return this.get(`/account_statements/${accountStatementId}`, options);
18
15
  }
19
16
 
@@ -23,12 +20,12 @@ export class AccountStatements extends APIResource {
23
20
  list(
24
21
  query?: AccountStatementListParams,
25
22
  options?: Core.RequestOptions,
26
- ): Core.PagePromise<AccountStatementsPage>;
27
- list(options?: Core.RequestOptions): Core.PagePromise<AccountStatementsPage>;
23
+ ): Core.PagePromise<AccountStatementsPage, AccountStatement>;
24
+ list(options?: Core.RequestOptions): Core.PagePromise<AccountStatementsPage, AccountStatement>;
28
25
  list(
29
26
  query: AccountStatementListParams | Core.RequestOptions = {},
30
27
  options?: Core.RequestOptions,
31
- ): Core.PagePromise<AccountStatementsPage> {
28
+ ): Core.PagePromise<AccountStatementsPage, AccountStatement> {
32
29
  if (isRequestOptions(query)) {
33
30
  return this.list({}, query);
34
31
  }
@@ -3,27 +3,21 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class AccountTransfers extends APIResource {
10
10
  /**
11
11
  * Create an Account Transfer
12
12
  */
13
- create(
14
- body: AccountTransferCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<AccountTransfer>> {
13
+ create(body: AccountTransferCreateParams, options?: Core.RequestOptions): Core.APIPromise<AccountTransfer> {
17
14
  return this.post('/account_transfers', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve an Account Transfer
22
19
  */
23
- retrieve(
24
- accountTransferId: string,
25
- options?: Core.RequestOptions,
26
- ): Promise<Core.APIResponse<AccountTransfer>> {
20
+ retrieve(accountTransferId: string, options?: Core.RequestOptions): Core.APIPromise<AccountTransfer> {
27
21
  return this.get(`/account_transfers/${accountTransferId}`, options);
28
22
  }
29
23
 
@@ -33,12 +27,12 @@ export class AccountTransfers extends APIResource {
33
27
  list(
34
28
  query?: AccountTransferListParams,
35
29
  options?: Core.RequestOptions,
36
- ): Core.PagePromise<AccountTransfersPage>;
37
- list(options?: Core.RequestOptions): Core.PagePromise<AccountTransfersPage>;
30
+ ): Core.PagePromise<AccountTransfersPage, AccountTransfer>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<AccountTransfersPage, AccountTransfer>;
38
32
  list(
39
33
  query: AccountTransferListParams | Core.RequestOptions = {},
40
34
  options?: Core.RequestOptions,
41
- ): Core.PagePromise<AccountTransfersPage> {
35
+ ): Core.PagePromise<AccountTransfersPage, AccountTransfer> {
42
36
  if (isRequestOptions(query)) {
43
37
  return this.list({}, query);
44
38
  }
@@ -48,20 +42,14 @@ export class AccountTransfers extends APIResource {
48
42
  /**
49
43
  * Approve an Account Transfer
50
44
  */
51
- approve(
52
- accountTransferId: string,
53
- options?: Core.RequestOptions,
54
- ): Promise<Core.APIResponse<AccountTransfer>> {
45
+ approve(accountTransferId: string, options?: Core.RequestOptions): Core.APIPromise<AccountTransfer> {
55
46
  return this.post(`/account_transfers/${accountTransferId}/approve`, options);
56
47
  }
57
48
 
58
49
  /**
59
50
  * Cancel an Account Transfer
60
51
  */
61
- cancel(
62
- accountTransferId: string,
63
- options?: Core.RequestOptions,
64
- ): Promise<Core.APIResponse<AccountTransfer>> {
52
+ cancel(accountTransferId: string, options?: Core.RequestOptions): Core.APIPromise<AccountTransfer> {
65
53
  return this.post(`/account_transfers/${accountTransferId}/cancel`, options);
66
54
  }
67
55
  }
@@ -3,21 +3,21 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class Accounts extends APIResource {
10
10
  /**
11
11
  * Create an Account
12
12
  */
13
- create(body: AccountCreateParams, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
13
+ create(body: AccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<Account> {
14
14
  return this.post('/accounts', { body, ...options });
15
15
  }
16
16
 
17
17
  /**
18
18
  * Retrieve an Account
19
19
  */
20
- retrieve(accountId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
20
+ retrieve(accountId: string, options?: Core.RequestOptions): Core.APIPromise<Account> {
21
21
  return this.get(`/accounts/${accountId}`, options);
22
22
  }
23
23
 
@@ -28,19 +28,19 @@ export class Accounts extends APIResource {
28
28
  accountId: string,
29
29
  body: AccountUpdateParams,
30
30
  options?: Core.RequestOptions,
31
- ): Promise<Core.APIResponse<Account>> {
31
+ ): Core.APIPromise<Account> {
32
32
  return this.patch(`/accounts/${accountId}`, { body, ...options });
33
33
  }
34
34
 
35
35
  /**
36
36
  * List Accounts
37
37
  */
38
- list(query?: AccountListParams, options?: Core.RequestOptions): Core.PagePromise<AccountsPage>;
39
- list(options?: Core.RequestOptions): Core.PagePromise<AccountsPage>;
38
+ list(query?: AccountListParams, options?: Core.RequestOptions): Core.PagePromise<AccountsPage, Account>;
39
+ list(options?: Core.RequestOptions): Core.PagePromise<AccountsPage, Account>;
40
40
  list(
41
41
  query: AccountListParams | Core.RequestOptions = {},
42
42
  options?: Core.RequestOptions,
43
- ): Core.PagePromise<AccountsPage> {
43
+ ): Core.PagePromise<AccountsPage, Account> {
44
44
  if (isRequestOptions(query)) {
45
45
  return this.list({}, query);
46
46
  }
@@ -50,7 +50,7 @@ export class Accounts extends APIResource {
50
50
  /**
51
51
  * Close an Account
52
52
  */
53
- close(accountId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Account>> {
53
+ close(accountId: string, options?: Core.RequestOptions): Core.APIPromise<Account> {
54
54
  return this.post(`/accounts/${accountId}/close`, options);
55
55
  }
56
56
  }
@@ -3,7 +3,7 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class ACHPrenotifications extends APIResource {
@@ -13,17 +13,14 @@ export class ACHPrenotifications extends APIResource {
13
13
  create(
14
14
  body: ACHPrenotificationCreateParams,
15
15
  options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<ACHPrenotification>> {
16
+ ): Core.APIPromise<ACHPrenotification> {
17
17
  return this.post('/ach_prenotifications', { body, ...options });
18
18
  }
19
19
 
20
20
  /**
21
21
  * Retrieve an ACH Prenotification
22
22
  */
23
- retrieve(
24
- achPrenotificationId: string,
25
- options?: Core.RequestOptions,
26
- ): Promise<Core.APIResponse<ACHPrenotification>> {
23
+ retrieve(achPrenotificationId: string, options?: Core.RequestOptions): Core.APIPromise<ACHPrenotification> {
27
24
  return this.get(`/ach_prenotifications/${achPrenotificationId}`, options);
28
25
  }
29
26
 
@@ -33,12 +30,12 @@ export class ACHPrenotifications extends APIResource {
33
30
  list(
34
31
  query?: ACHPrenotificationListParams,
35
32
  options?: Core.RequestOptions,
36
- ): Core.PagePromise<ACHPrenotificationsPage>;
37
- list(options?: Core.RequestOptions): Core.PagePromise<ACHPrenotificationsPage>;
33
+ ): Core.PagePromise<ACHPrenotificationsPage, ACHPrenotification>;
34
+ list(options?: Core.RequestOptions): Core.PagePromise<ACHPrenotificationsPage, ACHPrenotification>;
38
35
  list(
39
36
  query: ACHPrenotificationListParams | Core.RequestOptions = {},
40
37
  options?: Core.RequestOptions,
41
- ): Core.PagePromise<ACHPrenotificationsPage> {
38
+ ): Core.PagePromise<ACHPrenotificationsPage, ACHPrenotification> {
42
39
  if (isRequestOptions(query)) {
43
40
  return this.list({}, query);
44
41
  }
@@ -109,6 +106,12 @@ export interface ACHPrenotification {
109
106
  */
110
107
  effective_date: string | null;
111
108
 
109
+ /**
110
+ * If the receiving bank notifies that future transfers should use different
111
+ * details, this will contain those details.
112
+ */
113
+ notifications_of_change: Array<ACHPrenotification.NotificationsOfChange>;
114
+
112
115
  /**
113
116
  * If your prenotification is returned, this will contain details of the return.
114
117
  */
@@ -137,6 +140,51 @@ export interface ACHPrenotification {
137
140
  }
138
141
 
139
142
  export namespace ACHPrenotification {
143
+ export interface NotificationsOfChange {
144
+ /**
145
+ * The type of change that occurred.
146
+ *
147
+ * - `incorrect_account_number` - The account number was incorrect.
148
+ * - `incorrect_routing_number` - The routing number was incorrect.
149
+ * - `incorrect_routing_number_and_account_number` - Both the routing number and
150
+ * the account number were incorrect.
151
+ * - `incorrect_transaction_code` - The transaction code was incorrect.
152
+ * - `incorrect_account_number_and_transaction_code` - The account number and the
153
+ * transaction code were incorrect.
154
+ * - `incorrect_routing_number_account_number_and_transaction_code` - The routing
155
+ * number, account number, and transaction code were incorrect.
156
+ * - `incorrect_receiving_depository_financial_institution_identification` - The
157
+ * receiving depository financial institution identification was incorrect.
158
+ * - `incorrect_individual_identification_number` - The individual identification
159
+ * number was incorrect.
160
+ * - `addenda_format_error` - The addenda had an incorrect format.
161
+ * - `incorrect_standard_entry_class_code_for_outbound_international_payment` - The
162
+ * standard entry class code was incorrect for an outbound international payment.
163
+ */
164
+ change_code:
165
+ | 'incorrect_account_number'
166
+ | 'incorrect_routing_number'
167
+ | 'incorrect_routing_number_and_account_number'
168
+ | 'incorrect_transaction_code'
169
+ | 'incorrect_account_number_and_transaction_code'
170
+ | 'incorrect_routing_number_account_number_and_transaction_code'
171
+ | 'incorrect_receiving_depository_financial_institution_identification'
172
+ | 'incorrect_individual_identification_number'
173
+ | 'addenda_format_error'
174
+ | 'incorrect_standard_entry_class_code_for_outbound_international_payment';
175
+
176
+ /**
177
+ * The corrected data.
178
+ */
179
+ corrected_data: string;
180
+
181
+ /**
182
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
183
+ * the notification occurred.
184
+ */
185
+ created_at: string;
186
+ }
187
+
140
188
  /**
141
189
  * If your prenotification is returned, this will contain details of the return.
142
190
  */
@@ -3,36 +3,36 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class ACHTransfers extends APIResource {
10
10
  /**
11
11
  * Create an ACH Transfer
12
12
  */
13
- create(
14
- body: ACHTransferCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<ACHTransfer>> {
13
+ create(body: ACHTransferCreateParams, options?: Core.RequestOptions): Core.APIPromise<ACHTransfer> {
17
14
  return this.post('/ach_transfers', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve an ACH Transfer
22
19
  */
23
- retrieve(achTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ACHTransfer>> {
20
+ retrieve(achTransferId: string, options?: Core.RequestOptions): Core.APIPromise<ACHTransfer> {
24
21
  return this.get(`/ach_transfers/${achTransferId}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * List ACH Transfers
29
26
  */
30
- list(query?: ACHTransferListParams, options?: Core.RequestOptions): Core.PagePromise<ACHTransfersPage>;
31
- list(options?: Core.RequestOptions): Core.PagePromise<ACHTransfersPage>;
27
+ list(
28
+ query?: ACHTransferListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<ACHTransfersPage, ACHTransfer>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<ACHTransfersPage, ACHTransfer>;
32
32
  list(
33
33
  query: ACHTransferListParams | Core.RequestOptions = {},
34
34
  options?: Core.RequestOptions,
35
- ): Core.PagePromise<ACHTransfersPage> {
35
+ ): Core.PagePromise<ACHTransfersPage, ACHTransfer> {
36
36
  if (isRequestOptions(query)) {
37
37
  return this.list({}, query);
38
38
  }
@@ -42,14 +42,14 @@ export class ACHTransfers extends APIResource {
42
42
  /**
43
43
  * Approves an ACH Transfer in a pending_approval state.
44
44
  */
45
- approve(achTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ACHTransfer>> {
45
+ approve(achTransferId: string, options?: Core.RequestOptions): Core.APIPromise<ACHTransfer> {
46
46
  return this.post(`/ach_transfers/${achTransferId}/approve`, options);
47
47
  }
48
48
 
49
49
  /**
50
50
  * Cancels an ACH Transfer in a pending_approval state.
51
51
  */
52
- cancel(achTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ACHTransfer>> {
52
+ cancel(achTransferId: string, options?: Core.RequestOptions): Core.APIPromise<ACHTransfer> {
53
53
  return this.post(`/ach_transfers/${achTransferId}/cancel`, options);
54
54
  }
55
55
  }
@@ -589,6 +589,14 @@ export namespace ACHTransfer {
589
589
  * details.
590
590
  */
591
591
  export interface Submission {
592
+ /**
593
+ * When the funds transfer is expected to settle in the recipient's account.
594
+ * Credits may be available sooner, at the receiving banks discretion. The FedACH
595
+ * schedule is published
596
+ * [here](https://www.frbservices.org/resources/resource-centers/same-day-ach/fedach-processing-schedule.html).
597
+ */
598
+ expected_funds_settlement_at: string;
599
+
592
600
  /**
593
601
  * When the ACH transfer was sent to FedACH.
594
602
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
- import * as API from '.';
5
+ import * as API from './index';
6
6
 
7
7
  export class BalanceLookups extends APIResource {
8
8
  /**
@@ -11,7 +11,7 @@ export class BalanceLookups extends APIResource {
11
11
  lookup(
12
12
  body: BalanceLookupLookupParams,
13
13
  options?: Core.RequestOptions,
14
- ): Promise<Core.APIResponse<BalanceLookupLookupResponse>> {
14
+ ): Core.APIPromise<BalanceLookupLookupResponse> {
15
15
  return this.post('/balance_lookups', { body, ...options });
16
16
  }
17
17
  }
@@ -3,7 +3,7 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class BookkeepingAccounts extends APIResource {
@@ -13,7 +13,7 @@ export class BookkeepingAccounts extends APIResource {
13
13
  create(
14
14
  body: BookkeepingAccountCreateParams,
15
15
  options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<BookkeepingAccount>> {
16
+ ): Core.APIPromise<BookkeepingAccount> {
17
17
  return this.post('/bookkeeping_accounts', { body, ...options });
18
18
  }
19
19
 
@@ -23,12 +23,12 @@ export class BookkeepingAccounts extends APIResource {
23
23
  list(
24
24
  query?: BookkeepingAccountListParams,
25
25
  options?: Core.RequestOptions,
26
- ): Core.PagePromise<BookkeepingAccountsPage>;
27
- list(options?: Core.RequestOptions): Core.PagePromise<BookkeepingAccountsPage>;
26
+ ): Core.PagePromise<BookkeepingAccountsPage, BookkeepingAccount>;
27
+ list(options?: Core.RequestOptions): Core.PagePromise<BookkeepingAccountsPage, BookkeepingAccount>;
28
28
  list(
29
29
  query: BookkeepingAccountListParams | Core.RequestOptions = {},
30
30
  options?: Core.RequestOptions,
31
- ): Core.PagePromise<BookkeepingAccountsPage> {
31
+ ): Core.PagePromise<BookkeepingAccountsPage, BookkeepingAccount> {
32
32
  if (isRequestOptions(query)) {
33
33
  return this.list({}, query);
34
34
  }
@@ -3,7 +3,7 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class BookkeepingEntries extends APIResource {
@@ -13,12 +13,12 @@ export class BookkeepingEntries extends APIResource {
13
13
  list(
14
14
  query?: BookkeepingEntryListParams,
15
15
  options?: Core.RequestOptions,
16
- ): Core.PagePromise<BookkeepingEntriesPage>;
17
- list(options?: Core.RequestOptions): Core.PagePromise<BookkeepingEntriesPage>;
16
+ ): Core.PagePromise<BookkeepingEntriesPage, BookkeepingEntry>;
17
+ list(options?: Core.RequestOptions): Core.PagePromise<BookkeepingEntriesPage, BookkeepingEntry>;
18
18
  list(
19
19
  query: BookkeepingEntryListParams | Core.RequestOptions = {},
20
20
  options?: Core.RequestOptions,
21
- ): Core.PagePromise<BookkeepingEntriesPage> {
21
+ ): Core.PagePromise<BookkeepingEntriesPage, BookkeepingEntry> {
22
22
  if (isRequestOptions(query)) {
23
23
  return this.list({}, query);
24
24
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
- import * as API from '.';
5
+ import * as API from './index';
6
6
 
7
7
  export class BookkeepingEntrySets extends APIResource {
8
8
  /**
@@ -11,7 +11,7 @@ export class BookkeepingEntrySets extends APIResource {
11
11
  create(
12
12
  body: BookkeepingEntrySetCreateParams,
13
13
  options?: Core.RequestOptions,
14
- ): Promise<Core.APIResponse<BookkeepingEntrySet>> {
14
+ ): Core.APIPromise<BookkeepingEntrySet> {
15
15
  return this.post('/bookkeeping_entry_sets', { body, ...options });
16
16
  }
17
17
  }
@@ -3,36 +3,36 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class CardDisputes extends APIResource {
10
10
  /**
11
11
  * Create a Card Dispute
12
12
  */
13
- create(
14
- body: CardDisputeCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<CardDispute>> {
13
+ create(body: CardDisputeCreateParams, options?: Core.RequestOptions): Core.APIPromise<CardDispute> {
17
14
  return this.post('/card_disputes', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve a Card Dispute
22
19
  */
23
- retrieve(cardDisputeId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CardDispute>> {
20
+ retrieve(cardDisputeId: string, options?: Core.RequestOptions): Core.APIPromise<CardDispute> {
24
21
  return this.get(`/card_disputes/${cardDisputeId}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * List Card Disputes
29
26
  */
30
- list(query?: CardDisputeListParams, options?: Core.RequestOptions): Core.PagePromise<CardDisputesPage>;
31
- list(options?: Core.RequestOptions): Core.PagePromise<CardDisputesPage>;
27
+ list(
28
+ query?: CardDisputeListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<CardDisputesPage, CardDispute>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<CardDisputesPage, CardDispute>;
32
32
  list(
33
33
  query: CardDisputeListParams | Core.RequestOptions = {},
34
34
  options?: Core.RequestOptions,
35
- ): Core.PagePromise<CardDisputesPage> {
35
+ ): Core.PagePromise<CardDisputesPage, CardDispute> {
36
36
  if (isRequestOptions(query)) {
37
37
  return this.list({}, query);
38
38
  }
@@ -3,41 +3,48 @@
3
3
  import * as Core from '../core';
4
4
  import { APIResource } from '../resource';
5
5
  import { isRequestOptions } from '../core';
6
- import * as API from '.';
6
+ import * as API from './index';
7
7
  import { Page, PageParams } from '../pagination';
8
8
 
9
9
  export class CardProfiles extends APIResource {
10
10
  /**
11
11
  * Create a Card Profile
12
12
  */
13
- create(
14
- body: CardProfileCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<CardProfile>> {
13
+ create(body: CardProfileCreateParams, options?: Core.RequestOptions): Core.APIPromise<CardProfile> {
17
14
  return this.post('/card_profiles', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve a Card Profile
22
19
  */
23
- retrieve(cardProfileId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CardProfile>> {
20
+ retrieve(cardProfileId: string, options?: Core.RequestOptions): Core.APIPromise<CardProfile> {
24
21
  return this.get(`/card_profiles/${cardProfileId}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * List Card Profiles
29
26
  */
30
- list(query?: CardProfileListParams, options?: Core.RequestOptions): Core.PagePromise<CardProfilesPage>;
31
- list(options?: Core.RequestOptions): Core.PagePromise<CardProfilesPage>;
27
+ list(
28
+ query?: CardProfileListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<CardProfilesPage, CardProfile>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<CardProfilesPage, CardProfile>;
32
32
  list(
33
33
  query: CardProfileListParams | Core.RequestOptions = {},
34
34
  options?: Core.RequestOptions,
35
- ): Core.PagePromise<CardProfilesPage> {
35
+ ): Core.PagePromise<CardProfilesPage, CardProfile> {
36
36
  if (isRequestOptions(query)) {
37
37
  return this.list({}, query);
38
38
  }
39
39
  return this.getAPIList('/card_profiles', CardProfilesPage, { query, ...options });
40
40
  }
41
+
42
+ /**
43
+ * Archive an Card Profile
44
+ */
45
+ archive(cardProfileId: string, options?: Core.RequestOptions): Core.APIPromise<CardProfile> {
46
+ return this.post(`/card_profiles/${cardProfileId}/archive`, options);
47
+ }
41
48
  }
42
49
 
43
50
  export class CardProfilesPage extends Page<CardProfile> {}
@@ -72,6 +79,11 @@ export interface CardProfile {
72
79
  */
73
80
  digital_wallets: CardProfile.DigitalWallets;
74
81
 
82
+ /**
83
+ * Whether this Card Profile is the default for all cards in its Increase group.
84
+ */
85
+ is_default: boolean;
86
+
75
87
  /**
76
88
  * How physical cards should be designed and shipped.
77
89
  */
@@ -171,22 +183,36 @@ export namespace CardProfile {
171
183
  /**
172
184
  * The identifier of the File containing the physical card's back image.
173
185
  */
174
- back_image_file_id: string;
186
+ back_image_file_id: string | null;
175
187
 
176
188
  /**
177
189
  * The identifier of the File containing the physical card's carrier image.
178
190
  */
179
- carrier_image_file_id: string;
191
+ carrier_image_file_id: string | null;
180
192
 
181
193
  /**
182
194
  * A phone number the user can contact to receive support for their card.
183
195
  */
184
- contact_phone: string;
196
+ contact_phone: string | null;
185
197
 
186
198
  /**
187
199
  * The identifier of the File containing the physical card's front image.
188
200
  */
189
- front_image_file_id: string;
201
+ front_image_file_id: string | null;
202
+
203
+ /**
204
+ * The status of the Physical Card Profile.
205
+ *
206
+ * - `not_eligible` - The Card Profile is not eligible for physical cards.
207
+ * - `rejected` - There is an issue with the Physical Card Profile preventing it
208
+ * from use.
209
+ * - `pending_reviewing` - The card profile is awaiting review by Increase.
210
+ * - `pending_submitting` - The card profile is awaiting submission to the
211
+ * fulfillment provider.
212
+ * - `submitted` - The Physical Card Profile has been submitted to the fulfillment
213
+ * provider.
214
+ */
215
+ status: 'not_eligible' | 'rejected' | 'pending_reviewing' | 'pending_submitting' | 'submitted';
190
216
  }
191
217
  }
192
218