@cobo/cobo-waas2 1.25.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 +84 -8
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +2 -2
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/FeeStationApi.js +6 -6
- package/dist/api/PaymentApi.js +1322 -182
- package/dist/api/TokenizationApi.js +122 -4
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +371 -21
- package/dist/model/AutoFuelType.js +5 -0
- 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/CreateCryptoAddressRequest.js +1 -1
- 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/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +8 -8
- package/dist/model/CreateRefundLinkRequest.js +129 -0
- 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/FeeStationCheckFeeStationUsage.js +28 -10
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
- package/dist/model/FeeStationSponsorTransactionDescription.js +125 -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/MerchantBalance.js +1 -1
- package/dist/model/Order.js +1 -1
- package/dist/model/OrderLinkBusinessInfo.js +11 -11
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/PaymentOrderEventData.js +2 -2
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +2 -2
- package/dist/model/PspBalance.js +1 -1
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +162 -0
- package/dist/model/RefundStatus.js +10 -0
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/SubmitKytScreeningsReviewBody.js +1 -1
- package/dist/model/SwapActivityTimeline.js +1 -1
- package/dist/model/SwapQuote.js +18 -18
- package/dist/model/TokenizationERC20TokenParams.js +5 -5
- package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
- package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
- package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
- package/dist/model/TokenizationListPermissionsResponse.js +146 -0
- package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
- package/dist/model/TokenizationOperationType.js +5 -0
- package/dist/model/TokenizationPermissionAction.js +66 -0
- package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
- package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
- package/dist/model/TokenizationTokenDetailInfo.js +51 -5
- package/dist/model/TokenizationTokenInfo.js +26 -4
- package/dist/model/TokenizationTokenPermissionType.js +5 -0
- package/dist/model/TokenizationTokenStandard.js +10 -0
- package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
- package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
- package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
- package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionCoboCategory.js +35 -0
- 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/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/AutoFuelType.md +2 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BankAccountStatus.md +14 -0
- package/docs/ComplianceApi.md +1 -1
- 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/CreateCryptoAddressRequest.md +1 -1
- 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/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +5 -5
- package/docs/CreateRefundLinkRequest.md +10 -0
- 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/FeeStationApi.md +4 -4
- package/docs/FeeStationCheckFeeStationUsage.md +4 -2
- package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
- package/docs/FeeStationSponsorTransactionDescription.md +10 -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/MerchantBalance.md +1 -1
- package/docs/Order.md +1 -1
- package/docs/OrderLinkBusinessInfo.md +7 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/PaymentApi.md +1492 -188
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +1 -1
- package/docs/PspBalance.md +1 -1
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +13 -0
- package/docs/RefundStatus.md +4 -0
- package/docs/SettlementDetail.md +1 -0
- package/docs/SwapActivityTimeline.md +1 -1
- package/docs/SwapQuote.md +10 -10
- package/docs/TokenizationApi.md +120 -2
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
- package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
- package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
- package/docs/TokenizationListPermissionsResponse.md +10 -0
- package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
- package/docs/TokenizationOperationType.md +2 -0
- package/docs/TokenizationPermissionAction.md +14 -0
- package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
- package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
- package/docs/TokenizationTokenDetailInfo.md +3 -0
- package/docs/TokenizationTokenInfo.md +2 -0
- package/docs/TokenizationTokenPermissionType.md +2 -0
- package/docs/TokenizationTokenStandard.md +4 -0
- package/docs/TokenizationUpdateAddressPermissions.md +11 -0
- package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdatePermissionsParams.md +10 -0
- package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
- package/docs/Transaction.md +1 -1
- package/docs/TransactionCoboCategory.md +14 -0
- 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 +2 -2
- 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/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +12 -0
- package/docs/WebhookEventData.md +2 -2
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
- package/docs/TokenizationTokenPermissionsResponse.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -7,21 +7,48 @@ 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"));
|
|
23
|
+
var _CreateRefundLinkRequest = _interopRequireDefault(require("../model/CreateRefundLinkRequest"));
|
|
14
24
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
15
25
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
16
26
|
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
27
|
+
var _DeleteCounterparty200Response = _interopRequireDefault(require("../model/DeleteCounterparty200Response"));
|
|
28
|
+
var _DeleteCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/DeleteCounterpartyWalletAddress200Response"));
|
|
17
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"));
|
|
18
39
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
40
|
+
var _ExchangeRate = _interopRequireDefault(require("../model/ExchangeRate"));
|
|
19
41
|
var _ForcedSweep = _interopRequireDefault(require("../model/ForcedSweep"));
|
|
20
42
|
var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRequest"));
|
|
21
43
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
22
44
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
23
45
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
24
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"));
|
|
25
52
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
26
53
|
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
27
54
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
@@ -36,16 +63,20 @@ var _Order = _interopRequireDefault(require("../model/Order"));
|
|
|
36
63
|
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
37
64
|
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
38
65
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
39
|
-
var
|
|
66
|
+
var _QueryDestinationWhitelistEnabled200Response = _interopRequireDefault(require("../model/QueryDestinationWhitelistEnabled200Response"));
|
|
40
67
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
41
68
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
42
69
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
43
70
|
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
44
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"));
|
|
45
75
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
46
76
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
47
77
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
48
78
|
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
79
|
+
var _WalletAddress = _interopRequireDefault(require("../model/WalletAddress"));
|
|
49
80
|
var _WalletSetup = _interopRequireDefault(require("../model/WalletSetup"));
|
|
50
81
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
51
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); }
|
|
@@ -81,12 +112,63 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
81
112
|
}
|
|
82
113
|
|
|
83
114
|
/**
|
|
84
|
-
*
|
|
85
|
-
* This operation
|
|
86
|
-
* @param {String}
|
|
87
|
-
* @
|
|
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
|
|
88
120
|
*/
|
|
89
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
|
+
}, {
|
|
90
172
|
key: "cancelRefundByIdWithHttpInfo",
|
|
91
173
|
value: function cancelRefundByIdWithHttpInfo(refund_id) {
|
|
92
174
|
var postBody = null;
|
|
@@ -124,6 +206,88 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
124
206
|
});
|
|
125
207
|
}
|
|
126
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
|
+
|
|
127
291
|
/**
|
|
128
292
|
* Create crypto address
|
|
129
293
|
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
@@ -165,6 +329,129 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
165
329
|
});
|
|
166
330
|
}
|
|
167
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
|
+
|
|
168
455
|
/**
|
|
169
456
|
* Create forced sweep
|
|
170
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.
|
|
@@ -249,9 +536,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
249
536
|
|
|
250
537
|
/**
|
|
251
538
|
* Create order link
|
|
252
|
-
* This operation
|
|
539
|
+
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link).
|
|
253
540
|
* @param {Object} opts Optional parameters
|
|
254
|
-
* @param {module:model/CreateOrderLinkRequest} [CreateOrderLinkRequest] The request body to create a payment link
|
|
541
|
+
* @param {module:model/CreateOrderLinkRequest} [CreateOrderLinkRequest] The request body to create a payment link for a pay-in order.
|
|
255
542
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
256
543
|
*/
|
|
257
544
|
}, {
|
|
@@ -275,9 +562,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
275
562
|
|
|
276
563
|
/**
|
|
277
564
|
* Create order link
|
|
278
|
-
* This operation
|
|
565
|
+
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link).
|
|
279
566
|
* @param {Object} opts Optional parameters
|
|
280
|
-
* @param {module:model/CreateOrderLinkRequest} opts.CreateOrderLinkRequest The request body to create a payment link
|
|
567
|
+
* @param {module:model/CreateOrderLinkRequest} opts.CreateOrderLinkRequest The request body to create a payment link for a pay-in order.
|
|
281
568
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
282
569
|
*/
|
|
283
570
|
}, {
|
|
@@ -370,6 +657,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
370
657
|
});
|
|
371
658
|
}
|
|
372
659
|
|
|
660
|
+
/**
|
|
661
|
+
* Create refund link
|
|
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).
|
|
663
|
+
* @param {Object} opts Optional parameters
|
|
664
|
+
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a refund link.
|
|
665
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
666
|
+
*/
|
|
667
|
+
}, {
|
|
668
|
+
key: "createRefundLinkWithHttpInfo",
|
|
669
|
+
value: function createRefundLinkWithHttpInfo(opts) {
|
|
670
|
+
opts = opts || {};
|
|
671
|
+
var postBody = opts['CreateRefundLinkRequest'];
|
|
672
|
+
if (postBody && postBody.toJSON) {
|
|
673
|
+
postBody = postBody.toJSON();
|
|
674
|
+
}
|
|
675
|
+
var pathParams = {};
|
|
676
|
+
var queryParams = {};
|
|
677
|
+
var headerParams = {};
|
|
678
|
+
var formParams = {};
|
|
679
|
+
var authNames = ['CoboAuth'];
|
|
680
|
+
var contentTypes = ['application/json'];
|
|
681
|
+
var accepts = ['application/json'];
|
|
682
|
+
var returnType = _Link["default"];
|
|
683
|
+
return this.apiClient.callApi('/payments/links/refunds', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Create refund link
|
|
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).
|
|
689
|
+
* @param {Object} opts Optional parameters
|
|
690
|
+
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a refund link.
|
|
691
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
692
|
+
*/
|
|
693
|
+
}, {
|
|
694
|
+
key: "createRefundLink",
|
|
695
|
+
value: function createRefundLink(opts) {
|
|
696
|
+
return this.createRefundLinkWithHttpInfo(opts).then(function (response_and_data) {
|
|
697
|
+
return response_and_data.data;
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
|
|
373
701
|
/**
|
|
374
702
|
* Create settlement request
|
|
375
703
|
* This operation creates a settlement request to withdraw available balances.
|
|
@@ -412,24 +740,24 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
412
740
|
}
|
|
413
741
|
|
|
414
742
|
/**
|
|
415
|
-
* Delete
|
|
416
|
-
* This operation
|
|
417
|
-
* @param {String}
|
|
418
|
-
* @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
|
|
419
747
|
*/
|
|
420
748
|
}, {
|
|
421
|
-
key: "
|
|
422
|
-
value: function
|
|
749
|
+
key: "deleteCounterpartyWithHttpInfo",
|
|
750
|
+
value: function deleteCounterpartyWithHttpInfo(counterparty_id) {
|
|
423
751
|
var postBody = null;
|
|
424
752
|
if (postBody && postBody.toJSON) {
|
|
425
753
|
postBody = postBody.toJSON();
|
|
426
754
|
}
|
|
427
|
-
// verify the required parameter '
|
|
428
|
-
if (
|
|
429
|
-
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");
|
|
430
758
|
}
|
|
431
759
|
var pathParams = {
|
|
432
|
-
'
|
|
760
|
+
'counterparty_id': counterparty_id
|
|
433
761
|
};
|
|
434
762
|
var queryParams = {};
|
|
435
763
|
var headerParams = {};
|
|
@@ -437,128 +765,464 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
437
765
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
438
766
|
var contentTypes = [];
|
|
439
767
|
var accepts = ['application/json'];
|
|
440
|
-
var returnType =
|
|
441
|
-
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);
|
|
442
770
|
}
|
|
443
771
|
|
|
444
772
|
/**
|
|
445
|
-
* Delete
|
|
446
|
-
* This operation
|
|
447
|
-
* @param {String}
|
|
448
|
-
* @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}
|
|
449
777
|
*/
|
|
450
778
|
}, {
|
|
451
|
-
key: "
|
|
452
|
-
value: function
|
|
453
|
-
return this.
|
|
779
|
+
key: "deleteCounterparty",
|
|
780
|
+
value: function deleteCounterparty(counterparty_id) {
|
|
781
|
+
return this.deleteCounterpartyWithHttpInfo(counterparty_id).then(function (response_and_data) {
|
|
454
782
|
return response_and_data.data;
|
|
455
783
|
});
|
|
456
784
|
}
|
|
457
785
|
|
|
458
786
|
/**
|
|
459
|
-
*
|
|
460
|
-
* This operation
|
|
461
|
-
* @param {String}
|
|
462
|
-
* @
|
|
463
|
-
* @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
|
|
464
791
|
*/
|
|
465
792
|
}, {
|
|
466
|
-
key: "
|
|
467
|
-
value: function
|
|
793
|
+
key: "deleteCounterpartyWalletAddressWithHttpInfo",
|
|
794
|
+
value: function deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id) {
|
|
468
795
|
var postBody = null;
|
|
469
796
|
if (postBody && postBody.toJSON) {
|
|
470
797
|
postBody = postBody.toJSON();
|
|
471
798
|
}
|
|
472
|
-
// verify the required parameter '
|
|
473
|
-
if (
|
|
474
|
-
throw new Error("Missing the required parameter '
|
|
475
|
-
}
|
|
476
|
-
// verify the required parameter 'currency' is set
|
|
477
|
-
if (currency === undefined || currency === null) {
|
|
478
|
-
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");
|
|
479
802
|
}
|
|
480
803
|
var pathParams = {
|
|
481
|
-
'
|
|
482
|
-
'currency': currency
|
|
804
|
+
'wallet_address_id': wallet_address_id
|
|
483
805
|
};
|
|
484
806
|
var queryParams = {};
|
|
485
807
|
var headerParams = {};
|
|
486
808
|
var formParams = {};
|
|
487
|
-
var authNames = ['CoboAuth'];
|
|
809
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
488
810
|
var contentTypes = [];
|
|
489
811
|
var accepts = ['application/json'];
|
|
490
|
-
var returnType =
|
|
491
|
-
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);
|
|
492
814
|
}
|
|
493
815
|
|
|
494
816
|
/**
|
|
495
|
-
*
|
|
496
|
-
* This operation
|
|
497
|
-
* @param {String}
|
|
498
|
-
* @
|
|
499
|
-
* @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}
|
|
500
821
|
*/
|
|
501
822
|
}, {
|
|
502
|
-
key: "
|
|
503
|
-
value: function
|
|
504
|
-
return this.
|
|
823
|
+
key: "deleteCounterpartyWalletAddress",
|
|
824
|
+
value: function deleteCounterpartyWalletAddress(wallet_address_id) {
|
|
825
|
+
return this.deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id).then(function (response_and_data) {
|
|
505
826
|
return response_and_data.data;
|
|
506
827
|
});
|
|
507
828
|
}
|
|
508
829
|
|
|
509
830
|
/**
|
|
510
|
-
*
|
|
511
|
-
* This operation
|
|
512
|
-
* @param {String}
|
|
513
|
-
* @
|
|
514
|
-
* @param {Object} opts Optional parameters
|
|
515
|
-
* @param {String} [merchant_id] The merchant ID.
|
|
516
|
-
* @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
|
|
517
835
|
*/
|
|
518
836
|
}, {
|
|
519
|
-
key: "
|
|
520
|
-
value: function
|
|
521
|
-
opts = opts || {};
|
|
837
|
+
key: "deleteCryptoAddressWithHttpInfo",
|
|
838
|
+
value: function deleteCryptoAddressWithHttpInfo(crypto_address_id) {
|
|
522
839
|
var postBody = null;
|
|
523
840
|
if (postBody && postBody.toJSON) {
|
|
524
841
|
postBody = postBody.toJSON();
|
|
525
842
|
}
|
|
526
|
-
// verify the required parameter '
|
|
527
|
-
if (
|
|
528
|
-
throw new Error("Missing the required parameter '
|
|
529
|
-
}
|
|
530
|
-
// verify the required parameter 'token_id' is set
|
|
531
|
-
if (token_id === undefined || token_id === null) {
|
|
532
|
-
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");
|
|
533
846
|
}
|
|
534
|
-
var pathParams = {
|
|
535
|
-
|
|
536
|
-
'merchant_id': opts['merchant_id'],
|
|
537
|
-
'payer_id': payer_id,
|
|
538
|
-
'token_id': token_id
|
|
847
|
+
var pathParams = {
|
|
848
|
+
'crypto_address_id': crypto_address_id
|
|
539
849
|
};
|
|
850
|
+
var queryParams = {};
|
|
540
851
|
var headerParams = {};
|
|
541
852
|
var formParams = {};
|
|
542
853
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
543
854
|
var contentTypes = [];
|
|
544
855
|
var accepts = ['application/json'];
|
|
545
|
-
var returnType = [
|
|
546
|
-
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);
|
|
547
858
|
}
|
|
548
859
|
|
|
549
860
|
/**
|
|
550
|
-
*
|
|
551
|
-
* This operation
|
|
552
|
-
* @param {String}
|
|
553
|
-
* @
|
|
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}
|
|
865
|
+
*/
|
|
866
|
+
}, {
|
|
867
|
+
key: "deleteCryptoAddress",
|
|
868
|
+
value: function deleteCryptoAddress(crypto_address_id) {
|
|
869
|
+
return this.deleteCryptoAddressWithHttpInfo(crypto_address_id).then(function (response_and_data) {
|
|
870
|
+
return response_and_data.data;
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
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
|
|
879
|
+
*/
|
|
880
|
+
}, {
|
|
881
|
+
key: "deleteDestinationWithHttpInfo",
|
|
882
|
+
value: function deleteDestinationWithHttpInfo(destination_id) {
|
|
883
|
+
var postBody = null;
|
|
884
|
+
if (postBody && postBody.toJSON) {
|
|
885
|
+
postBody = postBody.toJSON();
|
|
886
|
+
}
|
|
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");
|
|
890
|
+
}
|
|
891
|
+
var pathParams = {
|
|
892
|
+
'destination_id': destination_id
|
|
893
|
+
};
|
|
894
|
+
var queryParams = {};
|
|
895
|
+
var headerParams = {};
|
|
896
|
+
var formParams = {};
|
|
897
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
898
|
+
var contentTypes = [];
|
|
899
|
+
var accepts = ['application/json'];
|
|
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);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
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}
|
|
909
|
+
*/
|
|
910
|
+
}, {
|
|
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.
|
|
554
1009
|
* @param {Object} opts Optional parameters
|
|
555
|
-
* @param {
|
|
556
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
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
|
|
557
1096
|
*/
|
|
558
1097
|
}, {
|
|
559
|
-
key: "
|
|
560
|
-
value: function
|
|
561
|
-
|
|
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) {
|
|
562
1226
|
return response_and_data.data;
|
|
563
1227
|
});
|
|
564
1228
|
}
|
|
@@ -773,42 +1437,298 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
773
1437
|
var pathParams = {
|
|
774
1438
|
'settlement_request_id': settlement_request_id
|
|
775
1439
|
};
|
|
776
|
-
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
|
+
};
|
|
777
1693
|
var headerParams = {};
|
|
778
1694
|
var formParams = {};
|
|
779
1695
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
780
1696
|
var contentTypes = [];
|
|
781
1697
|
var accepts = ['application/json'];
|
|
782
|
-
var returnType =
|
|
783
|
-
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);
|
|
784
1700
|
}
|
|
785
1701
|
|
|
786
1702
|
/**
|
|
787
|
-
*
|
|
788
|
-
* This operation retrieves the information of
|
|
789
|
-
* @param {
|
|
790
|
-
* @
|
|
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}
|
|
791
1713
|
*/
|
|
792
1714
|
}, {
|
|
793
|
-
key: "
|
|
794
|
-
value: function
|
|
795
|
-
return this.
|
|
1715
|
+
key: "listCounterpartyWalletAddress",
|
|
1716
|
+
value: function listCounterpartyWalletAddress(opts) {
|
|
1717
|
+
return this.listCounterpartyWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
796
1718
|
return response_and_data.data;
|
|
797
1719
|
});
|
|
798
1720
|
}
|
|
799
1721
|
|
|
800
1722
|
/**
|
|
801
|
-
*
|
|
802
|
-
*
|
|
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.
|
|
803
1725
|
* @param {Object} opts Optional parameters
|
|
804
|
-
* @param {String} [
|
|
805
|
-
* @
|
|
806
|
-
* @param {module:model/AcquiringType} [acquiring_type]
|
|
807
|
-
* @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
|
|
808
1728
|
*/
|
|
809
1729
|
}, {
|
|
810
|
-
key: "
|
|
811
|
-
value: function
|
|
1730
|
+
key: "listCryptoAddressesWithHttpInfo",
|
|
1731
|
+
value: function listCryptoAddressesWithHttpInfo(opts) {
|
|
812
1732
|
opts = opts || {};
|
|
813
1733
|
var postBody = null;
|
|
814
1734
|
if (postBody && postBody.toJSON) {
|
|
@@ -816,139 +1736,164 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
816
1736
|
}
|
|
817
1737
|
var pathParams = {};
|
|
818
1738
|
var queryParams = {
|
|
819
|
-
'
|
|
820
|
-
'currency': opts['currency'],
|
|
821
|
-
'acquiring_type': opts['acquiring_type']
|
|
1739
|
+
'token_id': opts['token_id']
|
|
822
1740
|
};
|
|
823
1741
|
var headerParams = {};
|
|
824
1742
|
var formParams = {};
|
|
825
1743
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
826
1744
|
var contentTypes = [];
|
|
827
1745
|
var accepts = ['application/json'];
|
|
828
|
-
var returnType =
|
|
829
|
-
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);
|
|
830
1748
|
}
|
|
831
1749
|
|
|
832
1750
|
/**
|
|
833
|
-
*
|
|
834
|
-
*
|
|
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.
|
|
835
1753
|
* @param {Object} opts Optional parameters
|
|
836
|
-
* @param {String} opts.
|
|
837
|
-
* @
|
|
838
|
-
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
839
|
-
* @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>}
|
|
840
1756
|
*/
|
|
841
1757
|
}, {
|
|
842
|
-
key: "
|
|
843
|
-
value: function
|
|
844
|
-
return this.
|
|
1758
|
+
key: "listCryptoAddresses",
|
|
1759
|
+
value: function listCryptoAddresses(opts) {
|
|
1760
|
+
return this.listCryptoAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
845
1761
|
return response_and_data.data;
|
|
846
1762
|
});
|
|
847
1763
|
}
|
|
848
1764
|
|
|
849
1765
|
/**
|
|
850
|
-
*
|
|
851
|
-
* This operation retrieves the information of
|
|
852
|
-
* @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`
|
|
853
|
-
* @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.
|
|
854
1768
|
* @param {Object} opts Optional parameters
|
|
855
|
-
* @param {
|
|
856
|
-
* @
|
|
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
|
|
857
1776
|
*/
|
|
858
1777
|
}, {
|
|
859
|
-
key: "
|
|
860
|
-
value: function
|
|
1778
|
+
key: "listDestinationBankAccountsWithHttpInfo",
|
|
1779
|
+
value: function listDestinationBankAccountsWithHttpInfo(opts) {
|
|
861
1780
|
opts = opts || {};
|
|
862
1781
|
var postBody = null;
|
|
863
1782
|
if (postBody && postBody.toJSON) {
|
|
864
1783
|
postBody = postBody.toJSON();
|
|
865
1784
|
}
|
|
866
|
-
// verify the required parameter 'token_id' is set
|
|
867
|
-
if (token_id === undefined || token_id === null) {
|
|
868
|
-
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
869
|
-
}
|
|
870
|
-
// verify the required parameter 'custom_payer_id' is set
|
|
871
|
-
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
872
|
-
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
873
|
-
}
|
|
874
1785
|
var pathParams = {};
|
|
875
1786
|
var queryParams = {
|
|
876
|
-
'
|
|
877
|
-
'
|
|
878
|
-
'
|
|
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']
|
|
879
1793
|
};
|
|
880
1794
|
var headerParams = {};
|
|
881
1795
|
var formParams = {};
|
|
882
1796
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
883
1797
|
var contentTypes = [];
|
|
884
1798
|
var accepts = ['application/json'];
|
|
885
|
-
var returnType =
|
|
886
|
-
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);
|
|
887
1801
|
}
|
|
888
1802
|
|
|
889
1803
|
/**
|
|
890
|
-
*
|
|
891
|
-
* This operation retrieves the information of
|
|
892
|
-
* @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`
|
|
893
|
-
* @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.
|
|
894
1806
|
* @param {Object} opts Optional parameters
|
|
895
|
-
* @param {
|
|
896
|
-
* @
|
|
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}
|
|
897
1814
|
*/
|
|
898
1815
|
}, {
|
|
899
|
-
key: "
|
|
900
|
-
value: function
|
|
901
|
-
return this.
|
|
1816
|
+
key: "listDestinationBankAccounts",
|
|
1817
|
+
value: function listDestinationBankAccounts(opts) {
|
|
1818
|
+
return this.listDestinationBankAccountsWithHttpInfo(opts).then(function (response_and_data) {
|
|
902
1819
|
return response_and_data.data;
|
|
903
1820
|
});
|
|
904
1821
|
}
|
|
905
1822
|
|
|
906
1823
|
/**
|
|
907
|
-
* List
|
|
908
|
-
* This operation retrieves the information of
|
|
909
|
-
* @
|
|
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
|
|
910
1834
|
*/
|
|
911
1835
|
}, {
|
|
912
|
-
key: "
|
|
913
|
-
value: function
|
|
1836
|
+
key: "listDestinationWalletAddressesWithHttpInfo",
|
|
1837
|
+
value: function listDestinationWalletAddressesWithHttpInfo(opts) {
|
|
1838
|
+
opts = opts || {};
|
|
914
1839
|
var postBody = null;
|
|
915
1840
|
if (postBody && postBody.toJSON) {
|
|
916
1841
|
postBody = postBody.toJSON();
|
|
917
1842
|
}
|
|
918
1843
|
var pathParams = {};
|
|
919
|
-
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
|
+
};
|
|
920
1852
|
var headerParams = {};
|
|
921
1853
|
var formParams = {};
|
|
922
1854
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
923
1855
|
var contentTypes = [];
|
|
924
1856
|
var accepts = ['application/json'];
|
|
925
|
-
var returnType = [
|
|
926
|
-
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);
|
|
927
1859
|
}
|
|
928
1860
|
|
|
929
1861
|
/**
|
|
930
|
-
* List
|
|
931
|
-
* This operation retrieves the information of
|
|
932
|
-
* @
|
|
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}
|
|
933
1872
|
*/
|
|
934
1873
|
}, {
|
|
935
|
-
key: "
|
|
936
|
-
value: function
|
|
937
|
-
return this.
|
|
1874
|
+
key: "listDestinationWalletAddresses",
|
|
1875
|
+
value: function listDestinationWalletAddresses(opts) {
|
|
1876
|
+
return this.listDestinationWalletAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
938
1877
|
return response_and_data.data;
|
|
939
1878
|
});
|
|
940
1879
|
}
|
|
941
1880
|
|
|
942
1881
|
/**
|
|
943
|
-
* List
|
|
944
|
-
* 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.
|
|
945
1884
|
* @param {Object} opts Optional parameters
|
|
946
|
-
* @param {
|
|
947
|
-
* @
|
|
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
|
|
948
1893
|
*/
|
|
949
1894
|
}, {
|
|
950
|
-
key: "
|
|
951
|
-
value: function
|
|
1895
|
+
key: "listDestinationsWithHttpInfo",
|
|
1896
|
+
value: function listDestinationsWithHttpInfo(opts) {
|
|
952
1897
|
opts = opts || {};
|
|
953
1898
|
var postBody = null;
|
|
954
1899
|
if (postBody && postBody.toJSON) {
|
|
@@ -956,28 +1901,40 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
956
1901
|
}
|
|
957
1902
|
var pathParams = {};
|
|
958
1903
|
var queryParams = {
|
|
959
|
-
'
|
|
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']
|
|
960
1911
|
};
|
|
961
1912
|
var headerParams = {};
|
|
962
1913
|
var formParams = {};
|
|
963
1914
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
964
1915
|
var contentTypes = [];
|
|
965
1916
|
var accepts = ['application/json'];
|
|
966
|
-
var returnType = [
|
|
967
|
-
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);
|
|
968
1919
|
}
|
|
969
1920
|
|
|
970
1921
|
/**
|
|
971
|
-
* List
|
|
972
|
-
* 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.
|
|
973
1924
|
* @param {Object} opts Optional parameters
|
|
974
|
-
* @param {
|
|
975
|
-
* @
|
|
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}
|
|
976
1933
|
*/
|
|
977
1934
|
}, {
|
|
978
|
-
key: "
|
|
979
|
-
value: function
|
|
980
|
-
return this.
|
|
1935
|
+
key: "listDestinations",
|
|
1936
|
+
value: function listDestinations(opts) {
|
|
1937
|
+
return this.listDestinationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
981
1938
|
return response_and_data.data;
|
|
982
1939
|
});
|
|
983
1940
|
}
|
|
@@ -1551,6 +2508,42 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1551
2508
|
});
|
|
1552
2509
|
}
|
|
1553
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
|
+
|
|
1554
2547
|
/**
|
|
1555
2548
|
* Update bank account
|
|
1556
2549
|
* This operation updates the information of an existing bank account.
|
|
@@ -1600,6 +2593,153 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1600
2593
|
});
|
|
1601
2594
|
}
|
|
1602
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
|
+
|
|
1603
2743
|
/**
|
|
1604
2744
|
* Update merchant
|
|
1605
2745
|
* This operation updates the information of an existing merchant.
|
|
@@ -1749,7 +2889,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1749
2889
|
|
|
1750
2890
|
/**
|
|
1751
2891
|
* Update top-up address
|
|
1752
|
-
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
2892
|
+
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. <Note> You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. </Note>
|
|
1753
2893
|
* @param {Object} opts Optional parameters
|
|
1754
2894
|
* @param {module:model/UpdateTopUpAddress} [UpdateTopUpAddress] The request body to update top-up address.
|
|
1755
2895
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
@@ -1775,7 +2915,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1775
2915
|
|
|
1776
2916
|
/**
|
|
1777
2917
|
* Update top-up address
|
|
1778
|
-
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
2918
|
+
* This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. <Note> You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. </Note>
|
|
1779
2919
|
* @param {Object} opts Optional parameters
|
|
1780
2920
|
* @param {module:model/UpdateTopUpAddress} opts.UpdateTopUpAddress The request body to update top-up address.
|
|
1781
2921
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|