@cobo/cobo-waas2 1.20.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 +60 -4
- package/dist/ApiClient.js +11 -2
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/PaymentApi.js +386 -24
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +103 -2
- package/dist/api/WalletsApi.js +2 -2
- package/dist/crypto/ApiSigner.js +5 -1
- package/dist/index.js +175 -0
- package/dist/model/AddressesEventData.js +3 -3
- package/dist/model/ApprovalDetail.js +7 -7
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/BalanceUpdateInfoEventData.js +3 -3
- package/dist/model/ChainsEventData.js +3 -3
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +138 -0
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreatePaymentOrderRequest.js +5 -5
- 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/CryptoAddress.js +12 -12
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteCryptoAddress201Response.js +110 -0
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/ForcedSweep.js +9 -9
- package/dist/model/ForcedSweepRequest.js +8 -9
- 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/ListSettlementDetails200Response.js +123 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +3 -3
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/PaymentAddressUpdateEventData.js +13 -13
- package/dist/model/PaymentOrderEventData.js +3 -3
- package/dist/model/PaymentRefundEventData.js +3 -3
- package/dist/model/PaymentSettlementEvent.js +42 -3
- package/dist/model/PaymentTransactionEventData.js +6 -6
- 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/Settlement.js +27 -0
- package/dist/model/SettlementDetail.js +26 -0
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SuspendedTokenEventData.js +3 -3
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TSSRequestWebhookEventData.js +3 -3
- package/dist/model/TokenListingEventData.js +3 -3
- 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/TokensEventData.js +3 -3
- package/dist/model/TopUpAddress.js +0 -1
- package/dist/model/TransactionWebhookEventData.js +3 -3
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateTopUpAddress.js +3 -3
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/dist/model/WalletInfoEventData.js +3 -3
- package/dist/model/WebhookEventData.js +19 -7
- package/dist/model/WebhookEventDataType.js +2 -2
- package/docs/AddressesEventData.md +1 -1
- 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/BalanceUpdateInfoEventData.md +1 -1
- package/docs/ChainsEventData.md +1 -1
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +3 -3
- 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/CryptoAddress.md +1 -1
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteCryptoAddress201Response.md +9 -0
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/ForcedSweep.md +7 -7
- package/docs/ForcedSweepRequest.md +4 -4
- 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/ListSettlementDetails200Response.md +10 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCVaultEventData.md +1 -1
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/MerchantBalance.md +16 -0
- package/docs/PaymentAddressUpdateEventData.md +6 -6
- package/docs/PaymentApi.md +403 -16
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PaymentRefundEventData.md +1 -1
- package/docs/PaymentSettlementEvent.md +4 -1
- package/docs/PaymentTransactionEventData.md +4 -4
- 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/Settlement.md +3 -0
- package/docs/SettlementDetail.md +2 -0
- package/docs/SettlementInfo.md +6 -6
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SuspendedTokenEventData.md +1 -1
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TSSRequestWebhookEventData.md +1 -1
- package/docs/TokenListingEventData.md +1 -1
- 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/TokensEventData.md +1 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +113 -1
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/docs/WalletInfoEventData.md +1 -1
- package/docs/WalletsApi.md +1 -1
- package/docs/WebhookEventData.md +9 -7
- package/docs/WebhookEventDataType.md +1 -1
- package/package.json +1 -1
package/dist/api/PaymentApi.js
CHANGED
|
@@ -7,11 +7,13 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AcquiringType = _interopRequireDefault(require("../model/AcquiringType"));
|
|
9
9
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
10
|
+
var _CreateCryptoAddressRequest = _interopRequireDefault(require("../model/CreateCryptoAddressRequest"));
|
|
10
11
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
11
12
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
12
13
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
13
14
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
14
15
|
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
16
|
+
var _DeleteCryptoAddress201Response = _interopRequireDefault(require("../model/DeleteCryptoAddress201Response"));
|
|
15
17
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
16
18
|
var _ForcedSweep = _interopRequireDefault(require("../model/ForcedSweep"));
|
|
17
19
|
var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRequest"));
|
|
@@ -19,12 +21,17 @@ var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetEx
|
|
|
19
21
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
20
22
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
21
23
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
24
|
+
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
22
25
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
23
26
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
27
|
+
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
28
|
+
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
24
29
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
25
30
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
26
31
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
27
32
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
33
|
+
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
34
|
+
var _ReceivedAmountPerAddress = _interopRequireDefault(require("../model/ReceivedAmountPerAddress"));
|
|
28
35
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
29
36
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
30
37
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
@@ -68,7 +75,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
77
|
* Cancel refund order
|
|
71
|
-
* 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.
|
|
72
79
|
* @param {String} refund_id The refund order ID.
|
|
73
80
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
74
81
|
*/
|
|
@@ -98,7 +105,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
98
105
|
|
|
99
106
|
/**
|
|
100
107
|
* Cancel refund order
|
|
101
|
-
* 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.
|
|
102
109
|
* @param {String} refund_id The refund order ID.
|
|
103
110
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
|
|
104
111
|
*/
|
|
@@ -111,10 +118,51 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
/**
|
|
114
|
-
* Create
|
|
115
|
-
* This operation
|
|
121
|
+
* Create crypto address
|
|
122
|
+
* This operation registers a crypto address for crypto withdrawal. The registered address can later be referenced by its ID when creating settlement requests.
|
|
116
123
|
* @param {Object} opts Optional parameters
|
|
117
|
-
* @param {module:model/
|
|
124
|
+
* @param {module:model/CreateCryptoAddressRequest} [CreateCryptoAddressRequest] The request body to register a crypto address.
|
|
125
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CryptoAddress} and HTTP response
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "createCryptoAddressWithHttpInfo",
|
|
129
|
+
value: function createCryptoAddressWithHttpInfo(opts) {
|
|
130
|
+
opts = opts || {};
|
|
131
|
+
var postBody = opts['CreateCryptoAddressRequest'];
|
|
132
|
+
if (postBody && postBody.toJSON) {
|
|
133
|
+
postBody = postBody.toJSON();
|
|
134
|
+
}
|
|
135
|
+
var pathParams = {};
|
|
136
|
+
var queryParams = {};
|
|
137
|
+
var headerParams = {};
|
|
138
|
+
var formParams = {};
|
|
139
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
140
|
+
var contentTypes = ['application/json'];
|
|
141
|
+
var accepts = ['application/json'];
|
|
142
|
+
var returnType = _CryptoAddress["default"];
|
|
143
|
+
return this.apiClient.callApi('/payments/crypto_addresses', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Create crypto address
|
|
148
|
+
* This operation registers a crypto address for crypto withdrawal. The registered address can later be referenced by its ID when creating settlement requests.
|
|
149
|
+
* @param {Object} opts Optional parameters
|
|
150
|
+
* @param {module:model/CreateCryptoAddressRequest} opts.CreateCryptoAddressRequest The request body to register a crypto address.
|
|
151
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CryptoAddress}
|
|
152
|
+
*/
|
|
153
|
+
}, {
|
|
154
|
+
key: "createCryptoAddress",
|
|
155
|
+
value: function createCryptoAddress(opts) {
|
|
156
|
+
return this.createCryptoAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
157
|
+
return response_and_data.data;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Create forced sweep
|
|
163
|
+
* This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
164
|
+
* @param {Object} opts Optional parameters
|
|
165
|
+
* @param {module:model/ForcedSweepRequest} [ForcedSweepRequest] The request body for forced sweep.
|
|
118
166
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ForcedSweep} and HTTP response
|
|
119
167
|
*/
|
|
120
168
|
}, {
|
|
@@ -137,10 +185,10 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
137
185
|
}
|
|
138
186
|
|
|
139
187
|
/**
|
|
140
|
-
* Create
|
|
141
|
-
* This operation creates a
|
|
188
|
+
* Create forced sweep
|
|
189
|
+
* This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
142
190
|
* @param {Object} opts Optional parameters
|
|
143
|
-
* @param {module:model/ForcedSweepRequest} opts.ForcedSweepRequest The request body
|
|
191
|
+
* @param {module:model/ForcedSweepRequest} opts.ForcedSweepRequest The request body for forced sweep.
|
|
144
192
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ForcedSweep}
|
|
145
193
|
*/
|
|
146
194
|
}, {
|
|
@@ -315,6 +363,50 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
315
363
|
});
|
|
316
364
|
}
|
|
317
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Delete crypto address
|
|
368
|
+
* This operation unregisters a crypto address from being used for crypto withdrawals.
|
|
369
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
370
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCryptoAddress201Response} and HTTP response
|
|
371
|
+
*/
|
|
372
|
+
}, {
|
|
373
|
+
key: "deleteCryptoAddressWithHttpInfo",
|
|
374
|
+
value: function deleteCryptoAddressWithHttpInfo(crypto_address_id) {
|
|
375
|
+
var postBody = null;
|
|
376
|
+
if (postBody && postBody.toJSON) {
|
|
377
|
+
postBody = postBody.toJSON();
|
|
378
|
+
}
|
|
379
|
+
// verify the required parameter 'crypto_address_id' is set
|
|
380
|
+
if (crypto_address_id === undefined || crypto_address_id === null) {
|
|
381
|
+
throw new Error("Missing the required parameter 'crypto_address_id' when calling deleteCryptoAddress");
|
|
382
|
+
}
|
|
383
|
+
var pathParams = {
|
|
384
|
+
'crypto_address_id': crypto_address_id
|
|
385
|
+
};
|
|
386
|
+
var queryParams = {};
|
|
387
|
+
var headerParams = {};
|
|
388
|
+
var formParams = {};
|
|
389
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
390
|
+
var contentTypes = [];
|
|
391
|
+
var accepts = ['application/json'];
|
|
392
|
+
var returnType = _DeleteCryptoAddress201Response["default"];
|
|
393
|
+
return this.apiClient.callApi('/payments/crypto_addresses/{crypto_address_id}/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Delete crypto address
|
|
398
|
+
* This operation unregisters a crypto address from being used for crypto withdrawals.
|
|
399
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
400
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCryptoAddress201Response}
|
|
401
|
+
*/
|
|
402
|
+
}, {
|
|
403
|
+
key: "deleteCryptoAddress",
|
|
404
|
+
value: function deleteCryptoAddress(crypto_address_id) {
|
|
405
|
+
return this.deleteCryptoAddressWithHttpInfo(crypto_address_id).then(function (response_and_data) {
|
|
406
|
+
return response_and_data.data;
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
|
|
318
410
|
/**
|
|
319
411
|
* Get exchange rate
|
|
320
412
|
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
@@ -366,6 +458,64 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
366
458
|
});
|
|
367
459
|
}
|
|
368
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
|
+
|
|
369
519
|
/**
|
|
370
520
|
* Get pay-in order information
|
|
371
521
|
* This operation retrieves details of a specific pay-in order.
|
|
@@ -410,6 +560,50 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
410
560
|
});
|
|
411
561
|
}
|
|
412
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
|
+
|
|
413
607
|
/**
|
|
414
608
|
* Get refund order information
|
|
415
609
|
* This operation retrieves the detailed information about a specified refund order.
|
|
@@ -463,6 +657,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
463
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.
|
|
464
658
|
* @param {String} [merchant_id] The merchant ID.
|
|
465
659
|
* @param {String} [request_id] The request ID.
|
|
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)
|
|
466
661
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
|
|
467
662
|
*/
|
|
468
663
|
}, {
|
|
@@ -479,7 +674,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
479
674
|
'before': opts['before'],
|
|
480
675
|
'after': opts['after'],
|
|
481
676
|
'merchant_id': opts['merchant_id'],
|
|
482
|
-
'request_id': opts['request_id']
|
|
677
|
+
'request_id': opts['request_id'],
|
|
678
|
+
'statuses': opts['statuses']
|
|
483
679
|
};
|
|
484
680
|
var headerParams = {};
|
|
485
681
|
var formParams = {};
|
|
@@ -499,6 +695,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
499
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.
|
|
500
696
|
* @param {String} opts.merchant_id The merchant ID.
|
|
501
697
|
* @param {String} opts.request_id The request ID.
|
|
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)
|
|
502
699
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
|
|
503
700
|
*/
|
|
504
701
|
}, {
|
|
@@ -555,7 +752,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
555
752
|
|
|
556
753
|
/**
|
|
557
754
|
* Get withdrawable balances
|
|
558
|
-
* This operation retrieves the
|
|
755
|
+
* This operation retrieves the balances of specified merchants or the developer.
|
|
559
756
|
* @param {Object} opts Optional parameters
|
|
560
757
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
561
758
|
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
@@ -587,7 +784,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
587
784
|
|
|
588
785
|
/**
|
|
589
786
|
* Get withdrawable balances
|
|
590
|
-
* This operation retrieves the
|
|
787
|
+
* This operation retrieves the balances of specified merchants or the developer.
|
|
591
788
|
* @param {Object} opts Optional parameters
|
|
592
789
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
593
790
|
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
@@ -740,8 +937,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
740
937
|
}
|
|
741
938
|
|
|
742
939
|
/**
|
|
743
|
-
* List
|
|
744
|
-
* This operation retrieves the information of
|
|
940
|
+
* List forced sweeps
|
|
941
|
+
* This operation retrieves the information of all forced sweeps.
|
|
745
942
|
* @param {Object} opts Optional parameters
|
|
746
943
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
747
944
|
* @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.
|
|
@@ -774,8 +971,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
774
971
|
}
|
|
775
972
|
|
|
776
973
|
/**
|
|
777
|
-
* List
|
|
778
|
-
* This operation retrieves the information of
|
|
974
|
+
* List forced sweeps
|
|
975
|
+
* This operation retrieves the information of all forced sweeps.
|
|
779
976
|
* @param {Object} opts Optional parameters
|
|
780
977
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
781
978
|
* @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.
|
|
@@ -791,6 +988,63 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
791
988
|
});
|
|
792
989
|
}
|
|
793
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
|
+
|
|
794
1048
|
/**
|
|
795
1049
|
* List all merchants
|
|
796
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.
|
|
@@ -855,6 +1109,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
855
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.
|
|
856
1110
|
* @param {String} [merchant_id] The merchant ID.
|
|
857
1111
|
* @param {String} [psp_order_id] A unique reference code assigned by the developer to identify this order in their system.
|
|
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)
|
|
858
1113
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
859
1114
|
*/
|
|
860
1115
|
}, {
|
|
@@ -871,7 +1126,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
871
1126
|
'before': opts['before'],
|
|
872
1127
|
'after': opts['after'],
|
|
873
1128
|
'merchant_id': opts['merchant_id'],
|
|
874
|
-
'psp_order_id': opts['psp_order_id']
|
|
1129
|
+
'psp_order_id': opts['psp_order_id'],
|
|
1130
|
+
'statuses': opts['statuses']
|
|
875
1131
|
};
|
|
876
1132
|
var headerParams = {};
|
|
877
1133
|
var formParams = {};
|
|
@@ -891,6 +1147,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
891
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.
|
|
892
1148
|
* @param {String} opts.merchant_id The merchant ID.
|
|
893
1149
|
* @param {String} opts.psp_order_id A unique reference code assigned by the developer to identify this order in their system.
|
|
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)
|
|
894
1151
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
895
1152
|
*/
|
|
896
1153
|
}, {
|
|
@@ -937,6 +1194,111 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
937
1194
|
});
|
|
938
1195
|
}
|
|
939
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
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* List all settlement details
|
|
1249
|
+
* This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status.
|
|
1250
|
+
* @param {Object} opts Optional parameters
|
|
1251
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
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.
|
|
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.
|
|
1254
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
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)
|
|
1256
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementDetails200Response} and HTTP response
|
|
1257
|
+
*/
|
|
1258
|
+
}, {
|
|
1259
|
+
key: "listSettlementDetailsWithHttpInfo",
|
|
1260
|
+
value: function listSettlementDetailsWithHttpInfo(opts) {
|
|
1261
|
+
opts = opts || {};
|
|
1262
|
+
var postBody = null;
|
|
1263
|
+
if (postBody && postBody.toJSON) {
|
|
1264
|
+
postBody = postBody.toJSON();
|
|
1265
|
+
}
|
|
1266
|
+
var pathParams = {};
|
|
1267
|
+
var queryParams = {
|
|
1268
|
+
'limit': opts['limit'],
|
|
1269
|
+
'before': opts['before'],
|
|
1270
|
+
'after': opts['after'],
|
|
1271
|
+
'merchant_id': opts['merchant_id'],
|
|
1272
|
+
'statuses': opts['statuses']
|
|
1273
|
+
};
|
|
1274
|
+
var headerParams = {};
|
|
1275
|
+
var formParams = {};
|
|
1276
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1277
|
+
var contentTypes = [];
|
|
1278
|
+
var accepts = ['application/json'];
|
|
1279
|
+
var returnType = _ListSettlementDetails200Response["default"];
|
|
1280
|
+
return this.apiClient.callApi('/payments/settlement_details', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* List all settlement details
|
|
1285
|
+
* This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status.
|
|
1286
|
+
* @param {Object} opts Optional parameters
|
|
1287
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
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.
|
|
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.
|
|
1290
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
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)
|
|
1292
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementDetails200Response}
|
|
1293
|
+
*/
|
|
1294
|
+
}, {
|
|
1295
|
+
key: "listSettlementDetails",
|
|
1296
|
+
value: function listSettlementDetails(opts) {
|
|
1297
|
+
return this.listSettlementDetailsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1298
|
+
return response_and_data.data;
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
|
|
940
1302
|
/**
|
|
941
1303
|
* List all settlement requests
|
|
942
1304
|
* This operation retrieves the information of all settlement requests.
|
|
@@ -1147,8 +1509,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1147
1509
|
}
|
|
1148
1510
|
|
|
1149
1511
|
/**
|
|
1150
|
-
* Update refund order
|
|
1151
|
-
* 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.
|
|
1152
1514
|
* @param {String} refund_id The refund order ID.
|
|
1153
1515
|
* @param {Object} opts Optional parameters
|
|
1154
1516
|
* @param {module:model/UpdateRefundByIdRequest} [UpdateRefundByIdRequest] The request body to update a refund order.
|
|
@@ -1180,8 +1542,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1180
1542
|
}
|
|
1181
1543
|
|
|
1182
1544
|
/**
|
|
1183
|
-
* Update refund order
|
|
1184
|
-
* 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.
|
|
1185
1547
|
* @param {String} refund_id The refund order ID.
|
|
1186
1548
|
* @param {Object} opts Optional parameters
|
|
1187
1549
|
* @param {module:model/UpdateRefundByIdRequest} opts.UpdateRefundByIdRequest The request body to update a refund order.
|
|
@@ -1197,9 +1559,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1197
1559
|
|
|
1198
1560
|
/**
|
|
1199
1561
|
* Update top-up address
|
|
1200
|
-
*
|
|
1562
|
+
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
1201
1563
|
* @param {Object} opts Optional parameters
|
|
1202
|
-
* @param {module:model/UpdateTopUpAddress} [UpdateTopUpAddress] The request body to update top
|
|
1564
|
+
* @param {module:model/UpdateTopUpAddress} [UpdateTopUpAddress] The request body to update top-up address.
|
|
1203
1565
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
1204
1566
|
*/
|
|
1205
1567
|
}, {
|
|
@@ -1223,9 +1585,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1223
1585
|
|
|
1224
1586
|
/**
|
|
1225
1587
|
* Update top-up address
|
|
1226
|
-
*
|
|
1588
|
+
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
1227
1589
|
* @param {Object} opts Optional parameters
|
|
1228
|
-
* @param {module:model/UpdateTopUpAddress} opts.UpdateTopUpAddress The request body to update top
|
|
1590
|
+
* @param {module:model/UpdateTopUpAddress} opts.UpdateTopUpAddress The request body to update top-up address.
|
|
1229
1591
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
1230
1592
|
*/
|
|
1231
1593
|
}, {
|