@cobo/cobo-waas2 1.23.0 → 1.24.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 +45 -6
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +194 -47
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +224 -14
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateMerchantRequest.js +13 -6
- package/dist/model/CreatePaymentOrderRequest.js +14 -1
- package/dist/model/CreateSettlement.js +2 -2
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedFILFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedSOLFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
- package/dist/model/FeeStationGasStationType.js +61 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
- package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
- package/dist/model/Merchant.js +9 -0
- package/dist/model/MerchantBalance.js +3 -3
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +107 -0
- package/dist/model/{RawMessageSignDestination.js → PaymentEstimateFeeRequest.js} +51 -37
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentRefundEventData.js +22 -2
- package/dist/model/PaymentSettlementEvent.js +62 -6
- package/dist/model/PspBalance.js +3 -3
- package/dist/model/Refund.js +17 -1
- package/dist/model/SettleRequestStatus.js +5 -0
- package/dist/model/Settlement.js +45 -3
- package/dist/model/SettlementDetail.js +33 -1
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
- package/dist/model/SolContractCallDestination.js +30 -0
- package/dist/model/StellarContractCallContractParam.js +164 -0
- package/dist/model/StellarContractCallContractType.js +56 -0
- package/dist/model/StellarContractCallDestination.js +125 -0
- package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
- package/dist/model/StellarContractCallTrustLineParam.js +133 -0
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SwapActivity.js +9 -9
- package/dist/model/SwapActivityApprovers.js +1 -1
- package/dist/model/SwapActivityDetail.js +34 -18
- package/dist/model/SwapActivitySigners.js +2 -2
- package/dist/model/SwapActivityTimeline.js +5 -5
- package/dist/model/SwapEstimateFee.js +147 -0
- package/dist/model/SwapQuote.js +18 -31
- package/dist/model/SwapReceivingTransaction.js +133 -0
- package/dist/model/SwapToken.js +9 -9
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionDestination.js +48 -8
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionEvmLegacyFee.js +1 -1
- package/dist/model/TransactionFILFee.js +1 -1
- package/dist/model/TransactionFixedFee.js +1 -1
- package/dist/model/TransactionFuelingInfo.js +13 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFILFee.js +1 -1
- package/dist/model/TransactionRequestSOLFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSOLFee.js +1 -1
- package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
- package/dist/model/TransactionSolContractDestination.js +30 -0
- package/dist/model/TransactionStellarContractParam.js +164 -0
- package/dist/model/TransactionStellarContractType.js +56 -0
- package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
- package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
- package/dist/model/TransactionStellarTrustLineParam.js +133 -0
- package/dist/model/TransactionUtxoFee.js +1 -1
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +19 -1
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/BridgingFee.md +11 -0
- package/docs/CommissionFee.md +9 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateMerchantRequest.md +2 -1
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/FeeStationApi.md +53 -0
- package/docs/FeeStationCheckFeeStationUsage.md +14 -0
- package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
- package/docs/FeeStationGasStationType.md +12 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/Merchant.md +1 -0
- package/docs/MerchantBalance.md +3 -3
- package/docs/MessageSignDestination.md +0 -1
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentApi.md +196 -21
- package/docs/PaymentEstimateFee.md +10 -0
- package/docs/PaymentEstimateFee201Response.md +9 -0
- package/docs/PaymentEstimateFeeRequest.md +10 -0
- package/docs/PaymentEstimatedFee.md +13 -0
- package/docs/PaymentFeeType.md +16 -0
- package/docs/PaymentRefundEventData.md +2 -1
- package/docs/PaymentSettlementEvent.md +6 -3
- package/docs/PspBalance.md +3 -3
- package/docs/Refund.md +2 -1
- package/docs/SettleRequestStatus.md +2 -0
- package/docs/Settlement.md +6 -3
- package/docs/SettlementDetail.md +3 -1
- package/docs/SettlementInfo.md +6 -6
- package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
- package/docs/SolContractCallDestination.md +1 -0
- package/docs/StellarContractCallContractParam.md +11 -0
- package/docs/StellarContractCallContractType.md +10 -0
- package/docs/StellarContractCallDestination.md +10 -0
- package/docs/StellarContractCallTrustLineOperationType.md +10 -0
- package/docs/StellarContractCallTrustLineParam.md +11 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SwapActivity.md +9 -9
- package/docs/SwapActivityDetail.md +10 -9
- package/docs/SwapActivitySigners.md +1 -1
- package/docs/SwapActivityTimeline.md +3 -3
- package/docs/SwapEstimateFee.md +12 -0
- package/docs/SwapQuote.md +10 -11
- package/docs/SwapReceivingTransaction.md +11 -0
- package/docs/SwapToken.md +6 -6
- package/docs/SwapsApi.md +356 -0
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionDestination.md +2 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionFuelingInfo.md +1 -0
- package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
- package/docs/TransactionSolContractDestination.md +1 -0
- package/docs/TransactionStellarContractParam.md +11 -0
- package/docs/TransactionStellarContractType.md +10 -0
- package/docs/TransactionStellarDestination.md +10 -0
- package/docs/TransactionStellarTrustLineOperationType.md +10 -0
- package/docs/TransactionStellarTrustLineParam.md +11 -0
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WebhookEventData.md +4 -1
- package/package.json +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -27,19 +27,24 @@ var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/Lis
|
|
|
27
27
|
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
28
28
|
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
29
29
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
30
|
+
var _ListTopUpPayerAccounts200Response = _interopRequireDefault(require("../model/ListTopUpPayerAccounts200Response"));
|
|
30
31
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
31
32
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
32
33
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
34
|
+
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
35
|
+
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
33
36
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
34
37
|
var _ReceivedAmountPerAddress = _interopRequireDefault(require("../model/ReceivedAmountPerAddress"));
|
|
35
38
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
36
39
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
37
40
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
38
41
|
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
42
|
+
var _UpdateBankAccountByIdRequest = _interopRequireDefault(require("../model/UpdateBankAccountByIdRequest"));
|
|
39
43
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
40
44
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
41
45
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
42
46
|
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
47
|
+
var _WalletSetup = _interopRequireDefault(require("../model/WalletSetup"));
|
|
43
48
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
44
49
|
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); }
|
|
45
50
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -119,7 +124,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
119
124
|
|
|
120
125
|
/**
|
|
121
126
|
* Create crypto address
|
|
122
|
-
* This operation registers a crypto address for crypto
|
|
127
|
+
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
123
128
|
* @param {Object} opts Optional parameters
|
|
124
129
|
* @param {module:model/CreateCryptoAddressRequest} [CreateCryptoAddressRequest] The request body to register a crypto address.
|
|
125
130
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CryptoAddress} and HTTP response
|
|
@@ -145,7 +150,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
145
150
|
|
|
146
151
|
/**
|
|
147
152
|
* Create crypto address
|
|
148
|
-
* This operation registers a crypto address for crypto
|
|
153
|
+
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
149
154
|
* @param {Object} opts Optional parameters
|
|
150
155
|
* @param {module:model/CreateCryptoAddressRequest} opts.CreateCryptoAddressRequest The request body to register a crypto address.
|
|
151
156
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CryptoAddress}
|
|
@@ -160,7 +165,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
160
165
|
|
|
161
166
|
/**
|
|
162
167
|
* Create forced sweep
|
|
163
|
-
* This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
168
|
+
* <Warning>This operation has been deprecated.</Warning> This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
164
169
|
* @param {Object} opts Optional parameters
|
|
165
170
|
* @param {module:model/ForcedSweepRequest} [ForcedSweepRequest] The request body for forced sweep.
|
|
166
171
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ForcedSweep} and HTTP response
|
|
@@ -186,7 +191,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
186
191
|
|
|
187
192
|
/**
|
|
188
193
|
* Create forced sweep
|
|
189
|
-
* This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
194
|
+
* <Warning>This operation has been deprecated.</Warning> This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
190
195
|
* @param {Object} opts Optional parameters
|
|
191
196
|
* @param {module:model/ForcedSweepRequest} opts.ForcedSweepRequest The request body for forced sweep.
|
|
192
197
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ForcedSweep}
|
|
@@ -461,22 +466,20 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
461
466
|
/**
|
|
462
467
|
* Get payer balance
|
|
463
468
|
* This operation retrieves the total amount received for a specific payer. The information is grouped by token and receiving address.
|
|
464
|
-
* @param {String} merchant_id The merchant ID.
|
|
465
469
|
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
466
470
|
* @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`
|
|
471
|
+
* @param {Object} opts Optional parameters
|
|
472
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
467
473
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ReceivedAmountPerAddress>} and HTTP response
|
|
468
474
|
*/
|
|
469
475
|
}, {
|
|
470
476
|
key: "getPayerBalanceByAddressWithHttpInfo",
|
|
471
|
-
value: function getPayerBalanceByAddressWithHttpInfo(
|
|
477
|
+
value: function getPayerBalanceByAddressWithHttpInfo(payer_id, token_id, opts) {
|
|
478
|
+
opts = opts || {};
|
|
472
479
|
var postBody = null;
|
|
473
480
|
if (postBody && postBody.toJSON) {
|
|
474
481
|
postBody = postBody.toJSON();
|
|
475
482
|
}
|
|
476
|
-
// verify the required parameter 'merchant_id' is set
|
|
477
|
-
if (merchant_id === undefined || merchant_id === null) {
|
|
478
|
-
throw new Error("Missing the required parameter 'merchant_id' when calling getPayerBalanceByAddress");
|
|
479
|
-
}
|
|
480
483
|
// verify the required parameter 'payer_id' is set
|
|
481
484
|
if (payer_id === undefined || payer_id === null) {
|
|
482
485
|
throw new Error("Missing the required parameter 'payer_id' when calling getPayerBalanceByAddress");
|
|
@@ -487,7 +490,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
487
490
|
}
|
|
488
491
|
var pathParams = {};
|
|
489
492
|
var queryParams = {
|
|
490
|
-
'merchant_id': merchant_id,
|
|
493
|
+
'merchant_id': opts['merchant_id'],
|
|
491
494
|
'payer_id': payer_id,
|
|
492
495
|
'token_id': token_id
|
|
493
496
|
};
|
|
@@ -503,15 +506,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
503
506
|
/**
|
|
504
507
|
* Get payer balance
|
|
505
508
|
* This operation retrieves the total amount received for a specific payer. The information is grouped by token and receiving address.
|
|
506
|
-
* @param {String} merchant_id The merchant ID.
|
|
507
509
|
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
508
510
|
* @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`
|
|
511
|
+
* @param {Object} opts Optional parameters
|
|
512
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
509
513
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ReceivedAmountPerAddress>}
|
|
510
514
|
*/
|
|
511
515
|
}, {
|
|
512
516
|
key: "getPayerBalanceByAddress",
|
|
513
|
-
value: function getPayerBalanceByAddress(
|
|
514
|
-
return this.getPayerBalanceByAddressWithHttpInfo(
|
|
517
|
+
value: function getPayerBalanceByAddress(payer_id, token_id, opts) {
|
|
518
|
+
return this.getPayerBalanceByAddressWithHttpInfo(payer_id, token_id, opts).then(function (response_and_data) {
|
|
515
519
|
return response_and_data.data;
|
|
516
520
|
});
|
|
517
521
|
}
|
|
@@ -562,7 +566,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
562
566
|
|
|
563
567
|
/**
|
|
564
568
|
* Get developer balance
|
|
565
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token.
|
|
569
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Amounts and Balances](/v2/payments/amounts-and-balances)
|
|
566
570
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
567
571
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
568
572
|
*/
|
|
@@ -592,7 +596,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
592
596
|
|
|
593
597
|
/**
|
|
594
598
|
* Get developer balance
|
|
595
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token.
|
|
599
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Amounts and Balances](/v2/payments/amounts-and-balances)
|
|
596
600
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
597
601
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
598
602
|
*/
|
|
@@ -752,7 +756,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
752
756
|
|
|
753
757
|
/**
|
|
754
758
|
* Get withdrawable balances
|
|
755
|
-
* This operation retrieves the balances of specified merchants or the developer.
|
|
759
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
756
760
|
* @param {Object} opts Optional parameters
|
|
757
761
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
758
762
|
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
@@ -784,7 +788,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
784
788
|
|
|
785
789
|
/**
|
|
786
790
|
* Get withdrawable balances
|
|
787
|
-
* This operation retrieves the balances of specified merchants or the developer.
|
|
791
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
788
792
|
* @param {Object} opts Optional parameters
|
|
789
793
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
790
794
|
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
@@ -802,22 +806,20 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
802
806
|
/**
|
|
803
807
|
* Get top-up address
|
|
804
808
|
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
805
|
-
* @param {String} merchant_id The merchant ID.
|
|
806
809
|
* @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`
|
|
807
810
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
811
|
+
* @param {Object} opts Optional parameters
|
|
812
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
808
813
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
809
814
|
*/
|
|
810
815
|
}, {
|
|
811
816
|
key: "getTopUpAddressWithHttpInfo",
|
|
812
|
-
value: function getTopUpAddressWithHttpInfo(
|
|
817
|
+
value: function getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts) {
|
|
818
|
+
opts = opts || {};
|
|
813
819
|
var postBody = null;
|
|
814
820
|
if (postBody && postBody.toJSON) {
|
|
815
821
|
postBody = postBody.toJSON();
|
|
816
822
|
}
|
|
817
|
-
// verify the required parameter 'merchant_id' is set
|
|
818
|
-
if (merchant_id === undefined || merchant_id === null) {
|
|
819
|
-
throw new Error("Missing the required parameter 'merchant_id' when calling getTopUpAddress");
|
|
820
|
-
}
|
|
821
823
|
// verify the required parameter 'token_id' is set
|
|
822
824
|
if (token_id === undefined || token_id === null) {
|
|
823
825
|
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
@@ -828,7 +830,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
828
830
|
}
|
|
829
831
|
var pathParams = {};
|
|
830
832
|
var queryParams = {
|
|
831
|
-
'merchant_id': merchant_id,
|
|
833
|
+
'merchant_id': opts['merchant_id'],
|
|
832
834
|
'token_id': token_id,
|
|
833
835
|
'custom_payer_id': custom_payer_id
|
|
834
836
|
};
|
|
@@ -844,15 +846,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
844
846
|
/**
|
|
845
847
|
* Get top-up address
|
|
846
848
|
* This operation retrieves the information of the dedicated top-up address assigned to a specific payer under a merchant on a specified chain.
|
|
847
|
-
* @param {String} merchant_id The merchant ID.
|
|
848
849
|
* @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`
|
|
849
850
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
851
|
+
* @param {Object} opts Optional parameters
|
|
852
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
850
853
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
851
854
|
*/
|
|
852
855
|
}, {
|
|
853
856
|
key: "getTopUpAddress",
|
|
854
|
-
value: function getTopUpAddress(
|
|
855
|
-
return this.getTopUpAddressWithHttpInfo(
|
|
857
|
+
value: function getTopUpAddress(token_id, custom_payer_id, opts) {
|
|
858
|
+
return this.getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts).then(function (response_and_data) {
|
|
856
859
|
return response_and_data.data;
|
|
857
860
|
});
|
|
858
861
|
}
|
|
@@ -895,7 +898,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
895
898
|
|
|
896
899
|
/**
|
|
897
900
|
* List crypto addresses
|
|
898
|
-
* This operation retrieves a list of crypto addresses registered for crypto
|
|
901
|
+
* This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
899
902
|
* @param {Object} opts Optional parameters
|
|
900
903
|
* @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`
|
|
901
904
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
@@ -923,7 +926,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
923
926
|
|
|
924
927
|
/**
|
|
925
928
|
* List crypto addresses
|
|
926
|
-
* This operation retrieves a list of crypto addresses registered for crypto
|
|
929
|
+
* This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
927
930
|
* @param {Object} opts Optional parameters
|
|
928
931
|
* @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`
|
|
929
932
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
@@ -938,7 +941,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
938
941
|
|
|
939
942
|
/**
|
|
940
943
|
* List forced sweeps
|
|
941
|
-
* This operation retrieves the information of all forced sweeps.
|
|
944
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the information of all forced sweeps.
|
|
942
945
|
* @param {Object} opts Optional parameters
|
|
943
946
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
944
947
|
* @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.
|
|
@@ -972,7 +975,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
972
975
|
|
|
973
976
|
/**
|
|
974
977
|
* List forced sweeps
|
|
975
|
-
* This operation retrieves the information of all forced sweeps.
|
|
978
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the information of all forced sweeps.
|
|
976
979
|
* @param {Object} opts Optional parameters
|
|
977
980
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
978
981
|
* @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.
|
|
@@ -990,7 +993,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
990
993
|
|
|
991
994
|
/**
|
|
992
995
|
* List merchant balances
|
|
993
|
-
*
|
|
996
|
+
* 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 [Amounts and Balances](/v2/payments/amounts-and-balances)
|
|
994
997
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
995
998
|
* @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.
|
|
996
999
|
* @param {Object} opts Optional parameters
|
|
@@ -1030,7 +1033,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1030
1033
|
|
|
1031
1034
|
/**
|
|
1032
1035
|
* List merchant balances
|
|
1033
|
-
*
|
|
1036
|
+
* 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 [Amounts and Balances](/v2/payments/amounts-and-balances)
|
|
1034
1037
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1035
1038
|
* @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.
|
|
1036
1039
|
* @param {Object} opts Optional parameters
|
|
@@ -1054,6 +1057,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1054
1057
|
* @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.
|
|
1055
1058
|
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1056
1059
|
* @param {String} [wallet_id] The wallet ID.
|
|
1060
|
+
* @param {module:model/WalletSetup} [wallet_setup] WalletSetup defines the type of funds used in the merchant account, either \"Shared\" or \"Separate\" is allowed when creating a merchant: - `Default`: Wallet of psp owned default merchant. - `Shared`: Shared wallet of non-psp owned merchants. - `Separate`: Separate wallet of non-psp owned merchants.
|
|
1057
1061
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchants200Response} and HTTP response
|
|
1058
1062
|
*/
|
|
1059
1063
|
}, {
|
|
@@ -1070,7 +1074,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1070
1074
|
'before': opts['before'],
|
|
1071
1075
|
'after': opts['after'],
|
|
1072
1076
|
'keyword': opts['keyword'],
|
|
1073
|
-
'wallet_id': opts['wallet_id']
|
|
1077
|
+
'wallet_id': opts['wallet_id'],
|
|
1078
|
+
'wallet_setup': opts['wallet_setup']
|
|
1074
1079
|
};
|
|
1075
1080
|
var headerParams = {};
|
|
1076
1081
|
var formParams = {};
|
|
@@ -1090,6 +1095,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1090
1095
|
* @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.
|
|
1091
1096
|
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
1092
1097
|
* @param {String} opts.wallet_id The wallet ID.
|
|
1098
|
+
* @param {module:model/WalletSetup} opts.wallet_setup WalletSetup defines the type of funds used in the merchant account, either \"Shared\" or \"Separate\" is allowed when creating a merchant: - `Default`: Wallet of psp owned default merchant. - `Shared`: Shared wallet of non-psp owned merchants. - `Separate`: Separate wallet of non-psp owned merchants.
|
|
1093
1099
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchants200Response}
|
|
1094
1100
|
*/
|
|
1095
1101
|
}, {
|
|
@@ -1196,7 +1202,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1196
1202
|
|
|
1197
1203
|
/**
|
|
1198
1204
|
* List payment wallet balances
|
|
1199
|
-
* This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned.
|
|
1205
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned.
|
|
1200
1206
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1201
1207
|
* @param {Object} opts Optional parameters
|
|
1202
1208
|
* @param {String} [wallet_ids] A list of wallet IDs to query.
|
|
@@ -1230,7 +1236,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1230
1236
|
|
|
1231
1237
|
/**
|
|
1232
1238
|
* List payment wallet balances
|
|
1233
|
-
* This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned.
|
|
1239
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned.
|
|
1234
1240
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1235
1241
|
* @param {Object} opts Optional parameters
|
|
1236
1242
|
* @param {String} opts.wallet_ids A list of wallet IDs to query.
|
|
@@ -1351,35 +1357,86 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1351
1357
|
});
|
|
1352
1358
|
}
|
|
1353
1359
|
|
|
1360
|
+
/**
|
|
1361
|
+
* List top-up payer accounts
|
|
1362
|
+
* This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id.
|
|
1363
|
+
* @param {Object} opts Optional parameters
|
|
1364
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1365
|
+
* @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.
|
|
1366
|
+
* @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.
|
|
1367
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1368
|
+
* @param {String} [payer_id] A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1369
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTopUpPayerAccounts200Response} and HTTP response
|
|
1370
|
+
*/
|
|
1371
|
+
}, {
|
|
1372
|
+
key: "listTopUpPayerAccountsWithHttpInfo",
|
|
1373
|
+
value: function listTopUpPayerAccountsWithHttpInfo(opts) {
|
|
1374
|
+
opts = opts || {};
|
|
1375
|
+
var postBody = null;
|
|
1376
|
+
if (postBody && postBody.toJSON) {
|
|
1377
|
+
postBody = postBody.toJSON();
|
|
1378
|
+
}
|
|
1379
|
+
var pathParams = {};
|
|
1380
|
+
var queryParams = {
|
|
1381
|
+
'limit': opts['limit'],
|
|
1382
|
+
'before': opts['before'],
|
|
1383
|
+
'after': opts['after'],
|
|
1384
|
+
'merchant_id': opts['merchant_id'],
|
|
1385
|
+
'payer_id': opts['payer_id']
|
|
1386
|
+
};
|
|
1387
|
+
var headerParams = {};
|
|
1388
|
+
var formParams = {};
|
|
1389
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1390
|
+
var contentTypes = [];
|
|
1391
|
+
var accepts = ['application/json'];
|
|
1392
|
+
var returnType = _ListTopUpPayerAccounts200Response["default"];
|
|
1393
|
+
return this.apiClient.callApi('/payments/topup/payer_accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* List top-up payer accounts
|
|
1398
|
+
* This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id.
|
|
1399
|
+
* @param {Object} opts Optional parameters
|
|
1400
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1401
|
+
* @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.
|
|
1402
|
+
* @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.
|
|
1403
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1404
|
+
* @param {String} opts.payer_id A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1405
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTopUpPayerAccounts200Response}
|
|
1406
|
+
*/
|
|
1407
|
+
}, {
|
|
1408
|
+
key: "listTopUpPayerAccounts",
|
|
1409
|
+
value: function listTopUpPayerAccounts(opts) {
|
|
1410
|
+
return this.listTopUpPayerAccountsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1411
|
+
return response_and_data.data;
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1354
1415
|
/**
|
|
1355
1416
|
* List payers
|
|
1356
1417
|
* This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID.
|
|
1357
|
-
* @param {String} merchant_id The merchant ID.
|
|
1358
1418
|
* @param {Object} opts Optional parameters
|
|
1359
1419
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1360
1420
|
* @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.
|
|
1361
1421
|
* @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.
|
|
1422
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1362
1423
|
* @param {String} [payer_id] A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1363
1424
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTopUpPayers200Response} and HTTP response
|
|
1364
1425
|
*/
|
|
1365
1426
|
}, {
|
|
1366
1427
|
key: "listTopUpPayersWithHttpInfo",
|
|
1367
|
-
value: function listTopUpPayersWithHttpInfo(
|
|
1428
|
+
value: function listTopUpPayersWithHttpInfo(opts) {
|
|
1368
1429
|
opts = opts || {};
|
|
1369
1430
|
var postBody = null;
|
|
1370
1431
|
if (postBody && postBody.toJSON) {
|
|
1371
1432
|
postBody = postBody.toJSON();
|
|
1372
1433
|
}
|
|
1373
|
-
// verify the required parameter 'merchant_id' is set
|
|
1374
|
-
if (merchant_id === undefined || merchant_id === null) {
|
|
1375
|
-
throw new Error("Missing the required parameter 'merchant_id' when calling listTopUpPayers");
|
|
1376
|
-
}
|
|
1377
1434
|
var pathParams = {};
|
|
1378
1435
|
var queryParams = {
|
|
1379
1436
|
'limit': opts['limit'],
|
|
1380
1437
|
'before': opts['before'],
|
|
1381
1438
|
'after': opts['after'],
|
|
1382
|
-
'merchant_id': merchant_id,
|
|
1439
|
+
'merchant_id': opts['merchant_id'],
|
|
1383
1440
|
'payer_id': opts['payer_id']
|
|
1384
1441
|
};
|
|
1385
1442
|
var headerParams = {};
|
|
@@ -1394,18 +1451,108 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1394
1451
|
/**
|
|
1395
1452
|
* List payers
|
|
1396
1453
|
* This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID.
|
|
1397
|
-
* @param {String} merchant_id The merchant ID.
|
|
1398
1454
|
* @param {Object} opts Optional parameters
|
|
1399
1455
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1400
1456
|
* @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.
|
|
1401
1457
|
* @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.
|
|
1458
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1402
1459
|
* @param {String} opts.payer_id A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1403
1460
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTopUpPayers200Response}
|
|
1404
1461
|
*/
|
|
1405
1462
|
}, {
|
|
1406
1463
|
key: "listTopUpPayers",
|
|
1407
|
-
value: function listTopUpPayers(
|
|
1408
|
-
return this.listTopUpPayersWithHttpInfo(
|
|
1464
|
+
value: function listTopUpPayers(opts) {
|
|
1465
|
+
return this.listTopUpPayersWithHttpInfo(opts).then(function (response_and_data) {
|
|
1466
|
+
return response_and_data.data;
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* Payment estimate fee
|
|
1472
|
+
* This operation to payment estimate fee.
|
|
1473
|
+
* @param {Object} opts Optional parameters
|
|
1474
|
+
* @param {module:model/PaymentEstimateFeeRequest} [PaymentEstimateFeeRequest] The request body to create a estimated fee request.
|
|
1475
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentEstimateFee201Response} and HTTP response
|
|
1476
|
+
*/
|
|
1477
|
+
}, {
|
|
1478
|
+
key: "paymentEstimateFeeWithHttpInfo",
|
|
1479
|
+
value: function paymentEstimateFeeWithHttpInfo(opts) {
|
|
1480
|
+
opts = opts || {};
|
|
1481
|
+
var postBody = opts['PaymentEstimateFeeRequest'];
|
|
1482
|
+
if (postBody && postBody.toJSON) {
|
|
1483
|
+
postBody = postBody.toJSON();
|
|
1484
|
+
}
|
|
1485
|
+
var pathParams = {};
|
|
1486
|
+
var queryParams = {};
|
|
1487
|
+
var headerParams = {};
|
|
1488
|
+
var formParams = {};
|
|
1489
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1490
|
+
var contentTypes = ['application/json'];
|
|
1491
|
+
var accepts = ['application/json'];
|
|
1492
|
+
var returnType = _PaymentEstimateFee201Response["default"];
|
|
1493
|
+
return this.apiClient.callApi('/payments/estimate_fee', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/**
|
|
1497
|
+
* Payment estimate fee
|
|
1498
|
+
* This operation to payment estimate fee.
|
|
1499
|
+
* @param {Object} opts Optional parameters
|
|
1500
|
+
* @param {module:model/PaymentEstimateFeeRequest} opts.PaymentEstimateFeeRequest The request body to create a estimated fee request.
|
|
1501
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentEstimateFee201Response}
|
|
1502
|
+
*/
|
|
1503
|
+
}, {
|
|
1504
|
+
key: "paymentEstimateFee",
|
|
1505
|
+
value: function paymentEstimateFee(opts) {
|
|
1506
|
+
return this.paymentEstimateFeeWithHttpInfo(opts).then(function (response_and_data) {
|
|
1507
|
+
return response_and_data.data;
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Update bank account
|
|
1513
|
+
* This operation updates the information of an existing bank account.
|
|
1514
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1515
|
+
* @param {Object} opts Optional parameters
|
|
1516
|
+
* @param {module:model/UpdateBankAccountByIdRequest} [UpdateBankAccountByIdRequest] The request body for updating an existing bank account.
|
|
1517
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
|
|
1518
|
+
*/
|
|
1519
|
+
}, {
|
|
1520
|
+
key: "updateBankAccountByIdWithHttpInfo",
|
|
1521
|
+
value: function updateBankAccountByIdWithHttpInfo(bank_account_id, opts) {
|
|
1522
|
+
opts = opts || {};
|
|
1523
|
+
var postBody = opts['UpdateBankAccountByIdRequest'];
|
|
1524
|
+
if (postBody && postBody.toJSON) {
|
|
1525
|
+
postBody = postBody.toJSON();
|
|
1526
|
+
}
|
|
1527
|
+
// verify the required parameter 'bank_account_id' is set
|
|
1528
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
1529
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling updateBankAccountById");
|
|
1530
|
+
}
|
|
1531
|
+
var pathParams = {
|
|
1532
|
+
'bank_account_id': bank_account_id
|
|
1533
|
+
};
|
|
1534
|
+
var queryParams = {};
|
|
1535
|
+
var headerParams = {};
|
|
1536
|
+
var formParams = {};
|
|
1537
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1538
|
+
var contentTypes = ['application/json'];
|
|
1539
|
+
var accepts = ['application/json'];
|
|
1540
|
+
var returnType = _BankAccount["default"];
|
|
1541
|
+
return this.apiClient.callApi('/payments/bank_accounts/{bank_account_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Update bank account
|
|
1546
|
+
* This operation updates the information of an existing bank account.
|
|
1547
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1548
|
+
* @param {Object} opts Optional parameters
|
|
1549
|
+
* @param {module:model/UpdateBankAccountByIdRequest} opts.UpdateBankAccountByIdRequest The request body for updating an existing bank account.
|
|
1550
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
|
|
1551
|
+
*/
|
|
1552
|
+
}, {
|
|
1553
|
+
key: "updateBankAccountById",
|
|
1554
|
+
value: function updateBankAccountById(bank_account_id, opts) {
|
|
1555
|
+
return this.updateBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
|
|
1409
1556
|
return response_and_data.data;
|
|
1410
1557
|
});
|
|
1411
1558
|
}
|