modern-treasury 2.2.0 → 2.3.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 (210) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +41 -15
  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 +78 -29
  15. package/core.d.ts.map +1 -1
  16. package/core.js +185 -61
  17. package/core.js.map +1 -1
  18. package/core.mjs +179 -61
  19. package/core.mjs.map +1 -1
  20. package/index.d.mts +1 -2
  21. package/index.d.ts +1 -2
  22. package/index.d.ts.map +1 -1
  23. package/index.js +4 -4
  24. package/index.js.map +1 -1
  25. package/index.mjs +4 -4
  26. package/index.mjs.map +1 -1
  27. package/package.json +1 -1
  28. package/pagination.d.ts +2 -2
  29. package/pagination.d.ts.map +1 -1
  30. package/pagination.js +5 -5
  31. package/pagination.js.map +1 -1
  32. package/pagination.mjs +5 -5
  33. package/pagination.mjs.map +1 -1
  34. package/resources/account-collection-flows.d.ts +6 -6
  35. package/resources/account-collection-flows.d.ts.map +1 -1
  36. package/resources/account-details.d.ts +5 -5
  37. package/resources/account-details.d.ts.map +1 -1
  38. package/resources/connections.d.ts +5 -2
  39. package/resources/connections.d.ts.map +1 -1
  40. package/resources/connections.js.map +1 -1
  41. package/resources/connections.mjs.map +1 -1
  42. package/resources/counterparties.d.ts +11 -11
  43. package/resources/counterparties.d.ts.map +1 -1
  44. package/resources/counterparties.js.map +1 -1
  45. package/resources/counterparties.mjs.map +1 -1
  46. package/resources/documents.d.ts +4 -4
  47. package/resources/documents.d.ts.map +1 -1
  48. package/resources/documents.js +2 -2
  49. package/resources/documents.js.map +1 -1
  50. package/resources/documents.mjs +2 -2
  51. package/resources/documents.mjs.map +1 -1
  52. package/resources/events.d.ts +3 -3
  53. package/resources/events.d.ts.map +1 -1
  54. package/resources/expected-payments.d.ts +7 -7
  55. package/resources/expected-payments.d.ts.map +1 -1
  56. package/resources/external-accounts.d.ts +10 -10
  57. package/resources/external-accounts.d.ts.map +1 -1
  58. package/resources/incoming-payment-details.d.ts +11 -7
  59. package/resources/incoming-payment-details.d.ts.map +1 -1
  60. package/resources/incoming-payment-details.js.map +1 -1
  61. package/resources/incoming-payment-details.mjs.map +1 -1
  62. package/resources/index.d.ts +0 -1
  63. package/resources/index.d.ts.map +1 -1
  64. package/resources/index.js.map +1 -1
  65. package/resources/index.mjs.map +1 -1
  66. package/resources/internal-accounts/balance-reports.d.ts +6 -3
  67. package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
  68. package/resources/internal-accounts/balance-reports.js.map +1 -1
  69. package/resources/internal-accounts/balance-reports.mjs.map +1 -1
  70. package/resources/internal-accounts/internal-accounts.d.ts +6 -6
  71. package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
  72. package/resources/invoices/invoices.d.ts +46 -13
  73. package/resources/invoices/invoices.d.ts.map +1 -1
  74. package/resources/invoices/invoices.js.map +1 -1
  75. package/resources/invoices/invoices.mjs.map +1 -1
  76. package/resources/invoices/line-items.d.ts +23 -171
  77. package/resources/invoices/line-items.d.ts.map +1 -1
  78. package/resources/invoices/line-items.js.map +1 -1
  79. package/resources/invoices/line-items.mjs.map +1 -1
  80. package/resources/ledger-account-categories.d.ts +39 -74
  81. package/resources/ledger-account-categories.d.ts.map +1 -1
  82. package/resources/ledger-account-categories.js +11 -13
  83. package/resources/ledger-account-categories.js.map +1 -1
  84. package/resources/ledger-account-categories.mjs +11 -13
  85. package/resources/ledger-account-categories.mjs.map +1 -1
  86. package/resources/ledger-account-payouts.d.ts +22 -6
  87. package/resources/ledger-account-payouts.d.ts.map +1 -1
  88. package/resources/ledger-account-payouts.js.map +1 -1
  89. package/resources/ledger-account-payouts.mjs.map +1 -1
  90. package/resources/ledger-account-statements.d.ts +2 -2
  91. package/resources/ledger-account-statements.d.ts.map +1 -1
  92. package/resources/ledger-accounts.d.ts +17 -12
  93. package/resources/ledger-accounts.d.ts.map +1 -1
  94. package/resources/ledger-accounts.js.map +1 -1
  95. package/resources/ledger-accounts.mjs.map +1 -1
  96. package/resources/ledger-entries.d.ts +20 -6
  97. package/resources/ledger-entries.d.ts.map +1 -1
  98. package/resources/ledger-entries.js.map +1 -1
  99. package/resources/ledger-entries.mjs.map +1 -1
  100. package/resources/ledger-event-handlers.d.ts +7 -8
  101. package/resources/ledger-event-handlers.d.ts.map +1 -1
  102. package/resources/ledger-event-handlers.js.map +1 -1
  103. package/resources/ledger-event-handlers.mjs.map +1 -1
  104. package/resources/ledger-transactions/ledger-transactions.d.ts +35 -18
  105. package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
  106. package/resources/ledger-transactions/ledger-transactions.js +3 -3
  107. package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
  108. package/resources/ledger-transactions/ledger-transactions.mjs +3 -3
  109. package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
  110. package/resources/ledger-transactions/versions.d.ts +4 -2
  111. package/resources/ledger-transactions/versions.d.ts.map +1 -1
  112. package/resources/ledger-transactions/versions.js.map +1 -1
  113. package/resources/ledger-transactions/versions.mjs.map +1 -1
  114. package/resources/ledgerable-events.d.ts +2 -2
  115. package/resources/ledgerable-events.d.ts.map +1 -1
  116. package/resources/ledgers.d.ts +12 -11
  117. package/resources/ledgers.d.ts.map +1 -1
  118. package/resources/ledgers.js.map +1 -1
  119. package/resources/ledgers.mjs.map +1 -1
  120. package/resources/line-items.d.ts +5 -5
  121. package/resources/line-items.d.ts.map +1 -1
  122. package/resources/paper-items.d.ts +6 -3
  123. package/resources/paper-items.d.ts.map +1 -1
  124. package/resources/paper-items.js.map +1 -1
  125. package/resources/paper-items.mjs.map +1 -1
  126. package/resources/payment-flows.d.ts +9 -9
  127. package/resources/payment-flows.d.ts.map +1 -1
  128. package/resources/payment-flows.js.map +1 -1
  129. package/resources/payment-flows.mjs.map +1 -1
  130. package/resources/payment-orders/payment-orders.d.ts +30 -24
  131. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  132. package/resources/payment-orders/payment-orders.js +3 -5
  133. package/resources/payment-orders/payment-orders.js.map +1 -1
  134. package/resources/payment-orders/payment-orders.mjs +3 -5
  135. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  136. package/resources/payment-orders/reversals.d.ts +14 -9
  137. package/resources/payment-orders/reversals.d.ts.map +1 -1
  138. package/resources/payment-orders/reversals.js.map +1 -1
  139. package/resources/payment-orders/reversals.mjs.map +1 -1
  140. package/resources/payment-references.d.ts +3 -3
  141. package/resources/payment-references.d.ts.map +1 -1
  142. package/resources/returns.d.ts +7 -4
  143. package/resources/returns.d.ts.map +1 -1
  144. package/resources/returns.js.map +1 -1
  145. package/resources/returns.mjs.map +1 -1
  146. package/resources/routing-details.d.ts +5 -5
  147. package/resources/routing-details.d.ts.map +1 -1
  148. package/resources/transactions/line-items.d.ts +5 -2
  149. package/resources/transactions/line-items.d.ts.map +1 -1
  150. package/resources/transactions/line-items.js.map +1 -1
  151. package/resources/transactions/line-items.mjs.map +1 -1
  152. package/resources/transactions/transactions.d.ts +8 -5
  153. package/resources/transactions/transactions.d.ts.map +1 -1
  154. package/resources/transactions/transactions.js.map +1 -1
  155. package/resources/transactions/transactions.mjs.map +1 -1
  156. package/resources/validations.d.ts +1 -1
  157. package/resources/validations.d.ts.map +1 -1
  158. package/resources/virtual-accounts.d.ts +7 -10
  159. package/resources/virtual-accounts.d.ts.map +1 -1
  160. package/resources/virtual-accounts.js.map +1 -1
  161. package/resources/virtual-accounts.mjs.map +1 -1
  162. package/src/_shims/ReadableStream.d.ts +38 -0
  163. package/src/_shims/ReadableStream.js +5 -0
  164. package/src/_shims/ReadableStream.mjs +7 -0
  165. package/src/_shims/ReadableStream.node.ts +6 -0
  166. package/src/_shims/fetch.d.ts +8 -1
  167. package/src/_shims/fetch.node.d.ts +11 -1
  168. package/src/core.ts +244 -79
  169. package/src/index.ts +4 -5
  170. package/src/pagination.ts +6 -6
  171. package/src/resources/account-collection-flows.ts +8 -8
  172. package/src/resources/account-details.ts +6 -6
  173. package/src/resources/connections.ts +6 -3
  174. package/src/resources/counterparties.ts +13 -13
  175. package/src/resources/documents.ts +6 -9
  176. package/src/resources/events.ts +4 -4
  177. package/src/resources/expected-payments.ts +9 -9
  178. package/src/resources/external-accounts.ts +13 -13
  179. package/src/resources/incoming-payment-details.ts +15 -10
  180. package/src/resources/index.ts +0 -1
  181. package/src/resources/internal-accounts/balance-reports.ts +7 -4
  182. package/src/resources/internal-accounts/internal-accounts.ts +8 -8
  183. package/src/resources/invoices/invoices.ts +55 -15
  184. package/src/resources/invoices/line-items.ts +25 -207
  185. package/src/resources/ledger-account-categories.ts +47 -91
  186. package/src/resources/ledger-account-payouts.ts +27 -8
  187. package/src/resources/ledger-account-statements.ts +2 -2
  188. package/src/resources/ledger-accounts.ts +21 -15
  189. package/src/resources/ledger-entries.ts +24 -8
  190. package/src/resources/ledger-event-handlers.ts +8 -12
  191. package/src/resources/ledger-transactions/ledger-transactions.ts +46 -25
  192. package/src/resources/ledger-transactions/versions.ts +5 -3
  193. package/src/resources/ledgerable-events.ts +2 -2
  194. package/src/resources/ledgers.ts +15 -13
  195. package/src/resources/line-items.ts +7 -7
  196. package/src/resources/paper-items.ts +7 -4
  197. package/src/resources/payment-flows.ts +11 -11
  198. package/src/resources/payment-orders/payment-orders.ts +39 -36
  199. package/src/resources/payment-orders/reversals.ts +17 -11
  200. package/src/resources/payment-references.ts +4 -4
  201. package/src/resources/returns.ts +8 -5
  202. package/src/resources/routing-details.ts +6 -6
  203. package/src/resources/transactions/line-items.ts +6 -3
  204. package/src/resources/transactions/transactions.ts +10 -7
  205. package/src/resources/validations.ts +1 -1
  206. package/src/resources/virtual-accounts.ts +9 -12
  207. package/src/version.ts +1 -1
  208. package/version.d.ts +1 -1
  209. package/version.js +1 -1
  210. package/version.mjs +1 -1
