@cobo/cobo-waas2 1.26.0 → 1.27.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 +64 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/PaymentApi.js +1298 -200
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/index.js +266 -7
- package/dist/model/BankAccountStatus.js +66 -0
- package/dist/model/ContractCallDestination.js +38 -10
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/Counterparty.js +195 -0
- package/dist/model/CounterpartyDetail.js +228 -0
- package/dist/model/CounterpartyType.js +61 -0
- package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
- package/dist/model/CreateCounterpartyRequest.js +193 -0
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
- package/dist/model/CreateDestinationBankAccount.js +257 -0
- package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
- package/dist/model/CreateDestinationRequest.js +235 -0
- package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +2 -2
- package/dist/model/CreateSettlement.js +13 -0
- package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
- package/dist/model/DeleteCounterparty200Response.js +110 -0
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
- package/dist/model/DeleteDestination200Response.js +110 -0
- package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
- package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
- package/dist/model/Destination.js +208 -0
- package/dist/model/DestinationBankAccount.js +301 -0
- package/dist/model/DestinationBankAccountDetail.js +394 -0
- package/dist/model/DestinationDetail.js +272 -0
- package/dist/model/DestinationType.js +61 -0
- package/dist/model/DestinationWalletAddressDetail.js +205 -0
- package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ExchangeRate.js +140 -0
- package/dist/model/IntermediaryBankInfo.js +140 -0
- package/dist/model/Link.js +4 -4
- package/dist/model/LinkDisplayInfo.js +2 -2
- package/dist/model/ListCounterparties200Response.js +123 -0
- package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
- package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
- package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
- package/dist/model/ListDestinations200Response.js +123 -0
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +2 -2
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +6 -6
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/SwapActivityTimeline.js +1 -1
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +38 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionTronContractDestination.js +150 -0
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TronContractCallDestination.js +150 -0
- package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
- package/dist/model/UpdateDestinationBankAccount.js +257 -0
- package/dist/model/UpdateDestinationByIdRequest.js +173 -0
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/BankAccountStatus.md +14 -0
- package/docs/ContractCallDestination.md +2 -2
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/Counterparty.md +16 -0
- package/docs/CounterpartyDetail.md +17 -0
- package/docs/CounterpartyType.md +12 -0
- package/docs/CounterpartyWalletAddressDetail.md +15 -0
- package/docs/CreateCounterpartyRequest.md +14 -0
- package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
- package/docs/CreateDestinationBankAccount.md +19 -0
- package/docs/CreateDestinationBankAccountRequest.md +20 -0
- package/docs/CreateDestinationRequest.md +16 -0
- package/docs/CreateDestinationWalletAddressRequest.md +11 -0
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +1 -1
- package/docs/CreateSettlement.md +1 -0
- package/docs/CreateWalletAddress.md +10 -0
- package/docs/DeleteCounterparty200Response.md +9 -0
- package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
- package/docs/DeleteDestination200Response.md +9 -0
- package/docs/DeleteDestinationBankAccount200Response.md +9 -0
- package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
- package/docs/Destination.md +17 -0
- package/docs/DestinationBankAccount.md +23 -0
- package/docs/DestinationBankAccountDetail.md +30 -0
- package/docs/DestinationDetail.md +19 -0
- package/docs/DestinationType.md +12 -0
- package/docs/DestinationWalletAddressDetail.md +16 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EnableDestinationWhitelistRequest.md +9 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeRate.md +11 -0
- package/docs/IntermediaryBankInfo.md +11 -0
- package/docs/Link.md +2 -2
- package/docs/LinkDisplayInfo.md +2 -2
- package/docs/ListCounterparties200Response.md +10 -0
- package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
- package/docs/ListDestinationBankAccounts200Response.md +10 -0
- package/docs/ListDestinationWalletAddresses200Response.md +10 -0
- package/docs/ListDestinations200Response.md +10 -0
- package/docs/PaymentApi.md +1459 -208
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +1 -1
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +4 -4
- package/docs/SettlementDetail.md +1 -0
- package/docs/SwapActivityTimeline.md +1 -1
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionTronContractDestination.md +12 -0
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TronContractCallDestination.md +12 -0
- package/docs/UpdateCounterpartyByIdRequest.md +13 -0
- package/docs/UpdateDestinationBankAccount.md +19 -0
- package/docs/UpdateDestinationByIdRequest.md +14 -0
- package/docs/WalletAddress.md +12 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -7,7 +7,16 @@ 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 _BankAccountStatus = _interopRequireDefault(require("../model/BankAccountStatus"));
|
|
11
|
+
var _Counterparty = _interopRequireDefault(require("../model/Counterparty"));
|
|
12
|
+
var _CounterpartyDetail = _interopRequireDefault(require("../model/CounterpartyDetail"));
|
|
13
|
+
var _CounterpartyType = _interopRequireDefault(require("../model/CounterpartyType"));
|
|
14
|
+
var _CreateCounterpartyRequest = _interopRequireDefault(require("../model/CreateCounterpartyRequest"));
|
|
15
|
+
var _CreateCounterpartyWalletAddressRequest = _interopRequireDefault(require("../model/CreateCounterpartyWalletAddressRequest"));
|
|
10
16
|
var _CreateCryptoAddressRequest = _interopRequireDefault(require("../model/CreateCryptoAddressRequest"));
|
|
17
|
+
var _CreateDestinationBankAccountRequest = _interopRequireDefault(require("../model/CreateDestinationBankAccountRequest"));
|
|
18
|
+
var _CreateDestinationRequest = _interopRequireDefault(require("../model/CreateDestinationRequest"));
|
|
19
|
+
var _CreateDestinationWalletAddressRequest = _interopRequireDefault(require("../model/CreateDestinationWalletAddressRequest"));
|
|
11
20
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
12
21
|
var _CreateOrderLinkRequest = _interopRequireDefault(require("../model/CreateOrderLinkRequest"));
|
|
13
22
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
@@ -15,14 +24,31 @@ var _CreateRefundLinkRequest = _interopRequireDefault(require("../model/CreateRe
|
|
|
15
24
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
16
25
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
17
26
|
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
27
|
+
var _DeleteCounterparty200Response = _interopRequireDefault(require("../model/DeleteCounterparty200Response"));
|
|
28
|
+
var _DeleteCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/DeleteCounterpartyWalletAddress200Response"));
|
|
18
29
|
var _DeleteCryptoAddress201Response = _interopRequireDefault(require("../model/DeleteCryptoAddress201Response"));
|
|
30
|
+
var _DeleteDestination200Response = _interopRequireDefault(require("../model/DeleteDestination200Response"));
|
|
31
|
+
var _DeleteDestinationBankAccount200Response = _interopRequireDefault(require("../model/DeleteDestinationBankAccount200Response"));
|
|
32
|
+
var _DeleteDestinationWalletAddress200Response = _interopRequireDefault(require("../model/DeleteDestinationWalletAddress200Response"));
|
|
33
|
+
var _Destination = _interopRequireDefault(require("../model/Destination"));
|
|
34
|
+
var _DestinationBankAccount = _interopRequireDefault(require("../model/DestinationBankAccount"));
|
|
35
|
+
var _DestinationBankAccountDetail = _interopRequireDefault(require("../model/DestinationBankAccountDetail"));
|
|
36
|
+
var _DestinationDetail = _interopRequireDefault(require("../model/DestinationDetail"));
|
|
37
|
+
var _DestinationType = _interopRequireDefault(require("../model/DestinationType"));
|
|
38
|
+
var _EnableDestinationWhitelistRequest = _interopRequireDefault(require("../model/EnableDestinationWhitelistRequest"));
|
|
19
39
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
40
|
+
var _ExchangeRate = _interopRequireDefault(require("../model/ExchangeRate"));
|
|
20
41
|
var _ForcedSweep = _interopRequireDefault(require("../model/ForcedSweep"));
|
|
21
42
|
var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRequest"));
|
|
22
43
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
23
44
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
24
45
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
25
46
|
var _Link = _interopRequireDefault(require("../model/Link"));
|
|
47
|
+
var _ListCounterparties200Response = _interopRequireDefault(require("../model/ListCounterparties200Response"));
|
|
48
|
+
var _ListCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/ListCounterpartyWalletAddress200Response"));
|
|
49
|
+
var _ListDestinationBankAccounts200Response = _interopRequireDefault(require("../model/ListDestinationBankAccounts200Response"));
|
|
50
|
+
var _ListDestinationWalletAddresses200Response = _interopRequireDefault(require("../model/ListDestinationWalletAddresses200Response"));
|
|
51
|
+
var _ListDestinations200Response = _interopRequireDefault(require("../model/ListDestinations200Response"));
|
|
26
52
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
27
53
|
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
28
54
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
@@ -37,16 +63,20 @@ var _Order = _interopRequireDefault(require("../model/Order"));
|
|
|
37
63
|
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
38
64
|
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
39
65
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
40
|
-
var
|
|
66
|
+
var _QueryDestinationWhitelistEnabled200Response = _interopRequireDefault(require("../model/QueryDestinationWhitelistEnabled200Response"));
|
|
41
67
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
42
68
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
43
69
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
44
70
|
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
45
71
|
var _UpdateBankAccountByIdRequest = _interopRequireDefault(require("../model/UpdateBankAccountByIdRequest"));
|
|
72
|
+
var _UpdateCounterpartyByIdRequest = _interopRequireDefault(require("../model/UpdateCounterpartyByIdRequest"));
|
|
73
|
+
var _UpdateDestinationBankAccount = _interopRequireDefault(require("../model/UpdateDestinationBankAccount"));
|
|
74
|
+
var _UpdateDestinationByIdRequest = _interopRequireDefault(require("../model/UpdateDestinationByIdRequest"));
|
|
46
75
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
47
76
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
48
77
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
49
78
|
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
79
|
+
var _WalletAddress = _interopRequireDefault(require("../model/WalletAddress"));
|
|
50
80
|
var _WalletSetup = _interopRequireDefault(require("../model/WalletSetup"));
|
|
51
81
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
52
82
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -82,12 +112,63 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
112
|
}
|
|
83
113
|
|
|
84
114
|
/**
|
|
85
|
-
*
|
|
86
|
-
* This operation
|
|
87
|
-
* @param {String}
|
|
88
|
-
* @
|
|
115
|
+
* Batch get exchange rates
|
|
116
|
+
* This operation retrieves the current exchange rates between a specified currency and a list of token IDs.
|
|
117
|
+
* @param {String} token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
118
|
+
* @param {String} currencies List of the fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
119
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ExchangeRate>} and HTTP response
|
|
89
120
|
*/
|
|
90
121
|
return _createClass(PaymentApi, [{
|
|
122
|
+
key: "batchGetExchangeRatesWithHttpInfo",
|
|
123
|
+
value: function batchGetExchangeRatesWithHttpInfo(token_ids, currencies) {
|
|
124
|
+
var postBody = null;
|
|
125
|
+
if (postBody && postBody.toJSON) {
|
|
126
|
+
postBody = postBody.toJSON();
|
|
127
|
+
}
|
|
128
|
+
// verify the required parameter 'token_ids' is set
|
|
129
|
+
if (token_ids === undefined || token_ids === null) {
|
|
130
|
+
throw new Error("Missing the required parameter 'token_ids' when calling batchGetExchangeRates");
|
|
131
|
+
}
|
|
132
|
+
// verify the required parameter 'currencies' is set
|
|
133
|
+
if (currencies === undefined || currencies === null) {
|
|
134
|
+
throw new Error("Missing the required parameter 'currencies' when calling batchGetExchangeRates");
|
|
135
|
+
}
|
|
136
|
+
var pathParams = {};
|
|
137
|
+
var queryParams = {
|
|
138
|
+
'token_ids': token_ids,
|
|
139
|
+
'currencies': currencies
|
|
140
|
+
};
|
|
141
|
+
var headerParams = {};
|
|
142
|
+
var formParams = {};
|
|
143
|
+
var authNames = ['CoboAuth'];
|
|
144
|
+
var contentTypes = [];
|
|
145
|
+
var accepts = ['application/json'];
|
|
146
|
+
var returnType = [_ExchangeRate["default"]];
|
|
147
|
+
return this.apiClient.callApi('/payments/exchange_rates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Batch get exchange rates
|
|
152
|
+
* This operation retrieves the current exchange rates between a specified currency and a list of token IDs.
|
|
153
|
+
* @param {String} token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
154
|
+
* @param {String} currencies List of the fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
155
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ExchangeRate>}
|
|
156
|
+
*/
|
|
157
|
+
}, {
|
|
158
|
+
key: "batchGetExchangeRates",
|
|
159
|
+
value: function batchGetExchangeRates(token_ids, currencies) {
|
|
160
|
+
return this.batchGetExchangeRatesWithHttpInfo(token_ids, currencies).then(function (response_and_data) {
|
|
161
|
+
return response_and_data.data;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Cancel refund order
|
|
167
|
+
* This operation cancels a specified refund order. You can only cancel refund orders that have not been processed yet.
|
|
168
|
+
* @param {String} refund_id The refund order ID.
|
|
169
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
170
|
+
*/
|
|
171
|
+
}, {
|
|
91
172
|
key: "cancelRefundByIdWithHttpInfo",
|
|
92
173
|
value: function cancelRefundByIdWithHttpInfo(refund_id) {
|
|
93
174
|
var postBody = null;
|
|
@@ -125,6 +206,88 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
125
206
|
});
|
|
126
207
|
}
|
|
127
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Create counterparty
|
|
211
|
+
* This operation creates a counterparty.
|
|
212
|
+
* @param {Object} opts Optional parameters
|
|
213
|
+
* @param {module:model/CreateCounterpartyRequest} [CreateCounterpartyRequest] The request body to create a counterparty.
|
|
214
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CounterpartyDetail} and HTTP response
|
|
215
|
+
*/
|
|
216
|
+
}, {
|
|
217
|
+
key: "createCounterpartyWithHttpInfo",
|
|
218
|
+
value: function createCounterpartyWithHttpInfo(opts) {
|
|
219
|
+
opts = opts || {};
|
|
220
|
+
var postBody = opts['CreateCounterpartyRequest'];
|
|
221
|
+
if (postBody && postBody.toJSON) {
|
|
222
|
+
postBody = postBody.toJSON();
|
|
223
|
+
}
|
|
224
|
+
var pathParams = {};
|
|
225
|
+
var queryParams = {};
|
|
226
|
+
var headerParams = {};
|
|
227
|
+
var formParams = {};
|
|
228
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
229
|
+
var contentTypes = ['application/json'];
|
|
230
|
+
var accepts = ['application/json'];
|
|
231
|
+
var returnType = _CounterpartyDetail["default"];
|
|
232
|
+
return this.apiClient.callApi('/payments/counterparty', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Create counterparty
|
|
237
|
+
* This operation creates a counterparty.
|
|
238
|
+
* @param {Object} opts Optional parameters
|
|
239
|
+
* @param {module:model/CreateCounterpartyRequest} opts.CreateCounterpartyRequest The request body to create a counterparty.
|
|
240
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CounterpartyDetail}
|
|
241
|
+
*/
|
|
242
|
+
}, {
|
|
243
|
+
key: "createCounterparty",
|
|
244
|
+
value: function createCounterparty(opts) {
|
|
245
|
+
return this.createCounterpartyWithHttpInfo(opts).then(function (response_and_data) {
|
|
246
|
+
return response_and_data.data;
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Create counterparty wallet address
|
|
252
|
+
* This operation creates a counterparty wallet address.
|
|
253
|
+
* @param {Object} opts Optional parameters
|
|
254
|
+
* @param {module:model/CreateCounterpartyWalletAddressRequest} [CreateCounterpartyWalletAddressRequest] The request body to create a counterparty wallet address.
|
|
255
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletAddress} and HTTP response
|
|
256
|
+
*/
|
|
257
|
+
}, {
|
|
258
|
+
key: "createCounterpartyWalletAddressWithHttpInfo",
|
|
259
|
+
value: function createCounterpartyWalletAddressWithHttpInfo(opts) {
|
|
260
|
+
opts = opts || {};
|
|
261
|
+
var postBody = opts['CreateCounterpartyWalletAddressRequest'];
|
|
262
|
+
if (postBody && postBody.toJSON) {
|
|
263
|
+
postBody = postBody.toJSON();
|
|
264
|
+
}
|
|
265
|
+
var pathParams = {};
|
|
266
|
+
var queryParams = {};
|
|
267
|
+
var headerParams = {};
|
|
268
|
+
var formParams = {};
|
|
269
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
270
|
+
var contentTypes = ['application/json'];
|
|
271
|
+
var accepts = ['application/json'];
|
|
272
|
+
var returnType = _WalletAddress["default"];
|
|
273
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Create counterparty wallet address
|
|
278
|
+
* This operation creates a counterparty wallet address.
|
|
279
|
+
* @param {Object} opts Optional parameters
|
|
280
|
+
* @param {module:model/CreateCounterpartyWalletAddressRequest} opts.CreateCounterpartyWalletAddressRequest The request body to create a counterparty wallet address.
|
|
281
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletAddress}
|
|
282
|
+
*/
|
|
283
|
+
}, {
|
|
284
|
+
key: "createCounterpartyWalletAddress",
|
|
285
|
+
value: function createCounterpartyWalletAddress(opts) {
|
|
286
|
+
return this.createCounterpartyWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
287
|
+
return response_and_data.data;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
128
291
|
/**
|
|
129
292
|
* Create crypto address
|
|
130
293
|
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
@@ -166,6 +329,129 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
166
329
|
});
|
|
167
330
|
}
|
|
168
331
|
|
|
332
|
+
/**
|
|
333
|
+
* Create destination
|
|
334
|
+
* This operation creates a destination.
|
|
335
|
+
* @param {Object} opts Optional parameters
|
|
336
|
+
* @param {module:model/CreateDestinationRequest} [CreateDestinationRequest] The request body to create a destination.
|
|
337
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationDetail} and HTTP response
|
|
338
|
+
*/
|
|
339
|
+
}, {
|
|
340
|
+
key: "createDestinationWithHttpInfo",
|
|
341
|
+
value: function createDestinationWithHttpInfo(opts) {
|
|
342
|
+
opts = opts || {};
|
|
343
|
+
var postBody = opts['CreateDestinationRequest'];
|
|
344
|
+
if (postBody && postBody.toJSON) {
|
|
345
|
+
postBody = postBody.toJSON();
|
|
346
|
+
}
|
|
347
|
+
var pathParams = {};
|
|
348
|
+
var queryParams = {};
|
|
349
|
+
var headerParams = {};
|
|
350
|
+
var formParams = {};
|
|
351
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
352
|
+
var contentTypes = ['application/json'];
|
|
353
|
+
var accepts = ['application/json'];
|
|
354
|
+
var returnType = _DestinationDetail["default"];
|
|
355
|
+
return this.apiClient.callApi('/payments/destination', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Create destination
|
|
360
|
+
* This operation creates a destination.
|
|
361
|
+
* @param {Object} opts Optional parameters
|
|
362
|
+
* @param {module:model/CreateDestinationRequest} opts.CreateDestinationRequest The request body to create a destination.
|
|
363
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationDetail}
|
|
364
|
+
*/
|
|
365
|
+
}, {
|
|
366
|
+
key: "createDestination",
|
|
367
|
+
value: function createDestination(opts) {
|
|
368
|
+
return this.createDestinationWithHttpInfo(opts).then(function (response_and_data) {
|
|
369
|
+
return response_and_data.data;
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Create destination bank account
|
|
375
|
+
* This operation creates a destination bank account.
|
|
376
|
+
* @param {Object} opts Optional parameters
|
|
377
|
+
* @param {module:model/CreateDestinationBankAccountRequest} [CreateDestinationBankAccountRequest] The request body to create a destination bank account.
|
|
378
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccount} and HTTP response
|
|
379
|
+
*/
|
|
380
|
+
}, {
|
|
381
|
+
key: "createDestinationBankAccountWithHttpInfo",
|
|
382
|
+
value: function createDestinationBankAccountWithHttpInfo(opts) {
|
|
383
|
+
opts = opts || {};
|
|
384
|
+
var postBody = opts['CreateDestinationBankAccountRequest'];
|
|
385
|
+
if (postBody && postBody.toJSON) {
|
|
386
|
+
postBody = postBody.toJSON();
|
|
387
|
+
}
|
|
388
|
+
var pathParams = {};
|
|
389
|
+
var queryParams = {};
|
|
390
|
+
var headerParams = {};
|
|
391
|
+
var formParams = {};
|
|
392
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
393
|
+
var contentTypes = ['application/json'];
|
|
394
|
+
var accepts = ['application/json'];
|
|
395
|
+
var returnType = _DestinationBankAccount["default"];
|
|
396
|
+
return this.apiClient.callApi('/payments/destination/bank_account', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Create destination bank account
|
|
401
|
+
* This operation creates a destination bank account.
|
|
402
|
+
* @param {Object} opts Optional parameters
|
|
403
|
+
* @param {module:model/CreateDestinationBankAccountRequest} opts.CreateDestinationBankAccountRequest The request body to create a destination bank account.
|
|
404
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccount}
|
|
405
|
+
*/
|
|
406
|
+
}, {
|
|
407
|
+
key: "createDestinationBankAccount",
|
|
408
|
+
value: function createDestinationBankAccount(opts) {
|
|
409
|
+
return this.createDestinationBankAccountWithHttpInfo(opts).then(function (response_and_data) {
|
|
410
|
+
return response_and_data.data;
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Create destination wallet address
|
|
416
|
+
* This operation creates a destination wallet address.
|
|
417
|
+
* @param {Object} opts Optional parameters
|
|
418
|
+
* @param {module:model/CreateDestinationWalletAddressRequest} [CreateDestinationWalletAddressRequest] The request body to create a destination wallet address.
|
|
419
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletAddress} and HTTP response
|
|
420
|
+
*/
|
|
421
|
+
}, {
|
|
422
|
+
key: "createDestinationWalletAddressWithHttpInfo",
|
|
423
|
+
value: function createDestinationWalletAddressWithHttpInfo(opts) {
|
|
424
|
+
opts = opts || {};
|
|
425
|
+
var postBody = opts['CreateDestinationWalletAddressRequest'];
|
|
426
|
+
if (postBody && postBody.toJSON) {
|
|
427
|
+
postBody = postBody.toJSON();
|
|
428
|
+
}
|
|
429
|
+
var pathParams = {};
|
|
430
|
+
var queryParams = {};
|
|
431
|
+
var headerParams = {};
|
|
432
|
+
var formParams = {};
|
|
433
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
434
|
+
var contentTypes = ['application/json'];
|
|
435
|
+
var accepts = ['application/json'];
|
|
436
|
+
var returnType = _WalletAddress["default"];
|
|
437
|
+
return this.apiClient.callApi('/payments/destination/wallet_address', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Create destination wallet address
|
|
442
|
+
* This operation creates a destination wallet address.
|
|
443
|
+
* @param {Object} opts Optional parameters
|
|
444
|
+
* @param {module:model/CreateDestinationWalletAddressRequest} opts.CreateDestinationWalletAddressRequest The request body to create a destination wallet address.
|
|
445
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletAddress}
|
|
446
|
+
*/
|
|
447
|
+
}, {
|
|
448
|
+
key: "createDestinationWalletAddress",
|
|
449
|
+
value: function createDestinationWalletAddress(opts) {
|
|
450
|
+
return this.createDestinationWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
451
|
+
return response_and_data.data;
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
|
|
169
455
|
/**
|
|
170
456
|
* Create forced sweep
|
|
171
457
|
* <Warning>This operation has been deprecated.</Warning> This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
@@ -373,9 +659,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
373
659
|
|
|
374
660
|
/**
|
|
375
661
|
* Create refund link
|
|
376
|
-
* This operation creates a
|
|
662
|
+
* This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/developers/v2/payments/create-refund-link).
|
|
377
663
|
* @param {Object} opts Optional parameters
|
|
378
|
-
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a
|
|
664
|
+
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a refund link.
|
|
379
665
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
380
666
|
*/
|
|
381
667
|
}, {
|
|
@@ -399,9 +685,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
399
685
|
|
|
400
686
|
/**
|
|
401
687
|
* Create refund link
|
|
402
|
-
* This operation creates a
|
|
688
|
+
* This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/developers/v2/payments/create-refund-link).
|
|
403
689
|
* @param {Object} opts Optional parameters
|
|
404
|
-
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a
|
|
690
|
+
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a refund link.
|
|
405
691
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
406
692
|
*/
|
|
407
693
|
}, {
|
|
@@ -454,24 +740,24 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
740
|
}
|
|
455
741
|
|
|
456
742
|
/**
|
|
457
|
-
* Delete
|
|
458
|
-
* This operation
|
|
459
|
-
* @param {String}
|
|
460
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
743
|
+
* Delete counterparty
|
|
744
|
+
* This operation deletes a counterparty.
|
|
745
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
746
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCounterparty200Response} and HTTP response
|
|
461
747
|
*/
|
|
462
748
|
}, {
|
|
463
|
-
key: "
|
|
464
|
-
value: function
|
|
749
|
+
key: "deleteCounterpartyWithHttpInfo",
|
|
750
|
+
value: function deleteCounterpartyWithHttpInfo(counterparty_id) {
|
|
465
751
|
var postBody = null;
|
|
466
752
|
if (postBody && postBody.toJSON) {
|
|
467
753
|
postBody = postBody.toJSON();
|
|
468
754
|
}
|
|
469
|
-
// verify the required parameter '
|
|
470
|
-
if (
|
|
471
|
-
throw new Error("Missing the required parameter '
|
|
755
|
+
// verify the required parameter 'counterparty_id' is set
|
|
756
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
757
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling deleteCounterparty");
|
|
472
758
|
}
|
|
473
759
|
var pathParams = {
|
|
474
|
-
'
|
|
760
|
+
'counterparty_id': counterparty_id
|
|
475
761
|
};
|
|
476
762
|
var queryParams = {};
|
|
477
763
|
var headerParams = {};
|
|
@@ -479,151 +765,131 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
479
765
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
480
766
|
var contentTypes = [];
|
|
481
767
|
var accepts = ['application/json'];
|
|
482
|
-
var returnType =
|
|
483
|
-
return this.apiClient.callApi('/payments/
|
|
768
|
+
var returnType = _DeleteCounterparty200Response["default"];
|
|
769
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
484
770
|
}
|
|
485
771
|
|
|
486
772
|
/**
|
|
487
|
-
* Delete
|
|
488
|
-
* This operation
|
|
489
|
-
* @param {String}
|
|
490
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
773
|
+
* Delete counterparty
|
|
774
|
+
* This operation deletes a counterparty.
|
|
775
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
776
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCounterparty200Response}
|
|
491
777
|
*/
|
|
492
778
|
}, {
|
|
493
|
-
key: "
|
|
494
|
-
value: function
|
|
495
|
-
return this.
|
|
779
|
+
key: "deleteCounterparty",
|
|
780
|
+
value: function deleteCounterparty(counterparty_id) {
|
|
781
|
+
return this.deleteCounterpartyWithHttpInfo(counterparty_id).then(function (response_and_data) {
|
|
496
782
|
return response_and_data.data;
|
|
497
783
|
});
|
|
498
784
|
}
|
|
499
785
|
|
|
500
786
|
/**
|
|
501
|
-
*
|
|
502
|
-
* This operation
|
|
503
|
-
* @param {String}
|
|
504
|
-
* @
|
|
505
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
787
|
+
* Delete counterparty wallet address
|
|
788
|
+
* This operation deletes a counterparty wallet address.
|
|
789
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
790
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCounterpartyWalletAddress200Response} and HTTP response
|
|
506
791
|
*/
|
|
507
792
|
}, {
|
|
508
|
-
key: "
|
|
509
|
-
value: function
|
|
793
|
+
key: "deleteCounterpartyWalletAddressWithHttpInfo",
|
|
794
|
+
value: function deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id) {
|
|
510
795
|
var postBody = null;
|
|
511
796
|
if (postBody && postBody.toJSON) {
|
|
512
797
|
postBody = postBody.toJSON();
|
|
513
798
|
}
|
|
514
|
-
// verify the required parameter '
|
|
515
|
-
if (
|
|
516
|
-
throw new Error("Missing the required parameter '
|
|
517
|
-
}
|
|
518
|
-
// verify the required parameter 'currency' is set
|
|
519
|
-
if (currency === undefined || currency === null) {
|
|
520
|
-
throw new Error("Missing the required parameter 'currency' when calling getExchangeRate");
|
|
799
|
+
// verify the required parameter 'wallet_address_id' is set
|
|
800
|
+
if (wallet_address_id === undefined || wallet_address_id === null) {
|
|
801
|
+
throw new Error("Missing the required parameter 'wallet_address_id' when calling deleteCounterpartyWalletAddress");
|
|
521
802
|
}
|
|
522
803
|
var pathParams = {
|
|
523
|
-
'
|
|
524
|
-
'currency': currency
|
|
804
|
+
'wallet_address_id': wallet_address_id
|
|
525
805
|
};
|
|
526
806
|
var queryParams = {};
|
|
527
807
|
var headerParams = {};
|
|
528
808
|
var formParams = {};
|
|
529
|
-
var authNames = ['CoboAuth'];
|
|
809
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
530
810
|
var contentTypes = [];
|
|
531
811
|
var accepts = ['application/json'];
|
|
532
|
-
var returnType =
|
|
533
|
-
return this.apiClient.callApi('/payments/
|
|
812
|
+
var returnType = _DeleteCounterpartyWalletAddress200Response["default"];
|
|
813
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address/{wallet_address_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
534
814
|
}
|
|
535
815
|
|
|
536
816
|
/**
|
|
537
|
-
*
|
|
538
|
-
* This operation
|
|
539
|
-
* @param {String}
|
|
540
|
-
* @
|
|
541
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
817
|
+
* Delete counterparty wallet address
|
|
818
|
+
* This operation deletes a counterparty wallet address.
|
|
819
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
820
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCounterpartyWalletAddress200Response}
|
|
542
821
|
*/
|
|
543
822
|
}, {
|
|
544
|
-
key: "
|
|
545
|
-
value: function
|
|
546
|
-
return this.
|
|
823
|
+
key: "deleteCounterpartyWalletAddress",
|
|
824
|
+
value: function deleteCounterpartyWalletAddress(wallet_address_id) {
|
|
825
|
+
return this.deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id).then(function (response_and_data) {
|
|
547
826
|
return response_and_data.data;
|
|
548
827
|
});
|
|
549
828
|
}
|
|
550
829
|
|
|
551
830
|
/**
|
|
552
|
-
*
|
|
553
|
-
* This operation
|
|
554
|
-
* @param {String}
|
|
555
|
-
* @
|
|
556
|
-
* @param {Object} opts Optional parameters
|
|
557
|
-
* @param {String} [merchant_id] The merchant ID.
|
|
558
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ReceivedAmountPerAddress>} and HTTP response
|
|
831
|
+
* Delete crypto address
|
|
832
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
833
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
834
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCryptoAddress201Response} and HTTP response
|
|
559
835
|
*/
|
|
560
836
|
}, {
|
|
561
|
-
key: "
|
|
562
|
-
value: function
|
|
563
|
-
opts = opts || {};
|
|
837
|
+
key: "deleteCryptoAddressWithHttpInfo",
|
|
838
|
+
value: function deleteCryptoAddressWithHttpInfo(crypto_address_id) {
|
|
564
839
|
var postBody = null;
|
|
565
840
|
if (postBody && postBody.toJSON) {
|
|
566
841
|
postBody = postBody.toJSON();
|
|
567
842
|
}
|
|
568
|
-
// verify the required parameter '
|
|
569
|
-
if (
|
|
570
|
-
throw new Error("Missing the required parameter '
|
|
571
|
-
}
|
|
572
|
-
// verify the required parameter 'token_id' is set
|
|
573
|
-
if (token_id === undefined || token_id === null) {
|
|
574
|
-
throw new Error("Missing the required parameter 'token_id' when calling getPayerBalanceByAddress");
|
|
843
|
+
// verify the required parameter 'crypto_address_id' is set
|
|
844
|
+
if (crypto_address_id === undefined || crypto_address_id === null) {
|
|
845
|
+
throw new Error("Missing the required parameter 'crypto_address_id' when calling deleteCryptoAddress");
|
|
575
846
|
}
|
|
576
|
-
var pathParams = {
|
|
577
|
-
|
|
578
|
-
'merchant_id': opts['merchant_id'],
|
|
579
|
-
'payer_id': payer_id,
|
|
580
|
-
'token_id': token_id
|
|
847
|
+
var pathParams = {
|
|
848
|
+
'crypto_address_id': crypto_address_id
|
|
581
849
|
};
|
|
850
|
+
var queryParams = {};
|
|
582
851
|
var headerParams = {};
|
|
583
852
|
var formParams = {};
|
|
584
853
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
585
854
|
var contentTypes = [];
|
|
586
855
|
var accepts = ['application/json'];
|
|
587
|
-
var returnType = [
|
|
588
|
-
return this.apiClient.callApi('/payments/
|
|
856
|
+
var returnType = _DeleteCryptoAddress201Response["default"];
|
|
857
|
+
return this.apiClient.callApi('/payments/crypto_addresses/{crypto_address_id}/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
589
858
|
}
|
|
590
859
|
|
|
591
860
|
/**
|
|
592
|
-
*
|
|
593
|
-
* This operation
|
|
594
|
-
* @param {String}
|
|
595
|
-
* @
|
|
596
|
-
* @param {Object} opts Optional parameters
|
|
597
|
-
* @param {String} opts.merchant_id The merchant ID.
|
|
598
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ReceivedAmountPerAddress>}
|
|
861
|
+
* Delete crypto address
|
|
862
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
863
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
864
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCryptoAddress201Response}
|
|
599
865
|
*/
|
|
600
866
|
}, {
|
|
601
|
-
key: "
|
|
602
|
-
value: function
|
|
603
|
-
return this.
|
|
867
|
+
key: "deleteCryptoAddress",
|
|
868
|
+
value: function deleteCryptoAddress(crypto_address_id) {
|
|
869
|
+
return this.deleteCryptoAddressWithHttpInfo(crypto_address_id).then(function (response_and_data) {
|
|
604
870
|
return response_and_data.data;
|
|
605
871
|
});
|
|
606
872
|
}
|
|
607
873
|
|
|
608
874
|
/**
|
|
609
|
-
*
|
|
610
|
-
* This operation
|
|
611
|
-
* @param {String}
|
|
612
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
875
|
+
* Delete destination
|
|
876
|
+
* This operation deletes a destination.
|
|
877
|
+
* @param {String} destination_id The destination ID.
|
|
878
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestination200Response} and HTTP response
|
|
613
879
|
*/
|
|
614
880
|
}, {
|
|
615
|
-
key: "
|
|
616
|
-
value: function
|
|
881
|
+
key: "deleteDestinationWithHttpInfo",
|
|
882
|
+
value: function deleteDestinationWithHttpInfo(destination_id) {
|
|
617
883
|
var postBody = null;
|
|
618
884
|
if (postBody && postBody.toJSON) {
|
|
619
885
|
postBody = postBody.toJSON();
|
|
620
886
|
}
|
|
621
|
-
// verify the required parameter '
|
|
622
|
-
if (
|
|
623
|
-
throw new Error("Missing the required parameter '
|
|
887
|
+
// verify the required parameter 'destination_id' is set
|
|
888
|
+
if (destination_id === undefined || destination_id === null) {
|
|
889
|
+
throw new Error("Missing the required parameter 'destination_id' when calling deleteDestination");
|
|
624
890
|
}
|
|
625
891
|
var pathParams = {
|
|
626
|
-
'
|
|
892
|
+
'destination_id': destination_id
|
|
627
893
|
};
|
|
628
894
|
var queryParams = {};
|
|
629
895
|
var headerParams = {};
|
|
@@ -631,20 +897,376 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
631
897
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
632
898
|
var contentTypes = [];
|
|
633
899
|
var accepts = ['application/json'];
|
|
634
|
-
var returnType =
|
|
635
|
-
return this.apiClient.callApi('/payments/
|
|
900
|
+
var returnType = _DeleteDestination200Response["default"];
|
|
901
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
636
902
|
}
|
|
637
903
|
|
|
638
904
|
/**
|
|
639
|
-
*
|
|
640
|
-
* This operation
|
|
641
|
-
* @param {String}
|
|
642
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
905
|
+
* Delete destination
|
|
906
|
+
* This operation deletes a destination.
|
|
907
|
+
* @param {String} destination_id The destination ID.
|
|
908
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestination200Response}
|
|
643
909
|
*/
|
|
644
910
|
}, {
|
|
645
|
-
key: "
|
|
646
|
-
value: function
|
|
647
|
-
return this.
|
|
911
|
+
key: "deleteDestination",
|
|
912
|
+
value: function deleteDestination(destination_id) {
|
|
913
|
+
return this.deleteDestinationWithHttpInfo(destination_id).then(function (response_and_data) {
|
|
914
|
+
return response_and_data.data;
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Delete destination bank account
|
|
920
|
+
* This operation deletes a destination bank account.
|
|
921
|
+
* @param {String} bank_account_id The bank account ID.
|
|
922
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestinationBankAccount200Response} and HTTP response
|
|
923
|
+
*/
|
|
924
|
+
}, {
|
|
925
|
+
key: "deleteDestinationBankAccountWithHttpInfo",
|
|
926
|
+
value: function deleteDestinationBankAccountWithHttpInfo(bank_account_id) {
|
|
927
|
+
var postBody = null;
|
|
928
|
+
if (postBody && postBody.toJSON) {
|
|
929
|
+
postBody = postBody.toJSON();
|
|
930
|
+
}
|
|
931
|
+
// verify the required parameter 'bank_account_id' is set
|
|
932
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
933
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling deleteDestinationBankAccount");
|
|
934
|
+
}
|
|
935
|
+
var pathParams = {
|
|
936
|
+
'bank_account_id': bank_account_id
|
|
937
|
+
};
|
|
938
|
+
var queryParams = {};
|
|
939
|
+
var headerParams = {};
|
|
940
|
+
var formParams = {};
|
|
941
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
942
|
+
var contentTypes = [];
|
|
943
|
+
var accepts = ['application/json'];
|
|
944
|
+
var returnType = _DeleteDestinationBankAccount200Response["default"];
|
|
945
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Delete destination bank account
|
|
950
|
+
* This operation deletes a destination bank account.
|
|
951
|
+
* @param {String} bank_account_id The bank account ID.
|
|
952
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestinationBankAccount200Response}
|
|
953
|
+
*/
|
|
954
|
+
}, {
|
|
955
|
+
key: "deleteDestinationBankAccount",
|
|
956
|
+
value: function deleteDestinationBankAccount(bank_account_id) {
|
|
957
|
+
return this.deleteDestinationBankAccountWithHttpInfo(bank_account_id).then(function (response_and_data) {
|
|
958
|
+
return response_and_data.data;
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Delete destination wallet address
|
|
964
|
+
* This operation deletes a destination wallet address.
|
|
965
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
966
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestinationWalletAddress200Response} and HTTP response
|
|
967
|
+
*/
|
|
968
|
+
}, {
|
|
969
|
+
key: "deleteDestinationWalletAddressWithHttpInfo",
|
|
970
|
+
value: function deleteDestinationWalletAddressWithHttpInfo(wallet_address_id) {
|
|
971
|
+
var postBody = null;
|
|
972
|
+
if (postBody && postBody.toJSON) {
|
|
973
|
+
postBody = postBody.toJSON();
|
|
974
|
+
}
|
|
975
|
+
// verify the required parameter 'wallet_address_id' is set
|
|
976
|
+
if (wallet_address_id === undefined || wallet_address_id === null) {
|
|
977
|
+
throw new Error("Missing the required parameter 'wallet_address_id' when calling deleteDestinationWalletAddress");
|
|
978
|
+
}
|
|
979
|
+
var pathParams = {
|
|
980
|
+
'wallet_address_id': wallet_address_id
|
|
981
|
+
};
|
|
982
|
+
var queryParams = {};
|
|
983
|
+
var headerParams = {};
|
|
984
|
+
var formParams = {};
|
|
985
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
986
|
+
var contentTypes = [];
|
|
987
|
+
var accepts = ['application/json'];
|
|
988
|
+
var returnType = _DeleteDestinationWalletAddress200Response["default"];
|
|
989
|
+
return this.apiClient.callApi('/payments/destination/wallet_address/{wallet_address_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Delete destination wallet address
|
|
994
|
+
* This operation deletes a destination wallet address.
|
|
995
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
996
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestinationWalletAddress200Response}
|
|
997
|
+
*/
|
|
998
|
+
}, {
|
|
999
|
+
key: "deleteDestinationWalletAddress",
|
|
1000
|
+
value: function deleteDestinationWalletAddress(wallet_address_id) {
|
|
1001
|
+
return this.deleteDestinationWalletAddressWithHttpInfo(wallet_address_id).then(function (response_and_data) {
|
|
1002
|
+
return response_and_data.data;
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Enable or disable destination whitelist
|
|
1008
|
+
* This operation enables or disables the whitelist for a destination.
|
|
1009
|
+
* @param {Object} opts Optional parameters
|
|
1010
|
+
* @param {module:model/EnableDestinationWhitelistRequest} [EnableDestinationWhitelistRequest] The request body to enable or disable the destination whitelist.
|
|
1011
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryDestinationWhitelistEnabled200Response} and HTTP response
|
|
1012
|
+
*/
|
|
1013
|
+
}, {
|
|
1014
|
+
key: "enableDestinationWhitelistWithHttpInfo",
|
|
1015
|
+
value: function enableDestinationWhitelistWithHttpInfo(opts) {
|
|
1016
|
+
opts = opts || {};
|
|
1017
|
+
var postBody = opts['EnableDestinationWhitelistRequest'];
|
|
1018
|
+
if (postBody && postBody.toJSON) {
|
|
1019
|
+
postBody = postBody.toJSON();
|
|
1020
|
+
}
|
|
1021
|
+
var pathParams = {};
|
|
1022
|
+
var queryParams = {};
|
|
1023
|
+
var headerParams = {};
|
|
1024
|
+
var formParams = {};
|
|
1025
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1026
|
+
var contentTypes = ['application/json'];
|
|
1027
|
+
var accepts = ['application/json'];
|
|
1028
|
+
var returnType = _QueryDestinationWhitelistEnabled200Response["default"];
|
|
1029
|
+
return this.apiClient.callApi('/payments/destination/enable_whitelist', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Enable or disable destination whitelist
|
|
1034
|
+
* This operation enables or disables the whitelist for a destination.
|
|
1035
|
+
* @param {Object} opts Optional parameters
|
|
1036
|
+
* @param {module:model/EnableDestinationWhitelistRequest} opts.EnableDestinationWhitelistRequest The request body to enable or disable the destination whitelist.
|
|
1037
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryDestinationWhitelistEnabled200Response}
|
|
1038
|
+
*/
|
|
1039
|
+
}, {
|
|
1040
|
+
key: "enableDestinationWhitelist",
|
|
1041
|
+
value: function enableDestinationWhitelist(opts) {
|
|
1042
|
+
return this.enableDestinationWhitelistWithHttpInfo(opts).then(function (response_and_data) {
|
|
1043
|
+
return response_and_data.data;
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Get counterparty information
|
|
1049
|
+
* This operation retrieves the detailed information about a specified counterparty.
|
|
1050
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
1051
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CounterpartyDetail} and HTTP response
|
|
1052
|
+
*/
|
|
1053
|
+
}, {
|
|
1054
|
+
key: "getCounterpartyDetailByIdWithHttpInfo",
|
|
1055
|
+
value: function getCounterpartyDetailByIdWithHttpInfo(counterparty_id) {
|
|
1056
|
+
var postBody = null;
|
|
1057
|
+
if (postBody && postBody.toJSON) {
|
|
1058
|
+
postBody = postBody.toJSON();
|
|
1059
|
+
}
|
|
1060
|
+
// verify the required parameter 'counterparty_id' is set
|
|
1061
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
1062
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling getCounterpartyDetailById");
|
|
1063
|
+
}
|
|
1064
|
+
var pathParams = {
|
|
1065
|
+
'counterparty_id': counterparty_id
|
|
1066
|
+
};
|
|
1067
|
+
var queryParams = {};
|
|
1068
|
+
var headerParams = {};
|
|
1069
|
+
var formParams = {};
|
|
1070
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1071
|
+
var contentTypes = [];
|
|
1072
|
+
var accepts = ['application/json'];
|
|
1073
|
+
var returnType = _CounterpartyDetail["default"];
|
|
1074
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Get counterparty information
|
|
1079
|
+
* This operation retrieves the detailed information about a specified counterparty.
|
|
1080
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
1081
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CounterpartyDetail}
|
|
1082
|
+
*/
|
|
1083
|
+
}, {
|
|
1084
|
+
key: "getCounterpartyDetailById",
|
|
1085
|
+
value: function getCounterpartyDetailById(counterparty_id) {
|
|
1086
|
+
return this.getCounterpartyDetailByIdWithHttpInfo(counterparty_id).then(function (response_and_data) {
|
|
1087
|
+
return response_and_data.data;
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* Get destination bank account information
|
|
1093
|
+
* This operation retrieves the detailed information about a specified destination bank account.
|
|
1094
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1095
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccountDetail} and HTTP response
|
|
1096
|
+
*/
|
|
1097
|
+
}, {
|
|
1098
|
+
key: "getDestinationBankAccountDetailByIdWithHttpInfo",
|
|
1099
|
+
value: function getDestinationBankAccountDetailByIdWithHttpInfo(bank_account_id) {
|
|
1100
|
+
var postBody = null;
|
|
1101
|
+
if (postBody && postBody.toJSON) {
|
|
1102
|
+
postBody = postBody.toJSON();
|
|
1103
|
+
}
|
|
1104
|
+
// verify the required parameter 'bank_account_id' is set
|
|
1105
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
1106
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling getDestinationBankAccountDetailById");
|
|
1107
|
+
}
|
|
1108
|
+
var pathParams = {
|
|
1109
|
+
'bank_account_id': bank_account_id
|
|
1110
|
+
};
|
|
1111
|
+
var queryParams = {};
|
|
1112
|
+
var headerParams = {};
|
|
1113
|
+
var formParams = {};
|
|
1114
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1115
|
+
var contentTypes = [];
|
|
1116
|
+
var accepts = ['application/json'];
|
|
1117
|
+
var returnType = _DestinationBankAccountDetail["default"];
|
|
1118
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Get destination bank account information
|
|
1123
|
+
* This operation retrieves the detailed information about a specified destination bank account.
|
|
1124
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1125
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccountDetail}
|
|
1126
|
+
*/
|
|
1127
|
+
}, {
|
|
1128
|
+
key: "getDestinationBankAccountDetailById",
|
|
1129
|
+
value: function getDestinationBankAccountDetailById(bank_account_id) {
|
|
1130
|
+
return this.getDestinationBankAccountDetailByIdWithHttpInfo(bank_account_id).then(function (response_and_data) {
|
|
1131
|
+
return response_and_data.data;
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Get destination information
|
|
1137
|
+
* This operation retrieves the detailed information about a specified destination.
|
|
1138
|
+
* @param {String} destination_id The destination ID.
|
|
1139
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationDetail} and HTTP response
|
|
1140
|
+
*/
|
|
1141
|
+
}, {
|
|
1142
|
+
key: "getDestinationDetailByIdWithHttpInfo",
|
|
1143
|
+
value: function getDestinationDetailByIdWithHttpInfo(destination_id) {
|
|
1144
|
+
var postBody = null;
|
|
1145
|
+
if (postBody && postBody.toJSON) {
|
|
1146
|
+
postBody = postBody.toJSON();
|
|
1147
|
+
}
|
|
1148
|
+
// verify the required parameter 'destination_id' is set
|
|
1149
|
+
if (destination_id === undefined || destination_id === null) {
|
|
1150
|
+
throw new Error("Missing the required parameter 'destination_id' when calling getDestinationDetailById");
|
|
1151
|
+
}
|
|
1152
|
+
var pathParams = {
|
|
1153
|
+
'destination_id': destination_id
|
|
1154
|
+
};
|
|
1155
|
+
var queryParams = {};
|
|
1156
|
+
var headerParams = {};
|
|
1157
|
+
var formParams = {};
|
|
1158
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1159
|
+
var contentTypes = [];
|
|
1160
|
+
var accepts = ['application/json'];
|
|
1161
|
+
var returnType = _DestinationDetail["default"];
|
|
1162
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Get destination information
|
|
1167
|
+
* This operation retrieves the detailed information about a specified destination.
|
|
1168
|
+
* @param {String} destination_id The destination ID.
|
|
1169
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationDetail}
|
|
1170
|
+
*/
|
|
1171
|
+
}, {
|
|
1172
|
+
key: "getDestinationDetailById",
|
|
1173
|
+
value: function getDestinationDetailById(destination_id) {
|
|
1174
|
+
return this.getDestinationDetailByIdWithHttpInfo(destination_id).then(function (response_and_data) {
|
|
1175
|
+
return response_and_data.data;
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Get exchange rate
|
|
1181
|
+
* This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. <Note>This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors.</Note>
|
|
1182
|
+
* @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`
|
|
1183
|
+
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
1184
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
1185
|
+
*/
|
|
1186
|
+
}, {
|
|
1187
|
+
key: "getExchangeRateWithHttpInfo",
|
|
1188
|
+
value: function getExchangeRateWithHttpInfo(token_id, currency) {
|
|
1189
|
+
var postBody = null;
|
|
1190
|
+
if (postBody && postBody.toJSON) {
|
|
1191
|
+
postBody = postBody.toJSON();
|
|
1192
|
+
}
|
|
1193
|
+
// verify the required parameter 'token_id' is set
|
|
1194
|
+
if (token_id === undefined || token_id === null) {
|
|
1195
|
+
throw new Error("Missing the required parameter 'token_id' when calling getExchangeRate");
|
|
1196
|
+
}
|
|
1197
|
+
// verify the required parameter 'currency' is set
|
|
1198
|
+
if (currency === undefined || currency === null) {
|
|
1199
|
+
throw new Error("Missing the required parameter 'currency' when calling getExchangeRate");
|
|
1200
|
+
}
|
|
1201
|
+
var pathParams = {
|
|
1202
|
+
'token_id': token_id,
|
|
1203
|
+
'currency': currency
|
|
1204
|
+
};
|
|
1205
|
+
var queryParams = {};
|
|
1206
|
+
var headerParams = {};
|
|
1207
|
+
var formParams = {};
|
|
1208
|
+
var authNames = ['CoboAuth'];
|
|
1209
|
+
var contentTypes = [];
|
|
1210
|
+
var accepts = ['application/json'];
|
|
1211
|
+
var returnType = _GetExchangeRate200Response["default"];
|
|
1212
|
+
return this.apiClient.callApi('/payments/exchange_rates/{token_id}/{currency}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Get exchange rate
|
|
1217
|
+
* This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. <Note>This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors.</Note>
|
|
1218
|
+
* @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`
|
|
1219
|
+
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
1220
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
1221
|
+
*/
|
|
1222
|
+
}, {
|
|
1223
|
+
key: "getExchangeRate",
|
|
1224
|
+
value: function getExchangeRate(token_id, currency) {
|
|
1225
|
+
return this.getExchangeRateWithHttpInfo(token_id, currency).then(function (response_and_data) {
|
|
1226
|
+
return response_and_data.data;
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Get pay-in order information
|
|
1232
|
+
* This operation retrieves details of a specific pay-in order.
|
|
1233
|
+
* @param {String} order_id The pay-in order ID.
|
|
1234
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
|
|
1235
|
+
*/
|
|
1236
|
+
}, {
|
|
1237
|
+
key: "getPaymentOrderDetailByIdWithHttpInfo",
|
|
1238
|
+
value: function getPaymentOrderDetailByIdWithHttpInfo(order_id) {
|
|
1239
|
+
var postBody = null;
|
|
1240
|
+
if (postBody && postBody.toJSON) {
|
|
1241
|
+
postBody = postBody.toJSON();
|
|
1242
|
+
}
|
|
1243
|
+
// verify the required parameter 'order_id' is set
|
|
1244
|
+
if (order_id === undefined || order_id === null) {
|
|
1245
|
+
throw new Error("Missing the required parameter 'order_id' when calling getPaymentOrderDetailById");
|
|
1246
|
+
}
|
|
1247
|
+
var pathParams = {
|
|
1248
|
+
'order_id': order_id
|
|
1249
|
+
};
|
|
1250
|
+
var queryParams = {};
|
|
1251
|
+
var headerParams = {};
|
|
1252
|
+
var formParams = {};
|
|
1253
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1254
|
+
var contentTypes = [];
|
|
1255
|
+
var accepts = ['application/json'];
|
|
1256
|
+
var returnType = _Order["default"];
|
|
1257
|
+
return this.apiClient.callApi('/payments/orders/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Get pay-in order information
|
|
1262
|
+
* This operation retrieves details of a specific pay-in order.
|
|
1263
|
+
* @param {String} order_id The pay-in order ID.
|
|
1264
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
|
|
1265
|
+
*/
|
|
1266
|
+
}, {
|
|
1267
|
+
key: "getPaymentOrderDetailById",
|
|
1268
|
+
value: function getPaymentOrderDetailById(order_id) {
|
|
1269
|
+
return this.getPaymentOrderDetailByIdWithHttpInfo(order_id).then(function (response_and_data) {
|
|
648
1270
|
return response_and_data.data;
|
|
649
1271
|
});
|
|
650
1272
|
}
|
|
@@ -815,42 +1437,298 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
815
1437
|
var pathParams = {
|
|
816
1438
|
'settlement_request_id': settlement_request_id
|
|
817
1439
|
};
|
|
818
|
-
var queryParams = {};
|
|
1440
|
+
var queryParams = {};
|
|
1441
|
+
var headerParams = {};
|
|
1442
|
+
var formParams = {};
|
|
1443
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1444
|
+
var contentTypes = [];
|
|
1445
|
+
var accepts = ['application/json'];
|
|
1446
|
+
var returnType = _Settlement["default"];
|
|
1447
|
+
return this.apiClient.callApi('/payments/settlement_requests/{settlement_request_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Get settlement request information
|
|
1452
|
+
* This operation retrieves the information of a specific settlement request.
|
|
1453
|
+
* @param {String} settlement_request_id The settlement request ID.
|
|
1454
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settlement}
|
|
1455
|
+
*/
|
|
1456
|
+
}, {
|
|
1457
|
+
key: "getSettlementById",
|
|
1458
|
+
value: function getSettlementById(settlement_request_id) {
|
|
1459
|
+
return this.getSettlementByIdWithHttpInfo(settlement_request_id).then(function (response_and_data) {
|
|
1460
|
+
return response_and_data.data;
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Get withdrawable balances
|
|
1466
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
1467
|
+
* @param {Object} opts Optional parameters
|
|
1468
|
+
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
1469
|
+
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
1470
|
+
* @param {module:model/AcquiringType} [acquiring_type]
|
|
1471
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
|
|
1472
|
+
*/
|
|
1473
|
+
}, {
|
|
1474
|
+
key: "getSettlementInfoByIdsWithHttpInfo",
|
|
1475
|
+
value: function getSettlementInfoByIdsWithHttpInfo(opts) {
|
|
1476
|
+
opts = opts || {};
|
|
1477
|
+
var postBody = null;
|
|
1478
|
+
if (postBody && postBody.toJSON) {
|
|
1479
|
+
postBody = postBody.toJSON();
|
|
1480
|
+
}
|
|
1481
|
+
var pathParams = {};
|
|
1482
|
+
var queryParams = {
|
|
1483
|
+
'merchant_ids': opts['merchant_ids'],
|
|
1484
|
+
'currency': opts['currency'],
|
|
1485
|
+
'acquiring_type': opts['acquiring_type']
|
|
1486
|
+
};
|
|
1487
|
+
var headerParams = {};
|
|
1488
|
+
var formParams = {};
|
|
1489
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1490
|
+
var contentTypes = [];
|
|
1491
|
+
var accepts = ['application/json'];
|
|
1492
|
+
var returnType = _GetSettlementInfoByIds200Response["default"];
|
|
1493
|
+
return this.apiClient.callApi('/payments/settlement_info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* Get withdrawable balances
|
|
1498
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
1499
|
+
* @param {Object} opts Optional parameters
|
|
1500
|
+
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
1501
|
+
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
1502
|
+
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
1503
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
|
|
1504
|
+
*/
|
|
1505
|
+
}, {
|
|
1506
|
+
key: "getSettlementInfoByIds",
|
|
1507
|
+
value: function getSettlementInfoByIds(opts) {
|
|
1508
|
+
return this.getSettlementInfoByIdsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1509
|
+
return response_and_data.data;
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Create/Get top-up address
|
|
1515
|
+
* This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used.
|
|
1516
|
+
* @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`
|
|
1517
|
+
* @param {String} custom_payer_id A unique identifier to track and identify individual payers in your system.
|
|
1518
|
+
* @param {Object} opts Optional parameters
|
|
1519
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1520
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
1521
|
+
*/
|
|
1522
|
+
}, {
|
|
1523
|
+
key: "getTopUpAddressWithHttpInfo",
|
|
1524
|
+
value: function getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts) {
|
|
1525
|
+
opts = opts || {};
|
|
1526
|
+
var postBody = null;
|
|
1527
|
+
if (postBody && postBody.toJSON) {
|
|
1528
|
+
postBody = postBody.toJSON();
|
|
1529
|
+
}
|
|
1530
|
+
// verify the required parameter 'token_id' is set
|
|
1531
|
+
if (token_id === undefined || token_id === null) {
|
|
1532
|
+
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
1533
|
+
}
|
|
1534
|
+
// verify the required parameter 'custom_payer_id' is set
|
|
1535
|
+
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
1536
|
+
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
1537
|
+
}
|
|
1538
|
+
var pathParams = {};
|
|
1539
|
+
var queryParams = {
|
|
1540
|
+
'token_id': token_id,
|
|
1541
|
+
'custom_payer_id': custom_payer_id,
|
|
1542
|
+
'merchant_id': opts['merchant_id']
|
|
1543
|
+
};
|
|
1544
|
+
var headerParams = {};
|
|
1545
|
+
var formParams = {};
|
|
1546
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1547
|
+
var contentTypes = [];
|
|
1548
|
+
var accepts = ['application/json'];
|
|
1549
|
+
var returnType = _TopUpAddress["default"];
|
|
1550
|
+
return this.apiClient.callApi('/payments/topup/address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* Create/Get top-up address
|
|
1555
|
+
* This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used.
|
|
1556
|
+
* @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`
|
|
1557
|
+
* @param {String} custom_payer_id A unique identifier to track and identify individual payers in your system.
|
|
1558
|
+
* @param {Object} opts Optional parameters
|
|
1559
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1560
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
1561
|
+
*/
|
|
1562
|
+
}, {
|
|
1563
|
+
key: "getTopUpAddress",
|
|
1564
|
+
value: function getTopUpAddress(token_id, custom_payer_id, opts) {
|
|
1565
|
+
return this.getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts).then(function (response_and_data) {
|
|
1566
|
+
return response_and_data.data;
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* List all bank accounts
|
|
1572
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
1573
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/BankAccount>} and HTTP response
|
|
1574
|
+
*/
|
|
1575
|
+
}, {
|
|
1576
|
+
key: "listBankAccountsWithHttpInfo",
|
|
1577
|
+
value: function listBankAccountsWithHttpInfo() {
|
|
1578
|
+
var postBody = null;
|
|
1579
|
+
if (postBody && postBody.toJSON) {
|
|
1580
|
+
postBody = postBody.toJSON();
|
|
1581
|
+
}
|
|
1582
|
+
var pathParams = {};
|
|
1583
|
+
var queryParams = {};
|
|
1584
|
+
var headerParams = {};
|
|
1585
|
+
var formParams = {};
|
|
1586
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1587
|
+
var contentTypes = [];
|
|
1588
|
+
var accepts = ['application/json'];
|
|
1589
|
+
var returnType = [_BankAccount["default"]];
|
|
1590
|
+
return this.apiClient.callApi('/payments/bank_accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* List all bank accounts
|
|
1595
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
1596
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/BankAccount>}
|
|
1597
|
+
*/
|
|
1598
|
+
}, {
|
|
1599
|
+
key: "listBankAccounts",
|
|
1600
|
+
value: function listBankAccounts() {
|
|
1601
|
+
return this.listBankAccountsWithHttpInfo().then(function (response_and_data) {
|
|
1602
|
+
return response_and_data.data;
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* List all counterparties
|
|
1608
|
+
* This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
1609
|
+
* @param {Object} opts Optional parameters
|
|
1610
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1611
|
+
* @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.
|
|
1612
|
+
* @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.
|
|
1613
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1614
|
+
* @param {module:model/CounterpartyType} [counterparty_type] CounterpartyType defines the type of the counterparty: - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization.
|
|
1615
|
+
* @param {String} [country] The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
1616
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCounterparties200Response} and HTTP response
|
|
1617
|
+
*/
|
|
1618
|
+
}, {
|
|
1619
|
+
key: "listCounterpartiesWithHttpInfo",
|
|
1620
|
+
value: function listCounterpartiesWithHttpInfo(opts) {
|
|
1621
|
+
opts = opts || {};
|
|
1622
|
+
var postBody = null;
|
|
1623
|
+
if (postBody && postBody.toJSON) {
|
|
1624
|
+
postBody = postBody.toJSON();
|
|
1625
|
+
}
|
|
1626
|
+
var pathParams = {};
|
|
1627
|
+
var queryParams = {
|
|
1628
|
+
'limit': opts['limit'],
|
|
1629
|
+
'before': opts['before'],
|
|
1630
|
+
'after': opts['after'],
|
|
1631
|
+
'keyword': opts['keyword'],
|
|
1632
|
+
'counterparty_type': opts['counterparty_type'],
|
|
1633
|
+
'country': opts['country']
|
|
1634
|
+
};
|
|
1635
|
+
var headerParams = {};
|
|
1636
|
+
var formParams = {};
|
|
1637
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1638
|
+
var contentTypes = [];
|
|
1639
|
+
var accepts = ['application/json'];
|
|
1640
|
+
var returnType = _ListCounterparties200Response["default"];
|
|
1641
|
+
return this.apiClient.callApi('/payments/counterparty', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* List all counterparties
|
|
1646
|
+
* This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
1647
|
+
* @param {Object} opts Optional parameters
|
|
1648
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1649
|
+
* @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.
|
|
1650
|
+
* @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.
|
|
1651
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
1652
|
+
* @param {module:model/CounterpartyType} opts.counterparty_type CounterpartyType defines the type of the counterparty: - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization.
|
|
1653
|
+
* @param {String} opts.country The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
1654
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCounterparties200Response}
|
|
1655
|
+
*/
|
|
1656
|
+
}, {
|
|
1657
|
+
key: "listCounterparties",
|
|
1658
|
+
value: function listCounterparties(opts) {
|
|
1659
|
+
return this.listCounterpartiesWithHttpInfo(opts).then(function (response_and_data) {
|
|
1660
|
+
return response_and_data.data;
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* List counterparty wallet addresses
|
|
1666
|
+
* This operation retrieves the information of counterparty wallet addresses.
|
|
1667
|
+
* @param {Object} opts Optional parameters
|
|
1668
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1669
|
+
* @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.
|
|
1670
|
+
* @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.
|
|
1671
|
+
* @param {String} [counterparty_id] The counterparty ID.
|
|
1672
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
1673
|
+
* @param {String} [wallet_address] The wallet address.
|
|
1674
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCounterpartyWalletAddress200Response} and HTTP response
|
|
1675
|
+
*/
|
|
1676
|
+
}, {
|
|
1677
|
+
key: "listCounterpartyWalletAddressWithHttpInfo",
|
|
1678
|
+
value: function listCounterpartyWalletAddressWithHttpInfo(opts) {
|
|
1679
|
+
opts = opts || {};
|
|
1680
|
+
var postBody = null;
|
|
1681
|
+
if (postBody && postBody.toJSON) {
|
|
1682
|
+
postBody = postBody.toJSON();
|
|
1683
|
+
}
|
|
1684
|
+
var pathParams = {};
|
|
1685
|
+
var queryParams = {
|
|
1686
|
+
'limit': opts['limit'],
|
|
1687
|
+
'before': opts['before'],
|
|
1688
|
+
'after': opts['after'],
|
|
1689
|
+
'counterparty_id': opts['counterparty_id'],
|
|
1690
|
+
'chain_ids': opts['chain_ids'],
|
|
1691
|
+
'wallet_address': opts['wallet_address']
|
|
1692
|
+
};
|
|
819
1693
|
var headerParams = {};
|
|
820
1694
|
var formParams = {};
|
|
821
1695
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
822
1696
|
var contentTypes = [];
|
|
823
1697
|
var accepts = ['application/json'];
|
|
824
|
-
var returnType =
|
|
825
|
-
return this.apiClient.callApi('/payments/
|
|
1698
|
+
var returnType = _ListCounterpartyWalletAddress200Response["default"];
|
|
1699
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
826
1700
|
}
|
|
827
1701
|
|
|
828
1702
|
/**
|
|
829
|
-
*
|
|
830
|
-
* This operation retrieves the information of
|
|
831
|
-
* @param {
|
|
832
|
-
* @
|
|
1703
|
+
* List counterparty wallet addresses
|
|
1704
|
+
* This operation retrieves the information of counterparty wallet addresses.
|
|
1705
|
+
* @param {Object} opts Optional parameters
|
|
1706
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1707
|
+
* @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.
|
|
1708
|
+
* @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.
|
|
1709
|
+
* @param {String} opts.counterparty_id The counterparty ID.
|
|
1710
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
1711
|
+
* @param {String} opts.wallet_address The wallet address.
|
|
1712
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCounterpartyWalletAddress200Response}
|
|
833
1713
|
*/
|
|
834
1714
|
}, {
|
|
835
|
-
key: "
|
|
836
|
-
value: function
|
|
837
|
-
return this.
|
|
1715
|
+
key: "listCounterpartyWalletAddress",
|
|
1716
|
+
value: function listCounterpartyWalletAddress(opts) {
|
|
1717
|
+
return this.listCounterpartyWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
838
1718
|
return response_and_data.data;
|
|
839
1719
|
});
|
|
840
1720
|
}
|
|
841
1721
|
|
|
842
1722
|
/**
|
|
843
|
-
*
|
|
844
|
-
*
|
|
1723
|
+
* List crypto addresses
|
|
1724
|
+
* This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
845
1725
|
* @param {Object} opts Optional parameters
|
|
846
|
-
* @param {String} [
|
|
847
|
-
* @
|
|
848
|
-
* @param {module:model/AcquiringType} [acquiring_type]
|
|
849
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
|
|
1726
|
+
* @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`
|
|
1727
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
850
1728
|
*/
|
|
851
1729
|
}, {
|
|
852
|
-
key: "
|
|
853
|
-
value: function
|
|
1730
|
+
key: "listCryptoAddressesWithHttpInfo",
|
|
1731
|
+
value: function listCryptoAddressesWithHttpInfo(opts) {
|
|
854
1732
|
opts = opts || {};
|
|
855
1733
|
var postBody = null;
|
|
856
1734
|
if (postBody && postBody.toJSON) {
|
|
@@ -858,139 +1736,164 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
858
1736
|
}
|
|
859
1737
|
var pathParams = {};
|
|
860
1738
|
var queryParams = {
|
|
861
|
-
'
|
|
862
|
-
'currency': opts['currency'],
|
|
863
|
-
'acquiring_type': opts['acquiring_type']
|
|
1739
|
+
'token_id': opts['token_id']
|
|
864
1740
|
};
|
|
865
1741
|
var headerParams = {};
|
|
866
1742
|
var formParams = {};
|
|
867
1743
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
868
1744
|
var contentTypes = [];
|
|
869
1745
|
var accepts = ['application/json'];
|
|
870
|
-
var returnType =
|
|
871
|
-
return this.apiClient.callApi('/payments/
|
|
1746
|
+
var returnType = [_CryptoAddress["default"]];
|
|
1747
|
+
return this.apiClient.callApi('/payments/crypto_addresses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
872
1748
|
}
|
|
873
1749
|
|
|
874
1750
|
/**
|
|
875
|
-
*
|
|
876
|
-
*
|
|
1751
|
+
* List crypto addresses
|
|
1752
|
+
* This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
877
1753
|
* @param {Object} opts Optional parameters
|
|
878
|
-
* @param {String} opts.
|
|
879
|
-
* @
|
|
880
|
-
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
881
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
|
|
1754
|
+
* @param {String} opts.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`
|
|
1755
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
882
1756
|
*/
|
|
883
1757
|
}, {
|
|
884
|
-
key: "
|
|
885
|
-
value: function
|
|
886
|
-
return this.
|
|
1758
|
+
key: "listCryptoAddresses",
|
|
1759
|
+
value: function listCryptoAddresses(opts) {
|
|
1760
|
+
return this.listCryptoAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
887
1761
|
return response_and_data.data;
|
|
888
1762
|
});
|
|
889
1763
|
}
|
|
890
1764
|
|
|
891
1765
|
/**
|
|
892
|
-
*
|
|
893
|
-
* This operation retrieves the information of
|
|
894
|
-
* @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`
|
|
895
|
-
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
1766
|
+
* List destination bank accounts
|
|
1767
|
+
* This operation retrieves the information of destination bank accounts.
|
|
896
1768
|
* @param {Object} opts Optional parameters
|
|
897
|
-
* @param {
|
|
898
|
-
* @
|
|
1769
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1770
|
+
* @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.
|
|
1771
|
+
* @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.
|
|
1772
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1773
|
+
* @param {String} [destination_id] The destination ID.
|
|
1774
|
+
* @param {module:model/BankAccountStatus} [bank_account_status] BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo.
|
|
1775
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinationBankAccounts200Response} and HTTP response
|
|
899
1776
|
*/
|
|
900
1777
|
}, {
|
|
901
|
-
key: "
|
|
902
|
-
value: function
|
|
1778
|
+
key: "listDestinationBankAccountsWithHttpInfo",
|
|
1779
|
+
value: function listDestinationBankAccountsWithHttpInfo(opts) {
|
|
903
1780
|
opts = opts || {};
|
|
904
1781
|
var postBody = null;
|
|
905
1782
|
if (postBody && postBody.toJSON) {
|
|
906
1783
|
postBody = postBody.toJSON();
|
|
907
1784
|
}
|
|
908
|
-
// verify the required parameter 'token_id' is set
|
|
909
|
-
if (token_id === undefined || token_id === null) {
|
|
910
|
-
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
911
|
-
}
|
|
912
|
-
// verify the required parameter 'custom_payer_id' is set
|
|
913
|
-
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
914
|
-
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
915
|
-
}
|
|
916
1785
|
var pathParams = {};
|
|
917
1786
|
var queryParams = {
|
|
918
|
-
'
|
|
919
|
-
'
|
|
920
|
-
'
|
|
1787
|
+
'limit': opts['limit'],
|
|
1788
|
+
'before': opts['before'],
|
|
1789
|
+
'after': opts['after'],
|
|
1790
|
+
'keyword': opts['keyword'],
|
|
1791
|
+
'destination_id': opts['destination_id'],
|
|
1792
|
+
'bank_account_status': opts['bank_account_status']
|
|
921
1793
|
};
|
|
922
1794
|
var headerParams = {};
|
|
923
1795
|
var formParams = {};
|
|
924
1796
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
925
1797
|
var contentTypes = [];
|
|
926
1798
|
var accepts = ['application/json'];
|
|
927
|
-
var returnType =
|
|
928
|
-
return this.apiClient.callApi('/payments/
|
|
1799
|
+
var returnType = _ListDestinationBankAccounts200Response["default"];
|
|
1800
|
+
return this.apiClient.callApi('/payments/destination/bank_account', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
929
1801
|
}
|
|
930
1802
|
|
|
931
1803
|
/**
|
|
932
|
-
*
|
|
933
|
-
* This operation retrieves the information of
|
|
934
|
-
* @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`
|
|
935
|
-
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
1804
|
+
* List destination bank accounts
|
|
1805
|
+
* This operation retrieves the information of destination bank accounts.
|
|
936
1806
|
* @param {Object} opts Optional parameters
|
|
937
|
-
* @param {
|
|
938
|
-
* @
|
|
1807
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1808
|
+
* @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.
|
|
1809
|
+
* @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.
|
|
1810
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
1811
|
+
* @param {String} opts.destination_id The destination ID.
|
|
1812
|
+
* @param {module:model/BankAccountStatus} opts.bank_account_status BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo.
|
|
1813
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinationBankAccounts200Response}
|
|
939
1814
|
*/
|
|
940
1815
|
}, {
|
|
941
|
-
key: "
|
|
942
|
-
value: function
|
|
943
|
-
return this.
|
|
1816
|
+
key: "listDestinationBankAccounts",
|
|
1817
|
+
value: function listDestinationBankAccounts(opts) {
|
|
1818
|
+
return this.listDestinationBankAccountsWithHttpInfo(opts).then(function (response_and_data) {
|
|
944
1819
|
return response_and_data.data;
|
|
945
1820
|
});
|
|
946
1821
|
}
|
|
947
1822
|
|
|
948
1823
|
/**
|
|
949
|
-
* List
|
|
950
|
-
* This operation retrieves the information of
|
|
951
|
-
* @
|
|
1824
|
+
* List destination wallet addresses
|
|
1825
|
+
* This operation retrieves the information of destination wallet addresses.
|
|
1826
|
+
* @param {Object} opts Optional parameters
|
|
1827
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1828
|
+
* @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.
|
|
1829
|
+
* @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.
|
|
1830
|
+
* @param {String} [destination_id] The destination ID.
|
|
1831
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
1832
|
+
* @param {String} [wallet_address] The wallet address.
|
|
1833
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinationWalletAddresses200Response} and HTTP response
|
|
952
1834
|
*/
|
|
953
1835
|
}, {
|
|
954
|
-
key: "
|
|
955
|
-
value: function
|
|
1836
|
+
key: "listDestinationWalletAddressesWithHttpInfo",
|
|
1837
|
+
value: function listDestinationWalletAddressesWithHttpInfo(opts) {
|
|
1838
|
+
opts = opts || {};
|
|
956
1839
|
var postBody = null;
|
|
957
1840
|
if (postBody && postBody.toJSON) {
|
|
958
1841
|
postBody = postBody.toJSON();
|
|
959
1842
|
}
|
|
960
1843
|
var pathParams = {};
|
|
961
|
-
var queryParams = {
|
|
1844
|
+
var queryParams = {
|
|
1845
|
+
'limit': opts['limit'],
|
|
1846
|
+
'before': opts['before'],
|
|
1847
|
+
'after': opts['after'],
|
|
1848
|
+
'destination_id': opts['destination_id'],
|
|
1849
|
+
'chain_ids': opts['chain_ids'],
|
|
1850
|
+
'wallet_address': opts['wallet_address']
|
|
1851
|
+
};
|
|
962
1852
|
var headerParams = {};
|
|
963
1853
|
var formParams = {};
|
|
964
1854
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
965
1855
|
var contentTypes = [];
|
|
966
1856
|
var accepts = ['application/json'];
|
|
967
|
-
var returnType = [
|
|
968
|
-
return this.apiClient.callApi('/payments/
|
|
1857
|
+
var returnType = _ListDestinationWalletAddresses200Response["default"];
|
|
1858
|
+
return this.apiClient.callApi('/payments/destination/wallet_address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
969
1859
|
}
|
|
970
1860
|
|
|
971
1861
|
/**
|
|
972
|
-
* List
|
|
973
|
-
* This operation retrieves the information of
|
|
974
|
-
* @
|
|
1862
|
+
* List destination wallet addresses
|
|
1863
|
+
* This operation retrieves the information of destination wallet addresses.
|
|
1864
|
+
* @param {Object} opts Optional parameters
|
|
1865
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1866
|
+
* @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.
|
|
1867
|
+
* @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.
|
|
1868
|
+
* @param {String} opts.destination_id The destination ID.
|
|
1869
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
1870
|
+
* @param {String} opts.wallet_address The wallet address.
|
|
1871
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinationWalletAddresses200Response}
|
|
975
1872
|
*/
|
|
976
1873
|
}, {
|
|
977
|
-
key: "
|
|
978
|
-
value: function
|
|
979
|
-
return this.
|
|
1874
|
+
key: "listDestinationWalletAddresses",
|
|
1875
|
+
value: function listDestinationWalletAddresses(opts) {
|
|
1876
|
+
return this.listDestinationWalletAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
980
1877
|
return response_and_data.data;
|
|
981
1878
|
});
|
|
982
1879
|
}
|
|
983
1880
|
|
|
984
1881
|
/**
|
|
985
|
-
* List
|
|
986
|
-
* This operation retrieves
|
|
1882
|
+
* List all destinations
|
|
1883
|
+
* This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names.
|
|
987
1884
|
* @param {Object} opts Optional parameters
|
|
988
|
-
* @param {
|
|
989
|
-
* @
|
|
1885
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1886
|
+
* @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.
|
|
1887
|
+
* @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.
|
|
1888
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1889
|
+
* @param {module:model/DestinationType} [destination_type] DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization.
|
|
1890
|
+
* @param {String} [country] The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
1891
|
+
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
1892
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinations200Response} and HTTP response
|
|
990
1893
|
*/
|
|
991
1894
|
}, {
|
|
992
|
-
key: "
|
|
993
|
-
value: function
|
|
1895
|
+
key: "listDestinationsWithHttpInfo",
|
|
1896
|
+
value: function listDestinationsWithHttpInfo(opts) {
|
|
994
1897
|
opts = opts || {};
|
|
995
1898
|
var postBody = null;
|
|
996
1899
|
if (postBody && postBody.toJSON) {
|
|
@@ -998,28 +1901,40 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
998
1901
|
}
|
|
999
1902
|
var pathParams = {};
|
|
1000
1903
|
var queryParams = {
|
|
1001
|
-
'
|
|
1904
|
+
'limit': opts['limit'],
|
|
1905
|
+
'before': opts['before'],
|
|
1906
|
+
'after': opts['after'],
|
|
1907
|
+
'keyword': opts['keyword'],
|
|
1908
|
+
'destination_type': opts['destination_type'],
|
|
1909
|
+
'country': opts['country'],
|
|
1910
|
+
'merchant_ids': opts['merchant_ids']
|
|
1002
1911
|
};
|
|
1003
1912
|
var headerParams = {};
|
|
1004
1913
|
var formParams = {};
|
|
1005
1914
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1006
1915
|
var contentTypes = [];
|
|
1007
1916
|
var accepts = ['application/json'];
|
|
1008
|
-
var returnType = [
|
|
1009
|
-
return this.apiClient.callApi('/payments/
|
|
1917
|
+
var returnType = _ListDestinations200Response["default"];
|
|
1918
|
+
return this.apiClient.callApi('/payments/destination', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1010
1919
|
}
|
|
1011
1920
|
|
|
1012
1921
|
/**
|
|
1013
|
-
* List
|
|
1014
|
-
* This operation retrieves
|
|
1922
|
+
* List all destinations
|
|
1923
|
+
* This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names.
|
|
1015
1924
|
* @param {Object} opts Optional parameters
|
|
1016
|
-
* @param {
|
|
1017
|
-
* @
|
|
1925
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1926
|
+
* @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.
|
|
1927
|
+
* @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.
|
|
1928
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
1929
|
+
* @param {module:model/DestinationType} opts.destination_type DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization.
|
|
1930
|
+
* @param {String} opts.country The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
1931
|
+
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
1932
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinations200Response}
|
|
1018
1933
|
*/
|
|
1019
1934
|
}, {
|
|
1020
|
-
key: "
|
|
1021
|
-
value: function
|
|
1022
|
-
return this.
|
|
1935
|
+
key: "listDestinations",
|
|
1936
|
+
value: function listDestinations(opts) {
|
|
1937
|
+
return this.listDestinationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1023
1938
|
return response_and_data.data;
|
|
1024
1939
|
});
|
|
1025
1940
|
}
|
|
@@ -1593,6 +2508,42 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1593
2508
|
});
|
|
1594
2509
|
}
|
|
1595
2510
|
|
|
2511
|
+
/**
|
|
2512
|
+
* Query destination whitelist enabled status
|
|
2513
|
+
* This operation retrieves the information of whether the destination whitelist is enabled.
|
|
2514
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryDestinationWhitelistEnabled200Response} and HTTP response
|
|
2515
|
+
*/
|
|
2516
|
+
}, {
|
|
2517
|
+
key: "queryDestinationWhitelistEnabledWithHttpInfo",
|
|
2518
|
+
value: function queryDestinationWhitelistEnabledWithHttpInfo() {
|
|
2519
|
+
var postBody = null;
|
|
2520
|
+
if (postBody && postBody.toJSON) {
|
|
2521
|
+
postBody = postBody.toJSON();
|
|
2522
|
+
}
|
|
2523
|
+
var pathParams = {};
|
|
2524
|
+
var queryParams = {};
|
|
2525
|
+
var headerParams = {};
|
|
2526
|
+
var formParams = {};
|
|
2527
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2528
|
+
var contentTypes = [];
|
|
2529
|
+
var accepts = ['application/json'];
|
|
2530
|
+
var returnType = _QueryDestinationWhitelistEnabled200Response["default"];
|
|
2531
|
+
return this.apiClient.callApi('/payments/destination/enable_whitelist', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
/**
|
|
2535
|
+
* Query destination whitelist enabled status
|
|
2536
|
+
* This operation retrieves the information of whether the destination whitelist is enabled.
|
|
2537
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryDestinationWhitelistEnabled200Response}
|
|
2538
|
+
*/
|
|
2539
|
+
}, {
|
|
2540
|
+
key: "queryDestinationWhitelistEnabled",
|
|
2541
|
+
value: function queryDestinationWhitelistEnabled() {
|
|
2542
|
+
return this.queryDestinationWhitelistEnabledWithHttpInfo().then(function (response_and_data) {
|
|
2543
|
+
return response_and_data.data;
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
|
|
1596
2547
|
/**
|
|
1597
2548
|
* Update bank account
|
|
1598
2549
|
* This operation updates the information of an existing bank account.
|
|
@@ -1642,6 +2593,153 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1642
2593
|
});
|
|
1643
2594
|
}
|
|
1644
2595
|
|
|
2596
|
+
/**
|
|
2597
|
+
* Update counterparty
|
|
2598
|
+
* This operation updates the information of a specified counterparty.
|
|
2599
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
2600
|
+
* @param {Object} opts Optional parameters
|
|
2601
|
+
* @param {module:model/UpdateCounterpartyByIdRequest} [UpdateCounterpartyByIdRequest] The request body to update a counterparty.
|
|
2602
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Counterparty} and HTTP response
|
|
2603
|
+
*/
|
|
2604
|
+
}, {
|
|
2605
|
+
key: "updateCounterpartyByIdWithHttpInfo",
|
|
2606
|
+
value: function updateCounterpartyByIdWithHttpInfo(counterparty_id, opts) {
|
|
2607
|
+
opts = opts || {};
|
|
2608
|
+
var postBody = opts['UpdateCounterpartyByIdRequest'];
|
|
2609
|
+
if (postBody && postBody.toJSON) {
|
|
2610
|
+
postBody = postBody.toJSON();
|
|
2611
|
+
}
|
|
2612
|
+
// verify the required parameter 'counterparty_id' is set
|
|
2613
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
2614
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling updateCounterpartyById");
|
|
2615
|
+
}
|
|
2616
|
+
var pathParams = {
|
|
2617
|
+
'counterparty_id': counterparty_id
|
|
2618
|
+
};
|
|
2619
|
+
var queryParams = {};
|
|
2620
|
+
var headerParams = {};
|
|
2621
|
+
var formParams = {};
|
|
2622
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2623
|
+
var contentTypes = ['application/json'];
|
|
2624
|
+
var accepts = ['application/json'];
|
|
2625
|
+
var returnType = _Counterparty["default"];
|
|
2626
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Update counterparty
|
|
2631
|
+
* This operation updates the information of a specified counterparty.
|
|
2632
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
2633
|
+
* @param {Object} opts Optional parameters
|
|
2634
|
+
* @param {module:model/UpdateCounterpartyByIdRequest} opts.UpdateCounterpartyByIdRequest The request body to update a counterparty.
|
|
2635
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Counterparty}
|
|
2636
|
+
*/
|
|
2637
|
+
}, {
|
|
2638
|
+
key: "updateCounterpartyById",
|
|
2639
|
+
value: function updateCounterpartyById(counterparty_id, opts) {
|
|
2640
|
+
return this.updateCounterpartyByIdWithHttpInfo(counterparty_id, opts).then(function (response_and_data) {
|
|
2641
|
+
return response_and_data.data;
|
|
2642
|
+
});
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
/**
|
|
2646
|
+
* Update destination bank account
|
|
2647
|
+
* This operation updates the information of a specified destination bank account.
|
|
2648
|
+
* @param {String} bank_account_id The bank account ID.
|
|
2649
|
+
* @param {Object} opts Optional parameters
|
|
2650
|
+
* @param {module:model/UpdateDestinationBankAccount} [UpdateDestinationBankAccount] The request body to update a destination bank account.
|
|
2651
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccount} and HTTP response
|
|
2652
|
+
*/
|
|
2653
|
+
}, {
|
|
2654
|
+
key: "updateDestinationBankAccountByIdWithHttpInfo",
|
|
2655
|
+
value: function updateDestinationBankAccountByIdWithHttpInfo(bank_account_id, opts) {
|
|
2656
|
+
opts = opts || {};
|
|
2657
|
+
var postBody = opts['UpdateDestinationBankAccount'];
|
|
2658
|
+
if (postBody && postBody.toJSON) {
|
|
2659
|
+
postBody = postBody.toJSON();
|
|
2660
|
+
}
|
|
2661
|
+
// verify the required parameter 'bank_account_id' is set
|
|
2662
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
2663
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling updateDestinationBankAccountById");
|
|
2664
|
+
}
|
|
2665
|
+
var pathParams = {
|
|
2666
|
+
'bank_account_id': bank_account_id
|
|
2667
|
+
};
|
|
2668
|
+
var queryParams = {};
|
|
2669
|
+
var headerParams = {};
|
|
2670
|
+
var formParams = {};
|
|
2671
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2672
|
+
var contentTypes = ['application/json'];
|
|
2673
|
+
var accepts = ['application/json'];
|
|
2674
|
+
var returnType = _DestinationBankAccount["default"];
|
|
2675
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Update destination bank account
|
|
2680
|
+
* This operation updates the information of a specified destination bank account.
|
|
2681
|
+
* @param {String} bank_account_id The bank account ID.
|
|
2682
|
+
* @param {Object} opts Optional parameters
|
|
2683
|
+
* @param {module:model/UpdateDestinationBankAccount} opts.UpdateDestinationBankAccount The request body to update a destination bank account.
|
|
2684
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccount}
|
|
2685
|
+
*/
|
|
2686
|
+
}, {
|
|
2687
|
+
key: "updateDestinationBankAccountById",
|
|
2688
|
+
value: function updateDestinationBankAccountById(bank_account_id, opts) {
|
|
2689
|
+
return this.updateDestinationBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
|
|
2690
|
+
return response_and_data.data;
|
|
2691
|
+
});
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
/**
|
|
2695
|
+
* Update destination
|
|
2696
|
+
* This operation updates the information of a specified destination.
|
|
2697
|
+
* @param {String} destination_id The destination ID.
|
|
2698
|
+
* @param {Object} opts Optional parameters
|
|
2699
|
+
* @param {module:model/UpdateDestinationByIdRequest} [UpdateDestinationByIdRequest] The request body to create a destination.
|
|
2700
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Destination} and HTTP response
|
|
2701
|
+
*/
|
|
2702
|
+
}, {
|
|
2703
|
+
key: "updateDestinationByIdWithHttpInfo",
|
|
2704
|
+
value: function updateDestinationByIdWithHttpInfo(destination_id, opts) {
|
|
2705
|
+
opts = opts || {};
|
|
2706
|
+
var postBody = opts['UpdateDestinationByIdRequest'];
|
|
2707
|
+
if (postBody && postBody.toJSON) {
|
|
2708
|
+
postBody = postBody.toJSON();
|
|
2709
|
+
}
|
|
2710
|
+
// verify the required parameter 'destination_id' is set
|
|
2711
|
+
if (destination_id === undefined || destination_id === null) {
|
|
2712
|
+
throw new Error("Missing the required parameter 'destination_id' when calling updateDestinationById");
|
|
2713
|
+
}
|
|
2714
|
+
var pathParams = {
|
|
2715
|
+
'destination_id': destination_id
|
|
2716
|
+
};
|
|
2717
|
+
var queryParams = {};
|
|
2718
|
+
var headerParams = {};
|
|
2719
|
+
var formParams = {};
|
|
2720
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2721
|
+
var contentTypes = ['application/json'];
|
|
2722
|
+
var accepts = ['application/json'];
|
|
2723
|
+
var returnType = _Destination["default"];
|
|
2724
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
/**
|
|
2728
|
+
* Update destination
|
|
2729
|
+
* This operation updates the information of a specified destination.
|
|
2730
|
+
* @param {String} destination_id The destination ID.
|
|
2731
|
+
* @param {Object} opts Optional parameters
|
|
2732
|
+
* @param {module:model/UpdateDestinationByIdRequest} opts.UpdateDestinationByIdRequest The request body to create a destination.
|
|
2733
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Destination}
|
|
2734
|
+
*/
|
|
2735
|
+
}, {
|
|
2736
|
+
key: "updateDestinationById",
|
|
2737
|
+
value: function updateDestinationById(destination_id, opts) {
|
|
2738
|
+
return this.updateDestinationByIdWithHttpInfo(destination_id, opts).then(function (response_and_data) {
|
|
2739
|
+
return response_and_data.data;
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
|
|
1645
2743
|
/**
|
|
1646
2744
|
* Update merchant
|
|
1647
2745
|
* This operation updates the information of an existing merchant.
|