modern-treasury 3.2.0 → 3.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 (33) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/bin/cli +12 -5
  3. package/package.json +1 -1
  4. package/resources/counterparties.d.mts +16 -23
  5. package/resources/counterparties.d.mts.map +1 -1
  6. package/resources/counterparties.d.ts +16 -23
  7. package/resources/counterparties.d.ts.map +1 -1
  8. package/resources/counterparties.js +2 -7
  9. package/resources/counterparties.js.map +1 -1
  10. package/resources/counterparties.mjs +2 -7
  11. package/resources/counterparties.mjs.map +1 -1
  12. package/resources/external-accounts.d.mts +16 -36
  13. package/resources/external-accounts.d.mts.map +1 -1
  14. package/resources/external-accounts.d.ts +16 -36
  15. package/resources/external-accounts.d.ts.map +1 -1
  16. package/resources/external-accounts.js +2 -7
  17. package/resources/external-accounts.js.map +1 -1
  18. package/resources/external-accounts.mjs +2 -7
  19. package/resources/external-accounts.mjs.map +1 -1
  20. package/resources/payment-orders/payment-orders.d.mts +1 -1
  21. package/resources/payment-orders/payment-orders.d.mts.map +1 -1
  22. package/resources/payment-orders/payment-orders.d.ts +1 -1
  23. package/resources/payment-orders/payment-orders.d.ts.map +1 -1
  24. package/resources/payment-orders/payment-orders.js.map +1 -1
  25. package/resources/payment-orders/payment-orders.mjs.map +1 -1
  26. package/src/resources/counterparties.ts +17 -30
  27. package/src/resources/external-accounts.ts +17 -43
  28. package/src/resources/payment-orders/payment-orders.ts +1 -0
  29. package/src/version.ts +1 -1
  30. package/version.d.mts +1 -1
  31. package/version.d.ts +1 -1
  32. package/version.js +1 -1
  33. package/version.mjs +1 -1
@@ -23,13 +23,8 @@ export class ExternalAccounts extends APIResource {
23
23
  * });
24
24
  * ```
25
25
  */
26
- create(params: ExternalAccountCreateParams, options?: RequestOptions): APIPromise<ExternalAccount> {
27
- const { query_external_id, ...body } = params;
28
- return this._client.post('/api/external_accounts', {
29
- query: { external_id: query_external_id },
30
- body,
31
- ...options,
32
- });
26
+ create(body: ExternalAccountCreateParams, options?: RequestOptions): APIPromise<ExternalAccount> {
27
+ return this._client.post('/api/external_accounts', { body, ...options });
33
28
  }
34
29
 
35
30
  /**
@@ -314,87 +309,66 @@ export namespace ExternalAccountVerifyResponse {
314
309
  }
315
310
 
316
311
  export interface ExternalAccountCreateParams {
317
- /**
318
- * Body param:
319
- */
320
312
  counterparty_id: string | null;
321
313
 
322
- /**
323
- * Query param: An optional user-defined 180 character unique identifier.
324
- */
325
- query_external_id?: string;
326
-
327
- /**
328
- * Body param:
329
- */
330
314
  account_details?: Array<ExternalAccountCreateParams.AccountDetail>;
331
315
 
332
316
  /**
333
- * Body param: Can be `checking`, `savings` or `other`.
317
+ * Can be `checking`, `savings` or `other`.
334
318
  */
335
319
  account_type?: ExternalAccountType;
336
320
 
337
- /**
338
- * Body param:
339
- */
340
321
  contact_details?: Array<PaymentOrdersAPI.ContactDetailCreateRequest>;
341
322
 
342
323
  /**
343
- * Body param: An optional user-defined 180 character unique identifier.
324
+ * An optional user-defined 180 character unique identifier.
344
325
  */
345
- body_external_id?: string | null;
326
+ external_id?: string | null;
346
327
 
347
328
  /**
348
- * Body param: Specifies a ledger account object that will be created with the
349
- * external account. The resulting ledger account is linked to the external account
350
- * for auto-ledgering Payment objects. See
329
+ * Specifies a ledger account object that will be created with the external
330
+ * account. The resulting ledger account is linked to the external account for
331
+ * auto-ledgering Payment objects. See
351
332
  * https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
352
333
  * for more details.
353
334
  */
354
335
  ledger_account?: Shared.LedgerAccountCreateRequest;
355
336
 
356
337
  /**
357
- * Body param: Additional data represented as key-value pairs. Both the key and
358
- * value must be strings.
338
+ * Additional data represented as key-value pairs. Both the key and value must be
339
+ * strings.
359
340
  */
360
341
  metadata?: { [key: string]: string };
361
342
 
362
343
  /**
363
- * Body param: A nickname for the external account. This is only for internal usage
364
- * and won't affect any payments
344
+ * A nickname for the external account. This is only for internal usage and won't
345
+ * affect any payments
365
346
  */
366
347
  name?: string | null;
367
348
 
368
349
  /**
369
- * Body param: Required if receiving wire payments.
350
+ * Required if receiving wire payments.
370
351
  */
371
352
  party_address?: Shared.AddressRequest;
372
353
 
373
- /**
374
- * Body param:
375
- */
376
354
  party_identifier?: string;
377
355
 
378
356
  /**
379
- * Body param: If this value isn't provided, it will be inherited from the
380
- * counterparty's name.
357
+ * If this value isn't provided, it will be inherited from the counterparty's name.
381
358
  */
382
359
  party_name?: string;
383
360
 
384
361
  /**
385
- * Body param: Either `individual` or `business`.
362
+ * Either `individual` or `business`.
386
363
  */
387
364
  party_type?: 'business' | 'individual' | null;
388
365
 
389
366
  /**
390
- * Body param: If you've enabled the Modern Treasury + Plaid integration in your
391
- * Plaid account, you can pass the processor token in this field.
367
+ * If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
368
+ * you can pass the processor token in this field.
392
369
  */
393
370
  plaid_processor_token?: string;
394
371
 
395
- /**
396
- * Body param:
397
- */
398
372
  routing_details?: Array<ExternalAccountCreateParams.RoutingDetail>;
399
373
  }
400
374
 
@@ -623,6 +623,7 @@ export type PaymentOrderSubtype =
623
623
  | 'CIE'
624
624
  | 'CTX'
625
625
  | 'IAT'
626
+ | 'POS'
626
627
  | 'PPD'
627
628
  | 'TEL'
628
629
  | 'WEB'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.2.0'; // x-release-please-version
1
+ export const VERSION = '3.3.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.2.0";
1
+ export declare const VERSION = "3.3.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.2.0";
1
+ export declare const VERSION = "3.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 = '3.2.0'; // x-release-please-version
4
+ exports.VERSION = '3.3.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.2.0'; // x-release-please-version
1
+ export const VERSION = '3.3.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map