@cobo/cobo-waas2 1.31.0 → 1.33.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 (46) hide show
  1. package/README.md +6 -1
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +4 -4
  4. package/dist/api/FeeStationApi.js +4 -4
  5. package/dist/api/PaymentApi.js +89 -14
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/api/WalletsApi.js +83 -0
  8. package/dist/index.js +14 -0
  9. package/dist/model/CreateDestinationBankAccount.js +26 -0
  10. package/dist/model/DestinationBankAccount.js +26 -0
  11. package/dist/model/DestinationBankAccountDetail.js +26 -0
  12. package/dist/model/IntermediaryBankInfo.js +4 -6
  13. package/dist/model/MerchantBalance.js +4 -6
  14. package/dist/model/ReportType.js +5 -0
  15. package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +26 -0
  16. package/dist/model/TransactionExtra.js +54 -8
  17. package/dist/model/TransactionRawTxInfo.js +32 -1
  18. package/dist/model/TransactionSelectedUtxo.js +39 -0
  19. package/dist/model/TransactionUtxoChange.js +13 -0
  20. package/dist/model/TriggerTestPaymentWebhookEventResponse.js +83 -0
  21. package/dist/model/TriggerTestPaymentsWebhookEventRequest.js +115 -0
  22. package/dist/model/UTXO.js +48 -0
  23. package/dist/model/UpdateDestinationBankAccount.js +26 -0
  24. package/dist/model/WebhookEventType.js +10 -0
  25. package/docs/AutoSweepApi.md +2 -2
  26. package/docs/CreateDestinationBankAccount.md +2 -0
  27. package/docs/DestinationBankAccount.md +2 -0
  28. package/docs/DestinationBankAccountDetail.md +2 -0
  29. package/docs/FeeStationApi.md +2 -2
  30. package/docs/IntermediaryBankInfo.md +1 -1
  31. package/docs/MerchantBalance.md +1 -1
  32. package/docs/PaymentApi.md +106 -6
  33. package/docs/ReportType.md +2 -0
  34. package/docs/TransactionDepositToAddressDestinationTxInfo.md +2 -0
  35. package/docs/TransactionExtra.md +3 -0
  36. package/docs/TransactionRawTxInfo.md +2 -1
  37. package/docs/TransactionSelectedUtxo.md +3 -0
  38. package/docs/TransactionUtxoChange.md +1 -0
  39. package/docs/TransactionsApi.md +2 -2
  40. package/docs/TriggerTestPaymentWebhookEventResponse.md +9 -0
  41. package/docs/TriggerTestPaymentsWebhookEventRequest.md +10 -0
  42. package/docs/UTXO.md +4 -0
  43. package/docs/UpdateDestinationBankAccount.md +2 -0
  44. package/docs/WalletsApi.md +71 -0
  45. package/docs/WebhookEventType.md +4 -0
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http
15
15
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
16
16
 
17
17
  - API version: v2
18
- - Package version: 1.31.0
18
+ - Package version: 1.33.0
19
19
  - Generator version: 7.6.0
20
20
  - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
21
21
  For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas)
