increase 0.8.1 → 0.9.1

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 (279) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +31 -11
  3. package/_shims/fetch.d.ts +8 -1
  4. package/_shims/fetch.node.d.ts +11 -1
  5. package/core.d.ts +76 -28
  6. package/core.d.ts.map +1 -1
  7. package/core.js +123 -55
  8. package/core.js.map +1 -1
  9. package/core.mjs +119 -55
  10. package/core.mjs.map +1 -1
  11. package/index.js +3 -2
  12. package/index.js.map +1 -1
  13. package/index.mjs +3 -2
  14. package/index.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/pagination.d.ts +2 -2
  17. package/pagination.d.ts.map +1 -1
  18. package/pagination.js +4 -4
  19. package/pagination.js.map +1 -1
  20. package/pagination.mjs +4 -4
  21. package/pagination.mjs.map +1 -1
  22. package/resources/account-numbers.d.ts +8 -8
  23. package/resources/account-numbers.d.ts.map +1 -1
  24. package/resources/account-numbers.js.map +1 -1
  25. package/resources/account-numbers.mjs.map +1 -1
  26. package/resources/account-statements.d.ts +3 -6
  27. package/resources/account-statements.d.ts.map +1 -1
  28. package/resources/account-statements.js.map +1 -1
  29. package/resources/account-statements.mjs.map +1 -1
  30. package/resources/account-transfers.d.ts +6 -18
  31. package/resources/account-transfers.d.ts.map +1 -1
  32. package/resources/account-transfers.js.map +1 -1
  33. package/resources/account-transfers.mjs.map +1 -1
  34. package/resources/accounts.d.ts +6 -6
  35. package/resources/accounts.d.ts.map +1 -1
  36. package/resources/ach-prenotifications.d.ts +51 -7
  37. package/resources/ach-prenotifications.d.ts.map +1 -1
  38. package/resources/ach-prenotifications.js.map +1 -1
  39. package/resources/ach-prenotifications.mjs.map +1 -1
  40. package/resources/ach-transfers.d.ts +16 -9
  41. package/resources/ach-transfers.d.ts.map +1 -1
  42. package/resources/ach-transfers.js.map +1 -1
  43. package/resources/ach-transfers.mjs.map +1 -1
  44. package/resources/balance-lookups.d.ts +1 -1
  45. package/resources/balance-lookups.d.ts.map +1 -1
  46. package/resources/bookkeeping-accounts.d.ts +3 -3
  47. package/resources/bookkeeping-accounts.d.ts.map +1 -1
  48. package/resources/bookkeeping-entries.d.ts +2 -2
  49. package/resources/bookkeeping-entries.d.ts.map +1 -1
  50. package/resources/bookkeeping-entry-sets.d.ts +1 -1
  51. package/resources/bookkeeping-entry-sets.d.ts.map +1 -1
  52. package/resources/card-disputes.d.ts +7 -7
  53. package/resources/card-disputes.d.ts.map +1 -1
  54. package/resources/card-disputes.js.map +1 -1
  55. package/resources/card-disputes.mjs.map +1 -1
  56. package/resources/card-profiles.d.ts +15 -7
  57. package/resources/card-profiles.d.ts.map +1 -1
  58. package/resources/card-profiles.js +6 -0
  59. package/resources/card-profiles.js.map +1 -1
  60. package/resources/card-profiles.mjs +6 -0
  61. package/resources/card-profiles.mjs.map +1 -1
  62. package/resources/card-purchase-supplements.d.ts +3 -3
  63. package/resources/card-purchase-supplements.d.ts.map +1 -1
  64. package/resources/cards.d.ts +6 -13
  65. package/resources/cards.d.ts.map +1 -1
  66. package/resources/cards.js.map +1 -1
  67. package/resources/cards.mjs.map +1 -1
  68. package/resources/check-deposits.d.ts +7 -7
  69. package/resources/check-deposits.d.ts.map +1 -1
  70. package/resources/check-deposits.js.map +1 -1
  71. package/resources/check-deposits.mjs.map +1 -1
  72. package/resources/check-transfers.d.ts +15 -10
  73. package/resources/check-transfers.d.ts.map +1 -1
  74. package/resources/check-transfers.js.map +1 -1
  75. package/resources/check-transfers.mjs.map +1 -1
  76. package/resources/declined-transactions.d.ts +25 -28
  77. package/resources/declined-transactions.d.ts.map +1 -1
  78. package/resources/declined-transactions.js.map +1 -1
  79. package/resources/declined-transactions.mjs.map +1 -1
  80. package/resources/digital-wallet-tokens.d.ts +3 -6
  81. package/resources/digital-wallet-tokens.d.ts.map +1 -1
  82. package/resources/digital-wallet-tokens.js.map +1 -1
  83. package/resources/digital-wallet-tokens.mjs.map +1 -1
  84. package/resources/documents.d.ts +3 -3
  85. package/resources/documents.d.ts.map +1 -1
  86. package/resources/entities/beneficial-owners.d.ts +4 -8
  87. package/resources/entities/beneficial-owners.d.ts.map +1 -1
  88. package/resources/entities/beneficial-owners.js.map +1 -1
  89. package/resources/entities/beneficial-owners.mjs.map +1 -1
  90. package/resources/entities/entities.d.ts +11 -11
  91. package/resources/entities/entities.d.ts.map +1 -1
  92. package/resources/entities/entities.js +6 -0
  93. package/resources/entities/entities.js.map +1 -1
  94. package/resources/entities/entities.mjs +6 -0
  95. package/resources/entities/entities.mjs.map +1 -1
  96. package/resources/entities/supplemental-documents.d.ts +2 -2
  97. package/resources/entities/supplemental-documents.d.ts.map +1 -1
  98. package/resources/event-subscriptions.d.ts +5 -8
  99. package/resources/event-subscriptions.d.ts.map +1 -1
  100. package/resources/event-subscriptions.js.map +1 -1
  101. package/resources/event-subscriptions.mjs.map +1 -1
  102. package/resources/events.d.ts +7 -5
  103. package/resources/events.d.ts.map +1 -1
  104. package/resources/events.js.map +1 -1
  105. package/resources/events.mjs.map +1 -1
  106. package/resources/exports.d.ts +4 -4
  107. package/resources/exports.d.ts.map +1 -1
  108. package/resources/external-accounts.d.ts +5 -11
  109. package/resources/external-accounts.d.ts.map +1 -1
  110. package/resources/external-accounts.js.map +1 -1
  111. package/resources/external-accounts.mjs.map +1 -1
  112. package/resources/files.d.ts +9 -4
  113. package/resources/files.d.ts.map +1 -1
  114. package/resources/files.js +2 -2
  115. package/resources/files.js.map +1 -1
  116. package/resources/files.mjs +2 -2
  117. package/resources/files.mjs.map +1 -1
  118. package/resources/groups.d.ts +1 -1
  119. package/resources/groups.d.ts.map +1 -1
  120. package/resources/inbound-ach-transfer-returns.d.ts +6 -4
  121. package/resources/inbound-ach-transfer-returns.d.ts.map +1 -1
  122. package/resources/inbound-ach-transfer-returns.js.map +1 -1
  123. package/resources/inbound-ach-transfer-returns.mjs.map +1 -1
  124. package/resources/inbound-wire-drawdown-requests.d.ts +5 -3
  125. package/resources/inbound-wire-drawdown-requests.d.ts.map +1 -1
  126. package/resources/inbound-wire-drawdown-requests.js.map +1 -1
  127. package/resources/inbound-wire-drawdown-requests.mjs.map +1 -1
  128. package/resources/limits.d.ts +5 -9
  129. package/resources/limits.d.ts.map +1 -1
  130. package/resources/limits.js.map +1 -1
  131. package/resources/limits.mjs.map +1 -1
  132. package/resources/oauth-connections.d.ts +3 -6
  133. package/resources/oauth-connections.d.ts.map +1 -1
  134. package/resources/oauth-connections.js.map +1 -1
  135. package/resources/oauth-connections.mjs.map +1 -1
  136. package/resources/pending-transactions.d.ts +28 -37
  137. package/resources/pending-transactions.d.ts.map +1 -1
  138. package/resources/pending-transactions.js.map +1 -1
  139. package/resources/pending-transactions.mjs.map +1 -1
  140. package/resources/programs.d.ts +3 -3
  141. package/resources/programs.d.ts.map +1 -1
  142. package/resources/real-time-decisions.d.ts +2 -5
  143. package/resources/real-time-decisions.d.ts.map +1 -1
  144. package/resources/real-time-decisions.js.map +1 -1
  145. package/resources/real-time-decisions.mjs.map +1 -1
  146. package/resources/real-time-payments-transfers.d.ts +6 -4
  147. package/resources/real-time-payments-transfers.d.ts.map +1 -1
  148. package/resources/real-time-payments-transfers.js.map +1 -1
  149. package/resources/real-time-payments-transfers.mjs.map +1 -1
  150. package/resources/routing-numbers.d.ts +4 -1
  151. package/resources/routing-numbers.d.ts.map +1 -1
  152. package/resources/routing-numbers.js.map +1 -1
  153. package/resources/routing-numbers.mjs.map +1 -1
  154. package/resources/simulations/account-statements.d.ts +1 -1
  155. package/resources/simulations/account-statements.d.ts.map +1 -1
  156. package/resources/simulations/account-transfers.d.ts +1 -1
  157. package/resources/simulations/account-transfers.d.ts.map +1 -1
  158. package/resources/simulations/ach-transfers.d.ts +124 -138
  159. package/resources/simulations/ach-transfers.d.ts.map +1 -1
  160. package/resources/simulations/ach-transfers.js.map +1 -1
  161. package/resources/simulations/ach-transfers.mjs.map +1 -1
  162. package/resources/simulations/card-disputes.d.ts +1 -1
  163. package/resources/simulations/card-disputes.d.ts.map +1 -1
  164. package/resources/simulations/card-profiles.d.ts +1 -4
  165. package/resources/simulations/card-profiles.d.ts.map +1 -1
  166. package/resources/simulations/card-profiles.js.map +1 -1
  167. package/resources/simulations/card-profiles.mjs.map +1 -1
  168. package/resources/simulations/card-refunds.d.ts +1 -1
  169. package/resources/simulations/card-refunds.d.ts.map +1 -1
  170. package/resources/simulations/cards.d.ts +49 -58
  171. package/resources/simulations/cards.d.ts.map +1 -1
  172. package/resources/simulations/cards.js.map +1 -1
  173. package/resources/simulations/cards.mjs.map +1 -1
  174. package/resources/simulations/check-deposits.d.ts +3 -12
  175. package/resources/simulations/check-deposits.d.ts.map +1 -1
  176. package/resources/simulations/check-transfers.d.ts +2 -2
  177. package/resources/simulations/check-transfers.d.ts.map +1 -1
  178. package/resources/simulations/digital-wallet-token-requests.d.ts +1 -1
  179. package/resources/simulations/digital-wallet-token-requests.d.ts.map +1 -1
  180. package/resources/simulations/documents.d.ts +1 -4
  181. package/resources/simulations/documents.d.ts.map +1 -1
  182. package/resources/simulations/documents.js.map +1 -1
  183. package/resources/simulations/documents.mjs.map +1 -1
  184. package/resources/simulations/inbound-funds-holds.d.ts +1 -1
  185. package/resources/simulations/inbound-funds-holds.d.ts.map +1 -1
  186. package/resources/simulations/inbound-wire-drawdown-requests.d.ts +1 -1
  187. package/resources/simulations/inbound-wire-drawdown-requests.d.ts.map +1 -1
  188. package/resources/simulations/interest-payments.d.ts +100 -108
  189. package/resources/simulations/interest-payments.d.ts.map +1 -1
  190. package/resources/simulations/interest-payments.js.map +1 -1
  191. package/resources/simulations/interest-payments.mjs.map +1 -1
  192. package/resources/simulations/programs.d.ts +1 -4
  193. package/resources/simulations/programs.d.ts.map +1 -1
  194. package/resources/simulations/programs.js.map +1 -1
  195. package/resources/simulations/programs.mjs.map +1 -1
  196. package/resources/simulations/real-time-payments-transfers.d.ts +123 -134
  197. package/resources/simulations/real-time-payments-transfers.d.ts.map +1 -1
  198. package/resources/simulations/real-time-payments-transfers.js.map +1 -1
  199. package/resources/simulations/real-time-payments-transfers.mjs.map +1 -1
  200. package/resources/simulations/wire-transfers.d.ts +100 -108
  201. package/resources/simulations/wire-transfers.d.ts.map +1 -1
  202. package/resources/simulations/wire-transfers.js.map +1 -1
  203. package/resources/simulations/wire-transfers.mjs.map +1 -1
  204. package/resources/transactions.d.ts +105 -110
  205. package/resources/transactions.d.ts.map +1 -1
  206. package/resources/transactions.js.map +1 -1
  207. package/resources/transactions.mjs.map +1 -1
  208. package/resources/wire-drawdown-requests.d.ts +4 -4
  209. package/resources/wire-drawdown-requests.d.ts.map +1 -1
  210. package/resources/wire-transfers.d.ts +11 -11
  211. package/resources/wire-transfers.d.ts.map +1 -1
  212. package/resources/wire-transfers.js.map +1 -1
  213. package/resources/wire-transfers.mjs.map +1 -1
  214. package/src/_shims/fetch.d.ts +8 -1
  215. package/src/_shims/fetch.node.d.ts +11 -1
  216. package/src/core.ts +176 -76
  217. package/src/index.ts +2 -2
  218. package/src/pagination.ts +5 -5
  219. package/src/resources/account-numbers.ts +9 -9
  220. package/src/resources/account-statements.ts +4 -7
  221. package/src/resources/account-transfers.ts +7 -19
  222. package/src/resources/accounts.ts +7 -7
  223. package/src/resources/ach-prenotifications.ts +56 -8
  224. package/src/resources/ach-transfers.ts +18 -10
  225. package/src/resources/balance-lookups.ts +1 -1
  226. package/src/resources/bookkeeping-accounts.ts +4 -4
  227. package/src/resources/bookkeeping-entries.ts +3 -3
  228. package/src/resources/bookkeeping-entry-sets.ts +1 -1
  229. package/src/resources/card-disputes.ts +8 -8
  230. package/src/resources/card-profiles.ts +20 -8
  231. package/src/resources/card-purchase-supplements.ts +4 -4
  232. package/src/resources/cards.ts +7 -14
  233. package/src/resources/check-deposits.ts +8 -8
  234. package/src/resources/check-transfers.ts +17 -11
  235. package/src/resources/declined-transactions.ts +26 -29
  236. package/src/resources/digital-wallet-tokens.ts +4 -7
  237. package/src/resources/documents.ts +4 -4
  238. package/src/resources/entities/beneficial-owners.ts +4 -8
  239. package/src/resources/entities/entities.ts +15 -12
  240. package/src/resources/entities/supplemental-documents.ts +2 -2
  241. package/src/resources/event-subscriptions.ts +6 -9
  242. package/src/resources/events.ts +8 -6
  243. package/src/resources/exports.ts +5 -5
  244. package/src/resources/external-accounts.ts +6 -12
  245. package/src/resources/files.ts +11 -6
  246. package/src/resources/groups.ts +1 -1
  247. package/src/resources/inbound-ach-transfer-returns.ts +7 -5
  248. package/src/resources/inbound-wire-drawdown-requests.ts +6 -4
  249. package/src/resources/limits.ts +6 -10
  250. package/src/resources/oauth-connections.ts +4 -7
  251. package/src/resources/pending-transactions.ts +29 -38
  252. package/src/resources/programs.ts +4 -4
  253. package/src/resources/real-time-decisions.ts +2 -5
  254. package/src/resources/real-time-payments-transfers.ts +7 -5
  255. package/src/resources/routing-numbers.ts +4 -1
  256. package/src/resources/simulations/account-statements.ts +1 -1
  257. package/src/resources/simulations/account-transfers.ts +1 -1
  258. package/src/resources/simulations/ach-transfers.ts +124 -138
  259. package/src/resources/simulations/card-disputes.ts +1 -1
  260. package/src/resources/simulations/card-profiles.ts +1 -4
  261. package/src/resources/simulations/card-refunds.ts +1 -1
  262. package/src/resources/simulations/cards.ts +49 -58
  263. package/src/resources/simulations/check-deposits.ts +3 -3
  264. package/src/resources/simulations/check-transfers.ts +2 -2
  265. package/src/resources/simulations/digital-wallet-token-requests.ts +1 -1
  266. package/src/resources/simulations/documents.ts +1 -4
  267. package/src/resources/simulations/inbound-funds-holds.ts +1 -1
  268. package/src/resources/simulations/inbound-wire-drawdown-requests.ts +1 -1
  269. package/src/resources/simulations/interest-payments.ts +100 -108
  270. package/src/resources/simulations/programs.ts +1 -4
  271. package/src/resources/simulations/real-time-payments-transfers.ts +123 -134
  272. package/src/resources/simulations/wire-transfers.ts +100 -108
  273. package/src/resources/transactions.ts +106 -111
  274. package/src/resources/wire-drawdown-requests.ts +5 -5
  275. package/src/resources/wire-transfers.ts +12 -12
  276. package/src/version.ts +1 -1
  277. package/version.d.ts +1 -1
  278. package/version.js +1 -1
  279. package/version.mjs +1 -1
