@cobo/cobo-waas2 1.16.0 → 1.18.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 +46 -6
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AppWorkflowsApi.js +22 -22
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/OrganizationsApi.js +79 -0
- package/dist/api/PaymentApi.js +265 -55
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/api/WalletsApi.js +11 -8
- package/dist/index.js +252 -14
- package/dist/model/Account.js +174 -0
- package/dist/model/AcquiringType.js +61 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AppWorkflow.js +7 -7
- package/dist/model/AppWorkflowField.js +5 -5
- package/dist/model/AppWorkflowPolicy.js +1 -1
- package/dist/model/ApprovalEntry.js +1 -1
- package/dist/model/ApprovalRequest.js +5 -3
- package/dist/model/ApprovalRequestDetail.js +2 -1
- package/dist/model/ApprovalUser.js +4 -4
- package/dist/model/BalanceUpdateInfo.js +170 -0
- package/dist/model/BalanceUpdateInfoEventData.js +297 -0
- package/dist/model/BankAccount.js +2 -2
- package/dist/model/ChainInfo.js +1 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CreateApprovalRequest201Response.js +2 -1
- package/dist/model/CreateMerchantRequest.js +13 -0
- package/dist/model/CreatePaymentOrderRequest.js +14 -5
- package/dist/model/CreateRefundRequest.js +41 -8
- package/dist/model/CreateSettlement.js +28 -12
- package/dist/model/CreateSettlementRequestRequest.js +27 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/CustodialTransferDestination.js +137 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimatedFILFee.js +170 -0
- package/dist/model/EstimatedFILFeeSlow.js +186 -0
- package/dist/model/EstimatedFee.js +68 -12
- package/dist/model/EstimatedSOLFee.js +170 -0
- package/dist/model/EstimatedSOLFeeSlow.js +184 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
- package/dist/model/FILBase.js +88 -0
- package/dist/model/FILPrice.js +114 -0
- package/dist/model/FeeType.js +10 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/GraphQLError.js +135 -0
- package/dist/model/GraphQLErrorLocationsInner.js +92 -0
- package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
- package/dist/model/GraphQLResponse.js +119 -0
- package/dist/model/ListTopUpPayers200Response.js +123 -0
- package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +15 -2
- package/dist/model/Order.js +16 -7
- package/dist/model/PayerAccount.js +189 -0
- package/dist/model/PaymentOrderEventData.js +33 -15
- package/dist/model/PaymentRefundEventData.js +66 -11
- package/dist/model/PaymentSettlementEvent.js +14 -9
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +1 -1
- package/dist/model/PolicyActionContent.js +6 -4
- package/dist/model/PolicyCondition.js +5 -5
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/Refund.js +39 -4
- package/dist/model/RefundStatus.js +5 -0
- package/dist/model/RequestApproval.js +9 -9
- package/dist/model/RevokeApprovalRequest201Response.js +2 -1
- package/dist/model/RevokeApprovalRequestRequest.js +2 -2
- package/dist/model/SOLBase.js +101 -0
- package/dist/model/SOLComputeUnit.js +101 -0
- package/dist/model/Settlement.js +3 -3
- package/dist/model/SettlementDetail.js +24 -6
- package/dist/model/SettlementInfo.js +11 -2
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/SwapActivityDetail.js +30 -0
- package/dist/model/SwapActivitySigners.js +110 -0
- package/dist/model/SwapQuote.js +17 -4
- package/dist/model/SwapSingingStatus.js +71 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TopUpAddress.js +230 -0
- package/dist/model/TransactionCoboCategory.js +20 -0
- package/dist/model/TransactionDestination.js +14 -38
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmCalldataInfo.js +1 -1
- package/dist/model/TransactionFILFee.js +229 -0
- package/dist/model/TransactionFee.js +107 -9
- package/dist/model/TransactionRequestFILFee.js +186 -0
- package/dist/model/TransactionRequestFee.js +89 -9
- package/dist/model/TransactionRequestSOLFee.js +168 -0
- package/dist/model/TransactionSOLFee.js +229 -0
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +44 -16
- package/dist/model/TransferDestinationType.js +5 -0
- package/dist/model/UpdateMerchantByIdRequest.js +13 -0
- package/dist/model/UpdateRefundByIdRequest.js +110 -0
- package/dist/model/UpdateTopUpAddress.js +141 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEvent.js +2 -2
- package/dist/model/WebhookEventData.js +83 -13
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventLog.js +2 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Account.md +14 -0
- package/docs/AcquiringType.md +12 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressesEventData.md +3 -1
- package/docs/AppWorkflow.md +3 -3
- package/docs/AppWorkflowField.md +2 -2
- package/docs/AppWorkflowsApi.md +12 -12
- package/docs/ApprovalRequest.md +2 -2
- package/docs/ApprovalRequestDetail.md +1 -1
- package/docs/ApprovalUser.md +2 -2
- package/docs/BalanceUpdateInfo.md +13 -0
- package/docs/BalanceUpdateInfoEventData.md +47 -0
- package/docs/BankAccount.md +2 -2
- package/docs/ChainInfo.md +1 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CreateApprovalRequest201Response.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateRefundRequest.md +5 -2
- package/docs/CreateSettlement.md +7 -6
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimatedFILFee.md +13 -0
- package/docs/EstimatedFILFeeSlow.md +12 -0
- package/docs/EstimatedFee.md +3 -3
- package/docs/EstimatedSOLFee.md +13 -0
- package/docs/EstimatedSOLFeeSlow.md +12 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/FILBase.md +9 -0
- package/docs/FILPrice.md +11 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/FeeType.md +4 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/GraphQLError.md +11 -0
- package/docs/GraphQLErrorLocationsInner.md +10 -0
- package/docs/GraphQLRequest.md +11 -0
- package/docs/GraphQLResponse.md +10 -0
- package/docs/ListTopUpPayers200Response.md +10 -0
- package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +6 -5
- package/docs/OrganizationsApi.md +55 -0
- package/docs/PayerAccount.md +14 -0
- package/docs/PaymentApi.md +247 -29
- package/docs/PaymentOrderEventData.md +9 -6
- package/docs/PaymentRefundEventData.md +10 -5
- package/docs/PaymentSettlementEvent.md +6 -4
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyActionContent.md +4 -4
- package/docs/PolicyCondition.md +2 -2
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/Refund.md +7 -4
- package/docs/RefundStatus.md +2 -0
- package/docs/RequestApproval.md +4 -4
- package/docs/RevokeApprovalRequest201Response.md +1 -1
- package/docs/RevokeApprovalRequestRequest.md +1 -1
- package/docs/SOLBase.md +10 -0
- package/docs/SOLComputeUnit.md +10 -0
- package/docs/Settlement.md +3 -3
- package/docs/SettlementDetail.md +8 -6
- package/docs/SettlementInfo.md +3 -2
- package/docs/SupportedToken.md +17 -0
- package/docs/SwapActivityDetail.md +1 -0
- package/docs/SwapActivitySigners.md +11 -0
- package/docs/SwapQuote.md +3 -2
- package/docs/SwapSingingStatus.md +16 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TopUpAddress.md +18 -0
- package/docs/TransactionCoboCategory.md +8 -0
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionEvmCalldataInfo.md +1 -1
- package/docs/TransactionFILFee.md +16 -0
- package/docs/TransactionFee.md +8 -1
- package/docs/TransactionRequestFILFee.md +13 -0
- package/docs/TransactionRequestFee.md +5 -1
- package/docs/TransactionRequestSOLFee.md +12 -0
- package/docs/TransactionSOLFee.md +16 -0
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TransferDestination.md +3 -3
- package/docs/TransferDestinationType.md +2 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -0
- package/docs/UpdateRefundByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +11 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +6 -4
- package/docs/WebhookEvent.md +1 -1
- package/docs/WebhookEventData.md +14 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventLog.md +1 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
- package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AcquiringType = _interopRequireDefault(require("../model/AcquiringType"));
|
|
8
9
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
9
|
-
var _CreateBankAccountRequest = _interopRequireDefault(require("../model/CreateBankAccountRequest"));
|
|
10
10
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
11
11
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
12
12
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
13
13
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
14
|
+
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
14
15
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
15
16
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
16
17
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
@@ -18,12 +19,16 @@ var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../mode
|
|
|
18
19
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
19
20
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
20
21
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
22
|
+
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
21
23
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
22
24
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
23
25
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
24
26
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
27
|
+
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
28
|
+
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
25
29
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
26
30
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
31
|
+
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
27
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
28
33
|
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); }
|
|
29
34
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -58,42 +63,45 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
|
-
*
|
|
62
|
-
* This operation
|
|
63
|
-
* @param {
|
|
64
|
-
* @
|
|
65
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
|
|
66
|
+
* Cancel refund order
|
|
67
|
+
* This operation cancels a specified refund order.
|
|
68
|
+
* @param {String} refund_id The refund order ID.
|
|
69
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
66
70
|
*/
|
|
67
71
|
return _createClass(PaymentApi, [{
|
|
68
|
-
key: "
|
|
69
|
-
value: function
|
|
70
|
-
|
|
71
|
-
var postBody = opts['CreateBankAccountRequest'];
|
|
72
|
+
key: "cancelRefundByIdWithHttpInfo",
|
|
73
|
+
value: function cancelRefundByIdWithHttpInfo(refund_id) {
|
|
74
|
+
var postBody = null;
|
|
72
75
|
if (postBody && postBody.toJSON) {
|
|
73
76
|
postBody = postBody.toJSON();
|
|
74
77
|
}
|
|
75
|
-
|
|
78
|
+
// verify the required parameter 'refund_id' is set
|
|
79
|
+
if (refund_id === undefined || refund_id === null) {
|
|
80
|
+
throw new Error("Missing the required parameter 'refund_id' when calling cancelRefundById");
|
|
81
|
+
}
|
|
82
|
+
var pathParams = {
|
|
83
|
+
'refund_id': refund_id
|
|
84
|
+
};
|
|
76
85
|
var queryParams = {};
|
|
77
86
|
var headerParams = {};
|
|
78
87
|
var formParams = {};
|
|
79
88
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
80
|
-
var contentTypes = [
|
|
89
|
+
var contentTypes = [];
|
|
81
90
|
var accepts = ['application/json'];
|
|
82
|
-
var returnType =
|
|
83
|
-
return this.apiClient.callApi('/payments/
|
|
91
|
+
var returnType = _Refund["default"];
|
|
92
|
+
return this.apiClient.callApi('/payments/refunds/{refund_id}/cancel', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
84
93
|
}
|
|
85
94
|
|
|
86
95
|
/**
|
|
87
|
-
*
|
|
88
|
-
* This operation
|
|
89
|
-
* @param {
|
|
90
|
-
* @
|
|
91
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
|
|
96
|
+
* Cancel refund order
|
|
97
|
+
* This operation cancels a specified refund order.
|
|
98
|
+
* @param {String} refund_id The refund order ID.
|
|
99
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
|
|
92
100
|
*/
|
|
93
101
|
}, {
|
|
94
|
-
key: "
|
|
95
|
-
value: function
|
|
96
|
-
return this.
|
|
102
|
+
key: "cancelRefundById",
|
|
103
|
+
value: function cancelRefundById(refund_id) {
|
|
104
|
+
return this.cancelRefundByIdWithHttpInfo(refund_id).then(function (response_and_data) {
|
|
97
105
|
return response_and_data.data;
|
|
98
106
|
});
|
|
99
107
|
}
|
|
@@ -223,7 +231,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
223
231
|
|
|
224
232
|
/**
|
|
225
233
|
* Create settlement request
|
|
226
|
-
* This operation creates a settlement request to withdraw available balances.
|
|
234
|
+
* This operation creates a settlement request to withdraw available balances.
|
|
227
235
|
* @param {Object} opts Optional parameters
|
|
228
236
|
* @param {module:model/CreateSettlementRequestRequest} [CreateSettlementRequestRequest] The request body to create a settlement request.
|
|
229
237
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Settlement} and HTTP response
|
|
@@ -249,7 +257,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
249
257
|
|
|
250
258
|
/**
|
|
251
259
|
* Create settlement request
|
|
252
|
-
* This operation creates a settlement request to withdraw available balances.
|
|
260
|
+
* This operation creates a settlement request to withdraw available balances.
|
|
253
261
|
* @param {Object} opts Optional parameters
|
|
254
262
|
* @param {module:model/CreateSettlementRequestRequest} opts.CreateSettlementRequestRequest The request body to create a settlement request.
|
|
255
263
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settlement}
|
|
@@ -265,7 +273,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
265
273
|
/**
|
|
266
274
|
* Get exchange rate
|
|
267
275
|
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
268
|
-
* @param {String} token_id The token ID, which
|
|
276
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
269
277
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
270
278
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
271
279
|
*/
|
|
@@ -301,7 +309,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
301
309
|
/**
|
|
302
310
|
* Get exchange rate
|
|
303
311
|
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
304
|
-
* @param {String} token_id The token ID, which
|
|
312
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
305
313
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
306
314
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
307
315
|
*/
|
|
@@ -506,6 +514,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
506
514
|
* @param {Object} opts Optional parameters
|
|
507
515
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
508
516
|
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
517
|
+
* @param {module:model/AcquiringType} [acquiring_type]
|
|
509
518
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
|
|
510
519
|
*/
|
|
511
520
|
}, {
|
|
@@ -519,7 +528,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
519
528
|
var pathParams = {};
|
|
520
529
|
var queryParams = {
|
|
521
530
|
'merchant_ids': opts['merchant_ids'],
|
|
522
|
-
'currency': opts['currency']
|
|
531
|
+
'currency': opts['currency'],
|
|
532
|
+
'acquiring_type': opts['acquiring_type']
|
|
523
533
|
};
|
|
524
534
|
var headerParams = {};
|
|
525
535
|
var formParams = {};
|
|
@@ -536,6 +546,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
536
546
|
* @param {Object} opts Optional parameters
|
|
537
547
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
538
548
|
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
549
|
+
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
539
550
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
|
|
540
551
|
*/
|
|
541
552
|
}, {
|
|
@@ -546,9 +557,67 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
546
557
|
});
|
|
547
558
|
}
|
|
548
559
|
|
|
560
|
+
/**
|
|
561
|
+
* Get top-up address
|
|
562
|
+
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
563
|
+
* @param {String} merchant_id The merchant ID.
|
|
564
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
565
|
+
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
566
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
567
|
+
*/
|
|
568
|
+
}, {
|
|
569
|
+
key: "getTopUpAddressWithHttpInfo",
|
|
570
|
+
value: function getTopUpAddressWithHttpInfo(merchant_id, token_id, custom_payer_id) {
|
|
571
|
+
var postBody = null;
|
|
572
|
+
if (postBody && postBody.toJSON) {
|
|
573
|
+
postBody = postBody.toJSON();
|
|
574
|
+
}
|
|
575
|
+
// verify the required parameter 'merchant_id' is set
|
|
576
|
+
if (merchant_id === undefined || merchant_id === null) {
|
|
577
|
+
throw new Error("Missing the required parameter 'merchant_id' when calling getTopUpAddress");
|
|
578
|
+
}
|
|
579
|
+
// verify the required parameter 'token_id' is set
|
|
580
|
+
if (token_id === undefined || token_id === null) {
|
|
581
|
+
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
582
|
+
}
|
|
583
|
+
// verify the required parameter 'custom_payer_id' is set
|
|
584
|
+
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
585
|
+
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
586
|
+
}
|
|
587
|
+
var pathParams = {};
|
|
588
|
+
var queryParams = {
|
|
589
|
+
'merchant_id': merchant_id,
|
|
590
|
+
'token_id': token_id,
|
|
591
|
+
'custom_payer_id': custom_payer_id
|
|
592
|
+
};
|
|
593
|
+
var headerParams = {};
|
|
594
|
+
var formParams = {};
|
|
595
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
596
|
+
var contentTypes = [];
|
|
597
|
+
var accepts = ['application/json'];
|
|
598
|
+
var returnType = _TopUpAddress["default"];
|
|
599
|
+
return this.apiClient.callApi('/payments/topup/address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Get top-up address
|
|
604
|
+
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
605
|
+
* @param {String} merchant_id The merchant ID.
|
|
606
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
607
|
+
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
608
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
609
|
+
*/
|
|
610
|
+
}, {
|
|
611
|
+
key: "getTopUpAddress",
|
|
612
|
+
value: function getTopUpAddress(merchant_id, token_id, custom_payer_id) {
|
|
613
|
+
return this.getTopUpAddressWithHttpInfo(merchant_id, token_id, custom_payer_id).then(function (response_and_data) {
|
|
614
|
+
return response_and_data.data;
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
|
|
549
618
|
/**
|
|
550
619
|
* List all bank accounts
|
|
551
|
-
* This operation retrieves the information of all bank accounts registered.
|
|
620
|
+
* 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.
|
|
552
621
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/BankAccount>} and HTTP response
|
|
553
622
|
*/
|
|
554
623
|
}, {
|
|
@@ -571,7 +640,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
571
640
|
|
|
572
641
|
/**
|
|
573
642
|
* List all bank accounts
|
|
574
|
-
* This operation retrieves the information of all bank accounts registered.
|
|
643
|
+
* 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.
|
|
575
644
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/BankAccount>}
|
|
576
645
|
*/
|
|
577
646
|
}, {
|
|
@@ -582,6 +651,49 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
582
651
|
});
|
|
583
652
|
}
|
|
584
653
|
|
|
654
|
+
/**
|
|
655
|
+
* List crypto addresses
|
|
656
|
+
* This operation retrieves a list of crypto addresses registered for crypto withdrawal. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
657
|
+
* @param {Object} opts Optional parameters
|
|
658
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
659
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
660
|
+
*/
|
|
661
|
+
}, {
|
|
662
|
+
key: "listCryptoAddressesWithHttpInfo",
|
|
663
|
+
value: function listCryptoAddressesWithHttpInfo(opts) {
|
|
664
|
+
opts = opts || {};
|
|
665
|
+
var postBody = null;
|
|
666
|
+
if (postBody && postBody.toJSON) {
|
|
667
|
+
postBody = postBody.toJSON();
|
|
668
|
+
}
|
|
669
|
+
var pathParams = {};
|
|
670
|
+
var queryParams = {
|
|
671
|
+
'token_id': opts['token_id']
|
|
672
|
+
};
|
|
673
|
+
var headerParams = {};
|
|
674
|
+
var formParams = {};
|
|
675
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
676
|
+
var contentTypes = [];
|
|
677
|
+
var accepts = ['application/json'];
|
|
678
|
+
var returnType = [_CryptoAddress["default"]];
|
|
679
|
+
return this.apiClient.callApi('/payments/crypto_addresses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* List crypto addresses
|
|
684
|
+
* This operation retrieves a list of crypto addresses registered for crypto withdrawal. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
685
|
+
* @param {Object} opts Optional parameters
|
|
686
|
+
* @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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
687
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
688
|
+
*/
|
|
689
|
+
}, {
|
|
690
|
+
key: "listCryptoAddresses",
|
|
691
|
+
value: function listCryptoAddresses(opts) {
|
|
692
|
+
return this.listCryptoAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
693
|
+
return response_and_data.data;
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
|
|
585
697
|
/**
|
|
586
698
|
* List all merchants
|
|
587
699
|
* This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID.
|
|
@@ -645,6 +757,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
645
757
|
* @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.
|
|
646
758
|
* @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.
|
|
647
759
|
* @param {String} [merchant_id] The merchant ID.
|
|
760
|
+
* @param {String} [psp_order_id] A unique reference code assigned by the developer to identify this order in their system.
|
|
648
761
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
649
762
|
*/
|
|
650
763
|
}, {
|
|
@@ -660,7 +773,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
660
773
|
'limit': opts['limit'],
|
|
661
774
|
'before': opts['before'],
|
|
662
775
|
'after': opts['after'],
|
|
663
|
-
'merchant_id': opts['merchant_id']
|
|
776
|
+
'merchant_id': opts['merchant_id'],
|
|
777
|
+
'psp_order_id': opts['psp_order_id']
|
|
664
778
|
};
|
|
665
779
|
var headerParams = {};
|
|
666
780
|
var formParams = {};
|
|
@@ -679,6 +793,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
679
793
|
* @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.
|
|
680
794
|
* @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.
|
|
681
795
|
* @param {String} opts.merchant_id The merchant ID.
|
|
796
|
+
* @param {String} opts.psp_order_id A unique reference code assigned by the developer to identify this order in their system.
|
|
682
797
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
683
798
|
*/
|
|
684
799
|
}, {
|
|
@@ -689,6 +804,42 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
689
804
|
});
|
|
690
805
|
}
|
|
691
806
|
|
|
807
|
+
/**
|
|
808
|
+
* List all supported tokens
|
|
809
|
+
* This operation retrieves the information of all supported tokens.
|
|
810
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/SupportedToken>} and HTTP response
|
|
811
|
+
*/
|
|
812
|
+
}, {
|
|
813
|
+
key: "listPaymentSupportedTokensWithHttpInfo",
|
|
814
|
+
value: function listPaymentSupportedTokensWithHttpInfo() {
|
|
815
|
+
var postBody = null;
|
|
816
|
+
if (postBody && postBody.toJSON) {
|
|
817
|
+
postBody = postBody.toJSON();
|
|
818
|
+
}
|
|
819
|
+
var pathParams = {};
|
|
820
|
+
var queryParams = {};
|
|
821
|
+
var headerParams = {};
|
|
822
|
+
var formParams = {};
|
|
823
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
824
|
+
var contentTypes = [];
|
|
825
|
+
var accepts = ['application/json'];
|
|
826
|
+
var returnType = [_SupportedToken["default"]];
|
|
827
|
+
return this.apiClient.callApi('/payments/supported_tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* List all supported tokens
|
|
832
|
+
* This operation retrieves the information of all supported tokens.
|
|
833
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/SupportedToken>}
|
|
834
|
+
*/
|
|
835
|
+
}, {
|
|
836
|
+
key: "listPaymentSupportedTokens",
|
|
837
|
+
value: function listPaymentSupportedTokens() {
|
|
838
|
+
return this.listPaymentSupportedTokensWithHttpInfo().then(function (response_and_data) {
|
|
839
|
+
return response_and_data.data;
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
|
|
692
843
|
/**
|
|
693
844
|
* List all settlement requests
|
|
694
845
|
* This operation retrieves the information of all settlement requests.
|
|
@@ -742,50 +893,60 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
742
893
|
}
|
|
743
894
|
|
|
744
895
|
/**
|
|
745
|
-
*
|
|
746
|
-
* This operation
|
|
747
|
-
* @param {String}
|
|
896
|
+
* List payers
|
|
897
|
+
* This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID.
|
|
898
|
+
* @param {String} merchant_id The merchant ID.
|
|
748
899
|
* @param {Object} opts Optional parameters
|
|
749
|
-
* @param {
|
|
750
|
-
* @
|
|
900
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
901
|
+
* @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.
|
|
902
|
+
* @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.
|
|
903
|
+
* @param {String} [payer_id] A unique identifier assigned by Cobo to track and identify individual payers.
|
|
904
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTopUpPayers200Response} and HTTP response
|
|
751
905
|
*/
|
|
752
906
|
}, {
|
|
753
|
-
key: "
|
|
754
|
-
value: function
|
|
907
|
+
key: "listTopUpPayersWithHttpInfo",
|
|
908
|
+
value: function listTopUpPayersWithHttpInfo(merchant_id, opts) {
|
|
755
909
|
opts = opts || {};
|
|
756
|
-
var postBody =
|
|
910
|
+
var postBody = null;
|
|
757
911
|
if (postBody && postBody.toJSON) {
|
|
758
912
|
postBody = postBody.toJSON();
|
|
759
913
|
}
|
|
760
|
-
// verify the required parameter '
|
|
761
|
-
if (
|
|
762
|
-
throw new Error("Missing the required parameter '
|
|
914
|
+
// verify the required parameter 'merchant_id' is set
|
|
915
|
+
if (merchant_id === undefined || merchant_id === null) {
|
|
916
|
+
throw new Error("Missing the required parameter 'merchant_id' when calling listTopUpPayers");
|
|
763
917
|
}
|
|
764
|
-
var pathParams = {
|
|
765
|
-
|
|
918
|
+
var pathParams = {};
|
|
919
|
+
var queryParams = {
|
|
920
|
+
'limit': opts['limit'],
|
|
921
|
+
'before': opts['before'],
|
|
922
|
+
'after': opts['after'],
|
|
923
|
+
'merchant_id': merchant_id,
|
|
924
|
+
'payer_id': opts['payer_id']
|
|
766
925
|
};
|
|
767
|
-
var queryParams = {};
|
|
768
926
|
var headerParams = {};
|
|
769
927
|
var formParams = {};
|
|
770
928
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
771
|
-
var contentTypes = [
|
|
929
|
+
var contentTypes = [];
|
|
772
930
|
var accepts = ['application/json'];
|
|
773
|
-
var returnType =
|
|
774
|
-
return this.apiClient.callApi('/payments/
|
|
931
|
+
var returnType = _ListTopUpPayers200Response["default"];
|
|
932
|
+
return this.apiClient.callApi('/payments/topup/payers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
775
933
|
}
|
|
776
934
|
|
|
777
935
|
/**
|
|
778
|
-
*
|
|
779
|
-
* This operation
|
|
780
|
-
* @param {String}
|
|
936
|
+
* List payers
|
|
937
|
+
* This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID.
|
|
938
|
+
* @param {String} merchant_id The merchant ID.
|
|
781
939
|
* @param {Object} opts Optional parameters
|
|
782
|
-
* @param {
|
|
783
|
-
* @
|
|
940
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
941
|
+
* @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.
|
|
942
|
+
* @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.
|
|
943
|
+
* @param {String} opts.payer_id A unique identifier assigned by Cobo to track and identify individual payers.
|
|
944
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTopUpPayers200Response}
|
|
784
945
|
*/
|
|
785
946
|
}, {
|
|
786
|
-
key: "
|
|
787
|
-
value: function
|
|
788
|
-
return this.
|
|
947
|
+
key: "listTopUpPayers",
|
|
948
|
+
value: function listTopUpPayers(merchant_id, opts) {
|
|
949
|
+
return this.listTopUpPayersWithHttpInfo(merchant_id, opts).then(function (response_and_data) {
|
|
789
950
|
return response_and_data.data;
|
|
790
951
|
});
|
|
791
952
|
}
|
|
@@ -887,5 +1048,54 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
887
1048
|
return response_and_data.data;
|
|
888
1049
|
});
|
|
889
1050
|
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Update refund order information
|
|
1054
|
+
* This operation updates a specified refund order.
|
|
1055
|
+
* @param {String} refund_id The refund order ID.
|
|
1056
|
+
* @param {Object} opts Optional parameters
|
|
1057
|
+
* @param {module:model/UpdateRefundByIdRequest} [UpdateRefundByIdRequest] The request body to update a refund order.
|
|
1058
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
1059
|
+
*/
|
|
1060
|
+
}, {
|
|
1061
|
+
key: "updateRefundByIdWithHttpInfo",
|
|
1062
|
+
value: function updateRefundByIdWithHttpInfo(refund_id, opts) {
|
|
1063
|
+
opts = opts || {};
|
|
1064
|
+
var postBody = opts['UpdateRefundByIdRequest'];
|
|
1065
|
+
if (postBody && postBody.toJSON) {
|
|
1066
|
+
postBody = postBody.toJSON();
|
|
1067
|
+
}
|
|
1068
|
+
// verify the required parameter 'refund_id' is set
|
|
1069
|
+
if (refund_id === undefined || refund_id === null) {
|
|
1070
|
+
throw new Error("Missing the required parameter 'refund_id' when calling updateRefundById");
|
|
1071
|
+
}
|
|
1072
|
+
var pathParams = {
|
|
1073
|
+
'refund_id': refund_id
|
|
1074
|
+
};
|
|
1075
|
+
var queryParams = {};
|
|
1076
|
+
var headerParams = {};
|
|
1077
|
+
var formParams = {};
|
|
1078
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1079
|
+
var contentTypes = ['application/json'];
|
|
1080
|
+
var accepts = ['application/json'];
|
|
1081
|
+
var returnType = _Refund["default"];
|
|
1082
|
+
return this.apiClient.callApi('/payments/refunds/{refund_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Update refund order information
|
|
1087
|
+
* This operation updates a specified refund order.
|
|
1088
|
+
* @param {String} refund_id The refund order ID.
|
|
1089
|
+
* @param {Object} opts Optional parameters
|
|
1090
|
+
* @param {module:model/UpdateRefundByIdRequest} opts.UpdateRefundByIdRequest The request body to update a refund order.
|
|
1091
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
|
|
1092
|
+
*/
|
|
1093
|
+
}, {
|
|
1094
|
+
key: "updateRefundById",
|
|
1095
|
+
value: function updateRefundById(refund_id, opts) {
|
|
1096
|
+
return this.updateRefundByIdWithHttpInfo(refund_id, opts).then(function (response_and_data) {
|
|
1097
|
+
return response_and_data.data;
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
890
1100
|
}]);
|
|
891
1101
|
}();
|
|
@@ -569,7 +569,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
569
569
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
570
570
|
* @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.
|
|
571
571
|
* @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.
|
|
572
|
-
* @param {module:model/String} [direction = '')] The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order.
|
|
572
|
+
* @param {module:model/String} [direction = 'ASC')] The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order.
|
|
573
573
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTransactions200Response} and HTTP response
|
|
574
574
|
*/
|
|
575
575
|
}, {
|
|
@@ -635,7 +635,7 @@ var TransactionsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
635
635
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
636
636
|
* @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.
|
|
637
637
|
* @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.
|
|
638
|
-
* @param {module:model/String} opts.direction The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. (default to '')
|
|
638
|
+
* @param {module:model/String} opts.direction The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. (default to 'ASC')
|
|
639
639
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTransactions200Response}
|
|
640
640
|
*/
|
|
641
641
|
}, {
|
package/dist/api/WalletsApi.js
CHANGED
|
@@ -74,10 +74,10 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Batch check UTXOs
|
|
77
|
-
*
|
|
77
|
+
* This operation verifies the existence and details of specified unspent transaction outputs (UTXOs) for a given wallet and token. A maximum of 100 UTXOs can be verified per request. <Note>This operation is applicable to MPC Wallets and Custodial Wallets (Web3 Wallets) only.</Note>
|
|
78
78
|
* @param {String} wallet_id The wallet ID.
|
|
79
79
|
* @param {Object} opts Optional parameters
|
|
80
|
-
* @param {module:model/BatchCheckUtxoRequest} [BatchCheckUtxoRequest] The request body of the
|
|
80
|
+
* @param {module:model/BatchCheckUtxoRequest} [BatchCheckUtxoRequest] The request body of the Batch check UTXOs operation.
|
|
81
81
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchCheckUtxo201Response} and HTTP response
|
|
82
82
|
*/
|
|
83
83
|
return _createClass(WalletsApi, [{
|
|
@@ -107,10 +107,10 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* Batch check UTXOs
|
|
110
|
-
*
|
|
110
|
+
* This operation verifies the existence and details of specified unspent transaction outputs (UTXOs) for a given wallet and token. A maximum of 100 UTXOs can be verified per request. <Note>This operation is applicable to MPC Wallets and Custodial Wallets (Web3 Wallets) only.</Note>
|
|
111
111
|
* @param {String} wallet_id The wallet ID.
|
|
112
112
|
* @param {Object} opts Optional parameters
|
|
113
|
-
* @param {module:model/BatchCheckUtxoRequest} opts.BatchCheckUtxoRequest The request body of the
|
|
113
|
+
* @param {module:model/BatchCheckUtxoRequest} opts.BatchCheckUtxoRequest The request body of the Batch check UTXOs operation.
|
|
114
114
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchCheckUtxo201Response}
|
|
115
115
|
*/
|
|
116
116
|
}, {
|
|
@@ -885,11 +885,12 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
885
885
|
|
|
886
886
|
/**
|
|
887
887
|
* List enabled tokens
|
|
888
|
-
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, and
|
|
888
|
+
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, chain IDs, and token IDs. If you do not specify a wallet type, this operation returns a combination of tokens that can be used by your organization for each wallet type.
|
|
889
889
|
* @param {Object} opts Optional parameters
|
|
890
890
|
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
891
891
|
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
892
892
|
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
893
|
+
* @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).
|
|
893
894
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
894
895
|
* @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.
|
|
895
896
|
* @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.
|
|
@@ -908,6 +909,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
908
909
|
'wallet_type': opts['wallet_type'],
|
|
909
910
|
'wallet_subtype': opts['wallet_subtype'],
|
|
910
911
|
'chain_ids': opts['chain_ids'],
|
|
912
|
+
'token_ids': opts['token_ids'],
|
|
911
913
|
'limit': opts['limit'],
|
|
912
914
|
'before': opts['before'],
|
|
913
915
|
'after': opts['after']
|
|
@@ -923,11 +925,12 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
923
925
|
|
|
924
926
|
/**
|
|
925
927
|
* List enabled tokens
|
|
926
|
-
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, and
|
|
928
|
+
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, chain IDs, and token IDs. If you do not specify a wallet type, this operation returns a combination of tokens that can be used by your organization for each wallet type.
|
|
927
929
|
* @param {Object} opts Optional parameters
|
|
928
930
|
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
929
931
|
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
930
932
|
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
933
|
+
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
931
934
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
932
935
|
* @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.
|
|
933
936
|
* @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.
|
|
@@ -1241,7 +1244,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1241
1244
|
|
|
1242
1245
|
/**
|
|
1243
1246
|
* List UTXOs
|
|
1244
|
-
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC and Custodial Web3 Wallets.</Note>
|
|
1247
|
+
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC Wallets and Custodial Wallets (Web3 Wallets) only.</Note>
|
|
1245
1248
|
* @param {String} wallet_id The wallet ID.
|
|
1246
1249
|
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
1247
1250
|
* @param {Object} opts Optional parameters
|
|
@@ -1290,7 +1293,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1290
1293
|
|
|
1291
1294
|
/**
|
|
1292
1295
|
* List UTXOs
|
|
1293
|
-
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC and Custodial Web3 Wallets.</Note>
|
|
1296
|
+
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC Wallets and Custodial Wallets (Web3 Wallets) only.</Note>
|
|
1294
1297
|
* @param {String} wallet_id The wallet ID.
|
|
1295
1298
|
* @param {String} token_id The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
1296
1299
|
* @param {Object} opts Optional parameters
|