@@ -134,6 +134,7 @@ Class | Method | HTTP request | Description
134
134
  *CoboWaas2.PaymentApi* | [**createRefund**](docs/PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
135
135
  *CoboWaas2.PaymentApi* | [**createRefundLink**](docs/PaymentApi.md#createRefundLink) | **POST** /payments/links/refunds | Create refund link
136
136
  *CoboWaas2.PaymentApi* | [**createReport**](docs/PaymentApi.md#createReport) | **POST** /payments/reports | Generate reports
137
+ *CoboWaas2.PaymentApi* | [**createSdkLink**](docs/PaymentApi.md#createSdkLink) | **POST** /payments/links/sdk | Create SDK link
137
138
  *CoboWaas2.PaymentApi* | [**createSettlementRequest**](docs/PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
138
139
  *CoboWaas2.PaymentApi* | [**createTopUpAddresses**](docs/PaymentApi.md#createTopUpAddresses) | **POST** /payments/topup/address | Batch create top-up addresses
139
140
  *CoboWaas2.PaymentApi* | [**deleteCounterpartyById**](docs/PaymentApi.md#deleteCounterpartyById) | **DELETE** /payments/counterparty/{counterparty_id} | Delete counterparty
@@ -179,6 +180,7 @@ Class | Method | HTTP request | Description
179
180
  *CoboWaas2.PaymentApi* | [**listTopUpPayerAccounts**](docs/PaymentApi.md#listTopUpPayerAccounts) | **GET** /payments/topup/payer_accounts | List top-up payer accounts
180
181
  *CoboWaas2.PaymentApi* | [**listTopUpPayers**](docs/PaymentApi.md#listTopUpPayers) | **GET** /payments/topup/payers | List payers
181
182
  *CoboWaas2.PaymentApi* | [**paymentEstimateFee**](docs/PaymentApi.md#paymentEstimateFee) | **POST** /payments/estimate_fee | Estimate fees
183
+ *CoboWaas2.PaymentApi* | [**triggerTestPaymentsWebhookEvent**](docs/PaymentApi.md#triggerTestPaymentsWebhookEvent) | **POST** /payments/webhooks/trigger | Trigger test webhook event
182
184
  *CoboWaas2.PaymentApi* | [**updateBankAccountById**](docs/PaymentApi.md#updateBankAccountById) | **PUT** /payments/bank_accounts/{bank_account_id} | Update bank account
183
185
  *CoboWaas2.PaymentApi* | [**updateCounterparty**](docs/PaymentApi.md#updateCounterparty) | **PUT** /payments/counterparty/{counterparty_id} | Update counterparty
184
186
  *CoboWaas2.PaymentApi* | [**updateDestination**](docs/PaymentApi.md#updateDestination) | **PUT** /payments/destination/{destination_id} | Update destination
@@ -285,6 +287,7 @@ Class | Method | HTTP request | Description
285
287
  *CoboWaas2.WalletsApi* | [**listTokenBalancesForAddress**](docs/WalletsApi.md#listTokenBalancesForAddress) | **GET** /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address
286
288
  *CoboWaas2.WalletsApi* | [**listTokenBalancesForWallet**](docs/WalletsApi.md#listTokenBalancesForWallet) | **GET** /wallets/{wallet_id}/tokens | List token balances by wallet
287
289
  *CoboWaas2.WalletsApi* | [**listTokenListingRequests**](docs/WalletsApi.md#listTokenListingRequests) | **GET** /wallets/tokens/listing_requests | List token listing requests
290
+ *CoboWaas2.WalletsApi* | [**listTransactionUtxos**](docs/WalletsApi.md#listTransactionUtxos) | **GET** /wallets/{wallet_id}/transaction_utxos | List transaction UTXOs
288
291
  *CoboWaas2.WalletsApi* | [**listUtxos**](docs/WalletsApi.md#listUtxos) | **GET** /wallets/{wallet_id}/utxos | List UTXOs
289
292
  *CoboWaas2.WalletsApi* | [**listWallets**](docs/WalletsApi.md#listWallets) | **GET** /wallets | List all wallets
290
293
  *CoboWaas2.WalletsApi* | [**lockUtxos**](docs/WalletsApi.md#lockUtxos) | **POST** /wallets/{wallet_id}/utxos/lock | Lock UTXOs
@@ -1086,6 +1089,8 @@ Class | Method | HTTP request | Description
1086
1089
  - [CoboWaas2.TravelRuleWithdrawNaturalEntity](docs/TravelRuleWithdrawNaturalEntity.md)
1087
1090
  - [CoboWaas2.TravelRuleWithdrawRequest](docs/TravelRuleWithdrawRequest.md)
1088
1091
  - [CoboWaas2.TravelRuleWithdrawRequestTravelRuleInfo](docs/TravelRuleWithdrawRequestTravelRuleInfo.md)
1092
+ - [CoboWaas2.TriggerTestPaymentWebhookEventResponse](docs/TriggerTestPaymentWebhookEventResponse.md)
1093
+ - [CoboWaas2.TriggerTestPaymentsWebhookEventRequest](docs/TriggerTestPaymentsWebhookEventRequest.md)
1089
1094
  - [CoboWaas2.TriggerTestWebhookEvent201Response](docs/TriggerTestWebhookEvent201Response.md)
1090
1095
  - [CoboWaas2.TriggerTestWebhookEventRequest](docs/TriggerTestWebhookEventRequest.md)
1091
1096
  - [CoboWaas2.TronContractCallDestination](docs/TronContractCallDestination.md)
package/dist/ApiClient.js CHANGED
@@ -102,7 +102,7 @@ var ApiClient = /*#__PURE__*/function () {
102
102
  * @default {}
103
103
  */
104
104
  this.defaultHeaders = {
105
- 'User-Agent': 'cobo-waas2-js-sdk/1.31.0'
105
+ 'User-Agent': 'cobo-waas2-js-sdk/1.33.0'
106
106
  };
107
107
 
108
108
  /**
@@ -178,8 +178,8 @@ var AutoSweepApi = exports["default"] = /*#__PURE__*/function () {
178
178
  * @param {Object} opts Optional parameters
179
179
  * @param {String} [token_id] The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
180
180
  * @param {String} [task_ids] A list of auto-sweep task IDs, separated by comma.
181
- * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
182
- * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
181
+ * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
182
+ * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
183
183
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
184
184
  * @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
185
185
  * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -226,8 +226,8 @@ var AutoSweepApi = exports["default"] = /*#__PURE__*/function () {
226
226
  * @param {Object} opts Optional parameters
227
227
  * @param {String} opts.token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
228
228
  * @param {String} opts.task_ids A list of auto-sweep task IDs, separated by comma.
229
- * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
230
- * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
229
+ * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
230
+ * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
231
231
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
232
232
  * @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
233
233
  * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -241,8 +241,8 @@ var FeeStationApi = exports["default"] = /*#__PURE__*/function () {
241
241
  * @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
242
242
  * @param {String} [token_ids] A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
243
243
  * @param {String} [asset_ids] (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
244
- * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
245
- * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
244
+ * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
245
+ * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
246
246
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
247
247
  * @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
248
248
  * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -297,8 +297,8 @@ var FeeStationApi = exports["default"] = /*#__PURE__*/function () {
297
297
  * @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
298
298
  * @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
299
299
  * @param {String} opts.asset_ids (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
300
- * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
301
- * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
300
+ * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
301
+ * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
302
302
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
303
303
  * @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
304
304
  * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -86,6 +86,8 @@ var _ReportType = _interopRequireDefault(require("../model/ReportType"));
86
86
  var _Settlement = _interopRequireDefault(require("../model/Settlement"));
87
87
  var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
88
88
  var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
89
+ var _TriggerTestPaymentWebhookEventResponse = _interopRequireDefault(require("../model/TriggerTestPaymentWebhookEventResponse"));
90
+ var _TriggerTestPaymentsWebhookEventRequest = _interopRequireDefault(require("../model/TriggerTestPaymentsWebhookEventRequest"));
89
91
  var _UpdateBankAccountByIdRequest = _interopRequireDefault(require("../model/UpdateBankAccountByIdRequest"));
90
92
  var _UpdateCounterpartyRequest = _interopRequireDefault(require("../model/UpdateCounterpartyRequest"));
91
93
  var _UpdateDestinationEntry200Response = _interopRequireDefault(require("../model/UpdateDestinationEntry200Response"));
@@ -839,6 +841,42 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
839
841
  });
840
842
  }
841
843
 
844
+ /**
845
+ * Create SDK link
846
+ * This operation creates a payment link for use with the front-end SDK integration. The returned URL and token can be used to initialize the Cobo payment SDK in your front-end application. For more information, see [Cobo Payment Guide](https://www.cobo.com/payments/en/guides/overview).
847
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
848
+ */
849
+ }, {
850
+ key: "createSdkLinkWithHttpInfo",
851
+ value: function createSdkLinkWithHttpInfo() {
852
+ var postBody = null;
853
+ if (postBody && postBody.toJSON) {
854
+ postBody = postBody.toJSON();
855
+ }
856
+ var pathParams = {};
857
+ var queryParams = {};
858
+ var headerParams = {};
859
+ var formParams = {};
860
+ var authNames = ['CoboAuth'];
861
+ var contentTypes = [];
862
+ var accepts = ['application/json'];
863
+ var returnType = _Link["default"];
864
+ return this.apiClient.callApi('/payments/links/sdk', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
865
+ }
866
+
867
+ /**
868
+ * Create SDK link
869
+ * This operation creates a payment link for use with the front-end SDK integration. The returned URL and token can be used to initialize the Cobo payment SDK in your front-end application. For more information, see [Cobo Payment Guide](https://www.cobo.com/payments/en/guides/overview).
870
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
871
+ */
872
+ }, {
873
+ key: "createSdkLink",
874
+ value: function createSdkLink() {
875
+ return this.createSdkLinkWithHttpInfo().then(function (response_and_data) {
876
+ return response_and_data.data;
877
+ });
878
+ }
879
+
842
880
  /**
843
881
  * Create settlement request
844
882
  * <Note>This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead.</Note> You can include multiple merchants and cryptocurrencies in a single settlement request.
@@ -2551,29 +2589,25 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
2551
2589
 
2552
2590
  /**
2553
2591
  * List merchant balances
2554
- * This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances).
2555
- * @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
2592
+ * This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. <Note>Do not pass `acquiring_type` for this operation.</Note> For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2556
2593
  * @param {Object} opts Optional parameters
2557
- * @param {String} [merchant_ids] A list of merchant IDs to query.
2594
+ * @param {String} [merchant_ids] The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2595
+ * @param {String} [token_id] The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2558
2596
  * @param {module:model/AcquiringType} [acquiring_type] This parameter has been deprecated
2559
2597
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchantBalances200Response} and HTTP response
2560
2598
  */
2561
2599
  }, {
2562
2600
  key: "listMerchantBalancesWithHttpInfo",
2563
- value: function listMerchantBalancesWithHttpInfo(token_id, opts) {
2601
+ value: function listMerchantBalancesWithHttpInfo(opts) {
2564
2602
  opts = opts || {};
2565
2603
  var postBody = null;
2566
2604
  if (postBody && postBody.toJSON) {
2567
2605
  postBody = postBody.toJSON();
2568
2606
  }
2569
- // verify the required parameter 'token_id' is set
2570
- if (token_id === undefined || token_id === null) {
2571
- throw new Error("Missing the required parameter 'token_id' when calling listMerchantBalances");
2572
- }
2573
2607
  var pathParams = {};
2574
2608
  var queryParams = {
2575
2609
  'merchant_ids': opts['merchant_ids'],
2576
- 'token_id': token_id,
2610
+ 'token_id': opts['token_id'],
2577
2611
  'acquiring_type': opts['acquiring_type']
2578
2612
  };
2579
2613
  var headerParams = {};
@@ -2587,17 +2621,17 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
2587
2621
 
2588
2622
  /**
2589
2623
  * List merchant balances
2590
- * This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances).
2591
- * @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
2624
+ * This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. <Note>Do not pass `acquiring_type` for this operation.</Note> For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2592
2625
  * @param {Object} opts Optional parameters
2593
- * @param {String} opts.merchant_ids A list of merchant IDs to query.
2626
+ * @param {String} opts.merchant_ids The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2627
+ * @param {String} opts.token_id The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview).
2594
2628
  * @param {module:model/AcquiringType} opts.acquiring_type This parameter has been deprecated
2595
2629
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchantBalances200Response}
2596
2630
  */
2597
2631
  }, {
2598
2632
  key: "listMerchantBalances",
2599
- value: function listMerchantBalances(token_id, opts) {
2600
- return this.listMerchantBalancesWithHttpInfo(token_id, opts).then(function (response_and_data) {
2633
+ value: function listMerchantBalances(opts) {
2634
+ return this.listMerchantBalancesWithHttpInfo(opts).then(function (response_and_data) {
2601
2635
  return response_and_data.data;
2602
2636
  });
2603
2637
  }
@@ -3114,6 +3148,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
3114
3148
  });
3115
3149
  }
3116
3150
 
3151
+ /**
3152
+ * Trigger test webhook event
3153
+ * This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events).
3154
+ * @param {Object} opts Optional parameters
3155
+ * @param {module:model/TriggerTestPaymentsWebhookEventRequest} [TriggerTestPaymentsWebhookEventRequest] The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type.
3156
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TriggerTestPaymentWebhookEventResponse} and HTTP response
3157
+ */
3158
+ }, {
3159
+ key: "triggerTestPaymentsWebhookEventWithHttpInfo",
3160
+ value: function triggerTestPaymentsWebhookEventWithHttpInfo(opts) {
3161
+ opts = opts || {};
3162
+ var postBody = opts['TriggerTestPaymentsWebhookEventRequest'];
3163
+ if (postBody && postBody.toJSON) {
3164
+ postBody = postBody.toJSON();
3165
+ }
3166
+ var pathParams = {};
3167
+ var queryParams = {};
3168
+ var headerParams = {};
3169
+ var formParams = {};
3170
+ var authNames = ['CoboAuth'];
3171
+ var contentTypes = ['application/json'];
3172
+ var accepts = ['application/json'];
3173
+ var returnType = _TriggerTestPaymentWebhookEventResponse["default"];
3174
+ return this.apiClient.callApi('/payments/webhooks/trigger', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
3175
+ }
3176
+
3177
+ /**
3178
+ * Trigger test webhook event
3179
+ * This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events).
3180
+ * @param {Object} opts Optional parameters
3181
+ * @param {module:model/TriggerTestPaymentsWebhookEventRequest} opts.TriggerTestPaymentsWebhookEventRequest The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type.
3182
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TriggerTestPaymentWebhookEventResponse}
3183
+ */
3184
+ }, {
3185
+ key: "triggerTestPaymentsWebhookEvent",
3186
+ value: function triggerTestPaymentsWebhookEvent(opts) {
3187
+ return this.triggerTestPaymentsWebhookEventWithHttpInfo(opts).then(function (response_and_data) {
3188
+ return response_and_data.data;
3189
+ });
3190
+ }
3191
+
3117
3192
  /**
3118
3193
  * Update bank account
3119
3194
  * <Note>This operation has been deprecated.</Note> This operation updates the information of an existing bank account.
@@ -665,8 +665,8 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
665
665
  * @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
666
666
  * @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
667
667
  * @param {String} [project_id] (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects).
668
- * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
669
- * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
668
+ * @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
669
+ * @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
670
670
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
671
671
  * @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
672
672
  * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -731,8 +731,8 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
731
731
  * @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
732
732
  * @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
733
733
  * @param {String} opts.project_id (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects).
734
- * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change.
735
- * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change.
734
+ * @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
735
+ * @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
736
736
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
737
737
  * @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
738
738
  * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
@@ -1292,6 +1292,89 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
1292
1292
  });
1293
1293
  }
1294
1294
 
1295
+ /**
1296
+ * List transaction UTXOs
1297
+ * The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. <Note>This operation is applicable to MPC and Custodial Web3 Wallets.</Note>
1298
+ * @param {String} wallet_id The wallet ID.
1299
+ * @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
1300
+ * @param {String} tx_hash The transaction hash to filter UTXOs by.
1301
+ * @param {Object} opts Optional parameters
1302
+ * @param {Boolean} [is_change] Filter UTXOs by whether they are change outputs.
1303
+ * @param {Number} [vout_n] The output index of the UTXO to filter by.
1304
+ * @param {String} [token_id] The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
1305
+ * @param {String} [address]
1306
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
1307
+ * @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
1308
+ * @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
1309
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListUtxos200Response} and HTTP response
1310
+ */
1311
+ }, {
1312
+ key: "listTransactionUtxosWithHttpInfo",
1313
+ value: function listTransactionUtxosWithHttpInfo(wallet_id, chain_id, tx_hash, opts) {
1314
+ opts = opts || {};
1315
+ var postBody = null;
1316
+ if (postBody && postBody.toJSON) {
1317
+ postBody = postBody.toJSON();
1318
+ }
1319
+ // verify the required parameter 'wallet_id' is set
1320
+ if (wallet_id === undefined || wallet_id === null) {
1321
+ throw new Error("Missing the required parameter 'wallet_id' when calling listTransactionUtxos");
1322
+ }
1323
+ // verify the required parameter 'chain_id' is set
1324
+ if (chain_id === undefined || chain_id === null) {
1325
+ throw new Error("Missing the required parameter 'chain_id' when calling listTransactionUtxos");
1326
+ }
1327
+ // verify the required parameter 'tx_hash' is set
1328
+ if (tx_hash === undefined || tx_hash === null) {
1329
+ throw new Error("Missing the required parameter 'tx_hash' when calling listTransactionUtxos");
1330
+ }
1331
+ var pathParams = {
1332
+ 'wallet_id': wallet_id
1333
+ };
1334
+ var queryParams = {
1335
+ 'chain_id': chain_id,
1336
+ 'tx_hash': tx_hash,
1337
+ 'is_change': opts['is_change'],
1338
+ 'vout_n': opts['vout_n'],
1339
+ 'token_id': opts['token_id'],
1340
+ 'address': opts['address'],
1341
+ 'limit': opts['limit'],
1342
+ 'before': opts['before'],
1343
+ 'after': opts['after']
1344
+ };
1345
+ var headerParams = {};
1346
+ var formParams = {};
1347
+ var authNames = ['OAuth2', 'CoboAuth'];
1348
+ var contentTypes = [];
1349
+ var accepts = ['application/json'];
1350
+ var returnType = _ListUtxos200Response["default"];
1351
+ return this.apiClient.callApi('/wallets/{wallet_id}/transaction_utxos', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
1352
+ }
1353
+
1354
+ /**
1355
+ * List transaction UTXOs
1356
+ * The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. <Note>This operation is applicable to MPC and Custodial Web3 Wallets.</Note>
1357
+ * @param {String} wallet_id The wallet ID.
1358
+ * @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
1359
+ * @param {String} tx_hash The transaction hash to filter UTXOs by.
1360
+ * @param {Object} opts Optional parameters
1361
+ * @param {Boolean} opts.is_change Filter UTXOs by whether they are change outputs.
1362
+ * @param {Number} opts.vout_n The output index of the UTXO to filter by.
1363
+ * @param {String} opts.token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
1364
+ * @param {String} opts.address
1365
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
1366
+ * @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
1367
+ * @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
1368
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUtxos200Response}
1369
+ */
1370
+ }, {
1371
+ key: "listTransactionUtxos",
1372
+ value: function listTransactionUtxos(wallet_id, chain_id, tx_hash, opts) {
1373
+ return this.listTransactionUtxosWithHttpInfo(wallet_id, chain_id, tx_hash, opts).then(function (response_and_data) {
1374
+ return response_and_data.data;
1375
+ });
1376
+ }
1377
+
1295
1378
  /**
1296
1379
  * List UTXOs
1297
1380
  * The operation retrieves a list of **unspent** transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation returns only UTXOs that are not used by any transaction. It does not return all UTXOs.</Note> <Info>This operation is applicable to MPC Wallets and Custodial Wallets (Web3 Wallets) only.</Info>
package/dist/index.js CHANGED
@@ -4725,6 +4725,18 @@ Object.defineProperty(exports, "TravelRuleWithdrawRequestTravelRuleInfo", {
4725
4725
  return _TravelRuleWithdrawRequestTravelRuleInfo["default"];
4726
4726
  }
4727
4727
  });
4728
+ Object.defineProperty(exports, "TriggerTestPaymentWebhookEventResponse", {
4729
+ enumerable: true,
4730
+ get: function get() {
4731
+ return _TriggerTestPaymentWebhookEventResponse["default"];
4732
+ }
4733
+ });
4734
+ Object.defineProperty(exports, "TriggerTestPaymentsWebhookEventRequest", {
4735
+ enumerable: true,
4736
+ get: function get() {
4737
+ return _TriggerTestPaymentsWebhookEventRequest["default"];
4738
+ }
4739
+ });
4728
4740
  Object.defineProperty(exports, "TriggerTestWebhookEvent201Response", {
4729
4741
  enumerable: true,
4730
4742
  get: function get() {
@@ -5777,6 +5789,8 @@ var _TravelRuleWithdrawLegalEntity = _interopRequireDefault(require("./model/Tra
5777
5789
  var _TravelRuleWithdrawNaturalEntity = _interopRequireDefault(require("./model/TravelRuleWithdrawNaturalEntity"));
5778
5790
  var _TravelRuleWithdrawRequest = _interopRequireDefault(require("./model/TravelRuleWithdrawRequest"));
5779
5791
  var _TravelRuleWithdrawRequestTravelRuleInfo = _interopRequireDefault(require("./model/TravelRuleWithdrawRequestTravelRuleInfo"));
5792
+ var _TriggerTestPaymentWebhookEventResponse = _interopRequireDefault(require("./model/TriggerTestPaymentWebhookEventResponse"));
5793
+ var _TriggerTestPaymentsWebhookEventRequest = _interopRequireDefault(require("./model/TriggerTestPaymentsWebhookEventRequest"));
5780
5794
  var _TriggerTestWebhookEvent201Response = _interopRequireDefault(require("./model/TriggerTestWebhookEvent201Response"));
5781
5795
  var _TriggerTestWebhookEventRequest = _interopRequireDefault(require("./model/TriggerTestWebhookEventRequest"));
5782
5796
  var _TronContractCallDestination = _interopRequireDefault(require("./model/TronContractCallDestination"));
@@ -110,6 +110,12 @@ var CreateDestinationBankAccount = /*#__PURE__*/function () {
110
110
  if (data.hasOwnProperty('intermediary_bank_info')) {
111
111
  obj['intermediary_bank_info'] = _IntermediaryBankInfo["default"].constructFromObject(data['intermediary_bank_info']);
112
112
  }
113
+ if (data.hasOwnProperty('country')) {
114
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
115
+ }
116
+ if (data.hasOwnProperty('city')) {
117
+ obj['city'] = _ApiClient["default"].convertToType(data['city'], 'String');
118
+ }
113
119
  }
114
120
  return obj;
115
121
  }
@@ -184,6 +190,14 @@ var CreateDestinationBankAccount = /*#__PURE__*/function () {
184
190
  _IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
185
191
  }
186
192
  }
193
+ // ensure the json data is a string
194
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
195
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
196
+ }
197
+ // ensure the json data is a string
198
+ if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
199
+ throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
200
+ }
187
201
  return true;
188
202
  }
189
203
  }]);
@@ -254,4 +268,16 @@ CreateDestinationBankAccount.prototype['further_credit'] = undefined;
254
268
  * @member {module:model/IntermediaryBankInfo} intermediary_bank_info
255
269
  */
256
270
  CreateDestinationBankAccount.prototype['intermediary_bank_info'] = undefined;
271
+
272
+ /**
273
+ * Beneficiary's country, in ISO 3166-1 alpha-3 format.
274
+ * @member {String} country
275
+ */
276
+ CreateDestinationBankAccount.prototype['country'] = undefined;
277
+
278
+ /**
279
+ * Beneficiary's city.
280
+ * @member {String} city
281
+ */
282
+ CreateDestinationBankAccount.prototype['city'] = undefined;
257
283
  var _default = exports["default"] = CreateDestinationBankAccount;
@@ -127,6 +127,12 @@ var DestinationBankAccount = /*#__PURE__*/function () {
127
127
  if (data.hasOwnProperty('updated_timestamp')) {
128
128
  obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
129
129
  }
130
+ if (data.hasOwnProperty('country')) {
131
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
132
+ }
133
+ if (data.hasOwnProperty('city')) {
134
+ obj['city'] = _ApiClient["default"].convertToType(data['city'], 'String');
135
+ }
130
136
  }
131
137
  return obj;
132
138
  }
@@ -205,6 +211,14 @@ var DestinationBankAccount = /*#__PURE__*/function () {
205
211
  _IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
206
212
  }
207
213
  }
214
+ // ensure the json data is a string
215
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
216
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
217
+ }
218
+ // ensure the json data is a string
219
+ if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
220
+ throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
221
+ }
208
222
  return true;
209
223
  }
210
224
  }]);
@@ -298,4 +312,16 @@ DestinationBankAccount.prototype['created_timestamp'] = undefined;
298
312
  * @member {Number} updated_timestamp
299
313
  */
300
314
  DestinationBankAccount.prototype['updated_timestamp'] = undefined;
315
+
316
+ /**
317
+ * Beneficiary's country, in ISO 3166-1 alpha-3 format.
318
+ * @member {String} country
319
+ */
320
+ DestinationBankAccount.prototype['country'] = undefined;
321
+
322
+ /**
323
+ * Beneficiary's city.
324
+ * @member {String} city
325
+ */
326
+ DestinationBankAccount.prototype['city'] = undefined;
301
327
  var _default = exports["default"] = DestinationBankAccount;
@@ -149,6 +149,12 @@ var DestinationBankAccountDetail = /*#__PURE__*/function () {
149
149
  if (data.hasOwnProperty('bank_account_status')) {
150
150
  obj['bank_account_status'] = _BankAccountStatus["default"].constructFromObject(data['bank_account_status']);
151
151
  }
152
+ if (data.hasOwnProperty('country')) {
153
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
154
+ }
155
+ if (data.hasOwnProperty('city')) {
156
+ obj['city'] = _ApiClient["default"].convertToType(data['city'], 'String');
157
+ }
152
158
  if (data.hasOwnProperty('created_timestamp')) {
153
159
  obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
154
160
  }
@@ -257,6 +263,14 @@ var DestinationBankAccountDetail = /*#__PURE__*/function () {
257
263
  _IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
258
264
  }
259
265
  }
266
+ // ensure the json data is a string
267
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
268
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
269
+ }
270
+ // ensure the json data is a string
271
+ if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
272
+ throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
273
+ }
260
274
  return true;
261
275
  }
262
276
  }]);
@@ -380,6 +394,18 @@ DestinationBankAccountDetail.prototype['intermediary_bank_info'] = undefined;
380
394
  */
381
395
  DestinationBankAccountDetail.prototype['bank_account_status'] = undefined;
382
396
 
397
+ /**
398
+ * Beneficiary's country, in ISO 3166-1 alpha-3 format.
399
+ * @member {String} country
400
+ */
401
+ DestinationBankAccountDetail.prototype['country'] = undefined;
402
+
403
+ /**
404
+ * Beneficiary's city.
405
+ * @member {String} city
406
+ */
407
+ DestinationBankAccountDetail.prototype['city'] = undefined;
408
+
383
409
  /**
384
410
  * The created time of the bank account, represented as a UNIX timestamp in seconds.
385
411
  * @member {Number} created_timestamp
@@ -33,12 +33,11 @@ var IntermediaryBankInfo = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>IntermediaryBankInfo</code>.
34
34
  * @alias module:model/IntermediaryBankInfo
35
35
  * @param bank_name {String} The name of the intermediary bank.
36
- * @param bank_address {String} The address of the intermediary bank.
37
36
  * @param bank_swift_code {String} The SWIFT or BIC code of the intermediary bank.
38
37
  */
39
- function IntermediaryBankInfo(bank_name, bank_address, bank_swift_code) {
38
+ function IntermediaryBankInfo(bank_name, bank_swift_code) {
40
39
  _classCallCheck(this, IntermediaryBankInfo);
41
- IntermediaryBankInfo.initialize(this, bank_name, bank_address, bank_swift_code);
40
+ IntermediaryBankInfo.initialize(this, bank_name, bank_swift_code);
42
41
  }
43
42
 
44
43
  /**
@@ -48,9 +47,8 @@ var IntermediaryBankInfo = /*#__PURE__*/function () {
48
47
  */
49
48
  return _createClass(IntermediaryBankInfo, null, [{
50
49
  key: "initialize",
51
- value: function initialize(obj, bank_name, bank_address, bank_swift_code) {
50
+ value: function initialize(obj, bank_name, bank_swift_code) {
52
51
  obj['bank_name'] = bank_name;
53
- obj['bank_address'] = bank_address;
54
52
  obj['bank_swift_code'] = bank_swift_code;
55
53
  }
56
54
 
@@ -118,7 +116,7 @@ var IntermediaryBankInfo = /*#__PURE__*/function () {
118
116
  }
119
117
  }]);
120
118
  }();
121
- IntermediaryBankInfo.RequiredProperties = ["bank_name", "bank_address", "bank_swift_code"];
119
+ IntermediaryBankInfo.RequiredProperties = ["bank_name", "bank_swift_code"];
122
120
 
123
121
  /**
124
122
  * The name of the intermediary bank.