@cobo/cobo-waas2 1.21.0 → 1.22.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.
- package/README.md +52 -2
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/PaymentApi.js +231 -18
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +101 -0
- package/dist/index.js +154 -0
- package/dist/model/ApprovalDetail.js +7 -7
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreateSafeWalletParams.js +9 -0
- package/dist/model/CreateSettlement.js +27 -4
- package/dist/model/CreateSmartContractWalletParams.js +6 -0
- package/dist/model/CreateSweepToAddress.js +126 -0
- package/dist/model/CreateWalletParams.js +6 -0
- package/dist/model/CreatedWalletInfo.js +6 -0
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteCryptoAddress201Response.js +2 -2
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
- package/dist/model/ListAutoSweepTask200Response.js +123 -0
- package/dist/model/ListMerchantBalances200Response.js +107 -0
- package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/PaymentWalletBalance.js +177 -0
- package/dist/model/PspBalance.js +175 -0
- package/dist/model/ReceivedAmountPerAddress.js +126 -0
- package/dist/model/SafeWallet.js +9 -0
- package/dist/model/SettlementDetail.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TokenizationActivityInfo.js +8 -4
- package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
- package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
- package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
- package/dist/model/TokenizationBurnTokenRequest.js +13 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationContractCallParamsData.js +43 -9
- package/dist/model/TokenizationContractCallRequest.js +13 -0
- package/dist/model/TokenizationContractCallType.js +5 -0
- package/dist/model/TokenizationERC20TokenParams.js +4 -4
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
- package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
- package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationMintTokenRequest.js +13 -0
- package/dist/model/TokenizationMpcOperationSource.js +2 -2
- package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationPauseTokenRequest.js +13 -0
- package/dist/model/TokenizationSOLTokenParams.js +173 -0
- package/dist/model/TokenizationSolContractCallParams.js +137 -0
- package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationTokenDetailInfo.js +6 -6
- package/dist/model/TokenizationTokenInfo.js +4 -4
- package/dist/model/TokenizationTokenOperationSource.js +1 -1
- package/dist/model/TokenizationTokenPermissionParams.js +1 -1
- package/dist/model/TokenizationTokenPermissionType.js +15 -0
- package/dist/model/TokenizationTokenStandard.js +5 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
- package/dist/model/TokenizationWeb3OperationSource.js +2 -2
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/docs/ApprovalDetail.md +1 -1
- package/docs/AutoSweepApi.md +285 -0
- package/docs/AutoSweepTask.md +16 -0
- package/docs/AutoSweepTaskStatus.md +12 -0
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +3 -3
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreateSafeWalletParams.md +1 -0
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -0
- package/docs/CreateSweepToAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -0
- package/docs/CreatedWalletInfo.md +1 -0
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteCryptoAddress201Response.md +1 -1
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
- package/docs/ListAutoSweepTask200Response.md +10 -0
- package/docs/ListMerchantBalances200Response.md +9 -0
- package/docs/ListPaymentWalletBalances200Response.md +9 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/MerchantBalance.md +16 -0
- package/docs/PaymentApi.md +228 -10
- package/docs/PaymentWalletBalance.md +14 -0
- package/docs/PspBalance.md +14 -0
- package/docs/ReceivedAmountPerAddress.md +10 -0
- package/docs/SafeWallet.md +1 -0
- package/docs/SettlementDetail.md +1 -1
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TokenizationActivityInfo.md +2 -2
- package/docs/TokenizationAllowlistActivationRequest.md +1 -0
- package/docs/TokenizationAllowlistAddressNote.md +3 -3
- package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
- package/docs/TokenizationApi.md +1069 -0
- package/docs/TokenizationBlocklistAddressNote.md +3 -3
- package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
- package/docs/TokenizationBurnTokenRequest.md +1 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
- package/docs/TokenizationContractCallParamsData.md +2 -1
- package/docs/TokenizationContractCallRequest.md +1 -0
- package/docs/TokenizationContractCallType.md +2 -0
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
- package/docs/TokenizationIssuedTokenRequest.md +2 -1
- package/docs/TokenizationMintEstimateFeeParams.md +1 -0
- package/docs/TokenizationMintTokenRequest.md +1 -0
- package/docs/TokenizationMpcOperationSource.md +1 -1
- package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationPauseTokenRequest.md +1 -0
- package/docs/TokenizationSOLTokenParams.md +14 -0
- package/docs/TokenizationSolContractCallParams.md +10 -0
- package/docs/TokenizationSolTokenPermissionParams.md +13 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
- package/docs/TokenizationTokenDetailInfo.md +1 -1
- package/docs/TokenizationTokenInfo.md +1 -1
- package/docs/TokenizationTokenOperationSource.md +1 -1
- package/docs/TokenizationTokenPermissionType.md +6 -0
- package/docs/TokenizationTokenStandard.md +2 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationUnpauseTokenRequest.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
- package/docs/TokenizationWeb3OperationSource.md +1 -1
- package/docs/TransactionsApi.md +112 -0
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/package.json +1 -1
package/dist/api/PaymentApi.js
CHANGED
|
@@ -21,13 +21,17 @@ var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetEx
|
|
|
21
21
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
22
22
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
23
23
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
24
|
+
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
24
25
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
25
26
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
27
|
+
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
26
28
|
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
27
29
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
28
30
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
29
31
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
30
32
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
33
|
+
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
34
|
+
var _ReceivedAmountPerAddress = _interopRequireDefault(require("../model/ReceivedAmountPerAddress"));
|
|
31
35
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
32
36
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
33
37
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
@@ -71,7 +75,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
71
75
|
|
|
72
76
|
/**
|
|
73
77
|
* Cancel refund order
|
|
74
|
-
* This operation cancels a specified refund order.
|
|
78
|
+
* This operation cancels a specified refund order. You can only cancel refund orders that have not been processed yet.
|
|
75
79
|
* @param {String} refund_id The refund order ID.
|
|
76
80
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
77
81
|
*/
|
|
@@ -101,7 +105,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
101
105
|
|
|
102
106
|
/**
|
|
103
107
|
* Cancel refund order
|
|
104
|
-
* This operation cancels a specified refund order.
|
|
108
|
+
* This operation cancels a specified refund order. You can only cancel refund orders that have not been processed yet.
|
|
105
109
|
* @param {String} refund_id The refund order ID.
|
|
106
110
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
|
|
107
111
|
*/
|
|
@@ -115,9 +119,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
115
119
|
|
|
116
120
|
/**
|
|
117
121
|
* Create crypto address
|
|
118
|
-
*
|
|
122
|
+
* This operation registers a crypto address for crypto withdrawal. The registered address can later be referenced by its ID when creating settlement requests.
|
|
119
123
|
* @param {Object} opts Optional parameters
|
|
120
|
-
* @param {module:model/CreateCryptoAddressRequest} [CreateCryptoAddressRequest] The request body to
|
|
124
|
+
* @param {module:model/CreateCryptoAddressRequest} [CreateCryptoAddressRequest] The request body to register a crypto address.
|
|
121
125
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CryptoAddress} and HTTP response
|
|
122
126
|
*/
|
|
123
127
|
}, {
|
|
@@ -141,9 +145,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
141
145
|
|
|
142
146
|
/**
|
|
143
147
|
* Create crypto address
|
|
144
|
-
*
|
|
148
|
+
* This operation registers a crypto address for crypto withdrawal. The registered address can later be referenced by its ID when creating settlement requests.
|
|
145
149
|
* @param {Object} opts Optional parameters
|
|
146
|
-
* @param {module:model/CreateCryptoAddressRequest} opts.CreateCryptoAddressRequest The request body to
|
|
150
|
+
* @param {module:model/CreateCryptoAddressRequest} opts.CreateCryptoAddressRequest The request body to register a crypto address.
|
|
147
151
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CryptoAddress}
|
|
148
152
|
*/
|
|
149
153
|
}, {
|
|
@@ -361,7 +365,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
361
365
|
|
|
362
366
|
/**
|
|
363
367
|
* Delete crypto address
|
|
364
|
-
* This operation
|
|
368
|
+
* This operation unregisters a crypto address from being used for crypto withdrawals.
|
|
365
369
|
* @param {String} crypto_address_id The crypto address ID.
|
|
366
370
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCryptoAddress201Response} and HTTP response
|
|
367
371
|
*/
|
|
@@ -391,7 +395,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
391
395
|
|
|
392
396
|
/**
|
|
393
397
|
* Delete crypto address
|
|
394
|
-
* This operation
|
|
398
|
+
* This operation unregisters a crypto address from being used for crypto withdrawals.
|
|
395
399
|
* @param {String} crypto_address_id The crypto address ID.
|
|
396
400
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCryptoAddress201Response}
|
|
397
401
|
*/
|
|
@@ -454,6 +458,64 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
458
|
});
|
|
455
459
|
}
|
|
456
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Get payer balance by address
|
|
463
|
+
* This operation retrieves aggregated balance details for a specific token and payer, with amounts grouped by address.
|
|
464
|
+
* @param {String} merchant_id The merchant ID.
|
|
465
|
+
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
466
|
+
* @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`
|
|
467
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ReceivedAmountPerAddress>} and HTTP response
|
|
468
|
+
*/
|
|
469
|
+
}, {
|
|
470
|
+
key: "getPayerBalanceByAddressWithHttpInfo",
|
|
471
|
+
value: function getPayerBalanceByAddressWithHttpInfo(merchant_id, payer_id, token_id) {
|
|
472
|
+
var postBody = null;
|
|
473
|
+
if (postBody && postBody.toJSON) {
|
|
474
|
+
postBody = postBody.toJSON();
|
|
475
|
+
}
|
|
476
|
+
// verify the required parameter 'merchant_id' is set
|
|
477
|
+
if (merchant_id === undefined || merchant_id === null) {
|
|
478
|
+
throw new Error("Missing the required parameter 'merchant_id' when calling getPayerBalanceByAddress");
|
|
479
|
+
}
|
|
480
|
+
// verify the required parameter 'payer_id' is set
|
|
481
|
+
if (payer_id === undefined || payer_id === null) {
|
|
482
|
+
throw new Error("Missing the required parameter 'payer_id' when calling getPayerBalanceByAddress");
|
|
483
|
+
}
|
|
484
|
+
// verify the required parameter 'token_id' is set
|
|
485
|
+
if (token_id === undefined || token_id === null) {
|
|
486
|
+
throw new Error("Missing the required parameter 'token_id' when calling getPayerBalanceByAddress");
|
|
487
|
+
}
|
|
488
|
+
var pathParams = {};
|
|
489
|
+
var queryParams = {
|
|
490
|
+
'merchant_id': merchant_id,
|
|
491
|
+
'payer_id': payer_id,
|
|
492
|
+
'token_id': token_id
|
|
493
|
+
};
|
|
494
|
+
var headerParams = {};
|
|
495
|
+
var formParams = {};
|
|
496
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
497
|
+
var contentTypes = [];
|
|
498
|
+
var accepts = ['application/json'];
|
|
499
|
+
var returnType = [_ReceivedAmountPerAddress["default"]];
|
|
500
|
+
return this.apiClient.callApi('/payments/balance/payer/address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Get payer balance by address
|
|
505
|
+
* This operation retrieves aggregated balance details for a specific token and payer, with amounts grouped by address.
|
|
506
|
+
* @param {String} merchant_id The merchant ID.
|
|
507
|
+
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
508
|
+
* @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`
|
|
509
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ReceivedAmountPerAddress>}
|
|
510
|
+
*/
|
|
511
|
+
}, {
|
|
512
|
+
key: "getPayerBalanceByAddress",
|
|
513
|
+
value: function getPayerBalanceByAddress(merchant_id, payer_id, token_id) {
|
|
514
|
+
return this.getPayerBalanceByAddressWithHttpInfo(merchant_id, payer_id, token_id).then(function (response_and_data) {
|
|
515
|
+
return response_and_data.data;
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
|
|
457
519
|
/**
|
|
458
520
|
* Get pay-in order information
|
|
459
521
|
* This operation retrieves details of a specific pay-in order.
|
|
@@ -498,6 +560,50 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
498
560
|
});
|
|
499
561
|
}
|
|
500
562
|
|
|
563
|
+
/**
|
|
564
|
+
* Get psp balance
|
|
565
|
+
* This operation retrieves the information of psp balance.
|
|
566
|
+
* @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`
|
|
567
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
568
|
+
*/
|
|
569
|
+
}, {
|
|
570
|
+
key: "getPspBalanceWithHttpInfo",
|
|
571
|
+
value: function getPspBalanceWithHttpInfo(token_id) {
|
|
572
|
+
var postBody = null;
|
|
573
|
+
if (postBody && postBody.toJSON) {
|
|
574
|
+
postBody = postBody.toJSON();
|
|
575
|
+
}
|
|
576
|
+
// verify the required parameter 'token_id' is set
|
|
577
|
+
if (token_id === undefined || token_id === null) {
|
|
578
|
+
throw new Error("Missing the required parameter 'token_id' when calling getPspBalance");
|
|
579
|
+
}
|
|
580
|
+
var pathParams = {};
|
|
581
|
+
var queryParams = {
|
|
582
|
+
'token_id': token_id
|
|
583
|
+
};
|
|
584
|
+
var headerParams = {};
|
|
585
|
+
var formParams = {};
|
|
586
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
587
|
+
var contentTypes = [];
|
|
588
|
+
var accepts = ['application/json'];
|
|
589
|
+
var returnType = _PspBalance["default"];
|
|
590
|
+
return this.apiClient.callApi('/payments/balance/psp', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Get psp balance
|
|
595
|
+
* This operation retrieves the information of psp balance.
|
|
596
|
+
* @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`
|
|
597
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
598
|
+
*/
|
|
599
|
+
}, {
|
|
600
|
+
key: "getPspBalance",
|
|
601
|
+
value: function getPspBalance(token_id) {
|
|
602
|
+
return this.getPspBalanceWithHttpInfo(token_id).then(function (response_and_data) {
|
|
603
|
+
return response_and_data.data;
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
|
|
501
607
|
/**
|
|
502
608
|
* Get refund order information
|
|
503
609
|
* This operation retrieves the detailed information about a specified refund order.
|
|
@@ -551,7 +657,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
551
657
|
* @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.
|
|
552
658
|
* @param {String} [merchant_id] The merchant ID.
|
|
553
659
|
* @param {String} [request_id] The request ID.
|
|
554
|
-
* @param {String} [statuses] A list of
|
|
660
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
555
661
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
|
|
556
662
|
*/
|
|
557
663
|
}, {
|
|
@@ -589,7 +695,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
589
695
|
* @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.
|
|
590
696
|
* @param {String} opts.merchant_id The merchant ID.
|
|
591
697
|
* @param {String} opts.request_id The request ID.
|
|
592
|
-
* @param {String} opts.statuses A list of
|
|
698
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
593
699
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
|
|
594
700
|
*/
|
|
595
701
|
}, {
|
|
@@ -882,6 +988,63 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
882
988
|
});
|
|
883
989
|
}
|
|
884
990
|
|
|
991
|
+
/**
|
|
992
|
+
* List merchant balances
|
|
993
|
+
* This operation retrieves the information of merchant balances.
|
|
994
|
+
* @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`
|
|
995
|
+
* @param {module:model/AcquiringType} acquiring_type AcquiringType defines the acquisition logic used in the payment flow: - `Order`: Each order is created with a specific amount and associated payment request. Funds are settled on a per-order basis. - `TopUp`: Recharge-style flow where funds are topped up to a payer balance or account. Useful for flexible or usage-based payment models.
|
|
996
|
+
* @param {Object} opts Optional parameters
|
|
997
|
+
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
998
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchantBalances200Response} and HTTP response
|
|
999
|
+
*/
|
|
1000
|
+
}, {
|
|
1001
|
+
key: "listMerchantBalancesWithHttpInfo",
|
|
1002
|
+
value: function listMerchantBalancesWithHttpInfo(token_id, acquiring_type, opts) {
|
|
1003
|
+
opts = opts || {};
|
|
1004
|
+
var postBody = null;
|
|
1005
|
+
if (postBody && postBody.toJSON) {
|
|
1006
|
+
postBody = postBody.toJSON();
|
|
1007
|
+
}
|
|
1008
|
+
// verify the required parameter 'token_id' is set
|
|
1009
|
+
if (token_id === undefined || token_id === null) {
|
|
1010
|
+
throw new Error("Missing the required parameter 'token_id' when calling listMerchantBalances");
|
|
1011
|
+
}
|
|
1012
|
+
// verify the required parameter 'acquiring_type' is set
|
|
1013
|
+
if (acquiring_type === undefined || acquiring_type === null) {
|
|
1014
|
+
throw new Error("Missing the required parameter 'acquiring_type' when calling listMerchantBalances");
|
|
1015
|
+
}
|
|
1016
|
+
var pathParams = {};
|
|
1017
|
+
var queryParams = {
|
|
1018
|
+
'merchant_ids': opts['merchant_ids'],
|
|
1019
|
+
'token_id': token_id,
|
|
1020
|
+
'acquiring_type': acquiring_type
|
|
1021
|
+
};
|
|
1022
|
+
var headerParams = {};
|
|
1023
|
+
var formParams = {};
|
|
1024
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1025
|
+
var contentTypes = [];
|
|
1026
|
+
var accepts = ['application/json'];
|
|
1027
|
+
var returnType = _ListMerchantBalances200Response["default"];
|
|
1028
|
+
return this.apiClient.callApi('/payments/balance/merchants', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* List merchant balances
|
|
1033
|
+
* This operation retrieves the information of merchant balances.
|
|
1034
|
+
* @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`
|
|
1035
|
+
* @param {module:model/AcquiringType} acquiring_type AcquiringType defines the acquisition logic used in the payment flow: - `Order`: Each order is created with a specific amount and associated payment request. Funds are settled on a per-order basis. - `TopUp`: Recharge-style flow where funds are topped up to a payer balance or account. Useful for flexible or usage-based payment models.
|
|
1036
|
+
* @param {Object} opts Optional parameters
|
|
1037
|
+
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
1038
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchantBalances200Response}
|
|
1039
|
+
*/
|
|
1040
|
+
}, {
|
|
1041
|
+
key: "listMerchantBalances",
|
|
1042
|
+
value: function listMerchantBalances(token_id, acquiring_type, opts) {
|
|
1043
|
+
return this.listMerchantBalancesWithHttpInfo(token_id, acquiring_type, opts).then(function (response_and_data) {
|
|
1044
|
+
return response_and_data.data;
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
|
|
885
1048
|
/**
|
|
886
1049
|
* List all merchants
|
|
887
1050
|
* This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID.
|
|
@@ -946,7 +1109,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
946
1109
|
* @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.
|
|
947
1110
|
* @param {String} [merchant_id] The merchant ID.
|
|
948
1111
|
* @param {String} [psp_order_id] A unique reference code assigned by the developer to identify this order in their system.
|
|
949
|
-
* @param {String} [statuses] A list of
|
|
1112
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
950
1113
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
951
1114
|
*/
|
|
952
1115
|
}, {
|
|
@@ -984,7 +1147,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
984
1147
|
* @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.
|
|
985
1148
|
* @param {String} opts.merchant_id The merchant ID.
|
|
986
1149
|
* @param {String} opts.psp_order_id A unique reference code assigned by the developer to identify this order in their system.
|
|
987
|
-
* @param {String} opts.statuses A list of
|
|
1150
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
988
1151
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
989
1152
|
*/
|
|
990
1153
|
}, {
|
|
@@ -1031,6 +1194,56 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1031
1194
|
});
|
|
1032
1195
|
}
|
|
1033
1196
|
|
|
1197
|
+
/**
|
|
1198
|
+
* List payment wallet balances
|
|
1199
|
+
* This operation retrieves the information of payment wallet balances.
|
|
1200
|
+
* @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`
|
|
1201
|
+
* @param {Object} opts Optional parameters
|
|
1202
|
+
* @param {String} [wallet_ids] A list of wallet IDs to query.
|
|
1203
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentWalletBalances200Response} and HTTP response
|
|
1204
|
+
*/
|
|
1205
|
+
}, {
|
|
1206
|
+
key: "listPaymentWalletBalancesWithHttpInfo",
|
|
1207
|
+
value: function listPaymentWalletBalancesWithHttpInfo(token_id, opts) {
|
|
1208
|
+
opts = opts || {};
|
|
1209
|
+
var postBody = null;
|
|
1210
|
+
if (postBody && postBody.toJSON) {
|
|
1211
|
+
postBody = postBody.toJSON();
|
|
1212
|
+
}
|
|
1213
|
+
// verify the required parameter 'token_id' is set
|
|
1214
|
+
if (token_id === undefined || token_id === null) {
|
|
1215
|
+
throw new Error("Missing the required parameter 'token_id' when calling listPaymentWalletBalances");
|
|
1216
|
+
}
|
|
1217
|
+
var pathParams = {};
|
|
1218
|
+
var queryParams = {
|
|
1219
|
+
'wallet_ids': opts['wallet_ids'],
|
|
1220
|
+
'token_id': token_id
|
|
1221
|
+
};
|
|
1222
|
+
var headerParams = {};
|
|
1223
|
+
var formParams = {};
|
|
1224
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1225
|
+
var contentTypes = [];
|
|
1226
|
+
var accepts = ['application/json'];
|
|
1227
|
+
var returnType = _ListPaymentWalletBalances200Response["default"];
|
|
1228
|
+
return this.apiClient.callApi('/payments/balance/payment_wallets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* List payment wallet balances
|
|
1233
|
+
* This operation retrieves the information of payment wallet balances.
|
|
1234
|
+
* @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`
|
|
1235
|
+
* @param {Object} opts Optional parameters
|
|
1236
|
+
* @param {String} opts.wallet_ids A list of wallet IDs to query.
|
|
1237
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentWalletBalances200Response}
|
|
1238
|
+
*/
|
|
1239
|
+
}, {
|
|
1240
|
+
key: "listPaymentWalletBalances",
|
|
1241
|
+
value: function listPaymentWalletBalances(token_id, opts) {
|
|
1242
|
+
return this.listPaymentWalletBalancesWithHttpInfo(token_id, opts).then(function (response_and_data) {
|
|
1243
|
+
return response_and_data.data;
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1034
1247
|
/**
|
|
1035
1248
|
* List all settlement details
|
|
1036
1249
|
* This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status.
|
|
@@ -1039,7 +1252,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1039
1252
|
* @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.
|
|
1040
1253
|
* @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.
|
|
1041
1254
|
* @param {String} [merchant_id] The merchant ID.
|
|
1042
|
-
* @param {String} [statuses] A list of
|
|
1255
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
1043
1256
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementDetails200Response} and HTTP response
|
|
1044
1257
|
*/
|
|
1045
1258
|
}, {
|
|
@@ -1075,7 +1288,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1075
1288
|
* @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.
|
|
1076
1289
|
* @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.
|
|
1077
1290
|
* @param {String} opts.merchant_id The merchant ID.
|
|
1078
|
-
* @param {String} opts.statuses A list of
|
|
1291
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details)
|
|
1079
1292
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementDetails200Response}
|
|
1080
1293
|
*/
|
|
1081
1294
|
}, {
|
|
@@ -1296,8 +1509,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1296
1509
|
}
|
|
1297
1510
|
|
|
1298
1511
|
/**
|
|
1299
|
-
* Update refund order
|
|
1300
|
-
* This operation updates a specified refund order.
|
|
1512
|
+
* Update refund order
|
|
1513
|
+
* This operation updates a specified refund order by modifying its recipient address. You can only update the recipient address for refund orders that have not been processed yet.
|
|
1301
1514
|
* @param {String} refund_id The refund order ID.
|
|
1302
1515
|
* @param {Object} opts Optional parameters
|
|
1303
1516
|
* @param {module:model/UpdateRefundByIdRequest} [UpdateRefundByIdRequest] The request body to update a refund order.
|
|
@@ -1329,8 +1542,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1329
1542
|
}
|
|
1330
1543
|
|
|
1331
1544
|
/**
|
|
1332
|
-
* Update refund order
|
|
1333
|
-
* This operation updates a specified refund order.
|
|
1545
|
+
* Update refund order
|
|
1546
|
+
* This operation updates a specified refund order by modifying its recipient address. You can only update the recipient address for refund orders that have not been processed yet.
|
|
1334
1547
|
* @param {String} refund_id The refund order ID.
|
|
1335
1548
|
* @param {Object} opts Optional parameters
|
|
1336
1549
|
* @param {module:model/UpdateRefundByIdRequest} opts.UpdateRefundByIdRequest The request body to update a refund order.
|