@@ -10,14 +10,14 @@ 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
  }
@@ -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
  */
@@ -10,29 +10,29 @@ 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
  */
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -10,29 +10,29 @@ 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
  }
@@ -10,34 +10,41 @@ 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
  */
@@ -13,7 +13,7 @@ export class CardPurchaseSupplements extends APIResource {
13
13
  retrieve(
14
14
  cardPurchaseSupplementId: string,
15
15
  options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<CardPurchaseSupplement>> {
16
+ ): Core.APIPromise<CardPurchaseSupplement> {
17
17
  return this.get(`/card_purchase_supplements/${cardPurchaseSupplementId}`, options);
18
18
  }
19
19
 
@@ -23,12 +23,12 @@ export class CardPurchaseSupplements extends APIResource {
23
23
  list(
24
24
  query?: CardPurchaseSupplementListParams,
25
25
  options?: Core.RequestOptions,
26
- ): Core.PagePromise<CardPurchaseSupplementsPage>;
27
- list(options?: Core.RequestOptions): Core.PagePromise<CardPurchaseSupplementsPage>;
26
+ ): Core.PagePromise<CardPurchaseSupplementsPage, CardPurchaseSupplement>;
27
+ list(options?: Core.RequestOptions): Core.PagePromise<CardPurchaseSupplementsPage, CardPurchaseSupplement>;
28
28
  list(
29
29
  query: CardPurchaseSupplementListParams | Core.RequestOptions = {},
30
30
  options?: Core.RequestOptions,
31
- ): Core.PagePromise<CardPurchaseSupplementsPage> {
31
+ ): Core.PagePromise<CardPurchaseSupplementsPage, CardPurchaseSupplement> {
32
32
  if (isRequestOptions(query)) {
33
33
  return this.list({}, query);
34
34
  }
@@ -10,37 +10,33 @@ export class Cards extends APIResource {
10
10
  /**
11
11
  * Create a Card
12
12
  */
13
- create(body: CardCreateParams, options?: Core.RequestOptions): Promise<Core.APIResponse<Card>> {
13
+ create(body: CardCreateParams, options?: Core.RequestOptions): Core.APIPromise<Card> {
14
14
  return this.post('/cards', { body, ...options });
15
15
  }
16
16
 
17
17
  /**
18
18
  * Retrieve a Card
19
19
  */
20
- retrieve(cardId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Card>> {
20
+ retrieve(cardId: string, options?: Core.RequestOptions): Core.APIPromise<Card> {
21
21
  return this.get(`/cards/${cardId}`, options);
22
22
  }
23
23
 
24
24
  /**
25
25
  * Update a Card
26
26
  */
27
- update(
28
- cardId: string,
29
- body: CardUpdateParams,
30
- options?: Core.RequestOptions,
31
- ): Promise<Core.APIResponse<Card>> {
27
+ update(cardId: string, body: CardUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Card> {
32
28
  return this.patch(`/cards/${cardId}`, { body, ...options });
33
29
  }
34
30
 
35
31
  /**
36
32
  * List Cards
37
33
  */
38
- list(query?: CardListParams, options?: Core.RequestOptions): Core.PagePromise<CardsPage>;
39
- list(options?: Core.RequestOptions): Core.PagePromise<CardsPage>;
34
+ list(query?: CardListParams, options?: Core.RequestOptions): Core.PagePromise<CardsPage, Card>;
35
+ list(options?: Core.RequestOptions): Core.PagePromise<CardsPage, Card>;
40
36
  list(
41
37
  query: CardListParams | Core.RequestOptions = {},
42
38
  options?: Core.RequestOptions,
43
- ): Core.PagePromise<CardsPage> {
39
+ ): Core.PagePromise<CardsPage, Card> {
44
40
  if (isRequestOptions(query)) {
45
41
  return this.list({}, query);
46
42
  }
@@ -50,10 +46,7 @@ export class Cards extends APIResource {
50
46
  /**
51
47
  * Retrieve sensitive details for a Card
52
48
  */
53
- retrieveSensitiveDetails(
54
- cardId: string,
55
- options?: Core.RequestOptions,
56
- ): Promise<Core.APIResponse<CardDetails>> {
49
+ retrieveSensitiveDetails(cardId: string, options?: Core.RequestOptions): Core.APIPromise<CardDetails> {
57
50
  return this.get(`/cards/${cardId}/details`, options);
58
51
  }
59
52
  }
@@ -10,29 +10,29 @@ export class CheckDeposits extends APIResource {
10
10
  /**
11
11
  * Create a Check Deposit
12
12
  */
13
- create(
14
- body: CheckDepositCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<CheckDeposit>> {
13
+ create(body: CheckDepositCreateParams, options?: Core.RequestOptions): Core.APIPromise<CheckDeposit> {
17
14
  return this.post('/check_deposits', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve a Check Deposit
22
19
  */
23
- retrieve(checkDepositId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CheckDeposit>> {
20
+ retrieve(checkDepositId: string, options?: Core.RequestOptions): Core.APIPromise<CheckDeposit> {
24
21
  return this.get(`/check_deposits/${checkDepositId}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * List Check Deposits
29
26
  */
30
- list(query?: CheckDepositListParams, options?: Core.RequestOptions): Core.PagePromise<CheckDepositsPage>;
31
- list(options?: Core.RequestOptions): Core.PagePromise<CheckDepositsPage>;
27
+ list(
28
+ query?: CheckDepositListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<CheckDepositsPage, CheckDeposit>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<CheckDepositsPage, CheckDeposit>;
32
32
  list(
33
33
  query: CheckDepositListParams | Core.RequestOptions = {},
34
34
  options?: Core.RequestOptions,
35
- ): Core.PagePromise<CheckDepositsPage> {
35
+ ): Core.PagePromise<CheckDepositsPage, CheckDeposit> {
36
36
  if (isRequestOptions(query)) {
37
37
  return this.list({}, query);
38
38
  }
@@ -10,29 +10,29 @@ export class CheckTransfers extends APIResource {
10
10
  /**
11
11
  * Create a Check Transfer
12
12
  */
13
- create(
14
- body: CheckTransferCreateParams,
15
- options?: Core.RequestOptions,
16
- ): Promise<Core.APIResponse<CheckTransfer>> {
13
+ create(body: CheckTransferCreateParams, options?: Core.RequestOptions): Core.APIPromise<CheckTransfer> {
17
14
  return this.post('/check_transfers', { body, ...options });
18
15
  }
19
16
 
20
17
  /**
21
18
  * Retrieve a Check Transfer
22
19
  */
23
- retrieve(checkTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CheckTransfer>> {
20
+ retrieve(checkTransferId: string, options?: Core.RequestOptions): Core.APIPromise<CheckTransfer> {
24
21
  return this.get(`/check_transfers/${checkTransferId}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * List Check Transfers
29
26
  */
30
- list(query?: CheckTransferListParams, options?: Core.RequestOptions): Core.PagePromise<CheckTransfersPage>;
31
- list(options?: Core.RequestOptions): Core.PagePromise<CheckTransfersPage>;
27
+ list(
28
+ query?: CheckTransferListParams,
29
+ options?: Core.RequestOptions,
30
+ ): Core.PagePromise<CheckTransfersPage, CheckTransfer>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<CheckTransfersPage, CheckTransfer>;
32
32
  list(
33
33
  query: CheckTransferListParams | Core.RequestOptions = {},
34
34
  options?: Core.RequestOptions,
35
- ): Core.PagePromise<CheckTransfersPage> {
35
+ ): Core.PagePromise<CheckTransfersPage, CheckTransfer> {
36
36
  if (isRequestOptions(query)) {
37
37
  return this.list({}, query);
38
38
  }
@@ -42,14 +42,14 @@ export class CheckTransfers extends APIResource {
42
42
  /**
43
43
  * Approve a Check Transfer
44
44
  */
45
- approve(checkTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CheckTransfer>> {
45
+ approve(checkTransferId: string, options?: Core.RequestOptions): Core.APIPromise<CheckTransfer> {
46
46
  return this.post(`/check_transfers/${checkTransferId}/approve`, options);
47
47
  }
48
48
 
49
49
  /**
50
50
  * Cancel a pending Check Transfer
51
51
  */
52
- cancel(checkTransferId: string, options?: Core.RequestOptions): Promise<Core.APIResponse<CheckTransfer>> {
52
+ cancel(checkTransferId: string, options?: Core.RequestOptions): Core.APIPromise<CheckTransfer> {
53
53
  return this.post(`/check_transfers/${checkTransferId}/cancel`, options);
54
54
  }
55
55
 
@@ -60,7 +60,7 @@ export class CheckTransfers extends APIResource {
60
60
  checkTransferId: string,
61
61
  body: CheckTransferStopPaymentParams,
62
62
  options?: Core.RequestOptions,
63
- ): Promise<Core.APIResponse<CheckTransfer>> {
63
+ ): Core.APIPromise<CheckTransfer> {
64
64
  return this.post(`/check_transfers/${checkTransferId}/stop_payment`, { body, ...options });
65
65
  }
66
66
  }
@@ -298,6 +298,12 @@ export namespace CheckTransfer {
298
298
  * shipment.
299
299
  */
300
300
  export interface Mailing {
301
+ /**
302
+ * The ID of the file corresponding to an image of the check that was mailed, if
303
+ * available.
304
+ */
305
+ image_id: string | null;
306
+
301
307
  /**
302
308
  * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
303
309
  * the check was mailed.