@cobo/cobo-waas2 1.23.0 → 1.25.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 +68 -6
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/ComplianceApi.js +132 -2
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +246 -56
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +336 -14
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +305 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateMerchantRequest.js +15 -8
- package/dist/model/CreateOrderLinkRequest.js +129 -0
- package/dist/model/CreatePaymentOrderRequest.js +27 -1
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSettlement.js +3 -29
- 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/FundsStatusType.js +111 -0
- package/dist/model/KytScreeningsDecisionsType.js +71 -0
- package/dist/model/KytScreeningsEventData.js +155 -0
- package/dist/model/KytScreeningsReviewType.js +61 -0
- package/dist/model/KytScreeningsTransaction.js +144 -0
- package/dist/model/KytScreeningsTransactionType.js +61 -0
- package/dist/model/Link.js +125 -0
- package/dist/model/LinkDisplayInfo.js +100 -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/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +12 -3
- package/dist/model/MerchantBalance.js +3 -3
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/Order.js +13 -0
- package/dist/model/OrderLinkBusinessInfo.js +261 -0
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +125 -0
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +108 -0
- package/dist/model/PaymentEstimateFeeRequest.js +137 -0
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentOrderEventData.js +26 -3
- package/dist/model/PaymentRefundEventData.js +30 -5
- package/dist/model/PaymentSettlementEvent.js +70 -9
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +3 -3
- package/dist/model/Refund.js +17 -1
- package/dist/model/ReviewStatusType.js +91 -0
- 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/SubmitKytResponse.js +122 -0
- package/dist/model/SubmitKytScreeningsDecisionsBody.js +122 -0
- package/dist/model/{RawMessageSignDestination.js → SubmitKytScreeningsReviewBody.js} +36 -36
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- 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/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- 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/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +81 -11
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BridgingFee.md +11 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/CommissionFee.md +9 -0
- package/docs/ComplianceApi.md +158 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +57 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateMerchantRequest.md +3 -2
- package/docs/CreateOrderLinkRequest.md +10 -0
- package/docs/CreatePaymentOrderRequest.md +3 -1
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +2 -4
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- 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/FundsStatusType.md +32 -0
- package/docs/KytScreeningsDecisionsType.md +16 -0
- package/docs/KytScreeningsEventData.md +13 -0
- package/docs/KytScreeningsReviewType.md +12 -0
- package/docs/KytScreeningsTransaction.md +12 -0
- package/docs/KytScreeningsTransactionType.md +12 -0
- package/docs/Link.md +10 -0
- package/docs/LinkDisplayInfo.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/MerchantBalance.md +3 -3
- package/docs/MessageSignDestination.md +0 -1
- package/docs/Order.md +1 -0
- package/docs/OrderLinkBusinessInfo.md +19 -0
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +10 -0
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +253 -25
- 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/PaymentOrderEventData.md +4 -1
- package/docs/PaymentRefundEventData.md +5 -2
- package/docs/PaymentSettlementEvent.md +9 -4
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +3 -3
- package/docs/Refund.md +2 -1
- package/docs/ReviewStatusType.md +24 -0
- 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/SubmitKytResponse.md +10 -0
- package/docs/SubmitKytScreeningsDecisionsBody.md +10 -0
- package/docs/SubmitKytScreeningsReviewBody.md +10 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- 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/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- 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/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WebhookEventData.md +12 -3
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -9,6 +9,7 @@ var _AcquiringType = _interopRequireDefault(require("../model/AcquiringType"));
|
|
|
9
9
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
10
10
|
var _CreateCryptoAddressRequest = _interopRequireDefault(require("../model/CreateCryptoAddressRequest"));
|
|
11
11
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
12
|
+
var _CreateOrderLinkRequest = _interopRequireDefault(require("../model/CreateOrderLinkRequest"));
|
|
12
13
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
13
14
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
14
15
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
@@ -20,6 +21,7 @@ var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRe
|
|
|
20
21
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
21
22
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
22
23
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
24
|
+
var _Link = _interopRequireDefault(require("../model/Link"));
|
|
23
25
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
24
26
|
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
25
27
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
@@ -27,19 +29,24 @@ var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/Lis
|
|
|
27
29
|
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
28
30
|
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
29
31
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
32
|
+
var _ListTopUpPayerAccounts200Response = _interopRequireDefault(require("../model/ListTopUpPayerAccounts200Response"));
|
|
30
33
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
31
34
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
32
35
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
36
|
+
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
37
|
+
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
33
38
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
34
39
|
var _ReceivedAmountPerAddress = _interopRequireDefault(require("../model/ReceivedAmountPerAddress"));
|
|
35
40
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
36
41
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
37
42
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
38
43
|
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
44
|
+
var _UpdateBankAccountByIdRequest = _interopRequireDefault(require("../model/UpdateBankAccountByIdRequest"));
|
|
39
45
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
40
46
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
41
47
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
42
48
|
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
49
|
+
var _WalletSetup = _interopRequireDefault(require("../model/WalletSetup"));
|
|
43
50
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
44
51
|
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
52
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -119,7 +126,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
119
126
|
|
|
120
127
|
/**
|
|
121
128
|
* Create crypto address
|
|
122
|
-
* This operation registers a crypto address for crypto
|
|
129
|
+
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
123
130
|
* @param {Object} opts Optional parameters
|
|
124
131
|
* @param {module:model/CreateCryptoAddressRequest} [CreateCryptoAddressRequest] The request body to register a crypto address.
|
|
125
132
|
* @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 +152,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
145
152
|
|
|
146
153
|
/**
|
|
147
154
|
* Create crypto address
|
|
148
|
-
* This operation registers a crypto address for crypto
|
|
155
|
+
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
149
156
|
* @param {Object} opts Optional parameters
|
|
150
157
|
* @param {module:model/CreateCryptoAddressRequest} opts.CreateCryptoAddressRequest The request body to register a crypto address.
|
|
151
158
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CryptoAddress}
|
|
@@ -160,7 +167,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
160
167
|
|
|
161
168
|
/**
|
|
162
169
|
* 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.
|
|
170
|
+
* <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
171
|
* @param {Object} opts Optional parameters
|
|
165
172
|
* @param {module:model/ForcedSweepRequest} [ForcedSweepRequest] The request body for forced sweep.
|
|
166
173
|
* @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 +193,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
186
193
|
|
|
187
194
|
/**
|
|
188
195
|
* 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.
|
|
196
|
+
* <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
197
|
* @param {Object} opts Optional parameters
|
|
191
198
|
* @param {module:model/ForcedSweepRequest} opts.ForcedSweepRequest The request body for forced sweep.
|
|
192
199
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ForcedSweep}
|
|
@@ -201,7 +208,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
201
208
|
|
|
202
209
|
/**
|
|
203
210
|
* Create merchant
|
|
204
|
-
* This operation creates a merchant
|
|
211
|
+
* 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/developers/v2/payments/preparation#create-merchant).
|
|
205
212
|
* @param {Object} opts Optional parameters
|
|
206
213
|
* @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
|
|
207
214
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
|
|
@@ -227,7 +234,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
227
234
|
|
|
228
235
|
/**
|
|
229
236
|
* Create merchant
|
|
230
|
-
* This operation creates a merchant
|
|
237
|
+
* 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/developers/v2/payments/preparation#create-merchant).
|
|
231
238
|
* @param {Object} opts Optional parameters
|
|
232
239
|
* @param {module:model/CreateMerchantRequest} opts.CreateMerchantRequest The request body to create a merchant.
|
|
233
240
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Merchant}
|
|
@@ -240,6 +247,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
247
|
});
|
|
241
248
|
}
|
|
242
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Create order link
|
|
252
|
+
* This operation creates a payment link of a pay-in order.
|
|
253
|
+
* @param {Object} opts Optional parameters
|
|
254
|
+
* @param {module:model/CreateOrderLinkRequest} [CreateOrderLinkRequest] The request body to create a payment link of a pay-in order.
|
|
255
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
256
|
+
*/
|
|
257
|
+
}, {
|
|
258
|
+
key: "createOrderLinkWithHttpInfo",
|
|
259
|
+
value: function createOrderLinkWithHttpInfo(opts) {
|
|
260
|
+
opts = opts || {};
|
|
261
|
+
var postBody = opts['CreateOrderLinkRequest'];
|
|
262
|
+
if (postBody && postBody.toJSON) {
|
|
263
|
+
postBody = postBody.toJSON();
|
|
264
|
+
}
|
|
265
|
+
var pathParams = {};
|
|
266
|
+
var queryParams = {};
|
|
267
|
+
var headerParams = {};
|
|
268
|
+
var formParams = {};
|
|
269
|
+
var authNames = ['CoboAuth'];
|
|
270
|
+
var contentTypes = ['application/json'];
|
|
271
|
+
var accepts = ['application/json'];
|
|
272
|
+
var returnType = _Link["default"];
|
|
273
|
+
return this.apiClient.callApi('/payments/links/orders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Create order link
|
|
278
|
+
* This operation creates a payment link of a pay-in order.
|
|
279
|
+
* @param {Object} opts Optional parameters
|
|
280
|
+
* @param {module:model/CreateOrderLinkRequest} opts.CreateOrderLinkRequest The request body to create a payment link of a pay-in order.
|
|
281
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
282
|
+
*/
|
|
283
|
+
}, {
|
|
284
|
+
key: "createOrderLink",
|
|
285
|
+
value: function createOrderLink(opts) {
|
|
286
|
+
return this.createOrderLinkWithHttpInfo(opts).then(function (response_and_data) {
|
|
287
|
+
return response_and_data.data;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
243
291
|
/**
|
|
244
292
|
* Create pay-in order
|
|
245
293
|
* This operation creates a pay-in order.
|
|
@@ -365,7 +413,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
365
413
|
|
|
366
414
|
/**
|
|
367
415
|
* Delete crypto address
|
|
368
|
-
* This operation unregisters a crypto address from being used for crypto
|
|
416
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
369
417
|
* @param {String} crypto_address_id The crypto address ID.
|
|
370
418
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCryptoAddress201Response} and HTTP response
|
|
371
419
|
*/
|
|
@@ -395,7 +443,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
395
443
|
|
|
396
444
|
/**
|
|
397
445
|
* Delete crypto address
|
|
398
|
-
* This operation unregisters a crypto address from being used for crypto
|
|
446
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
399
447
|
* @param {String} crypto_address_id The crypto address ID.
|
|
400
448
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCryptoAddress201Response}
|
|
401
449
|
*/
|
|
@@ -409,7 +457,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
409
457
|
|
|
410
458
|
/**
|
|
411
459
|
* Get exchange rate
|
|
412
|
-
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
460
|
+
* This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. <Note>This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors.</Note>
|
|
413
461
|
* @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`
|
|
414
462
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
415
463
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
@@ -445,7 +493,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
445
493
|
|
|
446
494
|
/**
|
|
447
495
|
* Get exchange rate
|
|
448
|
-
* This operation retrieves the current exchange rate between a specified currency pair.
|
|
496
|
+
* This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. <Note>This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors.</Note>
|
|
449
497
|
* @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`
|
|
450
498
|
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
451
499
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
@@ -461,22 +509,20 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
461
509
|
/**
|
|
462
510
|
* Get payer balance
|
|
463
511
|
* 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
512
|
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
466
513
|
* @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`
|
|
514
|
+
* @param {Object} opts Optional parameters
|
|
515
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
467
516
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ReceivedAmountPerAddress>} and HTTP response
|
|
468
517
|
*/
|
|
469
518
|
}, {
|
|
470
519
|
key: "getPayerBalanceByAddressWithHttpInfo",
|
|
471
|
-
value: function getPayerBalanceByAddressWithHttpInfo(
|
|
520
|
+
value: function getPayerBalanceByAddressWithHttpInfo(payer_id, token_id, opts) {
|
|
521
|
+
opts = opts || {};
|
|
472
522
|
var postBody = null;
|
|
473
523
|
if (postBody && postBody.toJSON) {
|
|
474
524
|
postBody = postBody.toJSON();
|
|
475
525
|
}
|
|
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
526
|
// verify the required parameter 'payer_id' is set
|
|
481
527
|
if (payer_id === undefined || payer_id === null) {
|
|
482
528
|
throw new Error("Missing the required parameter 'payer_id' when calling getPayerBalanceByAddress");
|
|
@@ -487,7 +533,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
487
533
|
}
|
|
488
534
|
var pathParams = {};
|
|
489
535
|
var queryParams = {
|
|
490
|
-
'merchant_id': merchant_id,
|
|
536
|
+
'merchant_id': opts['merchant_id'],
|
|
491
537
|
'payer_id': payer_id,
|
|
492
538
|
'token_id': token_id
|
|
493
539
|
};
|
|
@@ -503,15 +549,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
503
549
|
/**
|
|
504
550
|
* Get payer balance
|
|
505
551
|
* 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
552
|
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
508
553
|
* @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`
|
|
554
|
+
* @param {Object} opts Optional parameters
|
|
555
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
509
556
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ReceivedAmountPerAddress>}
|
|
510
557
|
*/
|
|
511
558
|
}, {
|
|
512
559
|
key: "getPayerBalanceByAddress",
|
|
513
|
-
value: function getPayerBalanceByAddress(
|
|
514
|
-
return this.getPayerBalanceByAddressWithHttpInfo(
|
|
560
|
+
value: function getPayerBalanceByAddress(payer_id, token_id, opts) {
|
|
561
|
+
return this.getPayerBalanceByAddressWithHttpInfo(payer_id, token_id, opts).then(function (response_and_data) {
|
|
515
562
|
return response_and_data.data;
|
|
516
563
|
});
|
|
517
564
|
}
|
|
@@ -562,7 +609,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
562
609
|
|
|
563
610
|
/**
|
|
564
611
|
* Get developer balance
|
|
565
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token.
|
|
612
|
+
* 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/developers/v2/payments/amounts-and-balances).
|
|
566
613
|
* @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
614
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
568
615
|
*/
|
|
@@ -592,7 +639,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
592
639
|
|
|
593
640
|
/**
|
|
594
641
|
* Get developer balance
|
|
595
|
-
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token.
|
|
642
|
+
* 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/developers/v2/payments/amounts-and-balances).
|
|
596
643
|
* @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
644
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
598
645
|
*/
|
|
@@ -752,7 +799,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
752
799
|
|
|
753
800
|
/**
|
|
754
801
|
* Get withdrawable balances
|
|
755
|
-
* This operation retrieves the balances of specified merchants or the developer.
|
|
802
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
756
803
|
* @param {Object} opts Optional parameters
|
|
757
804
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
758
805
|
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
@@ -784,7 +831,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
784
831
|
|
|
785
832
|
/**
|
|
786
833
|
* Get withdrawable balances
|
|
787
|
-
* This operation retrieves the balances of specified merchants or the developer.
|
|
834
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
788
835
|
* @param {Object} opts Optional parameters
|
|
789
836
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
790
837
|
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
@@ -802,22 +849,20 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
802
849
|
/**
|
|
803
850
|
* Get top-up address
|
|
804
851
|
* 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
852
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
807
853
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
854
|
+
* @param {Object} opts Optional parameters
|
|
855
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
808
856
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
809
857
|
*/
|
|
810
858
|
}, {
|
|
811
859
|
key: "getTopUpAddressWithHttpInfo",
|
|
812
|
-
value: function getTopUpAddressWithHttpInfo(
|
|
860
|
+
value: function getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts) {
|
|
861
|
+
opts = opts || {};
|
|
813
862
|
var postBody = null;
|
|
814
863
|
if (postBody && postBody.toJSON) {
|
|
815
864
|
postBody = postBody.toJSON();
|
|
816
865
|
}
|
|
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
866
|
// verify the required parameter 'token_id' is set
|
|
822
867
|
if (token_id === undefined || token_id === null) {
|
|
823
868
|
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
@@ -828,9 +873,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
828
873
|
}
|
|
829
874
|
var pathParams = {};
|
|
830
875
|
var queryParams = {
|
|
831
|
-
'merchant_id': merchant_id,
|
|
832
876
|
'token_id': token_id,
|
|
833
|
-
'custom_payer_id': custom_payer_id
|
|
877
|
+
'custom_payer_id': custom_payer_id,
|
|
878
|
+
'merchant_id': opts['merchant_id']
|
|
834
879
|
};
|
|
835
880
|
var headerParams = {};
|
|
836
881
|
var formParams = {};
|
|
@@ -844,15 +889,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
844
889
|
/**
|
|
845
890
|
* Get top-up address
|
|
846
891
|
* 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
892
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
849
893
|
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
894
|
+
* @param {Object} opts Optional parameters
|
|
895
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
850
896
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
851
897
|
*/
|
|
852
898
|
}, {
|
|
853
899
|
key: "getTopUpAddress",
|
|
854
|
-
value: function getTopUpAddress(
|
|
855
|
-
return this.getTopUpAddressWithHttpInfo(
|
|
900
|
+
value: function getTopUpAddress(token_id, custom_payer_id, opts) {
|
|
901
|
+
return this.getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts).then(function (response_and_data) {
|
|
856
902
|
return response_and_data.data;
|
|
857
903
|
});
|
|
858
904
|
}
|
|
@@ -895,7 +941,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
895
941
|
|
|
896
942
|
/**
|
|
897
943
|
* List crypto addresses
|
|
898
|
-
* This operation retrieves a list of crypto addresses registered for crypto
|
|
944
|
+
* 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
945
|
* @param {Object} opts Optional parameters
|
|
900
946
|
* @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
947
|
* @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 +969,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
923
969
|
|
|
924
970
|
/**
|
|
925
971
|
* List crypto addresses
|
|
926
|
-
* This operation retrieves a list of crypto addresses registered for crypto
|
|
972
|
+
* 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
973
|
* @param {Object} opts Optional parameters
|
|
928
974
|
* @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
975
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
@@ -938,7 +984,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
938
984
|
|
|
939
985
|
/**
|
|
940
986
|
* List forced sweeps
|
|
941
|
-
* This operation retrieves the information of all forced sweeps.
|
|
987
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the information of all forced sweeps.
|
|
942
988
|
* @param {Object} opts Optional parameters
|
|
943
989
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
944
990
|
* @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 +1018,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
972
1018
|
|
|
973
1019
|
/**
|
|
974
1020
|
* List forced sweeps
|
|
975
|
-
* This operation retrieves the information of all forced sweeps.
|
|
1021
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the information of all forced sweeps.
|
|
976
1022
|
* @param {Object} opts Optional parameters
|
|
977
1023
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
978
1024
|
* @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 +1036,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
990
1036
|
|
|
991
1037
|
/**
|
|
992
1038
|
* List merchant balances
|
|
993
|
-
*
|
|
1039
|
+
* 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/developers/v2/payments/amounts-and-balances).
|
|
994
1040
|
* @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
1041
|
* @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
1042
|
* @param {Object} opts Optional parameters
|
|
@@ -1030,7 +1076,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1030
1076
|
|
|
1031
1077
|
/**
|
|
1032
1078
|
* List merchant balances
|
|
1033
|
-
*
|
|
1079
|
+
* 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/developers/v2/payments/amounts-and-balances).
|
|
1034
1080
|
* @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
1081
|
* @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
1082
|
* @param {Object} opts Optional parameters
|
|
@@ -1053,7 +1099,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1053
1099
|
* @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.
|
|
1054
1100
|
* @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
1101
|
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1056
|
-
* @param {String} [wallet_id]
|
|
1102
|
+
* @param {String} [wallet_id] This parameter has been deprecated.
|
|
1103
|
+
* @param {module:model/WalletSetup} [wallet_setup] The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization).
|
|
1057
1104
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchants200Response} and HTTP response
|
|
1058
1105
|
*/
|
|
1059
1106
|
}, {
|
|
@@ -1070,7 +1117,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1070
1117
|
'before': opts['before'],
|
|
1071
1118
|
'after': opts['after'],
|
|
1072
1119
|
'keyword': opts['keyword'],
|
|
1073
|
-
'wallet_id': opts['wallet_id']
|
|
1120
|
+
'wallet_id': opts['wallet_id'],
|
|
1121
|
+
'wallet_setup': opts['wallet_setup']
|
|
1074
1122
|
};
|
|
1075
1123
|
var headerParams = {};
|
|
1076
1124
|
var formParams = {};
|
|
@@ -1089,7 +1137,8 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1089
1137
|
* @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.
|
|
1090
1138
|
* @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
1139
|
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
1092
|
-
* @param {String} opts.wallet_id
|
|
1140
|
+
* @param {String} opts.wallet_id This parameter has been deprecated.
|
|
1141
|
+
* @param {module:model/WalletSetup} opts.wallet_setup The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization).
|
|
1093
1142
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchants200Response}
|
|
1094
1143
|
*/
|
|
1095
1144
|
}, {
|
|
@@ -1196,7 +1245,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1196
1245
|
|
|
1197
1246
|
/**
|
|
1198
1247
|
* 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.
|
|
1248
|
+
* <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
1249
|
* @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
1250
|
* @param {Object} opts Optional parameters
|
|
1202
1251
|
* @param {String} [wallet_ids] A list of wallet IDs to query.
|
|
@@ -1230,7 +1279,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1230
1279
|
|
|
1231
1280
|
/**
|
|
1232
1281
|
* 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.
|
|
1282
|
+
* <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
1283
|
* @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
1284
|
* @param {Object} opts Optional parameters
|
|
1236
1285
|
* @param {String} opts.wallet_ids A list of wallet IDs to query.
|
|
@@ -1351,35 +1400,86 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1351
1400
|
});
|
|
1352
1401
|
}
|
|
1353
1402
|
|
|
1403
|
+
/**
|
|
1404
|
+
* List top-up payer accounts
|
|
1405
|
+
* This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id.
|
|
1406
|
+
* @param {Object} opts Optional parameters
|
|
1407
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1408
|
+
* @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.
|
|
1409
|
+
* @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.
|
|
1410
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1411
|
+
* @param {String} [payer_id] A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1412
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTopUpPayerAccounts200Response} and HTTP response
|
|
1413
|
+
*/
|
|
1414
|
+
}, {
|
|
1415
|
+
key: "listTopUpPayerAccountsWithHttpInfo",
|
|
1416
|
+
value: function listTopUpPayerAccountsWithHttpInfo(opts) {
|
|
1417
|
+
opts = opts || {};
|
|
1418
|
+
var postBody = null;
|
|
1419
|
+
if (postBody && postBody.toJSON) {
|
|
1420
|
+
postBody = postBody.toJSON();
|
|
1421
|
+
}
|
|
1422
|
+
var pathParams = {};
|
|
1423
|
+
var queryParams = {
|
|
1424
|
+
'limit': opts['limit'],
|
|
1425
|
+
'before': opts['before'],
|
|
1426
|
+
'after': opts['after'],
|
|
1427
|
+
'merchant_id': opts['merchant_id'],
|
|
1428
|
+
'payer_id': opts['payer_id']
|
|
1429
|
+
};
|
|
1430
|
+
var headerParams = {};
|
|
1431
|
+
var formParams = {};
|
|
1432
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1433
|
+
var contentTypes = [];
|
|
1434
|
+
var accepts = ['application/json'];
|
|
1435
|
+
var returnType = _ListTopUpPayerAccounts200Response["default"];
|
|
1436
|
+
return this.apiClient.callApi('/payments/topup/payer_accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
/**
|
|
1440
|
+
* List top-up payer accounts
|
|
1441
|
+
* This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id.
|
|
1442
|
+
* @param {Object} opts Optional parameters
|
|
1443
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1444
|
+
* @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.
|
|
1445
|
+
* @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.
|
|
1446
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1447
|
+
* @param {String} opts.payer_id A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1448
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTopUpPayerAccounts200Response}
|
|
1449
|
+
*/
|
|
1450
|
+
}, {
|
|
1451
|
+
key: "listTopUpPayerAccounts",
|
|
1452
|
+
value: function listTopUpPayerAccounts(opts) {
|
|
1453
|
+
return this.listTopUpPayerAccountsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1454
|
+
return response_and_data.data;
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1354
1458
|
/**
|
|
1355
1459
|
* List payers
|
|
1356
1460
|
* 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
1461
|
* @param {Object} opts Optional parameters
|
|
1359
1462
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1360
1463
|
* @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
1464
|
* @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.
|
|
1465
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1362
1466
|
* @param {String} [payer_id] A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1363
1467
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTopUpPayers200Response} and HTTP response
|
|
1364
1468
|
*/
|
|
1365
1469
|
}, {
|
|
1366
1470
|
key: "listTopUpPayersWithHttpInfo",
|
|
1367
|
-
value: function listTopUpPayersWithHttpInfo(
|
|
1471
|
+
value: function listTopUpPayersWithHttpInfo(opts) {
|
|
1368
1472
|
opts = opts || {};
|
|
1369
1473
|
var postBody = null;
|
|
1370
1474
|
if (postBody && postBody.toJSON) {
|
|
1371
1475
|
postBody = postBody.toJSON();
|
|
1372
1476
|
}
|
|
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
1477
|
var pathParams = {};
|
|
1378
1478
|
var queryParams = {
|
|
1379
1479
|
'limit': opts['limit'],
|
|
1380
1480
|
'before': opts['before'],
|
|
1381
1481
|
'after': opts['after'],
|
|
1382
|
-
'merchant_id': merchant_id,
|
|
1482
|
+
'merchant_id': opts['merchant_id'],
|
|
1383
1483
|
'payer_id': opts['payer_id']
|
|
1384
1484
|
};
|
|
1385
1485
|
var headerParams = {};
|
|
@@ -1394,18 +1494,108 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1394
1494
|
/**
|
|
1395
1495
|
* List payers
|
|
1396
1496
|
* 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
1497
|
* @param {Object} opts Optional parameters
|
|
1399
1498
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1400
1499
|
* @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
1500
|
* @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.
|
|
1501
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1402
1502
|
* @param {String} opts.payer_id A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1403
1503
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTopUpPayers200Response}
|
|
1404
1504
|
*/
|
|
1405
1505
|
}, {
|
|
1406
1506
|
key: "listTopUpPayers",
|
|
1407
|
-
value: function listTopUpPayers(
|
|
1408
|
-
return this.listTopUpPayersWithHttpInfo(
|
|
1507
|
+
value: function listTopUpPayers(opts) {
|
|
1508
|
+
return this.listTopUpPayersWithHttpInfo(opts).then(function (response_and_data) {
|
|
1509
|
+
return response_and_data.data;
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Estimate fees
|
|
1515
|
+
* This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates.
|
|
1516
|
+
* @param {Object} opts Optional parameters
|
|
1517
|
+
* @param {module:model/PaymentEstimateFeeRequest} [PaymentEstimateFeeRequest] The request body for fee estimation.
|
|
1518
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentEstimateFee201Response} and HTTP response
|
|
1519
|
+
*/
|
|
1520
|
+
}, {
|
|
1521
|
+
key: "paymentEstimateFeeWithHttpInfo",
|
|
1522
|
+
value: function paymentEstimateFeeWithHttpInfo(opts) {
|
|
1523
|
+
opts = opts || {};
|
|
1524
|
+
var postBody = opts['PaymentEstimateFeeRequest'];
|
|
1525
|
+
if (postBody && postBody.toJSON) {
|
|
1526
|
+
postBody = postBody.toJSON();
|
|
1527
|
+
}
|
|
1528
|
+
var pathParams = {};
|
|
1529
|
+
var queryParams = {};
|
|
1530
|
+
var headerParams = {};
|
|
1531
|
+
var formParams = {};
|
|
1532
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1533
|
+
var contentTypes = ['application/json'];
|
|
1534
|
+
var accepts = ['application/json'];
|
|
1535
|
+
var returnType = _PaymentEstimateFee201Response["default"];
|
|
1536
|
+
return this.apiClient.callApi('/payments/estimate_fee', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* Estimate fees
|
|
1541
|
+
* This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates.
|
|
1542
|
+
* @param {Object} opts Optional parameters
|
|
1543
|
+
* @param {module:model/PaymentEstimateFeeRequest} opts.PaymentEstimateFeeRequest The request body for fee estimation.
|
|
1544
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentEstimateFee201Response}
|
|
1545
|
+
*/
|
|
1546
|
+
}, {
|
|
1547
|
+
key: "paymentEstimateFee",
|
|
1548
|
+
value: function paymentEstimateFee(opts) {
|
|
1549
|
+
return this.paymentEstimateFeeWithHttpInfo(opts).then(function (response_and_data) {
|
|
1550
|
+
return response_and_data.data;
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Update bank account
|
|
1556
|
+
* This operation updates the information of an existing bank account.
|
|
1557
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1558
|
+
* @param {Object} opts Optional parameters
|
|
1559
|
+
* @param {module:model/UpdateBankAccountByIdRequest} [UpdateBankAccountByIdRequest] The request body for updating an existing bank account.
|
|
1560
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BankAccount} and HTTP response
|
|
1561
|
+
*/
|
|
1562
|
+
}, {
|
|
1563
|
+
key: "updateBankAccountByIdWithHttpInfo",
|
|
1564
|
+
value: function updateBankAccountByIdWithHttpInfo(bank_account_id, opts) {
|
|
1565
|
+
opts = opts || {};
|
|
1566
|
+
var postBody = opts['UpdateBankAccountByIdRequest'];
|
|
1567
|
+
if (postBody && postBody.toJSON) {
|
|
1568
|
+
postBody = postBody.toJSON();
|
|
1569
|
+
}
|
|
1570
|
+
// verify the required parameter 'bank_account_id' is set
|
|
1571
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
1572
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling updateBankAccountById");
|
|
1573
|
+
}
|
|
1574
|
+
var pathParams = {
|
|
1575
|
+
'bank_account_id': bank_account_id
|
|
1576
|
+
};
|
|
1577
|
+
var queryParams = {};
|
|
1578
|
+
var headerParams = {};
|
|
1579
|
+
var formParams = {};
|
|
1580
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1581
|
+
var contentTypes = ['application/json'];
|
|
1582
|
+
var accepts = ['application/json'];
|
|
1583
|
+
var returnType = _BankAccount["default"];
|
|
1584
|
+
return this.apiClient.callApi('/payments/bank_accounts/{bank_account_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Update bank account
|
|
1589
|
+
* This operation updates the information of an existing bank account.
|
|
1590
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1591
|
+
* @param {Object} opts Optional parameters
|
|
1592
|
+
* @param {module:model/UpdateBankAccountByIdRequest} opts.UpdateBankAccountByIdRequest The request body for updating an existing bank account.
|
|
1593
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BankAccount}
|
|
1594
|
+
*/
|
|
1595
|
+
}, {
|
|
1596
|
+
key: "updateBankAccountById",
|
|
1597
|
+
value: function updateBankAccountById(bank_account_id, opts) {
|
|
1598
|
+
return this.updateBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
|
|
1409
1599
|
return response_and_data.data;
|
|
1410
1600
|
});
|
|
1411
1601
|
}
|