@cobo/cobo-waas2 1.27.0 → 1.28.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 +33 -1
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +491 -36
- package/dist/api/StakingsApi.js +44 -2
- package/dist/api/SwapsApi.js +2 -2
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +14 -14
- package/dist/index.js +154 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AllocationRecord.js +193 -0
- package/dist/model/AllocationRequest.js +167 -0
- package/dist/model/BabylonCreateStakingExpansion.js +157 -0
- package/dist/model/BabylonStakeExtra.js +26 -0
- package/dist/model/BabylonStakingRegistration.js +1 -1
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BatchAllocation.js +190 -0
- package/dist/model/BatchAllocationDetail.js +188 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallDestination.js +42 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +115 -68
- package/dist/model/CreatePayoutRequest.js +192 -0
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CreateSettlementRequestRequest.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +12 -0
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/LinkDisplayInfo.js +13 -0
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.js +123 -0
- package/dist/model/ListPayoutItems200Response.js +123 -0
- package/dist/model/ListPayouts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MerchantBalance.js +28 -2
- package/dist/model/Order.js +135 -102
- package/dist/model/OrderLinkBusinessInfo.js +151 -87
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentAllocationAmount.js +125 -0
- package/dist/model/PaymentOrderEventData.js +198 -145
- package/dist/model/PaymentPayout.js +250 -0
- package/dist/model/PaymentPayoutDetail.js +248 -0
- package/dist/model/PaymentPayoutEvent.js +433 -0
- package/dist/model/PaymentPayoutItem.js +298 -0
- package/dist/model/PaymentPayoutItemDetail.js +298 -0
- package/dist/model/PaymentPayoutItemStatus.js +76 -0
- package/dist/model/PaymentPayoutParam.js +165 -0
- package/dist/model/PaymentPayoutStatus.js +81 -0
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentSourceType.js +61 -0
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- package/dist/model/Stakings.js +33 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +1 -1
- package/dist/model/SwapActivityDetail.js +2 -2
- package/dist/model/SwapActivityTimeline.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +106 -42
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationRecord.md +15 -0
- package/docs/AllocationRequest.md +13 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BabylonCreateStakingExpansion.md +12 -0
- package/docs/BabylonStakeExtra.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BatchAllocation.md +14 -0
- package/docs/BatchAllocationDetail.md +14 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallDestination.md +1 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +15 -11
- package/docs/CreatePayoutRequest.md +14 -0
- package/docs/CreateRefundRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/LinkDisplayInfo.md +1 -0
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.md +10 -0
- package/docs/ListPayoutItems200Response.md +10 -0
- package/docs/ListPayouts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MerchantBalance.md +4 -2
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +16 -13
- package/docs/OrderLinkBusinessInfo.md +11 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentAllocationAmount.md +10 -0
- package/docs/PaymentApi.md +527 -20
- package/docs/PaymentOrderEventData.md +19 -14
- package/docs/PaymentPayout.md +19 -0
- package/docs/PaymentPayoutDetail.md +19 -0
- package/docs/PaymentPayoutEvent.md +65 -0
- package/docs/PaymentPayoutItem.md +22 -0
- package/docs/PaymentPayoutItemDetail.md +22 -0
- package/docs/PaymentPayoutItemStatus.md +18 -0
- package/docs/PaymentPayoutParam.md +13 -0
- package/docs/PaymentPayoutStatus.md +20 -0
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentSourceType.md +12 -0
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +4 -2
- package/docs/RefundLinkBusinessInfo.md +1 -1
- package/docs/Stakings.md +2 -1
- package/docs/StakingsApi.md +54 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +1 -1
- package/docs/SwapActivityDetail.md +1 -1
- package/docs/SwapActivityTimeline.md +1 -1
- package/docs/SwapsApi.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +21 -13
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
package/dist/api/PaymentApi.js
CHANGED
|
@@ -8,9 +8,12 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _AcquiringType = _interopRequireDefault(require("../model/AcquiringType"));
|
|
9
9
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
10
10
|
var _BankAccountStatus = _interopRequireDefault(require("../model/BankAccountStatus"));
|
|
11
|
+
var _BatchAllocation = _interopRequireDefault(require("../model/BatchAllocation"));
|
|
12
|
+
var _BatchAllocationDetail = _interopRequireDefault(require("../model/BatchAllocationDetail"));
|
|
11
13
|
var _Counterparty = _interopRequireDefault(require("../model/Counterparty"));
|
|
12
14
|
var _CounterpartyDetail = _interopRequireDefault(require("../model/CounterpartyDetail"));
|
|
13
15
|
var _CounterpartyType = _interopRequireDefault(require("../model/CounterpartyType"));
|
|
16
|
+
var _CreateBatchAllocationRequest = _interopRequireDefault(require("../model/CreateBatchAllocationRequest"));
|
|
14
17
|
var _CreateCounterpartyRequest = _interopRequireDefault(require("../model/CreateCounterpartyRequest"));
|
|
15
18
|
var _CreateCounterpartyWalletAddressRequest = _interopRequireDefault(require("../model/CreateCounterpartyWalletAddressRequest"));
|
|
16
19
|
var _CreateCryptoAddressRequest = _interopRequireDefault(require("../model/CreateCryptoAddressRequest"));
|
|
@@ -20,6 +23,7 @@ var _CreateDestinationWalletAddressRequest = _interopRequireDefault(require("../
|
|
|
20
23
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
21
24
|
var _CreateOrderLinkRequest = _interopRequireDefault(require("../model/CreateOrderLinkRequest"));
|
|
22
25
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
26
|
+
var _CreatePayoutRequest = _interopRequireDefault(require("../model/CreatePayoutRequest"));
|
|
23
27
|
var _CreateRefundLinkRequest = _interopRequireDefault(require("../model/CreateRefundLinkRequest"));
|
|
24
28
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
25
29
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
@@ -44,6 +48,8 @@ var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetEx
|
|
|
44
48
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
45
49
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
46
50
|
var _Link = _interopRequireDefault(require("../model/Link"));
|
|
51
|
+
var _ListAllocations200Response = _interopRequireDefault(require("../model/ListAllocations200Response"));
|
|
52
|
+
var _ListBatchAllocations200Response = _interopRequireDefault(require("../model/ListBatchAllocations200Response"));
|
|
47
53
|
var _ListCounterparties200Response = _interopRequireDefault(require("../model/ListCounterparties200Response"));
|
|
48
54
|
var _ListCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/ListCounterpartyWalletAddress200Response"));
|
|
49
55
|
var _ListDestinationBankAccounts200Response = _interopRequireDefault(require("../model/ListDestinationBankAccounts200Response"));
|
|
@@ -54,14 +60,19 @@ var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/
|
|
|
54
60
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
55
61
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
56
62
|
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
63
|
+
var _ListPayoutItems200Response = _interopRequireDefault(require("../model/ListPayoutItems200Response"));
|
|
64
|
+
var _ListPayouts200Response = _interopRequireDefault(require("../model/ListPayouts200Response"));
|
|
57
65
|
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
58
66
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
59
67
|
var _ListTopUpPayerAccounts200Response = _interopRequireDefault(require("../model/ListTopUpPayerAccounts200Response"));
|
|
60
68
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
61
69
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
62
70
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
71
|
+
var _PaymentAllocationAmount = _interopRequireDefault(require("../model/PaymentAllocationAmount"));
|
|
63
72
|
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
64
73
|
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
74
|
+
var _PaymentPayout = _interopRequireDefault(require("../model/PaymentPayout"));
|
|
75
|
+
var _PaymentPayoutDetail = _interopRequireDefault(require("../model/PaymentPayoutDetail"));
|
|
65
76
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
66
77
|
var _QueryDestinationWhitelistEnabled200Response = _interopRequireDefault(require("../model/QueryDestinationWhitelistEnabled200Response"));
|
|
67
78
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
@@ -113,9 +124,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
113
124
|
|
|
114
125
|
/**
|
|
115
126
|
* Batch get exchange rates
|
|
116
|
-
* This operation retrieves the current exchange rates between
|
|
117
|
-
* @param {String} token_ids
|
|
118
|
-
* @param {String} currencies
|
|
127
|
+
* This operation retrieves the current exchange rates between multiple fiat currencies and cryptocurrencies.
|
|
128
|
+
* @param {String} token_ids A list of token IDs, separated by comma. 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`
|
|
129
|
+
* @param {String} currencies A list of fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
119
130
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ExchangeRate>} and HTTP response
|
|
120
131
|
*/
|
|
121
132
|
return _createClass(PaymentApi, [{
|
|
@@ -149,9 +160,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
149
160
|
|
|
150
161
|
/**
|
|
151
162
|
* Batch get exchange rates
|
|
152
|
-
* This operation retrieves the current exchange rates between
|
|
153
|
-
* @param {String} token_ids
|
|
154
|
-
* @param {String} currencies
|
|
163
|
+
* This operation retrieves the current exchange rates between multiple fiat currencies and cryptocurrencies.
|
|
164
|
+
* @param {String} token_ids A list of token IDs, separated by comma. 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`
|
|
165
|
+
* @param {String} currencies A list of fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
155
166
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ExchangeRate>}
|
|
156
167
|
*/
|
|
157
168
|
}, {
|
|
@@ -206,6 +217,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
206
217
|
});
|
|
207
218
|
}
|
|
208
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Create batch allocation
|
|
222
|
+
* This operation creates a batch allocation to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single batch allocation.
|
|
223
|
+
* @param {Object} opts Optional parameters
|
|
224
|
+
* @param {module:model/CreateBatchAllocationRequest} [CreateBatchAllocationRequest] The request body to create a settlement request.
|
|
225
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchAllocation} and HTTP response
|
|
226
|
+
*/
|
|
227
|
+
}, {
|
|
228
|
+
key: "createBatchAllocationWithHttpInfo",
|
|
229
|
+
value: function createBatchAllocationWithHttpInfo(opts) {
|
|
230
|
+
opts = opts || {};
|
|
231
|
+
var postBody = opts['CreateBatchAllocationRequest'];
|
|
232
|
+
if (postBody && postBody.toJSON) {
|
|
233
|
+
postBody = postBody.toJSON();
|
|
234
|
+
}
|
|
235
|
+
var pathParams = {};
|
|
236
|
+
var queryParams = {};
|
|
237
|
+
var headerParams = {};
|
|
238
|
+
var formParams = {};
|
|
239
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
240
|
+
var contentTypes = ['application/json'];
|
|
241
|
+
var accepts = ['application/json'];
|
|
242
|
+
var returnType = _BatchAllocation["default"];
|
|
243
|
+
return this.apiClient.callApi('/payments/batch_allocations', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Create batch allocation
|
|
248
|
+
* This operation creates a batch allocation to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single batch allocation.
|
|
249
|
+
* @param {Object} opts Optional parameters
|
|
250
|
+
* @param {module:model/CreateBatchAllocationRequest} opts.CreateBatchAllocationRequest The request body to create a settlement request.
|
|
251
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchAllocation}
|
|
252
|
+
*/
|
|
253
|
+
}, {
|
|
254
|
+
key: "createBatchAllocation",
|
|
255
|
+
value: function createBatchAllocation(opts) {
|
|
256
|
+
return this.createBatchAllocationWithHttpInfo(opts).then(function (response_and_data) {
|
|
257
|
+
return response_and_data.data;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
209
261
|
/**
|
|
210
262
|
* Create counterparty
|
|
211
263
|
* This operation creates a counterparty.
|
|
@@ -495,7 +547,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
495
547
|
|
|
496
548
|
/**
|
|
497
549
|
* Create merchant
|
|
498
|
-
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/
|
|
550
|
+
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant).
|
|
499
551
|
* @param {Object} opts Optional parameters
|
|
500
552
|
* @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
|
|
501
553
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
|
|
@@ -521,7 +573,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
521
573
|
|
|
522
574
|
/**
|
|
523
575
|
* Create merchant
|
|
524
|
-
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/
|
|
576
|
+
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant).
|
|
525
577
|
* @param {Object} opts Optional parameters
|
|
526
578
|
* @param {module:model/CreateMerchantRequest} opts.CreateMerchantRequest The request body to create a merchant.
|
|
527
579
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Merchant}
|
|
@@ -536,7 +588,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
536
588
|
|
|
537
589
|
/**
|
|
538
590
|
* Create order link
|
|
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/
|
|
591
|
+
* 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/payments/en/guides/payment-link).
|
|
540
592
|
* @param {Object} opts Optional parameters
|
|
541
593
|
* @param {module:model/CreateOrderLinkRequest} [CreateOrderLinkRequest] The request body to create a payment link for a pay-in order.
|
|
542
594
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
@@ -562,7 +614,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
562
614
|
|
|
563
615
|
/**
|
|
564
616
|
* Create order link
|
|
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/
|
|
617
|
+
* 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/payments/en/guides/payment-link).
|
|
566
618
|
* @param {Object} opts Optional parameters
|
|
567
619
|
* @param {module:model/CreateOrderLinkRequest} opts.CreateOrderLinkRequest The request body to create a payment link for a pay-in order.
|
|
568
620
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
@@ -616,6 +668,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
616
668
|
});
|
|
617
669
|
}
|
|
618
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Create payout
|
|
673
|
+
* This operation creates a payout to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single payout record.
|
|
674
|
+
* @param {Object} opts Optional parameters
|
|
675
|
+
* @param {module:model/CreatePayoutRequest} [CreatePayoutRequest] The request body to create a payout.
|
|
676
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentPayout} and HTTP response
|
|
677
|
+
*/
|
|
678
|
+
}, {
|
|
679
|
+
key: "createPayoutWithHttpInfo",
|
|
680
|
+
value: function createPayoutWithHttpInfo(opts) {
|
|
681
|
+
opts = opts || {};
|
|
682
|
+
var postBody = opts['CreatePayoutRequest'];
|
|
683
|
+
if (postBody && postBody.toJSON) {
|
|
684
|
+
postBody = postBody.toJSON();
|
|
685
|
+
}
|
|
686
|
+
var pathParams = {};
|
|
687
|
+
var queryParams = {};
|
|
688
|
+
var headerParams = {};
|
|
689
|
+
var formParams = {};
|
|
690
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
691
|
+
var contentTypes = ['application/json'];
|
|
692
|
+
var accepts = ['application/json'];
|
|
693
|
+
var returnType = _PaymentPayout["default"];
|
|
694
|
+
return this.apiClient.callApi('/payments/payouts', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Create payout
|
|
699
|
+
* This operation creates a payout to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single payout record.
|
|
700
|
+
* @param {Object} opts Optional parameters
|
|
701
|
+
* @param {module:model/CreatePayoutRequest} opts.CreatePayoutRequest The request body to create a payout.
|
|
702
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentPayout}
|
|
703
|
+
*/
|
|
704
|
+
}, {
|
|
705
|
+
key: "createPayout",
|
|
706
|
+
value: function createPayout(opts) {
|
|
707
|
+
return this.createPayoutWithHttpInfo(opts).then(function (response_and_data) {
|
|
708
|
+
return response_and_data.data;
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
|
|
619
712
|
/**
|
|
620
713
|
* Create refund order
|
|
621
714
|
* This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes.
|
|
@@ -659,7 +752,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
659
752
|
|
|
660
753
|
/**
|
|
661
754
|
* 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/
|
|
755
|
+
* 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/payments/en/guides/create-refund-link).
|
|
663
756
|
* @param {Object} opts Optional parameters
|
|
664
757
|
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a refund link.
|
|
665
758
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
@@ -685,7 +778,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
685
778
|
|
|
686
779
|
/**
|
|
687
780
|
* 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/
|
|
781
|
+
* 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/payments/en/guides/create-refund-link).
|
|
689
782
|
* @param {Object} opts Optional parameters
|
|
690
783
|
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a refund link.
|
|
691
784
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
@@ -1044,6 +1137,108 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1044
1137
|
});
|
|
1045
1138
|
}
|
|
1046
1139
|
|
|
1140
|
+
/**
|
|
1141
|
+
* Get available allocation amount
|
|
1142
|
+
* This operation retrieves the information of available allocation amount.
|
|
1143
|
+
* @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`
|
|
1144
|
+
* @param {String} source_account
|
|
1145
|
+
* @param {String} destination_account
|
|
1146
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentAllocationAmount} and HTTP response
|
|
1147
|
+
*/
|
|
1148
|
+
}, {
|
|
1149
|
+
key: "getAvailableAllocationAmountWithHttpInfo",
|
|
1150
|
+
value: function getAvailableAllocationAmountWithHttpInfo(token_id, source_account, destination_account) {
|
|
1151
|
+
var postBody = null;
|
|
1152
|
+
if (postBody && postBody.toJSON) {
|
|
1153
|
+
postBody = postBody.toJSON();
|
|
1154
|
+
}
|
|
1155
|
+
// verify the required parameter 'token_id' is set
|
|
1156
|
+
if (token_id === undefined || token_id === null) {
|
|
1157
|
+
throw new Error("Missing the required parameter 'token_id' when calling getAvailableAllocationAmount");
|
|
1158
|
+
}
|
|
1159
|
+
// verify the required parameter 'source_account' is set
|
|
1160
|
+
if (source_account === undefined || source_account === null) {
|
|
1161
|
+
throw new Error("Missing the required parameter 'source_account' when calling getAvailableAllocationAmount");
|
|
1162
|
+
}
|
|
1163
|
+
// verify the required parameter 'destination_account' is set
|
|
1164
|
+
if (destination_account === undefined || destination_account === null) {
|
|
1165
|
+
throw new Error("Missing the required parameter 'destination_account' when calling getAvailableAllocationAmount");
|
|
1166
|
+
}
|
|
1167
|
+
var pathParams = {};
|
|
1168
|
+
var queryParams = {
|
|
1169
|
+
'token_id': token_id,
|
|
1170
|
+
'source_account': source_account,
|
|
1171
|
+
'destination_account': destination_account
|
|
1172
|
+
};
|
|
1173
|
+
var headerParams = {};
|
|
1174
|
+
var formParams = {};
|
|
1175
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1176
|
+
var contentTypes = [];
|
|
1177
|
+
var accepts = ['application/json'];
|
|
1178
|
+
var returnType = _PaymentAllocationAmount["default"];
|
|
1179
|
+
return this.apiClient.callApi('/payments/allocation_amount', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Get available allocation amount
|
|
1184
|
+
* This operation retrieves the information of available allocation amount.
|
|
1185
|
+
* @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`
|
|
1186
|
+
* @param {String} source_account
|
|
1187
|
+
* @param {String} destination_account
|
|
1188
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentAllocationAmount}
|
|
1189
|
+
*/
|
|
1190
|
+
}, {
|
|
1191
|
+
key: "getAvailableAllocationAmount",
|
|
1192
|
+
value: function getAvailableAllocationAmount(token_id, source_account, destination_account) {
|
|
1193
|
+
return this.getAvailableAllocationAmountWithHttpInfo(token_id, source_account, destination_account).then(function (response_and_data) {
|
|
1194
|
+
return response_and_data.data;
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Get batch allocation by id
|
|
1200
|
+
* This operation retrieves the information of a batch allocation.
|
|
1201
|
+
* @param {String} batch_allocation_id The batch allocation ID.
|
|
1202
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchAllocationDetail} and HTTP response
|
|
1203
|
+
*/
|
|
1204
|
+
}, {
|
|
1205
|
+
key: "getBatchAllocationByIdWithHttpInfo",
|
|
1206
|
+
value: function getBatchAllocationByIdWithHttpInfo(batch_allocation_id) {
|
|
1207
|
+
var postBody = null;
|
|
1208
|
+
if (postBody && postBody.toJSON) {
|
|
1209
|
+
postBody = postBody.toJSON();
|
|
1210
|
+
}
|
|
1211
|
+
// verify the required parameter 'batch_allocation_id' is set
|
|
1212
|
+
if (batch_allocation_id === undefined || batch_allocation_id === null) {
|
|
1213
|
+
throw new Error("Missing the required parameter 'batch_allocation_id' when calling getBatchAllocationById");
|
|
1214
|
+
}
|
|
1215
|
+
var pathParams = {
|
|
1216
|
+
'batch_allocation_id': batch_allocation_id
|
|
1217
|
+
};
|
|
1218
|
+
var queryParams = {};
|
|
1219
|
+
var headerParams = {};
|
|
1220
|
+
var formParams = {};
|
|
1221
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1222
|
+
var contentTypes = [];
|
|
1223
|
+
var accepts = ['application/json'];
|
|
1224
|
+
var returnType = _BatchAllocationDetail["default"];
|
|
1225
|
+
return this.apiClient.callApi('/payments/batch_allocations/{batch_allocation_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Get batch allocation by id
|
|
1230
|
+
* This operation retrieves the information of a batch allocation.
|
|
1231
|
+
* @param {String} batch_allocation_id The batch allocation ID.
|
|
1232
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchAllocationDetail}
|
|
1233
|
+
*/
|
|
1234
|
+
}, {
|
|
1235
|
+
key: "getBatchAllocationById",
|
|
1236
|
+
value: function getBatchAllocationById(batch_allocation_id) {
|
|
1237
|
+
return this.getBatchAllocationByIdWithHttpInfo(batch_allocation_id).then(function (response_and_data) {
|
|
1238
|
+
return response_and_data.data;
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1047
1242
|
/**
|
|
1048
1243
|
* Get counterparty information
|
|
1049
1244
|
* This operation retrieves the detailed information about a specified counterparty.
|
|
@@ -1271,9 +1466,53 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1271
1466
|
});
|
|
1272
1467
|
}
|
|
1273
1468
|
|
|
1469
|
+
/**
|
|
1470
|
+
* Get payout information
|
|
1471
|
+
* This operation retrieves the information of a specific payout.
|
|
1472
|
+
* @param {String} payout_id The payout ID.
|
|
1473
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentPayoutDetail} and HTTP response
|
|
1474
|
+
*/
|
|
1475
|
+
}, {
|
|
1476
|
+
key: "getPayoutByIdWithHttpInfo",
|
|
1477
|
+
value: function getPayoutByIdWithHttpInfo(payout_id) {
|
|
1478
|
+
var postBody = null;
|
|
1479
|
+
if (postBody && postBody.toJSON) {
|
|
1480
|
+
postBody = postBody.toJSON();
|
|
1481
|
+
}
|
|
1482
|
+
// verify the required parameter 'payout_id' is set
|
|
1483
|
+
if (payout_id === undefined || payout_id === null) {
|
|
1484
|
+
throw new Error("Missing the required parameter 'payout_id' when calling getPayoutById");
|
|
1485
|
+
}
|
|
1486
|
+
var pathParams = {
|
|
1487
|
+
'payout_id': payout_id
|
|
1488
|
+
};
|
|
1489
|
+
var queryParams = {};
|
|
1490
|
+
var headerParams = {};
|
|
1491
|
+
var formParams = {};
|
|
1492
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1493
|
+
var contentTypes = [];
|
|
1494
|
+
var accepts = ['application/json'];
|
|
1495
|
+
var returnType = _PaymentPayoutDetail["default"];
|
|
1496
|
+
return this.apiClient.callApi('/payments/payouts/{payout_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Get payout information
|
|
1501
|
+
* This operation retrieves the information of a specific payout.
|
|
1502
|
+
* @param {String} payout_id The payout ID.
|
|
1503
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentPayoutDetail}
|
|
1504
|
+
*/
|
|
1505
|
+
}, {
|
|
1506
|
+
key: "getPayoutById",
|
|
1507
|
+
value: function getPayoutById(payout_id) {
|
|
1508
|
+
return this.getPayoutByIdWithHttpInfo(payout_id).then(function (response_and_data) {
|
|
1509
|
+
return response_and_data.data;
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1274
1513
|
/**
|
|
1275
1514
|
* Get developer balance
|
|
1276
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/
|
|
1515
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1277
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`
|
|
1278
1517
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
1279
1518
|
*/
|
|
@@ -1303,7 +1542,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1303
1542
|
|
|
1304
1543
|
/**
|
|
1305
1544
|
* Get developer balance
|
|
1306
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/
|
|
1545
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1307
1546
|
* @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`
|
|
1308
1547
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
1309
1548
|
*/
|
|
@@ -1368,7 +1607,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1368
1607
|
* @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.
|
|
1369
1608
|
* @param {String} [merchant_id] The merchant ID.
|
|
1370
1609
|
* @param {String} [request_id] The request ID.
|
|
1371
|
-
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
1610
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1372
1611
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
|
|
1373
1612
|
*/
|
|
1374
1613
|
}, {
|
|
@@ -1406,7 +1645,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1406
1645
|
* @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.
|
|
1407
1646
|
* @param {String} opts.merchant_id The merchant ID.
|
|
1408
1647
|
* @param {String} opts.request_id The request ID.
|
|
1409
|
-
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
1648
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1410
1649
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
|
|
1411
1650
|
*/
|
|
1412
1651
|
}, {
|
|
@@ -1567,6 +1806,67 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1567
1806
|
});
|
|
1568
1807
|
}
|
|
1569
1808
|
|
|
1809
|
+
/**
|
|
1810
|
+
* List all allocations
|
|
1811
|
+
* This operation retrieves the information of all allocations.
|
|
1812
|
+
* @param {Object} opts Optional parameters
|
|
1813
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1814
|
+
* @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.
|
|
1815
|
+
* @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.
|
|
1816
|
+
* @param {String} [source_account]
|
|
1817
|
+
* @param {String} [destination_account]
|
|
1818
|
+
* @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`
|
|
1819
|
+
* @param {String} [batch_allocation_id] The batch allocation ID.
|
|
1820
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAllocations200Response} and HTTP response
|
|
1821
|
+
*/
|
|
1822
|
+
}, {
|
|
1823
|
+
key: "listAllocationsWithHttpInfo",
|
|
1824
|
+
value: function listAllocationsWithHttpInfo(opts) {
|
|
1825
|
+
opts = opts || {};
|
|
1826
|
+
var postBody = null;
|
|
1827
|
+
if (postBody && postBody.toJSON) {
|
|
1828
|
+
postBody = postBody.toJSON();
|
|
1829
|
+
}
|
|
1830
|
+
var pathParams = {};
|
|
1831
|
+
var queryParams = {
|
|
1832
|
+
'limit': opts['limit'],
|
|
1833
|
+
'before': opts['before'],
|
|
1834
|
+
'after': opts['after'],
|
|
1835
|
+
'source_account': opts['source_account'],
|
|
1836
|
+
'destination_account': opts['destination_account'],
|
|
1837
|
+
'token_id': opts['token_id'],
|
|
1838
|
+
'batch_allocation_id': opts['batch_allocation_id']
|
|
1839
|
+
};
|
|
1840
|
+
var headerParams = {};
|
|
1841
|
+
var formParams = {};
|
|
1842
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1843
|
+
var contentTypes = [];
|
|
1844
|
+
var accepts = ['application/json'];
|
|
1845
|
+
var returnType = _ListAllocations200Response["default"];
|
|
1846
|
+
return this.apiClient.callApi('/payments/allocation_records', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* List all allocations
|
|
1851
|
+
* This operation retrieves the information of all allocations.
|
|
1852
|
+
* @param {Object} opts Optional parameters
|
|
1853
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1854
|
+
* @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.
|
|
1855
|
+
* @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.
|
|
1856
|
+
* @param {String} opts.source_account
|
|
1857
|
+
* @param {String} opts.destination_account
|
|
1858
|
+
* @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`
|
|
1859
|
+
* @param {String} opts.batch_allocation_id The batch allocation ID.
|
|
1860
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAllocations200Response}
|
|
1861
|
+
*/
|
|
1862
|
+
}, {
|
|
1863
|
+
key: "listAllocations",
|
|
1864
|
+
value: function listAllocations(opts) {
|
|
1865
|
+
return this.listAllocationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1866
|
+
return response_and_data.data;
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1570
1870
|
/**
|
|
1571
1871
|
* List all bank accounts
|
|
1572
1872
|
* 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.
|
|
@@ -1603,6 +1903,58 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1603
1903
|
});
|
|
1604
1904
|
}
|
|
1605
1905
|
|
|
1906
|
+
/**
|
|
1907
|
+
* List all batch allocations
|
|
1908
|
+
* This operation retrieves the information of all batch allocations.
|
|
1909
|
+
* @param {Object} opts Optional parameters
|
|
1910
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1911
|
+
* @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.
|
|
1912
|
+
* @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.
|
|
1913
|
+
* @param {String} [request_id] The request ID.
|
|
1914
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBatchAllocations200Response} and HTTP response
|
|
1915
|
+
*/
|
|
1916
|
+
}, {
|
|
1917
|
+
key: "listBatchAllocationsWithHttpInfo",
|
|
1918
|
+
value: function listBatchAllocationsWithHttpInfo(opts) {
|
|
1919
|
+
opts = opts || {};
|
|
1920
|
+
var postBody = null;
|
|
1921
|
+
if (postBody && postBody.toJSON) {
|
|
1922
|
+
postBody = postBody.toJSON();
|
|
1923
|
+
}
|
|
1924
|
+
var pathParams = {};
|
|
1925
|
+
var queryParams = {
|
|
1926
|
+
'limit': opts['limit'],
|
|
1927
|
+
'before': opts['before'],
|
|
1928
|
+
'after': opts['after'],
|
|
1929
|
+
'request_id': opts['request_id']
|
|
1930
|
+
};
|
|
1931
|
+
var headerParams = {};
|
|
1932
|
+
var formParams = {};
|
|
1933
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1934
|
+
var contentTypes = [];
|
|
1935
|
+
var accepts = ['application/json'];
|
|
1936
|
+
var returnType = _ListBatchAllocations200Response["default"];
|
|
1937
|
+
return this.apiClient.callApi('/payments/batch_allocations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* List all batch allocations
|
|
1942
|
+
* This operation retrieves the information of all batch allocations.
|
|
1943
|
+
* @param {Object} opts Optional parameters
|
|
1944
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1945
|
+
* @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.
|
|
1946
|
+
* @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.
|
|
1947
|
+
* @param {String} opts.request_id The request ID.
|
|
1948
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBatchAllocations200Response}
|
|
1949
|
+
*/
|
|
1950
|
+
}, {
|
|
1951
|
+
key: "listBatchAllocations",
|
|
1952
|
+
value: function listBatchAllocations(opts) {
|
|
1953
|
+
return this.listBatchAllocationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1954
|
+
return response_and_data.data;
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1606
1958
|
/**
|
|
1607
1959
|
* List all counterparties
|
|
1608
1960
|
* This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
@@ -1669,7 +2021,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1669
2021
|
* @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
2022
|
* @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
2023
|
* @param {String} [counterparty_id] The counterparty ID.
|
|
1672
|
-
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
2024
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
1673
2025
|
* @param {String} [wallet_address] The wallet address.
|
|
1674
2026
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCounterpartyWalletAddress200Response} and HTTP response
|
|
1675
2027
|
*/
|
|
@@ -1707,7 +2059,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1707
2059
|
* @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
2060
|
* @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
2061
|
* @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.
|
|
2062
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain.
|
|
1711
2063
|
* @param {String} opts.wallet_address The wallet address.
|
|
1712
2064
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCounterpartyWalletAddress200Response}
|
|
1713
2065
|
*/
|
|
@@ -1828,7 +2180,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1828
2180
|
* @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
2181
|
* @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
2182
|
* @param {String} [destination_id] The destination ID.
|
|
1831
|
-
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
2183
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
1832
2184
|
* @param {String} [wallet_address] The wallet address.
|
|
1833
2185
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinationWalletAddresses200Response} and HTTP response
|
|
1834
2186
|
*/
|
|
@@ -1866,7 +2218,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1866
2218
|
* @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
2219
|
* @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
2220
|
* @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.
|
|
2221
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain.
|
|
1870
2222
|
* @param {String} opts.wallet_address The wallet address.
|
|
1871
2223
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinationWalletAddresses200Response}
|
|
1872
2224
|
*/
|
|
@@ -1993,16 +2345,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1993
2345
|
|
|
1994
2346
|
/**
|
|
1995
2347
|
* List merchant balances
|
|
1996
|
-
* This operation retrieves the balance information for specified merchants.
|
|
2348
|
+
* This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1997
2349
|
* @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`
|
|
1998
|
-
* @param {module:model/AcquiringType} acquiring_type The payment acquisition type. - `Order`: Payers pay by fixed-amount orders. Ideal for specific purchases and one-time transactions. - `TopUp`: Account recharge flow where payers deposit funds to their dedicated top-up addresses. Ideal for flexible or usage-based payment models.
|
|
1999
2350
|
* @param {Object} opts Optional parameters
|
|
2000
2351
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
2352
|
+
* @param {module:model/AcquiringType} [acquiring_type]
|
|
2001
2353
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchantBalances200Response} and HTTP response
|
|
2002
2354
|
*/
|
|
2003
2355
|
}, {
|
|
2004
2356
|
key: "listMerchantBalancesWithHttpInfo",
|
|
2005
|
-
value: function listMerchantBalancesWithHttpInfo(token_id,
|
|
2357
|
+
value: function listMerchantBalancesWithHttpInfo(token_id, opts) {
|
|
2006
2358
|
opts = opts || {};
|
|
2007
2359
|
var postBody = null;
|
|
2008
2360
|
if (postBody && postBody.toJSON) {
|
|
@@ -2012,15 +2364,11 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2012
2364
|
if (token_id === undefined || token_id === null) {
|
|
2013
2365
|
throw new Error("Missing the required parameter 'token_id' when calling listMerchantBalances");
|
|
2014
2366
|
}
|
|
2015
|
-
// verify the required parameter 'acquiring_type' is set
|
|
2016
|
-
if (acquiring_type === undefined || acquiring_type === null) {
|
|
2017
|
-
throw new Error("Missing the required parameter 'acquiring_type' when calling listMerchantBalances");
|
|
2018
|
-
}
|
|
2019
2367
|
var pathParams = {};
|
|
2020
2368
|
var queryParams = {
|
|
2021
2369
|
'merchant_ids': opts['merchant_ids'],
|
|
2022
2370
|
'token_id': token_id,
|
|
2023
|
-
'acquiring_type': acquiring_type
|
|
2371
|
+
'acquiring_type': opts['acquiring_type']
|
|
2024
2372
|
};
|
|
2025
2373
|
var headerParams = {};
|
|
2026
2374
|
var formParams = {};
|
|
@@ -2033,17 +2381,17 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2033
2381
|
|
|
2034
2382
|
/**
|
|
2035
2383
|
* List merchant balances
|
|
2036
|
-
* This operation retrieves the balance information for specified merchants.
|
|
2384
|
+
* This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
2037
2385
|
* @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`
|
|
2038
|
-
* @param {module:model/AcquiringType} acquiring_type The payment acquisition type. - `Order`: Payers pay by fixed-amount orders. Ideal for specific purchases and one-time transactions. - `TopUp`: Account recharge flow where payers deposit funds to their dedicated top-up addresses. Ideal for flexible or usage-based payment models.
|
|
2039
2386
|
* @param {Object} opts Optional parameters
|
|
2040
2387
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
2388
|
+
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
2041
2389
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchantBalances200Response}
|
|
2042
2390
|
*/
|
|
2043
2391
|
}, {
|
|
2044
2392
|
key: "listMerchantBalances",
|
|
2045
|
-
value: function listMerchantBalances(token_id,
|
|
2046
|
-
return this.listMerchantBalancesWithHttpInfo(token_id,
|
|
2393
|
+
value: function listMerchantBalances(token_id, opts) {
|
|
2394
|
+
return this.listMerchantBalancesWithHttpInfo(token_id, opts).then(function (response_and_data) {
|
|
2047
2395
|
return response_and_data.data;
|
|
2048
2396
|
});
|
|
2049
2397
|
}
|
|
@@ -2115,7 +2463,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2115
2463
|
* @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.
|
|
2116
2464
|
* @param {String} [merchant_id] The merchant ID.
|
|
2117
2465
|
* @param {String} [psp_order_id] A unique reference code assigned by the developer to identify this order in their system.
|
|
2118
|
-
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2466
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2119
2467
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
2120
2468
|
*/
|
|
2121
2469
|
}, {
|
|
@@ -2153,7 +2501,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2153
2501
|
* @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.
|
|
2154
2502
|
* @param {String} opts.merchant_id The merchant ID.
|
|
2155
2503
|
* @param {String} opts.psp_order_id A unique reference code assigned by the developer to identify this order in their system.
|
|
2156
|
-
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2504
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2157
2505
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
2158
2506
|
*/
|
|
2159
2507
|
}, {
|
|
@@ -2250,6 +2598,113 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2250
2598
|
});
|
|
2251
2599
|
}
|
|
2252
2600
|
|
|
2601
|
+
/**
|
|
2602
|
+
* List all payout items
|
|
2603
|
+
* This operation retrieves the information of all payout items. You can filter the result by merchant ID or status.
|
|
2604
|
+
* @param {Object} opts Optional parameters
|
|
2605
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2606
|
+
* @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.
|
|
2607
|
+
* @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.
|
|
2608
|
+
* @param {String} [source_account]
|
|
2609
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2610
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPayoutItems200Response} and HTTP response
|
|
2611
|
+
*/
|
|
2612
|
+
}, {
|
|
2613
|
+
key: "listPayoutItemsWithHttpInfo",
|
|
2614
|
+
value: function listPayoutItemsWithHttpInfo(opts) {
|
|
2615
|
+
opts = opts || {};
|
|
2616
|
+
var postBody = null;
|
|
2617
|
+
if (postBody && postBody.toJSON) {
|
|
2618
|
+
postBody = postBody.toJSON();
|
|
2619
|
+
}
|
|
2620
|
+
var pathParams = {};
|
|
2621
|
+
var queryParams = {
|
|
2622
|
+
'limit': opts['limit'],
|
|
2623
|
+
'before': opts['before'],
|
|
2624
|
+
'after': opts['after'],
|
|
2625
|
+
'source_account': opts['source_account'],
|
|
2626
|
+
'statuses': opts['statuses']
|
|
2627
|
+
};
|
|
2628
|
+
var headerParams = {};
|
|
2629
|
+
var formParams = {};
|
|
2630
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2631
|
+
var contentTypes = [];
|
|
2632
|
+
var accepts = ['application/json'];
|
|
2633
|
+
var returnType = _ListPayoutItems200Response["default"];
|
|
2634
|
+
return this.apiClient.callApi('/payments/payout_items', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* List all payout items
|
|
2639
|
+
* This operation retrieves the information of all payout items. You can filter the result by merchant ID or status.
|
|
2640
|
+
* @param {Object} opts Optional parameters
|
|
2641
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2642
|
+
* @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.
|
|
2643
|
+
* @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.
|
|
2644
|
+
* @param {String} opts.source_account
|
|
2645
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2646
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPayoutItems200Response}
|
|
2647
|
+
*/
|
|
2648
|
+
}, {
|
|
2649
|
+
key: "listPayoutItems",
|
|
2650
|
+
value: function listPayoutItems(opts) {
|
|
2651
|
+
return this.listPayoutItemsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2652
|
+
return response_and_data.data;
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
/**
|
|
2657
|
+
* List all payouts
|
|
2658
|
+
* This operation retrieves the information of all payouts.
|
|
2659
|
+
* @param {Object} opts Optional parameters
|
|
2660
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2661
|
+
* @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.
|
|
2662
|
+
* @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.
|
|
2663
|
+
* @param {String} [request_id] The request ID.
|
|
2664
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPayouts200Response} and HTTP response
|
|
2665
|
+
*/
|
|
2666
|
+
}, {
|
|
2667
|
+
key: "listPayoutsWithHttpInfo",
|
|
2668
|
+
value: function listPayoutsWithHttpInfo(opts) {
|
|
2669
|
+
opts = opts || {};
|
|
2670
|
+
var postBody = null;
|
|
2671
|
+
if (postBody && postBody.toJSON) {
|
|
2672
|
+
postBody = postBody.toJSON();
|
|
2673
|
+
}
|
|
2674
|
+
var pathParams = {};
|
|
2675
|
+
var queryParams = {
|
|
2676
|
+
'limit': opts['limit'],
|
|
2677
|
+
'before': opts['before'],
|
|
2678
|
+
'after': opts['after'],
|
|
2679
|
+
'request_id': opts['request_id']
|
|
2680
|
+
};
|
|
2681
|
+
var headerParams = {};
|
|
2682
|
+
var formParams = {};
|
|
2683
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2684
|
+
var contentTypes = [];
|
|
2685
|
+
var accepts = ['application/json'];
|
|
2686
|
+
var returnType = _ListPayouts200Response["default"];
|
|
2687
|
+
return this.apiClient.callApi('/payments/payouts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* List all payouts
|
|
2692
|
+
* This operation retrieves the information of all payouts.
|
|
2693
|
+
* @param {Object} opts Optional parameters
|
|
2694
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2695
|
+
* @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.
|
|
2696
|
+
* @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.
|
|
2697
|
+
* @param {String} opts.request_id The request ID.
|
|
2698
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPayouts200Response}
|
|
2699
|
+
*/
|
|
2700
|
+
}, {
|
|
2701
|
+
key: "listPayouts",
|
|
2702
|
+
value: function listPayouts(opts) {
|
|
2703
|
+
return this.listPayoutsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2704
|
+
return response_and_data.data;
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2253
2708
|
/**
|
|
2254
2709
|
* List all settlement details
|
|
2255
2710
|
* This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status.
|
|
@@ -2258,7 +2713,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2258
2713
|
* @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.
|
|
2259
2714
|
* @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.
|
|
2260
2715
|
* @param {String} [merchant_id] The merchant ID.
|
|
2261
|
-
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2716
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2262
2717
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementDetails200Response} and HTTP response
|
|
2263
2718
|
*/
|
|
2264
2719
|
}, {
|
|
@@ -2294,7 +2749,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
2294
2749
|
* @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.
|
|
2295
2750
|
* @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.
|
|
2296
2751
|
* @param {String} opts.merchant_id The merchant ID.
|
|
2297
|
-
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2752
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2298
2753
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementDetails200Response}
|
|
2299
2754
|
*/
|
|
2300
2755
|
}, {
|