@@ -13,12 +13,12 @@ export class PaymentReferences extends APIResource {
13
13
  list(
14
14
  query?: PaymentReferenceListParams,
15
15
  options?: Core.RequestOptions,
16
- ): Core.PagePromise<PaymentReferencesPage>;
17
- list(options?: Core.RequestOptions): Core.PagePromise<PaymentReferencesPage>;
16
+ ): Core.PagePromise<PaymentReferencesPage, PaymentReference>;
17
+ list(options?: Core.RequestOptions): Core.PagePromise<PaymentReferencesPage, PaymentReference>;
18
18
  list(
19
19
  query: PaymentReferenceListParams | Core.RequestOptions = {},
20
20
  options?: Core.RequestOptions,
21
- ): Core.PagePromise<PaymentReferencesPage> {
21
+ ): Core.PagePromise<PaymentReferencesPage, PaymentReference> {
22
22
  if (isRequestOptions(query)) {
23
23
  return this.list({}, query);
24
24
  }
@@ -28,7 +28,7 @@ export class PaymentReferences extends APIResource {
28
28
  /**
29
29
  * get payment_reference
30
30
  */
31
- retireve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaymentReference>> {
31
+ retireve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentReference> {
32
32
  return this.get(`/api/payment_references/${id}`, options);
33
33
  }
34
34
  }
@@ -11,7 +11,7 @@ export class Returns extends APIResource {
11
11
  /**
12
12
  * Create a return.
13
13
  */
14
- create(params: ReturnCreateParams, options?: Core.RequestOptions): Promise<Core.APIResponse<ReturnObject>> {
14
+ create(params: ReturnCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReturnObject> {
15
15
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
16
16
  return this.post('/api/returns', {
17
17
  body,
@@ -23,19 +23,22 @@ export class Returns extends APIResource {
23
23
  /**
24
24
  * Get a single return.
25
25
  */
26
- retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ReturnObject>> {
26
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ReturnObject> {
27
27
  return this.get(`/api/returns/${id}`, options);
28
28
  }
29
29
 
30
30
  /**
31
31
  * Get a list of returns.
32
32
  */
33
- list(query?: ReturnListParams, options?: Core.RequestOptions): Core.PagePromise<ReturnObjectsPage>;
34
- list(options?: Core.RequestOptions): Core.PagePromise<ReturnObjectsPage>;
33
+ list(
34
+ query?: ReturnListParams,
35
+ options?: Core.RequestOptions,
36
+ ): Core.PagePromise<ReturnObjectsPage, ReturnObject>;
37
+ list(options?: Core.RequestOptions): Core.PagePromise<ReturnObjectsPage, ReturnObject>;
35
38
  list(
36
39
  query: ReturnListParams | Core.RequestOptions = {},
37
40
  options?: Core.RequestOptions,
38
- ): Core.PagePromise<ReturnObjectsPage> {
41
+ ): Core.PagePromise<ReturnObjectsPage, ReturnObject> {
39
42
  if (isRequestOptions(query)) {
40
43
  return this.list({}, query);
41
44
  }
@@ -16,7 +16,7 @@ export class RoutingDetails extends APIResource {
16
16
  accountId: string,
17
17
  params: RoutingDetailCreateParams,
18
18
  options?: Core.RequestOptions,
19
- ): Promise<Core.APIResponse<RoutingDetail>> {
19
+ ): Core.APIPromise<RoutingDetail> {
20
20
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
21
21
  return this.post(`/api/${accountsType}/${accountId}/routing_details`, {
22
22
  body,
@@ -33,7 +33,7 @@ export class RoutingDetails extends APIResource {
33
33
  accountId: string,
34
34
  id: string,
35
35
  options?: Core.RequestOptions,
36
- ): Promise<Core.APIResponse<RoutingDetail>> {
36
+ ): Core.APIPromise<RoutingDetail> {
37
37
  return this.get(`/api/${accountsType}/${accountId}/routing_details/${id}`, options);
38
38
  }
39
39
 
@@ -45,18 +45,18 @@ export class RoutingDetails extends APIResource {
45
45
  accountId: string,
46
46
  query?: RoutingDetailListParams,
47
47
  options?: Core.RequestOptions,
48
- ): Core.PagePromise<RoutingDetailsPage>;
48
+ ): Core.PagePromise<RoutingDetailsPage, RoutingDetail>;
49
49
  list(
50
50
  accountsType: Shared.AccountsType,
51
51
  accountId: string,
52
52
  options?: Core.RequestOptions,
53
- ): Core.PagePromise<RoutingDetailsPage>;
53
+ ): Core.PagePromise<RoutingDetailsPage, RoutingDetail>;
54
54
  list(
55
55
  accountsType: Shared.AccountsType,
56
56
  accountId: string,
57
57
  query: RoutingDetailListParams | Core.RequestOptions = {},
58
58
  options?: Core.RequestOptions,
59
- ): Core.PagePromise<RoutingDetailsPage> {
59
+ ): Core.PagePromise<RoutingDetailsPage, RoutingDetail> {
60
60
  if (isRequestOptions(query)) {
61
61
  return this.list(accountsType, accountId, {}, query);
62
62
  }
@@ -74,7 +74,7 @@ export class RoutingDetails extends APIResource {
74
74
  accountId: string,
75
75
  id: string,
76
76
  options?: Core.RequestOptions,
77
- ): Promise<Core.APIResponse<void>> {
77
+ ): Core.APIPromise<void> {
78
78
  return this.delete(`/api/${accountsType}/${accountId}/routing_details/${id}`, {
79
79
  ...options,
80
80
  headers: { Accept: '', ...options?.headers },
@@ -14,13 +14,16 @@ export class LineItems extends APIResource {
14
14
  transactionId: string,
15
15
  query?: LineItemListParams,
16
16
  options?: Core.RequestOptions,
17
- ): Core.PagePromise<TransactionLineItemsPage>;
18
- list(transactionId: string, options?: Core.RequestOptions): Core.PagePromise<TransactionLineItemsPage>;
17
+ ): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem>;
18
+ list(
19
+ transactionId: string,
20
+ options?: Core.RequestOptions,
21
+ ): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem>;
19
22
  list(
20
23
  transactionId: string,
21
24
  query: LineItemListParams | Core.RequestOptions = {},
22
25
  options?: Core.RequestOptions,
23
- ): Core.PagePromise<TransactionLineItemsPage> {
26
+ ): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem> {
24
27
  if (isRequestOptions(query)) {
25
28
  return this.list(transactionId, {}, query);
26
29
  }
@@ -14,7 +14,7 @@ export class Transactions extends APIResource {
14
14
  /**
15
15
  * Get details on a single transaction.
16
16
  */
17
- retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Transaction>> {
17
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Transaction> {
18
18
  return this.get(`/api/transactions/${id}`, options);
19
19
  }
20
20
 
@@ -25,13 +25,13 @@ export class Transactions extends APIResource {
25
25
  id: string,
26
26
  body?: TransactionUpdateParams,
27
27
  options?: Core.RequestOptions,
28
- ): Promise<Core.APIResponse<Transaction>>;
29
- update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Transaction>>;
28
+ ): Core.APIPromise<Transaction>;
29
+ update(id: string, options?: Core.RequestOptions): Core.APIPromise<Transaction>;
30
30
  update(
31
31
  id: string,
32
32
  body: TransactionUpdateParams | Core.RequestOptions = {},
33
33
  options?: Core.RequestOptions,
34
- ): Promise<Core.APIResponse<Transaction>> {
34
+ ): Core.APIPromise<Transaction> {
35
35
  if (isRequestOptions(body)) {
36
36
  return this.update(id, {}, body);
37
37
  }
@@ -41,12 +41,15 @@ export class Transactions extends APIResource {
41
41
  /**
42
42
  * Get a list of all transactions.
43
43
  */
44
- list(query?: TransactionListParams, options?: Core.RequestOptions): Core.PagePromise<TransactionsPage>;
45
- list(options?: Core.RequestOptions): Core.PagePromise<TransactionsPage>;
44
+ list(
45
+ query?: TransactionListParams,
46
+ options?: Core.RequestOptions,
47
+ ): Core.PagePromise<TransactionsPage, Transaction>;
48
+ list(options?: Core.RequestOptions): Core.PagePromise<TransactionsPage, Transaction>;
46
49
  list(
47
50
  query: TransactionListParams | Core.RequestOptions = {},
48
51
  options?: Core.RequestOptions,
49
- ): Core.PagePromise<TransactionsPage> {
52
+ ): Core.PagePromise<TransactionsPage, Transaction> {
50
53
  if (isRequestOptions(query)) {
51
54
  return this.list({}, query);
52
55
  }
@@ -12,7 +12,7 @@ export class Validations extends APIResource {
12
12
  validateRoutingNumber(
13
13
  query: ValidationValidateRoutingNumberParams,
14
14
  options?: Core.RequestOptions,
15
- ): Promise<Core.APIResponse<RoutingNumberLookupRequest>> {
15
+ ): Core.APIPromise<RoutingNumberLookupRequest> {
16
16
  return this.get('/api/validations/routing_numbers', { query, ...options });
17
17
  }
18
18
  }
@@ -12,10 +12,7 @@ export class VirtualAccounts extends APIResource {
12
12
  /**
13
13
  * create virtual_account
14
14
  */
15
- create(
16
- params: VirtualAccountCreateParams,
17
- options?: Core.RequestOptions,
18
- ): Promise<Core.APIResponse<VirtualAccount>> {
15
+ create(params: VirtualAccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<VirtualAccount> {
19
16
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
20
17
  return this.post('/api/virtual_accounts', {
21
18
  body,
@@ -27,7 +24,7 @@ export class VirtualAccounts extends APIResource {
27
24
  /**
28
25
  * get virtual_account
29
26
  */
30
- retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<VirtualAccount>> {
27
+ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<VirtualAccount> {
31
28
  return this.get(`/api/virtual_accounts/${id}`, options);
32
29
  }
33
30
 
@@ -38,13 +35,13 @@ export class VirtualAccounts extends APIResource {
38
35
  id: string,
39
36
  body?: VirtualAccountUpdateParams,
40
37
  options?: Core.RequestOptions,
41
- ): Promise<Core.APIResponse<VirtualAccount>>;
42
- update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<VirtualAccount>>;
38
+ ): Core.APIPromise<VirtualAccount>;
39
+ update(id: string, options?: Core.RequestOptions): Core.APIPromise<VirtualAccount>;
43
40
  update(
44
41
  id: string,
45
42
  body: VirtualAccountUpdateParams | Core.RequestOptions = {},
46
43
  options?: Core.RequestOptions,
47
- ): Promise<Core.APIResponse<VirtualAccount>> {
44
+ ): Core.APIPromise<VirtualAccount> {
48
45
  if (isRequestOptions(body)) {
49
46
  return this.update(id, {}, body);
50
47
  }
@@ -57,12 +54,12 @@ export class VirtualAccounts extends APIResource {
57
54
  list(
58
55
  query?: VirtualAccountListParams,
59
56
  options?: Core.RequestOptions,
60
- ): Core.PagePromise<VirtualAccountsPage>;
61
- list(options?: Core.RequestOptions): Core.PagePromise<VirtualAccountsPage>;
57
+ ): Core.PagePromise<VirtualAccountsPage, VirtualAccount>;
58
+ list(options?: Core.RequestOptions): Core.PagePromise<VirtualAccountsPage, VirtualAccount>;
62
59
  list(
63
60
  query: VirtualAccountListParams | Core.RequestOptions = {},
64
61
  options?: Core.RequestOptions,
65
- ): Core.PagePromise<VirtualAccountsPage> {
62
+ ): Core.PagePromise<VirtualAccountsPage, VirtualAccount> {
66
63
  if (isRequestOptions(query)) {
67
64
  return this.list({}, query);
68
65
  }
@@ -72,7 +69,7 @@ export class VirtualAccounts extends APIResource {
72
69
  /**
73
70
  * delete virtual_account
74
71
  */
75
- del(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<VirtualAccount>> {
72
+ del(id: string, options?: Core.RequestOptions): Core.APIPromise<VirtualAccount> {
76
73
  return this.delete(`/api/virtual_accounts/${id}`, options);
77
74
  }
78
75
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.2.0'; // x-release-please-version
1
+ export const VERSION = '2.3.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = '2.2.0';
1
+ export declare const VERSION = '2.3.0';
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.2.0'; // x-release-please-version
4
+ exports.VERSION = '2.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.2.0'; // x-release-please-version
1
+ export const VERSION = '2.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map