@cobo/cobo-waas2 1.26.0 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +1847 -294
- package/dist/api/StakingsApi.js +44 -2
- package/dist/api/SwapsApi.js +2 -2
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +14 -14
- package/dist/index.js +420 -7
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AllocationRecord.js +193 -0
- package/dist/model/AllocationRequest.js +167 -0
- package/dist/model/BabylonCreateStakingExpansion.js +157 -0
- package/dist/model/BabylonStakeExtra.js +26 -0
- package/dist/model/BabylonStakingRegistration.js +1 -1
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BankAccountStatus.js +66 -0
- package/dist/model/BatchAllocation.js +190 -0
- package/dist/model/BatchAllocationDetail.js +188 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallDestination.js +72 -10
- package/dist/model/ContractCallDestinationType.js +10 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/Counterparty.js +195 -0
- package/dist/model/CounterpartyDetail.js +228 -0
- package/dist/model/CounterpartyType.js +61 -0
- package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCounterpartyRequest.js +193 -0
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateDestinationBankAccount.js +257 -0
- package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
- package/dist/model/CreateDestinationRequest.js +235 -0
- package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +115 -68
- package/dist/model/CreatePayoutRequest.js +192 -0
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +14 -1
- package/dist/model/CreateSettlementRequestRequest.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +12 -0
- package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/DeleteCounterparty200Response.js +110 -0
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
- package/dist/model/DeleteDestination200Response.js +110 -0
- package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
- package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
- package/dist/model/Destination.js +208 -0
- package/dist/model/DestinationBankAccount.js +301 -0
- package/dist/model/DestinationBankAccountDetail.js +394 -0
- package/dist/model/DestinationDetail.js +272 -0
- package/dist/model/DestinationType.js +61 -0
- package/dist/model/DestinationWalletAddressDetail.js +205 -0
- package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ExchangeRate.js +140 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/IntermediaryBankInfo.js +140 -0
- package/dist/model/Link.js +4 -4
- package/dist/model/LinkDisplayInfo.js +15 -2
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.js +123 -0
- package/dist/model/ListCounterparties200Response.js +123 -0
- package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
- package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
- package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
- package/dist/model/ListDestinations200Response.js +123 -0
- package/dist/model/ListPayoutItems200Response.js +123 -0
- package/dist/model/ListPayouts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MerchantBalance.js +28 -2
- package/dist/model/Order.js +135 -102
- package/dist/model/OrderLinkBusinessInfo.js +151 -87
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentAllocationAmount.js +125 -0
- package/dist/model/PaymentOrderEventData.js +198 -145
- package/dist/model/PaymentPayout.js +250 -0
- package/dist/model/PaymentPayoutDetail.js +248 -0
- package/dist/model/PaymentPayoutEvent.js +433 -0
- package/dist/model/PaymentPayoutItem.js +298 -0
- package/dist/model/PaymentPayoutItemDetail.js +298 -0
- package/dist/model/PaymentPayoutItemStatus.js +76 -0
- package/dist/model/PaymentPayoutParam.js +165 -0
- package/dist/model/PaymentPayoutStatus.js +81 -0
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentSourceType.js +61 -0
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +10 -5
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +6 -6
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/Stakings.js +33 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +1 -1
- package/dist/model/SwapActivityDetail.js +2 -2
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionDestination.js +38 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionTronContractDestination.js +150 -0
- package/dist/model/TransactionWebhookEventData.js +10 -5
- package/dist/model/TronContractCallDestination.js +150 -0
- package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
- package/dist/model/UpdateDestinationBankAccount.js +257 -0
- package/dist/model/UpdateDestinationByIdRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +107 -43
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationRecord.md +15 -0
- package/docs/AllocationRequest.md +13 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BabylonCreateStakingExpansion.md +12 -0
- package/docs/BabylonStakeExtra.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BankAccountStatus.md +14 -0
- package/docs/BatchAllocation.md +14 -0
- package/docs/BatchAllocationDetail.md +14 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallDestination.md +3 -2
- package/docs/ContractCallDestinationType.md +4 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/Counterparty.md +16 -0
- package/docs/CounterpartyDetail.md +17 -0
- package/docs/CounterpartyType.md +12 -0
- package/docs/CounterpartyWalletAddressDetail.md +15 -0
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCounterpartyRequest.md +14 -0
- package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateDestinationBankAccount.md +19 -0
- package/docs/CreateDestinationBankAccountRequest.md +20 -0
- package/docs/CreateDestinationRequest.md +16 -0
- package/docs/CreateDestinationWalletAddressRequest.md +11 -0
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +15 -11
- package/docs/CreatePayoutRequest.md +14 -0
- package/docs/CreateRefundRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +2 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteCounterparty200Response.md +9 -0
- package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
- package/docs/DeleteDestination200Response.md +9 -0
- package/docs/DeleteDestinationBankAccount200Response.md +9 -0
- package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
- package/docs/Destination.md +17 -0
- package/docs/DestinationBankAccount.md +23 -0
- package/docs/DestinationBankAccountDetail.md +30 -0
- package/docs/DestinationDetail.md +19 -0
- package/docs/DestinationType.md +12 -0
- package/docs/DestinationWalletAddressDetail.md +16 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EnableDestinationWhitelistRequest.md +9 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeRate.md +11 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/IntermediaryBankInfo.md +11 -0
- package/docs/Link.md +2 -2
- package/docs/LinkDisplayInfo.md +3 -2
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.md +10 -0
- package/docs/ListCounterparties200Response.md +10 -0
- package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
- package/docs/ListDestinationBankAccounts200Response.md +10 -0
- package/docs/ListDestinationWalletAddresses200Response.md +10 -0
- package/docs/ListDestinations200Response.md +10 -0
- package/docs/ListPayoutItems200Response.md +10 -0
- package/docs/ListPayouts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MerchantBalance.md +4 -2
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +16 -13
- package/docs/OrderLinkBusinessInfo.md +11 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentAllocationAmount.md +10 -0
- package/docs/PaymentApi.md +2153 -395
- package/docs/PaymentOrderEventData.md +19 -14
- package/docs/PaymentPayout.md +19 -0
- package/docs/PaymentPayoutDetail.md +19 -0
- package/docs/PaymentPayoutEvent.md +65 -0
- package/docs/PaymentPayoutItem.md +22 -0
- package/docs/PaymentPayoutItemDetail.md +22 -0
- package/docs/PaymentPayoutItemStatus.md +18 -0
- package/docs/PaymentPayoutParam.md +13 -0
- package/docs/PaymentPayoutStatus.md +20 -0
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentSourceType.md +12 -0
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +4 -2
- package/docs/PspBalance.md +4 -2
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +4 -4
- package/docs/SettlementDetail.md +1 -0
- package/docs/Stakings.md +2 -1
- package/docs/StakingsApi.md +54 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +1 -1
- package/docs/SwapActivityDetail.md +1 -1
- package/docs/SwapsApi.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/Transaction.md +1 -1
- package/docs/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionTronContractDestination.md +12 -0
- package/docs/TransactionWebhookEventData.md +4 -2
- package/docs/TransactionsApi.md +3 -3
- package/docs/TronContractCallDestination.md +12 -0
- package/docs/UpdateCounterpartyByIdRequest.md +13 -0
- package/docs/UpdateDestinationBankAccount.md +19 -0
- package/docs/UpdateDestinationByIdRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +12 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +22 -14
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
package/dist/api/PaymentApi.js
CHANGED
|
@@ -7,46 +7,87 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AcquiringType = _interopRequireDefault(require("../model/AcquiringType"));
|
|
9
9
|
var _BankAccount = _interopRequireDefault(require("../model/BankAccount"));
|
|
10
|
+
var _BankAccountStatus = _interopRequireDefault(require("../model/BankAccountStatus"));
|
|
11
|
+
var _BatchAllocation = _interopRequireDefault(require("../model/BatchAllocation"));
|
|
12
|
+
var _BatchAllocationDetail = _interopRequireDefault(require("../model/BatchAllocationDetail"));
|
|
13
|
+
var _Counterparty = _interopRequireDefault(require("../model/Counterparty"));
|
|
14
|
+
var _CounterpartyDetail = _interopRequireDefault(require("../model/CounterpartyDetail"));
|
|
15
|
+
var _CounterpartyType = _interopRequireDefault(require("../model/CounterpartyType"));
|
|
16
|
+
var _CreateBatchAllocationRequest = _interopRequireDefault(require("../model/CreateBatchAllocationRequest"));
|
|
17
|
+
var _CreateCounterpartyRequest = _interopRequireDefault(require("../model/CreateCounterpartyRequest"));
|
|
18
|
+
var _CreateCounterpartyWalletAddressRequest = _interopRequireDefault(require("../model/CreateCounterpartyWalletAddressRequest"));
|
|
10
19
|
var _CreateCryptoAddressRequest = _interopRequireDefault(require("../model/CreateCryptoAddressRequest"));
|
|
20
|
+
var _CreateDestinationBankAccountRequest = _interopRequireDefault(require("../model/CreateDestinationBankAccountRequest"));
|
|
21
|
+
var _CreateDestinationRequest = _interopRequireDefault(require("../model/CreateDestinationRequest"));
|
|
22
|
+
var _CreateDestinationWalletAddressRequest = _interopRequireDefault(require("../model/CreateDestinationWalletAddressRequest"));
|
|
11
23
|
var _CreateMerchantRequest = _interopRequireDefault(require("../model/CreateMerchantRequest"));
|
|
12
24
|
var _CreateOrderLinkRequest = _interopRequireDefault(require("../model/CreateOrderLinkRequest"));
|
|
13
25
|
var _CreatePaymentOrderRequest = _interopRequireDefault(require("../model/CreatePaymentOrderRequest"));
|
|
26
|
+
var _CreatePayoutRequest = _interopRequireDefault(require("../model/CreatePayoutRequest"));
|
|
14
27
|
var _CreateRefundLinkRequest = _interopRequireDefault(require("../model/CreateRefundLinkRequest"));
|
|
15
28
|
var _CreateRefundRequest = _interopRequireDefault(require("../model/CreateRefundRequest"));
|
|
16
29
|
var _CreateSettlementRequestRequest = _interopRequireDefault(require("../model/CreateSettlementRequestRequest"));
|
|
17
30
|
var _CryptoAddress = _interopRequireDefault(require("../model/CryptoAddress"));
|
|
31
|
+
var _DeleteCounterparty200Response = _interopRequireDefault(require("../model/DeleteCounterparty200Response"));
|
|
32
|
+
var _DeleteCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/DeleteCounterpartyWalletAddress200Response"));
|
|
18
33
|
var _DeleteCryptoAddress201Response = _interopRequireDefault(require("../model/DeleteCryptoAddress201Response"));
|
|
34
|
+
var _DeleteDestination200Response = _interopRequireDefault(require("../model/DeleteDestination200Response"));
|
|
35
|
+
var _DeleteDestinationBankAccount200Response = _interopRequireDefault(require("../model/DeleteDestinationBankAccount200Response"));
|
|
36
|
+
var _DeleteDestinationWalletAddress200Response = _interopRequireDefault(require("../model/DeleteDestinationWalletAddress200Response"));
|
|
37
|
+
var _Destination = _interopRequireDefault(require("../model/Destination"));
|
|
38
|
+
var _DestinationBankAccount = _interopRequireDefault(require("../model/DestinationBankAccount"));
|
|
39
|
+
var _DestinationBankAccountDetail = _interopRequireDefault(require("../model/DestinationBankAccountDetail"));
|
|
40
|
+
var _DestinationDetail = _interopRequireDefault(require("../model/DestinationDetail"));
|
|
41
|
+
var _DestinationType = _interopRequireDefault(require("../model/DestinationType"));
|
|
42
|
+
var _EnableDestinationWhitelistRequest = _interopRequireDefault(require("../model/EnableDestinationWhitelistRequest"));
|
|
19
43
|
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
44
|
+
var _ExchangeRate = _interopRequireDefault(require("../model/ExchangeRate"));
|
|
20
45
|
var _ForcedSweep = _interopRequireDefault(require("../model/ForcedSweep"));
|
|
21
46
|
var _ForcedSweepRequest = _interopRequireDefault(require("../model/ForcedSweepRequest"));
|
|
22
47
|
var _GetExchangeRate200Response = _interopRequireDefault(require("../model/GetExchangeRate200Response"));
|
|
23
48
|
var _GetRefunds200Response = _interopRequireDefault(require("../model/GetRefunds200Response"));
|
|
24
49
|
var _GetSettlementInfoByIds200Response = _interopRequireDefault(require("../model/GetSettlementInfoByIds200Response"));
|
|
25
50
|
var _Link = _interopRequireDefault(require("../model/Link"));
|
|
51
|
+
var _ListAllocations200Response = _interopRequireDefault(require("../model/ListAllocations200Response"));
|
|
52
|
+
var _ListBatchAllocations200Response = _interopRequireDefault(require("../model/ListBatchAllocations200Response"));
|
|
53
|
+
var _ListCounterparties200Response = _interopRequireDefault(require("../model/ListCounterparties200Response"));
|
|
54
|
+
var _ListCounterpartyWalletAddress200Response = _interopRequireDefault(require("../model/ListCounterpartyWalletAddress200Response"));
|
|
55
|
+
var _ListDestinationBankAccounts200Response = _interopRequireDefault(require("../model/ListDestinationBankAccounts200Response"));
|
|
56
|
+
var _ListDestinationWalletAddresses200Response = _interopRequireDefault(require("../model/ListDestinationWalletAddresses200Response"));
|
|
57
|
+
var _ListDestinations200Response = _interopRequireDefault(require("../model/ListDestinations200Response"));
|
|
26
58
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("../model/ListForcedSweepRequests200Response"));
|
|
27
59
|
var _ListMerchantBalances200Response = _interopRequireDefault(require("../model/ListMerchantBalances200Response"));
|
|
28
60
|
var _ListMerchants200Response = _interopRequireDefault(require("../model/ListMerchants200Response"));
|
|
29
61
|
var _ListPaymentOrders200Response = _interopRequireDefault(require("../model/ListPaymentOrders200Response"));
|
|
30
62
|
var _ListPaymentWalletBalances200Response = _interopRequireDefault(require("../model/ListPaymentWalletBalances200Response"));
|
|
63
|
+
var _ListPayoutItems200Response = _interopRequireDefault(require("../model/ListPayoutItems200Response"));
|
|
64
|
+
var _ListPayouts200Response = _interopRequireDefault(require("../model/ListPayouts200Response"));
|
|
31
65
|
var _ListSettlementDetails200Response = _interopRequireDefault(require("../model/ListSettlementDetails200Response"));
|
|
32
66
|
var _ListSettlementRequests200Response = _interopRequireDefault(require("../model/ListSettlementRequests200Response"));
|
|
33
67
|
var _ListTopUpPayerAccounts200Response = _interopRequireDefault(require("../model/ListTopUpPayerAccounts200Response"));
|
|
34
68
|
var _ListTopUpPayers200Response = _interopRequireDefault(require("../model/ListTopUpPayers200Response"));
|
|
35
69
|
var _Merchant = _interopRequireDefault(require("../model/Merchant"));
|
|
36
70
|
var _Order = _interopRequireDefault(require("../model/Order"));
|
|
71
|
+
var _PaymentAllocationAmount = _interopRequireDefault(require("../model/PaymentAllocationAmount"));
|
|
37
72
|
var _PaymentEstimateFee201Response = _interopRequireDefault(require("../model/PaymentEstimateFee201Response"));
|
|
38
73
|
var _PaymentEstimateFeeRequest = _interopRequireDefault(require("../model/PaymentEstimateFeeRequest"));
|
|
74
|
+
var _PaymentPayout = _interopRequireDefault(require("../model/PaymentPayout"));
|
|
75
|
+
var _PaymentPayoutDetail = _interopRequireDefault(require("../model/PaymentPayoutDetail"));
|
|
39
76
|
var _PspBalance = _interopRequireDefault(require("../model/PspBalance"));
|
|
40
|
-
var
|
|
77
|
+
var _QueryDestinationWhitelistEnabled200Response = _interopRequireDefault(require("../model/QueryDestinationWhitelistEnabled200Response"));
|
|
41
78
|
var _Refund = _interopRequireDefault(require("../model/Refund"));
|
|
42
79
|
var _Settlement = _interopRequireDefault(require("../model/Settlement"));
|
|
43
80
|
var _SupportedToken = _interopRequireDefault(require("../model/SupportedToken"));
|
|
44
81
|
var _TopUpAddress = _interopRequireDefault(require("../model/TopUpAddress"));
|
|
45
82
|
var _UpdateBankAccountByIdRequest = _interopRequireDefault(require("../model/UpdateBankAccountByIdRequest"));
|
|
83
|
+
var _UpdateCounterpartyByIdRequest = _interopRequireDefault(require("../model/UpdateCounterpartyByIdRequest"));
|
|
84
|
+
var _UpdateDestinationBankAccount = _interopRequireDefault(require("../model/UpdateDestinationBankAccount"));
|
|
85
|
+
var _UpdateDestinationByIdRequest = _interopRequireDefault(require("../model/UpdateDestinationByIdRequest"));
|
|
46
86
|
var _UpdateMerchantByIdRequest = _interopRequireDefault(require("../model/UpdateMerchantByIdRequest"));
|
|
47
87
|
var _UpdatePaymentOrderRequest = _interopRequireDefault(require("../model/UpdatePaymentOrderRequest"));
|
|
48
88
|
var _UpdateRefundByIdRequest = _interopRequireDefault(require("../model/UpdateRefundByIdRequest"));
|
|
49
89
|
var _UpdateTopUpAddress = _interopRequireDefault(require("../model/UpdateTopUpAddress"));
|
|
90
|
+
var _WalletAddress = _interopRequireDefault(require("../model/WalletAddress"));
|
|
50
91
|
var _WalletSetup = _interopRequireDefault(require("../model/WalletSetup"));
|
|
51
92
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
52
93
|
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); }
|
|
@@ -82,12 +123,63 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
82
123
|
}
|
|
83
124
|
|
|
84
125
|
/**
|
|
85
|
-
*
|
|
86
|
-
* This operation
|
|
87
|
-
* @param {String}
|
|
88
|
-
* @
|
|
126
|
+
* Batch get exchange rates
|
|
127
|
+
* This operation retrieves the current exchange rates between multiple fiat currencies and cryptocurrencies.
|
|
128
|
+
* @param {String} token_ids A list of token IDs, separated by comma. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
129
|
+
* @param {String} currencies A list of fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
130
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ExchangeRate>} and HTTP response
|
|
89
131
|
*/
|
|
90
132
|
return _createClass(PaymentApi, [{
|
|
133
|
+
key: "batchGetExchangeRatesWithHttpInfo",
|
|
134
|
+
value: function batchGetExchangeRatesWithHttpInfo(token_ids, currencies) {
|
|
135
|
+
var postBody = null;
|
|
136
|
+
if (postBody && postBody.toJSON) {
|
|
137
|
+
postBody = postBody.toJSON();
|
|
138
|
+
}
|
|
139
|
+
// verify the required parameter 'token_ids' is set
|
|
140
|
+
if (token_ids === undefined || token_ids === null) {
|
|
141
|
+
throw new Error("Missing the required parameter 'token_ids' when calling batchGetExchangeRates");
|
|
142
|
+
}
|
|
143
|
+
// verify the required parameter 'currencies' is set
|
|
144
|
+
if (currencies === undefined || currencies === null) {
|
|
145
|
+
throw new Error("Missing the required parameter 'currencies' when calling batchGetExchangeRates");
|
|
146
|
+
}
|
|
147
|
+
var pathParams = {};
|
|
148
|
+
var queryParams = {
|
|
149
|
+
'token_ids': token_ids,
|
|
150
|
+
'currencies': currencies
|
|
151
|
+
};
|
|
152
|
+
var headerParams = {};
|
|
153
|
+
var formParams = {};
|
|
154
|
+
var authNames = ['CoboAuth'];
|
|
155
|
+
var contentTypes = [];
|
|
156
|
+
var accepts = ['application/json'];
|
|
157
|
+
var returnType = [_ExchangeRate["default"]];
|
|
158
|
+
return this.apiClient.callApi('/payments/exchange_rates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Batch get exchange rates
|
|
163
|
+
* This operation retrieves the current exchange rates between multiple fiat currencies and cryptocurrencies.
|
|
164
|
+
* @param {String} token_ids A list of token IDs, separated by comma. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
165
|
+
* @param {String} currencies A list of fiat currencies, separated by comma. Currently, only `USD` is supported.
|
|
166
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ExchangeRate>}
|
|
167
|
+
*/
|
|
168
|
+
}, {
|
|
169
|
+
key: "batchGetExchangeRates",
|
|
170
|
+
value: function batchGetExchangeRates(token_ids, currencies) {
|
|
171
|
+
return this.batchGetExchangeRatesWithHttpInfo(token_ids, currencies).then(function (response_and_data) {
|
|
172
|
+
return response_and_data.data;
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Cancel refund order
|
|
178
|
+
* This operation cancels a specified refund order. You can only cancel refund orders that have not been processed yet.
|
|
179
|
+
* @param {String} refund_id The refund order ID.
|
|
180
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
181
|
+
*/
|
|
182
|
+
}, {
|
|
91
183
|
key: "cancelRefundByIdWithHttpInfo",
|
|
92
184
|
value: function cancelRefundByIdWithHttpInfo(refund_id) {
|
|
93
185
|
var postBody = null;
|
|
@@ -125,6 +217,129 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
125
217
|
});
|
|
126
218
|
}
|
|
127
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Create batch allocation
|
|
222
|
+
* This operation creates a batch allocation to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single batch allocation.
|
|
223
|
+
* @param {Object} opts Optional parameters
|
|
224
|
+
* @param {module:model/CreateBatchAllocationRequest} [CreateBatchAllocationRequest] The request body to create a settlement request.
|
|
225
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchAllocation} and HTTP response
|
|
226
|
+
*/
|
|
227
|
+
}, {
|
|
228
|
+
key: "createBatchAllocationWithHttpInfo",
|
|
229
|
+
value: function createBatchAllocationWithHttpInfo(opts) {
|
|
230
|
+
opts = opts || {};
|
|
231
|
+
var postBody = opts['CreateBatchAllocationRequest'];
|
|
232
|
+
if (postBody && postBody.toJSON) {
|
|
233
|
+
postBody = postBody.toJSON();
|
|
234
|
+
}
|
|
235
|
+
var pathParams = {};
|
|
236
|
+
var queryParams = {};
|
|
237
|
+
var headerParams = {};
|
|
238
|
+
var formParams = {};
|
|
239
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
240
|
+
var contentTypes = ['application/json'];
|
|
241
|
+
var accepts = ['application/json'];
|
|
242
|
+
var returnType = _BatchAllocation["default"];
|
|
243
|
+
return this.apiClient.callApi('/payments/batch_allocations', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Create batch allocation
|
|
248
|
+
* This operation creates a batch allocation to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single batch allocation.
|
|
249
|
+
* @param {Object} opts Optional parameters
|
|
250
|
+
* @param {module:model/CreateBatchAllocationRequest} opts.CreateBatchAllocationRequest The request body to create a settlement request.
|
|
251
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchAllocation}
|
|
252
|
+
*/
|
|
253
|
+
}, {
|
|
254
|
+
key: "createBatchAllocation",
|
|
255
|
+
value: function createBatchAllocation(opts) {
|
|
256
|
+
return this.createBatchAllocationWithHttpInfo(opts).then(function (response_and_data) {
|
|
257
|
+
return response_and_data.data;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Create counterparty
|
|
263
|
+
* This operation creates a counterparty.
|
|
264
|
+
* @param {Object} opts Optional parameters
|
|
265
|
+
* @param {module:model/CreateCounterpartyRequest} [CreateCounterpartyRequest] The request body to create a counterparty.
|
|
266
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CounterpartyDetail} and HTTP response
|
|
267
|
+
*/
|
|
268
|
+
}, {
|
|
269
|
+
key: "createCounterpartyWithHttpInfo",
|
|
270
|
+
value: function createCounterpartyWithHttpInfo(opts) {
|
|
271
|
+
opts = opts || {};
|
|
272
|
+
var postBody = opts['CreateCounterpartyRequest'];
|
|
273
|
+
if (postBody && postBody.toJSON) {
|
|
274
|
+
postBody = postBody.toJSON();
|
|
275
|
+
}
|
|
276
|
+
var pathParams = {};
|
|
277
|
+
var queryParams = {};
|
|
278
|
+
var headerParams = {};
|
|
279
|
+
var formParams = {};
|
|
280
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
281
|
+
var contentTypes = ['application/json'];
|
|
282
|
+
var accepts = ['application/json'];
|
|
283
|
+
var returnType = _CounterpartyDetail["default"];
|
|
284
|
+
return this.apiClient.callApi('/payments/counterparty', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Create counterparty
|
|
289
|
+
* This operation creates a counterparty.
|
|
290
|
+
* @param {Object} opts Optional parameters
|
|
291
|
+
* @param {module:model/CreateCounterpartyRequest} opts.CreateCounterpartyRequest The request body to create a counterparty.
|
|
292
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CounterpartyDetail}
|
|
293
|
+
*/
|
|
294
|
+
}, {
|
|
295
|
+
key: "createCounterparty",
|
|
296
|
+
value: function createCounterparty(opts) {
|
|
297
|
+
return this.createCounterpartyWithHttpInfo(opts).then(function (response_and_data) {
|
|
298
|
+
return response_and_data.data;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Create counterparty wallet address
|
|
304
|
+
* This operation creates a counterparty wallet address.
|
|
305
|
+
* @param {Object} opts Optional parameters
|
|
306
|
+
* @param {module:model/CreateCounterpartyWalletAddressRequest} [CreateCounterpartyWalletAddressRequest] The request body to create a counterparty wallet address.
|
|
307
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletAddress} and HTTP response
|
|
308
|
+
*/
|
|
309
|
+
}, {
|
|
310
|
+
key: "createCounterpartyWalletAddressWithHttpInfo",
|
|
311
|
+
value: function createCounterpartyWalletAddressWithHttpInfo(opts) {
|
|
312
|
+
opts = opts || {};
|
|
313
|
+
var postBody = opts['CreateCounterpartyWalletAddressRequest'];
|
|
314
|
+
if (postBody && postBody.toJSON) {
|
|
315
|
+
postBody = postBody.toJSON();
|
|
316
|
+
}
|
|
317
|
+
var pathParams = {};
|
|
318
|
+
var queryParams = {};
|
|
319
|
+
var headerParams = {};
|
|
320
|
+
var formParams = {};
|
|
321
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
322
|
+
var contentTypes = ['application/json'];
|
|
323
|
+
var accepts = ['application/json'];
|
|
324
|
+
var returnType = _WalletAddress["default"];
|
|
325
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Create counterparty wallet address
|
|
330
|
+
* This operation creates a counterparty wallet address.
|
|
331
|
+
* @param {Object} opts Optional parameters
|
|
332
|
+
* @param {module:model/CreateCounterpartyWalletAddressRequest} opts.CreateCounterpartyWalletAddressRequest The request body to create a counterparty wallet address.
|
|
333
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletAddress}
|
|
334
|
+
*/
|
|
335
|
+
}, {
|
|
336
|
+
key: "createCounterpartyWalletAddress",
|
|
337
|
+
value: function createCounterpartyWalletAddress(opts) {
|
|
338
|
+
return this.createCounterpartyWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
339
|
+
return response_and_data.data;
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
|
|
128
343
|
/**
|
|
129
344
|
* Create crypto address
|
|
130
345
|
* This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
@@ -166,6 +381,129 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
166
381
|
});
|
|
167
382
|
}
|
|
168
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Create destination
|
|
386
|
+
* This operation creates a destination.
|
|
387
|
+
* @param {Object} opts Optional parameters
|
|
388
|
+
* @param {module:model/CreateDestinationRequest} [CreateDestinationRequest] The request body to create a destination.
|
|
389
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationDetail} and HTTP response
|
|
390
|
+
*/
|
|
391
|
+
}, {
|
|
392
|
+
key: "createDestinationWithHttpInfo",
|
|
393
|
+
value: function createDestinationWithHttpInfo(opts) {
|
|
394
|
+
opts = opts || {};
|
|
395
|
+
var postBody = opts['CreateDestinationRequest'];
|
|
396
|
+
if (postBody && postBody.toJSON) {
|
|
397
|
+
postBody = postBody.toJSON();
|
|
398
|
+
}
|
|
399
|
+
var pathParams = {};
|
|
400
|
+
var queryParams = {};
|
|
401
|
+
var headerParams = {};
|
|
402
|
+
var formParams = {};
|
|
403
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
404
|
+
var contentTypes = ['application/json'];
|
|
405
|
+
var accepts = ['application/json'];
|
|
406
|
+
var returnType = _DestinationDetail["default"];
|
|
407
|
+
return this.apiClient.callApi('/payments/destination', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Create destination
|
|
412
|
+
* This operation creates a destination.
|
|
413
|
+
* @param {Object} opts Optional parameters
|
|
414
|
+
* @param {module:model/CreateDestinationRequest} opts.CreateDestinationRequest The request body to create a destination.
|
|
415
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationDetail}
|
|
416
|
+
*/
|
|
417
|
+
}, {
|
|
418
|
+
key: "createDestination",
|
|
419
|
+
value: function createDestination(opts) {
|
|
420
|
+
return this.createDestinationWithHttpInfo(opts).then(function (response_and_data) {
|
|
421
|
+
return response_and_data.data;
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Create destination bank account
|
|
427
|
+
* This operation creates a destination bank account.
|
|
428
|
+
* @param {Object} opts Optional parameters
|
|
429
|
+
* @param {module:model/CreateDestinationBankAccountRequest} [CreateDestinationBankAccountRequest] The request body to create a destination bank account.
|
|
430
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccount} and HTTP response
|
|
431
|
+
*/
|
|
432
|
+
}, {
|
|
433
|
+
key: "createDestinationBankAccountWithHttpInfo",
|
|
434
|
+
value: function createDestinationBankAccountWithHttpInfo(opts) {
|
|
435
|
+
opts = opts || {};
|
|
436
|
+
var postBody = opts['CreateDestinationBankAccountRequest'];
|
|
437
|
+
if (postBody && postBody.toJSON) {
|
|
438
|
+
postBody = postBody.toJSON();
|
|
439
|
+
}
|
|
440
|
+
var pathParams = {};
|
|
441
|
+
var queryParams = {};
|
|
442
|
+
var headerParams = {};
|
|
443
|
+
var formParams = {};
|
|
444
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
445
|
+
var contentTypes = ['application/json'];
|
|
446
|
+
var accepts = ['application/json'];
|
|
447
|
+
var returnType = _DestinationBankAccount["default"];
|
|
448
|
+
return this.apiClient.callApi('/payments/destination/bank_account', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Create destination bank account
|
|
453
|
+
* This operation creates a destination bank account.
|
|
454
|
+
* @param {Object} opts Optional parameters
|
|
455
|
+
* @param {module:model/CreateDestinationBankAccountRequest} opts.CreateDestinationBankAccountRequest The request body to create a destination bank account.
|
|
456
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccount}
|
|
457
|
+
*/
|
|
458
|
+
}, {
|
|
459
|
+
key: "createDestinationBankAccount",
|
|
460
|
+
value: function createDestinationBankAccount(opts) {
|
|
461
|
+
return this.createDestinationBankAccountWithHttpInfo(opts).then(function (response_and_data) {
|
|
462
|
+
return response_and_data.data;
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Create destination wallet address
|
|
468
|
+
* This operation creates a destination wallet address.
|
|
469
|
+
* @param {Object} opts Optional parameters
|
|
470
|
+
* @param {module:model/CreateDestinationWalletAddressRequest} [CreateDestinationWalletAddressRequest] The request body to create a destination wallet address.
|
|
471
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletAddress} and HTTP response
|
|
472
|
+
*/
|
|
473
|
+
}, {
|
|
474
|
+
key: "createDestinationWalletAddressWithHttpInfo",
|
|
475
|
+
value: function createDestinationWalletAddressWithHttpInfo(opts) {
|
|
476
|
+
opts = opts || {};
|
|
477
|
+
var postBody = opts['CreateDestinationWalletAddressRequest'];
|
|
478
|
+
if (postBody && postBody.toJSON) {
|
|
479
|
+
postBody = postBody.toJSON();
|
|
480
|
+
}
|
|
481
|
+
var pathParams = {};
|
|
482
|
+
var queryParams = {};
|
|
483
|
+
var headerParams = {};
|
|
484
|
+
var formParams = {};
|
|
485
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
486
|
+
var contentTypes = ['application/json'];
|
|
487
|
+
var accepts = ['application/json'];
|
|
488
|
+
var returnType = _WalletAddress["default"];
|
|
489
|
+
return this.apiClient.callApi('/payments/destination/wallet_address', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Create destination wallet address
|
|
494
|
+
* This operation creates a destination wallet address.
|
|
495
|
+
* @param {Object} opts Optional parameters
|
|
496
|
+
* @param {module:model/CreateDestinationWalletAddressRequest} opts.CreateDestinationWalletAddressRequest The request body to create a destination wallet address.
|
|
497
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletAddress}
|
|
498
|
+
*/
|
|
499
|
+
}, {
|
|
500
|
+
key: "createDestinationWalletAddress",
|
|
501
|
+
value: function createDestinationWalletAddress(opts) {
|
|
502
|
+
return this.createDestinationWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
503
|
+
return response_and_data.data;
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
169
507
|
/**
|
|
170
508
|
* Create forced sweep
|
|
171
509
|
* <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.
|
|
@@ -209,7 +547,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
209
547
|
|
|
210
548
|
/**
|
|
211
549
|
* Create merchant
|
|
212
|
-
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/
|
|
550
|
+
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant).
|
|
213
551
|
* @param {Object} opts Optional parameters
|
|
214
552
|
* @param {module:model/CreateMerchantRequest} [CreateMerchantRequest] The request body to create a merchant.
|
|
215
553
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Merchant} and HTTP response
|
|
@@ -235,7 +573,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
235
573
|
|
|
236
574
|
/**
|
|
237
575
|
* Create merchant
|
|
238
|
-
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/
|
|
576
|
+
* This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant).
|
|
239
577
|
* @param {Object} opts Optional parameters
|
|
240
578
|
* @param {module:model/CreateMerchantRequest} opts.CreateMerchantRequest The request body to create a merchant.
|
|
241
579
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Merchant}
|
|
@@ -250,7 +588,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
250
588
|
|
|
251
589
|
/**
|
|
252
590
|
* Create order link
|
|
253
|
-
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/
|
|
591
|
+
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link).
|
|
254
592
|
* @param {Object} opts Optional parameters
|
|
255
593
|
* @param {module:model/CreateOrderLinkRequest} [CreateOrderLinkRequest] The request body to create a payment link for a pay-in order.
|
|
256
594
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
@@ -276,7 +614,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
276
614
|
|
|
277
615
|
/**
|
|
278
616
|
* Create order link
|
|
279
|
-
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/
|
|
617
|
+
* This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link).
|
|
280
618
|
* @param {Object} opts Optional parameters
|
|
281
619
|
* @param {module:model/CreateOrderLinkRequest} opts.CreateOrderLinkRequest The request body to create a payment link for a pay-in order.
|
|
282
620
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
@@ -330,6 +668,47 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
330
668
|
});
|
|
331
669
|
}
|
|
332
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Create payout
|
|
673
|
+
* This operation creates a payout to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single payout record.
|
|
674
|
+
* @param {Object} opts Optional parameters
|
|
675
|
+
* @param {module:model/CreatePayoutRequest} [CreatePayoutRequest] The request body to create a payout.
|
|
676
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentPayout} and HTTP response
|
|
677
|
+
*/
|
|
678
|
+
}, {
|
|
679
|
+
key: "createPayoutWithHttpInfo",
|
|
680
|
+
value: function createPayoutWithHttpInfo(opts) {
|
|
681
|
+
opts = opts || {};
|
|
682
|
+
var postBody = opts['CreatePayoutRequest'];
|
|
683
|
+
if (postBody && postBody.toJSON) {
|
|
684
|
+
postBody = postBody.toJSON();
|
|
685
|
+
}
|
|
686
|
+
var pathParams = {};
|
|
687
|
+
var queryParams = {};
|
|
688
|
+
var headerParams = {};
|
|
689
|
+
var formParams = {};
|
|
690
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
691
|
+
var contentTypes = ['application/json'];
|
|
692
|
+
var accepts = ['application/json'];
|
|
693
|
+
var returnType = _PaymentPayout["default"];
|
|
694
|
+
return this.apiClient.callApi('/payments/payouts', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Create payout
|
|
699
|
+
* This operation creates a payout to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single payout record.
|
|
700
|
+
* @param {Object} opts Optional parameters
|
|
701
|
+
* @param {module:model/CreatePayoutRequest} opts.CreatePayoutRequest The request body to create a payout.
|
|
702
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentPayout}
|
|
703
|
+
*/
|
|
704
|
+
}, {
|
|
705
|
+
key: "createPayout",
|
|
706
|
+
value: function createPayout(opts) {
|
|
707
|
+
return this.createPayoutWithHttpInfo(opts).then(function (response_and_data) {
|
|
708
|
+
return response_and_data.data;
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
|
|
333
712
|
/**
|
|
334
713
|
* Create refund order
|
|
335
714
|
* This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes.
|
|
@@ -373,9 +752,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
373
752
|
|
|
374
753
|
/**
|
|
375
754
|
* Create refund link
|
|
376
|
-
* This operation creates a
|
|
755
|
+
* This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link).
|
|
377
756
|
* @param {Object} opts Optional parameters
|
|
378
|
-
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a
|
|
757
|
+
* @param {module:model/CreateRefundLinkRequest} [CreateRefundLinkRequest] The request body to create a refund link.
|
|
379
758
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
|
|
380
759
|
*/
|
|
381
760
|
}, {
|
|
@@ -399,9 +778,9 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
399
778
|
|
|
400
779
|
/**
|
|
401
780
|
* Create refund link
|
|
402
|
-
* This operation creates a
|
|
781
|
+
* This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link).
|
|
403
782
|
* @param {Object} opts Optional parameters
|
|
404
|
-
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a
|
|
783
|
+
* @param {module:model/CreateRefundLinkRequest} opts.CreateRefundLinkRequest The request body to create a refund link.
|
|
405
784
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
|
|
406
785
|
*/
|
|
407
786
|
}, {
|
|
@@ -454,24 +833,24 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
833
|
}
|
|
455
834
|
|
|
456
835
|
/**
|
|
457
|
-
* Delete
|
|
458
|
-
* This operation
|
|
459
|
-
* @param {String}
|
|
460
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
836
|
+
* Delete counterparty
|
|
837
|
+
* This operation deletes a counterparty.
|
|
838
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
839
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCounterparty200Response} and HTTP response
|
|
461
840
|
*/
|
|
462
841
|
}, {
|
|
463
|
-
key: "
|
|
464
|
-
value: function
|
|
842
|
+
key: "deleteCounterpartyWithHttpInfo",
|
|
843
|
+
value: function deleteCounterpartyWithHttpInfo(counterparty_id) {
|
|
465
844
|
var postBody = null;
|
|
466
845
|
if (postBody && postBody.toJSON) {
|
|
467
846
|
postBody = postBody.toJSON();
|
|
468
847
|
}
|
|
469
|
-
// verify the required parameter '
|
|
470
|
-
if (
|
|
471
|
-
throw new Error("Missing the required parameter '
|
|
848
|
+
// verify the required parameter 'counterparty_id' is set
|
|
849
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
850
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling deleteCounterparty");
|
|
472
851
|
}
|
|
473
852
|
var pathParams = {
|
|
474
|
-
'
|
|
853
|
+
'counterparty_id': counterparty_id
|
|
475
854
|
};
|
|
476
855
|
var queryParams = {};
|
|
477
856
|
var headerParams = {};
|
|
@@ -479,279 +858,1118 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
479
858
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
480
859
|
var contentTypes = [];
|
|
481
860
|
var accepts = ['application/json'];
|
|
482
|
-
var returnType =
|
|
483
|
-
return this.apiClient.callApi('/payments/
|
|
861
|
+
var returnType = _DeleteCounterparty200Response["default"];
|
|
862
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
484
863
|
}
|
|
485
864
|
|
|
486
865
|
/**
|
|
487
|
-
* Delete
|
|
488
|
-
* This operation
|
|
489
|
-
* @param {String}
|
|
490
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
866
|
+
* Delete counterparty
|
|
867
|
+
* This operation deletes a counterparty.
|
|
868
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
869
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCounterparty200Response}
|
|
491
870
|
*/
|
|
492
871
|
}, {
|
|
493
|
-
key: "
|
|
494
|
-
value: function
|
|
495
|
-
return this.
|
|
872
|
+
key: "deleteCounterparty",
|
|
873
|
+
value: function deleteCounterparty(counterparty_id) {
|
|
874
|
+
return this.deleteCounterpartyWithHttpInfo(counterparty_id).then(function (response_and_data) {
|
|
496
875
|
return response_and_data.data;
|
|
497
876
|
});
|
|
498
877
|
}
|
|
499
878
|
|
|
500
879
|
/**
|
|
501
|
-
*
|
|
502
|
-
* This operation
|
|
503
|
-
* @param {String}
|
|
504
|
-
* @
|
|
505
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
880
|
+
* Delete counterparty wallet address
|
|
881
|
+
* This operation deletes a counterparty wallet address.
|
|
882
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
883
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCounterpartyWalletAddress200Response} and HTTP response
|
|
506
884
|
*/
|
|
507
885
|
}, {
|
|
508
|
-
key: "
|
|
509
|
-
value: function
|
|
886
|
+
key: "deleteCounterpartyWalletAddressWithHttpInfo",
|
|
887
|
+
value: function deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id) {
|
|
510
888
|
var postBody = null;
|
|
511
889
|
if (postBody && postBody.toJSON) {
|
|
512
890
|
postBody = postBody.toJSON();
|
|
513
891
|
}
|
|
514
|
-
// verify the required parameter '
|
|
515
|
-
if (
|
|
516
|
-
throw new Error("Missing the required parameter '
|
|
517
|
-
}
|
|
518
|
-
// verify the required parameter 'currency' is set
|
|
519
|
-
if (currency === undefined || currency === null) {
|
|
520
|
-
throw new Error("Missing the required parameter 'currency' when calling getExchangeRate");
|
|
892
|
+
// verify the required parameter 'wallet_address_id' is set
|
|
893
|
+
if (wallet_address_id === undefined || wallet_address_id === null) {
|
|
894
|
+
throw new Error("Missing the required parameter 'wallet_address_id' when calling deleteCounterpartyWalletAddress");
|
|
521
895
|
}
|
|
522
896
|
var pathParams = {
|
|
523
|
-
'
|
|
524
|
-
'currency': currency
|
|
897
|
+
'wallet_address_id': wallet_address_id
|
|
525
898
|
};
|
|
526
899
|
var queryParams = {};
|
|
527
900
|
var headerParams = {};
|
|
528
901
|
var formParams = {};
|
|
529
|
-
var authNames = ['CoboAuth'];
|
|
902
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
530
903
|
var contentTypes = [];
|
|
531
904
|
var accepts = ['application/json'];
|
|
532
|
-
var returnType =
|
|
533
|
-
return this.apiClient.callApi('/payments/
|
|
905
|
+
var returnType = _DeleteCounterpartyWalletAddress200Response["default"];
|
|
906
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address/{wallet_address_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
534
907
|
}
|
|
535
908
|
|
|
536
909
|
/**
|
|
537
|
-
*
|
|
538
|
-
* This operation
|
|
539
|
-
* @param {String}
|
|
540
|
-
* @
|
|
541
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
910
|
+
* Delete counterparty wallet address
|
|
911
|
+
* This operation deletes a counterparty wallet address.
|
|
912
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
913
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCounterpartyWalletAddress200Response}
|
|
542
914
|
*/
|
|
543
915
|
}, {
|
|
544
|
-
key: "
|
|
545
|
-
value: function
|
|
546
|
-
return this.
|
|
916
|
+
key: "deleteCounterpartyWalletAddress",
|
|
917
|
+
value: function deleteCounterpartyWalletAddress(wallet_address_id) {
|
|
918
|
+
return this.deleteCounterpartyWalletAddressWithHttpInfo(wallet_address_id).then(function (response_and_data) {
|
|
547
919
|
return response_and_data.data;
|
|
548
920
|
});
|
|
549
921
|
}
|
|
550
922
|
|
|
551
923
|
/**
|
|
552
|
-
*
|
|
553
|
-
* This operation
|
|
554
|
-
* @param {String}
|
|
555
|
-
* @
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
924
|
+
* Delete crypto address
|
|
925
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
926
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
927
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteCryptoAddress201Response} and HTTP response
|
|
928
|
+
*/
|
|
929
|
+
}, {
|
|
930
|
+
key: "deleteCryptoAddressWithHttpInfo",
|
|
931
|
+
value: function deleteCryptoAddressWithHttpInfo(crypto_address_id) {
|
|
932
|
+
var postBody = null;
|
|
933
|
+
if (postBody && postBody.toJSON) {
|
|
934
|
+
postBody = postBody.toJSON();
|
|
935
|
+
}
|
|
936
|
+
// verify the required parameter 'crypto_address_id' is set
|
|
937
|
+
if (crypto_address_id === undefined || crypto_address_id === null) {
|
|
938
|
+
throw new Error("Missing the required parameter 'crypto_address_id' when calling deleteCryptoAddress");
|
|
939
|
+
}
|
|
940
|
+
var pathParams = {
|
|
941
|
+
'crypto_address_id': crypto_address_id
|
|
942
|
+
};
|
|
943
|
+
var queryParams = {};
|
|
944
|
+
var headerParams = {};
|
|
945
|
+
var formParams = {};
|
|
946
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
947
|
+
var contentTypes = [];
|
|
948
|
+
var accepts = ['application/json'];
|
|
949
|
+
var returnType = _DeleteCryptoAddress201Response["default"];
|
|
950
|
+
return this.apiClient.callApi('/payments/crypto_addresses/{crypto_address_id}/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Delete crypto address
|
|
955
|
+
* This operation unregisters a crypto address from being used for crypto payouts.
|
|
956
|
+
* @param {String} crypto_address_id The crypto address ID.
|
|
957
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteCryptoAddress201Response}
|
|
958
|
+
*/
|
|
959
|
+
}, {
|
|
960
|
+
key: "deleteCryptoAddress",
|
|
961
|
+
value: function deleteCryptoAddress(crypto_address_id) {
|
|
962
|
+
return this.deleteCryptoAddressWithHttpInfo(crypto_address_id).then(function (response_and_data) {
|
|
963
|
+
return response_and_data.data;
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Delete destination
|
|
969
|
+
* This operation deletes a destination.
|
|
970
|
+
* @param {String} destination_id The destination ID.
|
|
971
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestination200Response} and HTTP response
|
|
972
|
+
*/
|
|
973
|
+
}, {
|
|
974
|
+
key: "deleteDestinationWithHttpInfo",
|
|
975
|
+
value: function deleteDestinationWithHttpInfo(destination_id) {
|
|
976
|
+
var postBody = null;
|
|
977
|
+
if (postBody && postBody.toJSON) {
|
|
978
|
+
postBody = postBody.toJSON();
|
|
979
|
+
}
|
|
980
|
+
// verify the required parameter 'destination_id' is set
|
|
981
|
+
if (destination_id === undefined || destination_id === null) {
|
|
982
|
+
throw new Error("Missing the required parameter 'destination_id' when calling deleteDestination");
|
|
983
|
+
}
|
|
984
|
+
var pathParams = {
|
|
985
|
+
'destination_id': destination_id
|
|
986
|
+
};
|
|
987
|
+
var queryParams = {};
|
|
988
|
+
var headerParams = {};
|
|
989
|
+
var formParams = {};
|
|
990
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
991
|
+
var contentTypes = [];
|
|
992
|
+
var accepts = ['application/json'];
|
|
993
|
+
var returnType = _DeleteDestination200Response["default"];
|
|
994
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Delete destination
|
|
999
|
+
* This operation deletes a destination.
|
|
1000
|
+
* @param {String} destination_id The destination ID.
|
|
1001
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestination200Response}
|
|
1002
|
+
*/
|
|
1003
|
+
}, {
|
|
1004
|
+
key: "deleteDestination",
|
|
1005
|
+
value: function deleteDestination(destination_id) {
|
|
1006
|
+
return this.deleteDestinationWithHttpInfo(destination_id).then(function (response_and_data) {
|
|
1007
|
+
return response_and_data.data;
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* Delete destination bank account
|
|
1013
|
+
* This operation deletes a destination bank account.
|
|
1014
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1015
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestinationBankAccount200Response} and HTTP response
|
|
1016
|
+
*/
|
|
1017
|
+
}, {
|
|
1018
|
+
key: "deleteDestinationBankAccountWithHttpInfo",
|
|
1019
|
+
value: function deleteDestinationBankAccountWithHttpInfo(bank_account_id) {
|
|
1020
|
+
var postBody = null;
|
|
1021
|
+
if (postBody && postBody.toJSON) {
|
|
1022
|
+
postBody = postBody.toJSON();
|
|
1023
|
+
}
|
|
1024
|
+
// verify the required parameter 'bank_account_id' is set
|
|
1025
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
1026
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling deleteDestinationBankAccount");
|
|
1027
|
+
}
|
|
1028
|
+
var pathParams = {
|
|
1029
|
+
'bank_account_id': bank_account_id
|
|
1030
|
+
};
|
|
1031
|
+
var queryParams = {};
|
|
1032
|
+
var headerParams = {};
|
|
1033
|
+
var formParams = {};
|
|
1034
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1035
|
+
var contentTypes = [];
|
|
1036
|
+
var accepts = ['application/json'];
|
|
1037
|
+
var returnType = _DeleteDestinationBankAccount200Response["default"];
|
|
1038
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Delete destination bank account
|
|
1043
|
+
* This operation deletes a destination bank account.
|
|
1044
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1045
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestinationBankAccount200Response}
|
|
1046
|
+
*/
|
|
1047
|
+
}, {
|
|
1048
|
+
key: "deleteDestinationBankAccount",
|
|
1049
|
+
value: function deleteDestinationBankAccount(bank_account_id) {
|
|
1050
|
+
return this.deleteDestinationBankAccountWithHttpInfo(bank_account_id).then(function (response_and_data) {
|
|
1051
|
+
return response_and_data.data;
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Delete destination wallet address
|
|
1057
|
+
* This operation deletes a destination wallet address.
|
|
1058
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
1059
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDestinationWalletAddress200Response} and HTTP response
|
|
1060
|
+
*/
|
|
1061
|
+
}, {
|
|
1062
|
+
key: "deleteDestinationWalletAddressWithHttpInfo",
|
|
1063
|
+
value: function deleteDestinationWalletAddressWithHttpInfo(wallet_address_id) {
|
|
1064
|
+
var postBody = null;
|
|
1065
|
+
if (postBody && postBody.toJSON) {
|
|
1066
|
+
postBody = postBody.toJSON();
|
|
1067
|
+
}
|
|
1068
|
+
// verify the required parameter 'wallet_address_id' is set
|
|
1069
|
+
if (wallet_address_id === undefined || wallet_address_id === null) {
|
|
1070
|
+
throw new Error("Missing the required parameter 'wallet_address_id' when calling deleteDestinationWalletAddress");
|
|
1071
|
+
}
|
|
1072
|
+
var pathParams = {
|
|
1073
|
+
'wallet_address_id': wallet_address_id
|
|
1074
|
+
};
|
|
1075
|
+
var queryParams = {};
|
|
1076
|
+
var headerParams = {};
|
|
1077
|
+
var formParams = {};
|
|
1078
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1079
|
+
var contentTypes = [];
|
|
1080
|
+
var accepts = ['application/json'];
|
|
1081
|
+
var returnType = _DeleteDestinationWalletAddress200Response["default"];
|
|
1082
|
+
return this.apiClient.callApi('/payments/destination/wallet_address/{wallet_address_id}/delete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Delete destination wallet address
|
|
1087
|
+
* This operation deletes a destination wallet address.
|
|
1088
|
+
* @param {String} wallet_address_id The wallet address ID.
|
|
1089
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDestinationWalletAddress200Response}
|
|
1090
|
+
*/
|
|
1091
|
+
}, {
|
|
1092
|
+
key: "deleteDestinationWalletAddress",
|
|
1093
|
+
value: function deleteDestinationWalletAddress(wallet_address_id) {
|
|
1094
|
+
return this.deleteDestinationWalletAddressWithHttpInfo(wallet_address_id).then(function (response_and_data) {
|
|
1095
|
+
return response_and_data.data;
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Enable or disable destination whitelist
|
|
1101
|
+
* This operation enables or disables the whitelist for a destination.
|
|
1102
|
+
* @param {Object} opts Optional parameters
|
|
1103
|
+
* @param {module:model/EnableDestinationWhitelistRequest} [EnableDestinationWhitelistRequest] The request body to enable or disable the destination whitelist.
|
|
1104
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryDestinationWhitelistEnabled200Response} and HTTP response
|
|
1105
|
+
*/
|
|
1106
|
+
}, {
|
|
1107
|
+
key: "enableDestinationWhitelistWithHttpInfo",
|
|
1108
|
+
value: function enableDestinationWhitelistWithHttpInfo(opts) {
|
|
1109
|
+
opts = opts || {};
|
|
1110
|
+
var postBody = opts['EnableDestinationWhitelistRequest'];
|
|
1111
|
+
if (postBody && postBody.toJSON) {
|
|
1112
|
+
postBody = postBody.toJSON();
|
|
1113
|
+
}
|
|
1114
|
+
var pathParams = {};
|
|
1115
|
+
var queryParams = {};
|
|
1116
|
+
var headerParams = {};
|
|
1117
|
+
var formParams = {};
|
|
1118
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1119
|
+
var contentTypes = ['application/json'];
|
|
1120
|
+
var accepts = ['application/json'];
|
|
1121
|
+
var returnType = _QueryDestinationWhitelistEnabled200Response["default"];
|
|
1122
|
+
return this.apiClient.callApi('/payments/destination/enable_whitelist', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Enable or disable destination whitelist
|
|
1127
|
+
* This operation enables or disables the whitelist for a destination.
|
|
1128
|
+
* @param {Object} opts Optional parameters
|
|
1129
|
+
* @param {module:model/EnableDestinationWhitelistRequest} opts.EnableDestinationWhitelistRequest The request body to enable or disable the destination whitelist.
|
|
1130
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryDestinationWhitelistEnabled200Response}
|
|
1131
|
+
*/
|
|
1132
|
+
}, {
|
|
1133
|
+
key: "enableDestinationWhitelist",
|
|
1134
|
+
value: function enableDestinationWhitelist(opts) {
|
|
1135
|
+
return this.enableDestinationWhitelistWithHttpInfo(opts).then(function (response_and_data) {
|
|
1136
|
+
return response_and_data.data;
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Get available allocation amount
|
|
1142
|
+
* This operation retrieves the information of available allocation amount.
|
|
1143
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1144
|
+
* @param {String} source_account
|
|
1145
|
+
* @param {String} destination_account
|
|
1146
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentAllocationAmount} and HTTP response
|
|
1147
|
+
*/
|
|
1148
|
+
}, {
|
|
1149
|
+
key: "getAvailableAllocationAmountWithHttpInfo",
|
|
1150
|
+
value: function getAvailableAllocationAmountWithHttpInfo(token_id, source_account, destination_account) {
|
|
1151
|
+
var postBody = null;
|
|
1152
|
+
if (postBody && postBody.toJSON) {
|
|
1153
|
+
postBody = postBody.toJSON();
|
|
1154
|
+
}
|
|
1155
|
+
// verify the required parameter 'token_id' is set
|
|
1156
|
+
if (token_id === undefined || token_id === null) {
|
|
1157
|
+
throw new Error("Missing the required parameter 'token_id' when calling getAvailableAllocationAmount");
|
|
1158
|
+
}
|
|
1159
|
+
// verify the required parameter 'source_account' is set
|
|
1160
|
+
if (source_account === undefined || source_account === null) {
|
|
1161
|
+
throw new Error("Missing the required parameter 'source_account' when calling getAvailableAllocationAmount");
|
|
1162
|
+
}
|
|
1163
|
+
// verify the required parameter 'destination_account' is set
|
|
1164
|
+
if (destination_account === undefined || destination_account === null) {
|
|
1165
|
+
throw new Error("Missing the required parameter 'destination_account' when calling getAvailableAllocationAmount");
|
|
1166
|
+
}
|
|
1167
|
+
var pathParams = {};
|
|
1168
|
+
var queryParams = {
|
|
1169
|
+
'token_id': token_id,
|
|
1170
|
+
'source_account': source_account,
|
|
1171
|
+
'destination_account': destination_account
|
|
1172
|
+
};
|
|
1173
|
+
var headerParams = {};
|
|
1174
|
+
var formParams = {};
|
|
1175
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1176
|
+
var contentTypes = [];
|
|
1177
|
+
var accepts = ['application/json'];
|
|
1178
|
+
var returnType = _PaymentAllocationAmount["default"];
|
|
1179
|
+
return this.apiClient.callApi('/payments/allocation_amount', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Get available allocation amount
|
|
1184
|
+
* This operation retrieves the information of available allocation amount.
|
|
1185
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1186
|
+
* @param {String} source_account
|
|
1187
|
+
* @param {String} destination_account
|
|
1188
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentAllocationAmount}
|
|
1189
|
+
*/
|
|
1190
|
+
}, {
|
|
1191
|
+
key: "getAvailableAllocationAmount",
|
|
1192
|
+
value: function getAvailableAllocationAmount(token_id, source_account, destination_account) {
|
|
1193
|
+
return this.getAvailableAllocationAmountWithHttpInfo(token_id, source_account, destination_account).then(function (response_and_data) {
|
|
1194
|
+
return response_and_data.data;
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Get batch allocation by id
|
|
1200
|
+
* This operation retrieves the information of a batch allocation.
|
|
1201
|
+
* @param {String} batch_allocation_id The batch allocation ID.
|
|
1202
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchAllocationDetail} and HTTP response
|
|
1203
|
+
*/
|
|
1204
|
+
}, {
|
|
1205
|
+
key: "getBatchAllocationByIdWithHttpInfo",
|
|
1206
|
+
value: function getBatchAllocationByIdWithHttpInfo(batch_allocation_id) {
|
|
1207
|
+
var postBody = null;
|
|
1208
|
+
if (postBody && postBody.toJSON) {
|
|
1209
|
+
postBody = postBody.toJSON();
|
|
1210
|
+
}
|
|
1211
|
+
// verify the required parameter 'batch_allocation_id' is set
|
|
1212
|
+
if (batch_allocation_id === undefined || batch_allocation_id === null) {
|
|
1213
|
+
throw new Error("Missing the required parameter 'batch_allocation_id' when calling getBatchAllocationById");
|
|
1214
|
+
}
|
|
1215
|
+
var pathParams = {
|
|
1216
|
+
'batch_allocation_id': batch_allocation_id
|
|
1217
|
+
};
|
|
1218
|
+
var queryParams = {};
|
|
1219
|
+
var headerParams = {};
|
|
1220
|
+
var formParams = {};
|
|
1221
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1222
|
+
var contentTypes = [];
|
|
1223
|
+
var accepts = ['application/json'];
|
|
1224
|
+
var returnType = _BatchAllocationDetail["default"];
|
|
1225
|
+
return this.apiClient.callApi('/payments/batch_allocations/{batch_allocation_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Get batch allocation by id
|
|
1230
|
+
* This operation retrieves the information of a batch allocation.
|
|
1231
|
+
* @param {String} batch_allocation_id The batch allocation ID.
|
|
1232
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchAllocationDetail}
|
|
1233
|
+
*/
|
|
1234
|
+
}, {
|
|
1235
|
+
key: "getBatchAllocationById",
|
|
1236
|
+
value: function getBatchAllocationById(batch_allocation_id) {
|
|
1237
|
+
return this.getBatchAllocationByIdWithHttpInfo(batch_allocation_id).then(function (response_and_data) {
|
|
1238
|
+
return response_and_data.data;
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Get counterparty information
|
|
1244
|
+
* This operation retrieves the detailed information about a specified counterparty.
|
|
1245
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
1246
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CounterpartyDetail} and HTTP response
|
|
1247
|
+
*/
|
|
1248
|
+
}, {
|
|
1249
|
+
key: "getCounterpartyDetailByIdWithHttpInfo",
|
|
1250
|
+
value: function getCounterpartyDetailByIdWithHttpInfo(counterparty_id) {
|
|
1251
|
+
var postBody = null;
|
|
1252
|
+
if (postBody && postBody.toJSON) {
|
|
1253
|
+
postBody = postBody.toJSON();
|
|
1254
|
+
}
|
|
1255
|
+
// verify the required parameter 'counterparty_id' is set
|
|
1256
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
1257
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling getCounterpartyDetailById");
|
|
1258
|
+
}
|
|
1259
|
+
var pathParams = {
|
|
1260
|
+
'counterparty_id': counterparty_id
|
|
1261
|
+
};
|
|
1262
|
+
var queryParams = {};
|
|
1263
|
+
var headerParams = {};
|
|
1264
|
+
var formParams = {};
|
|
1265
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1266
|
+
var contentTypes = [];
|
|
1267
|
+
var accepts = ['application/json'];
|
|
1268
|
+
var returnType = _CounterpartyDetail["default"];
|
|
1269
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Get counterparty information
|
|
1274
|
+
* This operation retrieves the detailed information about a specified counterparty.
|
|
1275
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
1276
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CounterpartyDetail}
|
|
1277
|
+
*/
|
|
1278
|
+
}, {
|
|
1279
|
+
key: "getCounterpartyDetailById",
|
|
1280
|
+
value: function getCounterpartyDetailById(counterparty_id) {
|
|
1281
|
+
return this.getCounterpartyDetailByIdWithHttpInfo(counterparty_id).then(function (response_and_data) {
|
|
1282
|
+
return response_and_data.data;
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* Get destination bank account information
|
|
1288
|
+
* This operation retrieves the detailed information about a specified destination bank account.
|
|
1289
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1290
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccountDetail} and HTTP response
|
|
1291
|
+
*/
|
|
1292
|
+
}, {
|
|
1293
|
+
key: "getDestinationBankAccountDetailByIdWithHttpInfo",
|
|
1294
|
+
value: function getDestinationBankAccountDetailByIdWithHttpInfo(bank_account_id) {
|
|
1295
|
+
var postBody = null;
|
|
1296
|
+
if (postBody && postBody.toJSON) {
|
|
1297
|
+
postBody = postBody.toJSON();
|
|
1298
|
+
}
|
|
1299
|
+
// verify the required parameter 'bank_account_id' is set
|
|
1300
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
1301
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling getDestinationBankAccountDetailById");
|
|
1302
|
+
}
|
|
1303
|
+
var pathParams = {
|
|
1304
|
+
'bank_account_id': bank_account_id
|
|
1305
|
+
};
|
|
1306
|
+
var queryParams = {};
|
|
1307
|
+
var headerParams = {};
|
|
1308
|
+
var formParams = {};
|
|
1309
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1310
|
+
var contentTypes = [];
|
|
1311
|
+
var accepts = ['application/json'];
|
|
1312
|
+
var returnType = _DestinationBankAccountDetail["default"];
|
|
1313
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Get destination bank account information
|
|
1318
|
+
* This operation retrieves the detailed information about a specified destination bank account.
|
|
1319
|
+
* @param {String} bank_account_id The bank account ID.
|
|
1320
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccountDetail}
|
|
1321
|
+
*/
|
|
1322
|
+
}, {
|
|
1323
|
+
key: "getDestinationBankAccountDetailById",
|
|
1324
|
+
value: function getDestinationBankAccountDetailById(bank_account_id) {
|
|
1325
|
+
return this.getDestinationBankAccountDetailByIdWithHttpInfo(bank_account_id).then(function (response_and_data) {
|
|
1326
|
+
return response_and_data.data;
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Get destination information
|
|
1332
|
+
* This operation retrieves the detailed information about a specified destination.
|
|
1333
|
+
* @param {String} destination_id The destination ID.
|
|
1334
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationDetail} and HTTP response
|
|
1335
|
+
*/
|
|
1336
|
+
}, {
|
|
1337
|
+
key: "getDestinationDetailByIdWithHttpInfo",
|
|
1338
|
+
value: function getDestinationDetailByIdWithHttpInfo(destination_id) {
|
|
1339
|
+
var postBody = null;
|
|
1340
|
+
if (postBody && postBody.toJSON) {
|
|
1341
|
+
postBody = postBody.toJSON();
|
|
1342
|
+
}
|
|
1343
|
+
// verify the required parameter 'destination_id' is set
|
|
1344
|
+
if (destination_id === undefined || destination_id === null) {
|
|
1345
|
+
throw new Error("Missing the required parameter 'destination_id' when calling getDestinationDetailById");
|
|
1346
|
+
}
|
|
1347
|
+
var pathParams = {
|
|
1348
|
+
'destination_id': destination_id
|
|
1349
|
+
};
|
|
1350
|
+
var queryParams = {};
|
|
1351
|
+
var headerParams = {};
|
|
1352
|
+
var formParams = {};
|
|
1353
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1354
|
+
var contentTypes = [];
|
|
1355
|
+
var accepts = ['application/json'];
|
|
1356
|
+
var returnType = _DestinationDetail["default"];
|
|
1357
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/detail', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* Get destination information
|
|
1362
|
+
* This operation retrieves the detailed information about a specified destination.
|
|
1363
|
+
* @param {String} destination_id The destination ID.
|
|
1364
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationDetail}
|
|
1365
|
+
*/
|
|
1366
|
+
}, {
|
|
1367
|
+
key: "getDestinationDetailById",
|
|
1368
|
+
value: function getDestinationDetailById(destination_id) {
|
|
1369
|
+
return this.getDestinationDetailByIdWithHttpInfo(destination_id).then(function (response_and_data) {
|
|
1370
|
+
return response_and_data.data;
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Get exchange rate
|
|
1376
|
+
* 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>
|
|
1377
|
+
* @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`
|
|
1378
|
+
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
1379
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetExchangeRate200Response} and HTTP response
|
|
1380
|
+
*/
|
|
1381
|
+
}, {
|
|
1382
|
+
key: "getExchangeRateWithHttpInfo",
|
|
1383
|
+
value: function getExchangeRateWithHttpInfo(token_id, currency) {
|
|
1384
|
+
var postBody = null;
|
|
1385
|
+
if (postBody && postBody.toJSON) {
|
|
1386
|
+
postBody = postBody.toJSON();
|
|
1387
|
+
}
|
|
1388
|
+
// verify the required parameter 'token_id' is set
|
|
1389
|
+
if (token_id === undefined || token_id === null) {
|
|
1390
|
+
throw new Error("Missing the required parameter 'token_id' when calling getExchangeRate");
|
|
1391
|
+
}
|
|
1392
|
+
// verify the required parameter 'currency' is set
|
|
1393
|
+
if (currency === undefined || currency === null) {
|
|
1394
|
+
throw new Error("Missing the required parameter 'currency' when calling getExchangeRate");
|
|
1395
|
+
}
|
|
1396
|
+
var pathParams = {
|
|
1397
|
+
'token_id': token_id,
|
|
1398
|
+
'currency': currency
|
|
1399
|
+
};
|
|
1400
|
+
var queryParams = {};
|
|
1401
|
+
var headerParams = {};
|
|
1402
|
+
var formParams = {};
|
|
1403
|
+
var authNames = ['CoboAuth'];
|
|
1404
|
+
var contentTypes = [];
|
|
1405
|
+
var accepts = ['application/json'];
|
|
1406
|
+
var returnType = _GetExchangeRate200Response["default"];
|
|
1407
|
+
return this.apiClient.callApi('/payments/exchange_rates/{token_id}/{currency}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Get exchange rate
|
|
1412
|
+
* 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>
|
|
1413
|
+
* @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`
|
|
1414
|
+
* @param {String} currency The fiat currency. Currently, only `USD` is supported.
|
|
1415
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetExchangeRate200Response}
|
|
1416
|
+
*/
|
|
1417
|
+
}, {
|
|
1418
|
+
key: "getExchangeRate",
|
|
1419
|
+
value: function getExchangeRate(token_id, currency) {
|
|
1420
|
+
return this.getExchangeRateWithHttpInfo(token_id, currency).then(function (response_and_data) {
|
|
1421
|
+
return response_and_data.data;
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* Get pay-in order information
|
|
1427
|
+
* This operation retrieves details of a specific pay-in order.
|
|
1428
|
+
* @param {String} order_id The pay-in order ID.
|
|
1429
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
|
|
1430
|
+
*/
|
|
1431
|
+
}, {
|
|
1432
|
+
key: "getPaymentOrderDetailByIdWithHttpInfo",
|
|
1433
|
+
value: function getPaymentOrderDetailByIdWithHttpInfo(order_id) {
|
|
1434
|
+
var postBody = null;
|
|
1435
|
+
if (postBody && postBody.toJSON) {
|
|
1436
|
+
postBody = postBody.toJSON();
|
|
1437
|
+
}
|
|
1438
|
+
// verify the required parameter 'order_id' is set
|
|
1439
|
+
if (order_id === undefined || order_id === null) {
|
|
1440
|
+
throw new Error("Missing the required parameter 'order_id' when calling getPaymentOrderDetailById");
|
|
1441
|
+
}
|
|
1442
|
+
var pathParams = {
|
|
1443
|
+
'order_id': order_id
|
|
1444
|
+
};
|
|
1445
|
+
var queryParams = {};
|
|
1446
|
+
var headerParams = {};
|
|
1447
|
+
var formParams = {};
|
|
1448
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1449
|
+
var contentTypes = [];
|
|
1450
|
+
var accepts = ['application/json'];
|
|
1451
|
+
var returnType = _Order["default"];
|
|
1452
|
+
return this.apiClient.callApi('/payments/orders/{order_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* Get pay-in order information
|
|
1457
|
+
* This operation retrieves details of a specific pay-in order.
|
|
1458
|
+
* @param {String} order_id The pay-in order ID.
|
|
1459
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
|
|
1460
|
+
*/
|
|
1461
|
+
}, {
|
|
1462
|
+
key: "getPaymentOrderDetailById",
|
|
1463
|
+
value: function getPaymentOrderDetailById(order_id) {
|
|
1464
|
+
return this.getPaymentOrderDetailByIdWithHttpInfo(order_id).then(function (response_and_data) {
|
|
1465
|
+
return response_and_data.data;
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Get payout information
|
|
1471
|
+
* This operation retrieves the information of a specific payout.
|
|
1472
|
+
* @param {String} payout_id The payout ID.
|
|
1473
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PaymentPayoutDetail} and HTTP response
|
|
1474
|
+
*/
|
|
1475
|
+
}, {
|
|
1476
|
+
key: "getPayoutByIdWithHttpInfo",
|
|
1477
|
+
value: function getPayoutByIdWithHttpInfo(payout_id) {
|
|
1478
|
+
var postBody = null;
|
|
1479
|
+
if (postBody && postBody.toJSON) {
|
|
1480
|
+
postBody = postBody.toJSON();
|
|
1481
|
+
}
|
|
1482
|
+
// verify the required parameter 'payout_id' is set
|
|
1483
|
+
if (payout_id === undefined || payout_id === null) {
|
|
1484
|
+
throw new Error("Missing the required parameter 'payout_id' when calling getPayoutById");
|
|
1485
|
+
}
|
|
1486
|
+
var pathParams = {
|
|
1487
|
+
'payout_id': payout_id
|
|
1488
|
+
};
|
|
1489
|
+
var queryParams = {};
|
|
1490
|
+
var headerParams = {};
|
|
1491
|
+
var formParams = {};
|
|
1492
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1493
|
+
var contentTypes = [];
|
|
1494
|
+
var accepts = ['application/json'];
|
|
1495
|
+
var returnType = _PaymentPayoutDetail["default"];
|
|
1496
|
+
return this.apiClient.callApi('/payments/payouts/{payout_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Get payout information
|
|
1501
|
+
* This operation retrieves the information of a specific payout.
|
|
1502
|
+
* @param {String} payout_id The payout ID.
|
|
1503
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PaymentPayoutDetail}
|
|
1504
|
+
*/
|
|
1505
|
+
}, {
|
|
1506
|
+
key: "getPayoutById",
|
|
1507
|
+
value: function getPayoutById(payout_id) {
|
|
1508
|
+
return this.getPayoutByIdWithHttpInfo(payout_id).then(function (response_and_data) {
|
|
1509
|
+
return response_and_data.data;
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Get developer balance
|
|
1515
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1516
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1517
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
1518
|
+
*/
|
|
1519
|
+
}, {
|
|
1520
|
+
key: "getPspBalanceWithHttpInfo",
|
|
1521
|
+
value: function getPspBalanceWithHttpInfo(token_id) {
|
|
1522
|
+
var postBody = null;
|
|
1523
|
+
if (postBody && postBody.toJSON) {
|
|
1524
|
+
postBody = postBody.toJSON();
|
|
1525
|
+
}
|
|
1526
|
+
// verify the required parameter 'token_id' is set
|
|
1527
|
+
if (token_id === undefined || token_id === null) {
|
|
1528
|
+
throw new Error("Missing the required parameter 'token_id' when calling getPspBalance");
|
|
1529
|
+
}
|
|
1530
|
+
var pathParams = {};
|
|
1531
|
+
var queryParams = {
|
|
1532
|
+
'token_id': token_id
|
|
1533
|
+
};
|
|
1534
|
+
var headerParams = {};
|
|
1535
|
+
var formParams = {};
|
|
1536
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1537
|
+
var contentTypes = [];
|
|
1538
|
+
var accepts = ['application/json'];
|
|
1539
|
+
var returnType = _PspBalance["default"];
|
|
1540
|
+
return this.apiClient.callApi('/payments/balance/psp', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* Get developer balance
|
|
1545
|
+
* This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1546
|
+
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1547
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
1548
|
+
*/
|
|
1549
|
+
}, {
|
|
1550
|
+
key: "getPspBalance",
|
|
1551
|
+
value: function getPspBalance(token_id) {
|
|
1552
|
+
return this.getPspBalanceWithHttpInfo(token_id).then(function (response_and_data) {
|
|
1553
|
+
return response_and_data.data;
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Get refund order information
|
|
1559
|
+
* This operation retrieves the detailed information about a specified refund order.
|
|
1560
|
+
* @param {String} refund_id The refund order ID.
|
|
1561
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Refund} and HTTP response
|
|
1562
|
+
*/
|
|
1563
|
+
}, {
|
|
1564
|
+
key: "getRefundDetailByIdWithHttpInfo",
|
|
1565
|
+
value: function getRefundDetailByIdWithHttpInfo(refund_id) {
|
|
1566
|
+
var postBody = null;
|
|
1567
|
+
if (postBody && postBody.toJSON) {
|
|
1568
|
+
postBody = postBody.toJSON();
|
|
1569
|
+
}
|
|
1570
|
+
// verify the required parameter 'refund_id' is set
|
|
1571
|
+
if (refund_id === undefined || refund_id === null) {
|
|
1572
|
+
throw new Error("Missing the required parameter 'refund_id' when calling getRefundDetailById");
|
|
1573
|
+
}
|
|
1574
|
+
var pathParams = {
|
|
1575
|
+
'refund_id': refund_id
|
|
1576
|
+
};
|
|
1577
|
+
var queryParams = {};
|
|
1578
|
+
var headerParams = {};
|
|
1579
|
+
var formParams = {};
|
|
1580
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1581
|
+
var contentTypes = [];
|
|
1582
|
+
var accepts = ['application/json'];
|
|
1583
|
+
var returnType = _Refund["default"];
|
|
1584
|
+
return this.apiClient.callApi('/payments/refunds/{refund_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Get refund order information
|
|
1589
|
+
* This operation retrieves the detailed information about a specified refund order.
|
|
1590
|
+
* @param {String} refund_id The refund order ID.
|
|
1591
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Refund}
|
|
1592
|
+
*/
|
|
1593
|
+
}, {
|
|
1594
|
+
key: "getRefundDetailById",
|
|
1595
|
+
value: function getRefundDetailById(refund_id) {
|
|
1596
|
+
return this.getRefundDetailByIdWithHttpInfo(refund_id).then(function (response_and_data) {
|
|
1597
|
+
return response_and_data.data;
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* List all refund orders
|
|
1603
|
+
* This operation retrieves the information of all refund orders.
|
|
1604
|
+
* @param {Object} opts Optional parameters
|
|
1605
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1606
|
+
* @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.
|
|
1607
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1608
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1609
|
+
* @param {String} [request_id] The request ID.
|
|
1610
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1611
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRefunds200Response} and HTTP response
|
|
1612
|
+
*/
|
|
1613
|
+
}, {
|
|
1614
|
+
key: "getRefundsWithHttpInfo",
|
|
1615
|
+
value: function getRefundsWithHttpInfo(opts) {
|
|
1616
|
+
opts = opts || {};
|
|
1617
|
+
var postBody = null;
|
|
1618
|
+
if (postBody && postBody.toJSON) {
|
|
1619
|
+
postBody = postBody.toJSON();
|
|
1620
|
+
}
|
|
1621
|
+
var pathParams = {};
|
|
1622
|
+
var queryParams = {
|
|
1623
|
+
'limit': opts['limit'],
|
|
1624
|
+
'before': opts['before'],
|
|
1625
|
+
'after': opts['after'],
|
|
1626
|
+
'merchant_id': opts['merchant_id'],
|
|
1627
|
+
'request_id': opts['request_id'],
|
|
1628
|
+
'statuses': opts['statuses']
|
|
1629
|
+
};
|
|
1630
|
+
var headerParams = {};
|
|
1631
|
+
var formParams = {};
|
|
1632
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1633
|
+
var contentTypes = [];
|
|
1634
|
+
var accepts = ['application/json'];
|
|
1635
|
+
var returnType = _GetRefunds200Response["default"];
|
|
1636
|
+
return this.apiClient.callApi('/payments/refunds', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* List all refund orders
|
|
1641
|
+
* This operation retrieves the information of all refund orders.
|
|
1642
|
+
* @param {Object} opts Optional parameters
|
|
1643
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1644
|
+
* @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.
|
|
1645
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1646
|
+
* @param {String} opts.merchant_id The merchant ID.
|
|
1647
|
+
* @param {String} opts.request_id The request ID.
|
|
1648
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1649
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRefunds200Response}
|
|
1650
|
+
*/
|
|
1651
|
+
}, {
|
|
1652
|
+
key: "getRefunds",
|
|
1653
|
+
value: function getRefunds(opts) {
|
|
1654
|
+
return this.getRefundsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1655
|
+
return response_and_data.data;
|
|
1656
|
+
});
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Get settlement request information
|
|
1661
|
+
* This operation retrieves the information of a specific settlement request.
|
|
1662
|
+
* @param {String} settlement_request_id The settlement request ID.
|
|
1663
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Settlement} and HTTP response
|
|
1664
|
+
*/
|
|
1665
|
+
}, {
|
|
1666
|
+
key: "getSettlementByIdWithHttpInfo",
|
|
1667
|
+
value: function getSettlementByIdWithHttpInfo(settlement_request_id) {
|
|
1668
|
+
var postBody = null;
|
|
1669
|
+
if (postBody && postBody.toJSON) {
|
|
1670
|
+
postBody = postBody.toJSON();
|
|
1671
|
+
}
|
|
1672
|
+
// verify the required parameter 'settlement_request_id' is set
|
|
1673
|
+
if (settlement_request_id === undefined || settlement_request_id === null) {
|
|
1674
|
+
throw new Error("Missing the required parameter 'settlement_request_id' when calling getSettlementById");
|
|
1675
|
+
}
|
|
1676
|
+
var pathParams = {
|
|
1677
|
+
'settlement_request_id': settlement_request_id
|
|
1678
|
+
};
|
|
1679
|
+
var queryParams = {};
|
|
1680
|
+
var headerParams = {};
|
|
1681
|
+
var formParams = {};
|
|
1682
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1683
|
+
var contentTypes = [];
|
|
1684
|
+
var accepts = ['application/json'];
|
|
1685
|
+
var returnType = _Settlement["default"];
|
|
1686
|
+
return this.apiClient.callApi('/payments/settlement_requests/{settlement_request_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* Get settlement request information
|
|
1691
|
+
* This operation retrieves the information of a specific settlement request.
|
|
1692
|
+
* @param {String} settlement_request_id The settlement request ID.
|
|
1693
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Settlement}
|
|
1694
|
+
*/
|
|
1695
|
+
}, {
|
|
1696
|
+
key: "getSettlementById",
|
|
1697
|
+
value: function getSettlementById(settlement_request_id) {
|
|
1698
|
+
return this.getSettlementByIdWithHttpInfo(settlement_request_id).then(function (response_and_data) {
|
|
1699
|
+
return response_and_data.data;
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* Get withdrawable balances
|
|
1705
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
1706
|
+
* @param {Object} opts Optional parameters
|
|
1707
|
+
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
1708
|
+
* @param {String} [currency = 'USD')] The currency for the operation. Currently, only `USD` is supported.
|
|
1709
|
+
* @param {module:model/AcquiringType} [acquiring_type]
|
|
1710
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
|
|
1711
|
+
*/
|
|
1712
|
+
}, {
|
|
1713
|
+
key: "getSettlementInfoByIdsWithHttpInfo",
|
|
1714
|
+
value: function getSettlementInfoByIdsWithHttpInfo(opts) {
|
|
1715
|
+
opts = opts || {};
|
|
1716
|
+
var postBody = null;
|
|
1717
|
+
if (postBody && postBody.toJSON) {
|
|
1718
|
+
postBody = postBody.toJSON();
|
|
1719
|
+
}
|
|
1720
|
+
var pathParams = {};
|
|
1721
|
+
var queryParams = {
|
|
1722
|
+
'merchant_ids': opts['merchant_ids'],
|
|
1723
|
+
'currency': opts['currency'],
|
|
1724
|
+
'acquiring_type': opts['acquiring_type']
|
|
1725
|
+
};
|
|
1726
|
+
var headerParams = {};
|
|
1727
|
+
var formParams = {};
|
|
1728
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1729
|
+
var contentTypes = [];
|
|
1730
|
+
var accepts = ['application/json'];
|
|
1731
|
+
var returnType = _GetSettlementInfoByIds200Response["default"];
|
|
1732
|
+
return this.apiClient.callApi('/payments/settlement_info', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Get withdrawable balances
|
|
1737
|
+
* <Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
1738
|
+
* @param {Object} opts Optional parameters
|
|
1739
|
+
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
1740
|
+
* @param {String} opts.currency The currency for the operation. Currently, only `USD` is supported. (default to 'USD')
|
|
1741
|
+
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
1742
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
|
|
1743
|
+
*/
|
|
1744
|
+
}, {
|
|
1745
|
+
key: "getSettlementInfoByIds",
|
|
1746
|
+
value: function getSettlementInfoByIds(opts) {
|
|
1747
|
+
return this.getSettlementInfoByIdsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1748
|
+
return response_and_data.data;
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* Create/Get top-up address
|
|
1754
|
+
* This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used.
|
|
1755
|
+
* @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`
|
|
1756
|
+
* @param {String} custom_payer_id A unique identifier to track and identify individual payers in your system.
|
|
1757
|
+
* @param {Object} opts Optional parameters
|
|
1758
|
+
* @param {String} [merchant_id] The merchant ID.
|
|
1759
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TopUpAddress} and HTTP response
|
|
1760
|
+
*/
|
|
560
1761
|
}, {
|
|
561
|
-
key: "
|
|
562
|
-
value: function
|
|
1762
|
+
key: "getTopUpAddressWithHttpInfo",
|
|
1763
|
+
value: function getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts) {
|
|
563
1764
|
opts = opts || {};
|
|
564
1765
|
var postBody = null;
|
|
565
1766
|
if (postBody && postBody.toJSON) {
|
|
566
1767
|
postBody = postBody.toJSON();
|
|
567
1768
|
}
|
|
568
|
-
// verify the required parameter 'payer_id' is set
|
|
569
|
-
if (payer_id === undefined || payer_id === null) {
|
|
570
|
-
throw new Error("Missing the required parameter 'payer_id' when calling getPayerBalanceByAddress");
|
|
571
|
-
}
|
|
572
1769
|
// verify the required parameter 'token_id' is set
|
|
573
1770
|
if (token_id === undefined || token_id === null) {
|
|
574
|
-
throw new Error("Missing the required parameter 'token_id' when calling
|
|
1771
|
+
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
1772
|
+
}
|
|
1773
|
+
// verify the required parameter 'custom_payer_id' is set
|
|
1774
|
+
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
1775
|
+
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
575
1776
|
}
|
|
576
1777
|
var pathParams = {};
|
|
577
1778
|
var queryParams = {
|
|
578
|
-
'
|
|
579
|
-
'
|
|
580
|
-
'
|
|
1779
|
+
'token_id': token_id,
|
|
1780
|
+
'custom_payer_id': custom_payer_id,
|
|
1781
|
+
'merchant_id': opts['merchant_id']
|
|
581
1782
|
};
|
|
582
1783
|
var headerParams = {};
|
|
583
1784
|
var formParams = {};
|
|
584
1785
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
585
1786
|
var contentTypes = [];
|
|
586
1787
|
var accepts = ['application/json'];
|
|
587
|
-
var returnType = [
|
|
588
|
-
return this.apiClient.callApi('/payments/
|
|
1788
|
+
var returnType = _TopUpAddress["default"];
|
|
1789
|
+
return this.apiClient.callApi('/payments/topup/address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
589
1790
|
}
|
|
590
1791
|
|
|
591
1792
|
/**
|
|
592
|
-
* Get
|
|
593
|
-
* This operation retrieves
|
|
594
|
-
* @param {String} payer_id Unique payer identifier on the Cobo side, auto-generated by the system.
|
|
1793
|
+
* Create/Get top-up address
|
|
1794
|
+
* This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used.
|
|
595
1795
|
* @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`
|
|
1796
|
+
* @param {String} custom_payer_id A unique identifier to track and identify individual payers in your system.
|
|
596
1797
|
* @param {Object} opts Optional parameters
|
|
597
1798
|
* @param {String} opts.merchant_id The merchant ID.
|
|
598
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link
|
|
1799
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TopUpAddress}
|
|
599
1800
|
*/
|
|
600
1801
|
}, {
|
|
601
|
-
key: "
|
|
602
|
-
value: function
|
|
603
|
-
return this.
|
|
1802
|
+
key: "getTopUpAddress",
|
|
1803
|
+
value: function getTopUpAddress(token_id, custom_payer_id, opts) {
|
|
1804
|
+
return this.getTopUpAddressWithHttpInfo(token_id, custom_payer_id, opts).then(function (response_and_data) {
|
|
604
1805
|
return response_and_data.data;
|
|
605
1806
|
});
|
|
606
1807
|
}
|
|
607
1808
|
|
|
608
1809
|
/**
|
|
609
|
-
*
|
|
610
|
-
* This operation retrieves
|
|
611
|
-
* @param {
|
|
612
|
-
* @
|
|
1810
|
+
* List all allocations
|
|
1811
|
+
* This operation retrieves the information of all allocations.
|
|
1812
|
+
* @param {Object} opts Optional parameters
|
|
1813
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1814
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1815
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1816
|
+
* @param {String} [source_account]
|
|
1817
|
+
* @param {String} [destination_account]
|
|
1818
|
+
* @param {String} [token_id] The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1819
|
+
* @param {String} [batch_allocation_id] The batch allocation ID.
|
|
1820
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAllocations200Response} and HTTP response
|
|
613
1821
|
*/
|
|
614
1822
|
}, {
|
|
615
|
-
key: "
|
|
616
|
-
value: function
|
|
1823
|
+
key: "listAllocationsWithHttpInfo",
|
|
1824
|
+
value: function listAllocationsWithHttpInfo(opts) {
|
|
1825
|
+
opts = opts || {};
|
|
617
1826
|
var postBody = null;
|
|
618
1827
|
if (postBody && postBody.toJSON) {
|
|
619
1828
|
postBody = postBody.toJSON();
|
|
620
1829
|
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
'
|
|
1830
|
+
var pathParams = {};
|
|
1831
|
+
var queryParams = {
|
|
1832
|
+
'limit': opts['limit'],
|
|
1833
|
+
'before': opts['before'],
|
|
1834
|
+
'after': opts['after'],
|
|
1835
|
+
'source_account': opts['source_account'],
|
|
1836
|
+
'destination_account': opts['destination_account'],
|
|
1837
|
+
'token_id': opts['token_id'],
|
|
1838
|
+
'batch_allocation_id': opts['batch_allocation_id']
|
|
627
1839
|
};
|
|
628
|
-
var queryParams = {};
|
|
629
1840
|
var headerParams = {};
|
|
630
1841
|
var formParams = {};
|
|
631
1842
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
632
1843
|
var contentTypes = [];
|
|
633
1844
|
var accepts = ['application/json'];
|
|
634
|
-
var returnType =
|
|
635
|
-
return this.apiClient.callApi('/payments/
|
|
1845
|
+
var returnType = _ListAllocations200Response["default"];
|
|
1846
|
+
return this.apiClient.callApi('/payments/allocation_records', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
636
1847
|
}
|
|
637
1848
|
|
|
638
1849
|
/**
|
|
639
|
-
*
|
|
640
|
-
* This operation retrieves
|
|
641
|
-
* @param {
|
|
642
|
-
* @
|
|
1850
|
+
* List all allocations
|
|
1851
|
+
* This operation retrieves the information of all allocations.
|
|
1852
|
+
* @param {Object} opts Optional parameters
|
|
1853
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1854
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1855
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1856
|
+
* @param {String} opts.source_account
|
|
1857
|
+
* @param {String} opts.destination_account
|
|
1858
|
+
* @param {String} opts.token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1859
|
+
* @param {String} opts.batch_allocation_id The batch allocation ID.
|
|
1860
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAllocations200Response}
|
|
643
1861
|
*/
|
|
644
1862
|
}, {
|
|
645
|
-
key: "
|
|
646
|
-
value: function
|
|
647
|
-
return this.
|
|
1863
|
+
key: "listAllocations",
|
|
1864
|
+
value: function listAllocations(opts) {
|
|
1865
|
+
return this.listAllocationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
648
1866
|
return response_and_data.data;
|
|
649
1867
|
});
|
|
650
1868
|
}
|
|
651
1869
|
|
|
652
1870
|
/**
|
|
653
|
-
*
|
|
654
|
-
* This operation retrieves the
|
|
655
|
-
* @
|
|
656
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PspBalance} and HTTP response
|
|
1871
|
+
* List all bank accounts
|
|
1872
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
1873
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/BankAccount>} and HTTP response
|
|
657
1874
|
*/
|
|
658
1875
|
}, {
|
|
659
|
-
key: "
|
|
660
|
-
value: function
|
|
1876
|
+
key: "listBankAccountsWithHttpInfo",
|
|
1877
|
+
value: function listBankAccountsWithHttpInfo() {
|
|
661
1878
|
var postBody = null;
|
|
662
1879
|
if (postBody && postBody.toJSON) {
|
|
663
1880
|
postBody = postBody.toJSON();
|
|
664
1881
|
}
|
|
665
|
-
// verify the required parameter 'token_id' is set
|
|
666
|
-
if (token_id === undefined || token_id === null) {
|
|
667
|
-
throw new Error("Missing the required parameter 'token_id' when calling getPspBalance");
|
|
668
|
-
}
|
|
669
1882
|
var pathParams = {};
|
|
670
|
-
var queryParams = {
|
|
671
|
-
'token_id': token_id
|
|
672
|
-
};
|
|
1883
|
+
var queryParams = {};
|
|
673
1884
|
var headerParams = {};
|
|
674
1885
|
var formParams = {};
|
|
675
1886
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
676
1887
|
var contentTypes = [];
|
|
677
1888
|
var accepts = ['application/json'];
|
|
678
|
-
var returnType =
|
|
679
|
-
return this.apiClient.callApi('/payments/
|
|
1889
|
+
var returnType = [_BankAccount["default"]];
|
|
1890
|
+
return this.apiClient.callApi('/payments/bank_accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
680
1891
|
}
|
|
681
1892
|
|
|
682
1893
|
/**
|
|
683
|
-
*
|
|
684
|
-
* This operation retrieves the
|
|
685
|
-
* @
|
|
686
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PspBalance}
|
|
1894
|
+
* List all bank accounts
|
|
1895
|
+
* This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
1896
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/BankAccount>}
|
|
687
1897
|
*/
|
|
688
1898
|
}, {
|
|
689
|
-
key: "
|
|
690
|
-
value: function
|
|
691
|
-
return this.
|
|
1899
|
+
key: "listBankAccounts",
|
|
1900
|
+
value: function listBankAccounts() {
|
|
1901
|
+
return this.listBankAccountsWithHttpInfo().then(function (response_and_data) {
|
|
692
1902
|
return response_and_data.data;
|
|
693
1903
|
});
|
|
694
1904
|
}
|
|
695
1905
|
|
|
696
1906
|
/**
|
|
697
|
-
*
|
|
698
|
-
* This operation retrieves the
|
|
699
|
-
* @param {
|
|
700
|
-
* @
|
|
1907
|
+
* List all batch allocations
|
|
1908
|
+
* This operation retrieves the information of all batch allocations.
|
|
1909
|
+
* @param {Object} opts Optional parameters
|
|
1910
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1911
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1912
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1913
|
+
* @param {String} [request_id] The request ID.
|
|
1914
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBatchAllocations200Response} and HTTP response
|
|
701
1915
|
*/
|
|
702
1916
|
}, {
|
|
703
|
-
key: "
|
|
704
|
-
value: function
|
|
1917
|
+
key: "listBatchAllocationsWithHttpInfo",
|
|
1918
|
+
value: function listBatchAllocationsWithHttpInfo(opts) {
|
|
1919
|
+
opts = opts || {};
|
|
705
1920
|
var postBody = null;
|
|
706
1921
|
if (postBody && postBody.toJSON) {
|
|
707
1922
|
postBody = postBody.toJSON();
|
|
708
1923
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
'
|
|
1924
|
+
var pathParams = {};
|
|
1925
|
+
var queryParams = {
|
|
1926
|
+
'limit': opts['limit'],
|
|
1927
|
+
'before': opts['before'],
|
|
1928
|
+
'after': opts['after'],
|
|
1929
|
+
'request_id': opts['request_id']
|
|
715
1930
|
};
|
|
716
|
-
var queryParams = {};
|
|
717
1931
|
var headerParams = {};
|
|
718
1932
|
var formParams = {};
|
|
719
1933
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
720
1934
|
var contentTypes = [];
|
|
721
1935
|
var accepts = ['application/json'];
|
|
722
|
-
var returnType =
|
|
723
|
-
return this.apiClient.callApi('/payments/
|
|
1936
|
+
var returnType = _ListBatchAllocations200Response["default"];
|
|
1937
|
+
return this.apiClient.callApi('/payments/batch_allocations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
724
1938
|
}
|
|
725
1939
|
|
|
726
1940
|
/**
|
|
727
|
-
*
|
|
728
|
-
* This operation retrieves the
|
|
729
|
-
* @param {
|
|
730
|
-
* @
|
|
1941
|
+
* List all batch allocations
|
|
1942
|
+
* This operation retrieves the information of all batch allocations.
|
|
1943
|
+
* @param {Object} opts Optional parameters
|
|
1944
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1945
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1946
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1947
|
+
* @param {String} opts.request_id The request ID.
|
|
1948
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBatchAllocations200Response}
|
|
731
1949
|
*/
|
|
732
1950
|
}, {
|
|
733
|
-
key: "
|
|
734
|
-
value: function
|
|
735
|
-
return this.
|
|
1951
|
+
key: "listBatchAllocations",
|
|
1952
|
+
value: function listBatchAllocations(opts) {
|
|
1953
|
+
return this.listBatchAllocationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
736
1954
|
return response_and_data.data;
|
|
737
1955
|
});
|
|
738
1956
|
}
|
|
739
1957
|
|
|
740
1958
|
/**
|
|
741
|
-
* List all
|
|
742
|
-
* This operation retrieves the information of all
|
|
1959
|
+
* List all counterparties
|
|
1960
|
+
* This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
743
1961
|
* @param {Object} opts Optional parameters
|
|
744
1962
|
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
745
1963
|
* @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.
|
|
746
1964
|
* @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.
|
|
747
|
-
* @param {String} [
|
|
748
|
-
* @param {
|
|
749
|
-
* @param {String} [
|
|
750
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
1965
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
1966
|
+
* @param {module:model/CounterpartyType} [counterparty_type] CounterpartyType defines the type of the counterparty: - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization.
|
|
1967
|
+
* @param {String} [country] The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
1968
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCounterparties200Response} and HTTP response
|
|
751
1969
|
*/
|
|
752
1970
|
}, {
|
|
753
|
-
key: "
|
|
754
|
-
value: function
|
|
1971
|
+
key: "listCounterpartiesWithHttpInfo",
|
|
1972
|
+
value: function listCounterpartiesWithHttpInfo(opts) {
|
|
755
1973
|
opts = opts || {};
|
|
756
1974
|
var postBody = null;
|
|
757
1975
|
if (postBody && postBody.toJSON) {
|
|
@@ -762,95 +1980,107 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
762
1980
|
'limit': opts['limit'],
|
|
763
1981
|
'before': opts['before'],
|
|
764
1982
|
'after': opts['after'],
|
|
765
|
-
'
|
|
766
|
-
'
|
|
767
|
-
'
|
|
1983
|
+
'keyword': opts['keyword'],
|
|
1984
|
+
'counterparty_type': opts['counterparty_type'],
|
|
1985
|
+
'country': opts['country']
|
|
768
1986
|
};
|
|
769
1987
|
var headerParams = {};
|
|
770
1988
|
var formParams = {};
|
|
771
1989
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
772
1990
|
var contentTypes = [];
|
|
773
1991
|
var accepts = ['application/json'];
|
|
774
|
-
var returnType =
|
|
775
|
-
return this.apiClient.callApi('/payments/
|
|
1992
|
+
var returnType = _ListCounterparties200Response["default"];
|
|
1993
|
+
return this.apiClient.callApi('/payments/counterparty', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
776
1994
|
}
|
|
777
1995
|
|
|
778
1996
|
/**
|
|
779
|
-
* List all
|
|
780
|
-
* This operation retrieves the information of all
|
|
1997
|
+
* List all counterparties
|
|
1998
|
+
* This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
781
1999
|
* @param {Object} opts Optional parameters
|
|
782
2000
|
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
783
2001
|
* @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.
|
|
784
2002
|
* @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.
|
|
785
|
-
* @param {String} opts.
|
|
786
|
-
* @param {
|
|
787
|
-
* @param {String} opts.
|
|
788
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/
|
|
2003
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
2004
|
+
* @param {module:model/CounterpartyType} opts.counterparty_type CounterpartyType defines the type of the counterparty: - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization.
|
|
2005
|
+
* @param {String} opts.country The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
2006
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCounterparties200Response}
|
|
789
2007
|
*/
|
|
790
2008
|
}, {
|
|
791
|
-
key: "
|
|
792
|
-
value: function
|
|
793
|
-
return this.
|
|
2009
|
+
key: "listCounterparties",
|
|
2010
|
+
value: function listCounterparties(opts) {
|
|
2011
|
+
return this.listCounterpartiesWithHttpInfo(opts).then(function (response_and_data) {
|
|
794
2012
|
return response_and_data.data;
|
|
795
2013
|
});
|
|
796
2014
|
}
|
|
797
2015
|
|
|
798
2016
|
/**
|
|
799
|
-
*
|
|
800
|
-
* This operation retrieves the information of
|
|
801
|
-
* @param {
|
|
802
|
-
* @
|
|
2017
|
+
* List counterparty wallet addresses
|
|
2018
|
+
* This operation retrieves the information of counterparty wallet addresses.
|
|
2019
|
+
* @param {Object} opts Optional parameters
|
|
2020
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2021
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2022
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2023
|
+
* @param {String} [counterparty_id] The counterparty ID.
|
|
2024
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
2025
|
+
* @param {String} [wallet_address] The wallet address.
|
|
2026
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListCounterpartyWalletAddress200Response} and HTTP response
|
|
803
2027
|
*/
|
|
804
2028
|
}, {
|
|
805
|
-
key: "
|
|
806
|
-
value: function
|
|
2029
|
+
key: "listCounterpartyWalletAddressWithHttpInfo",
|
|
2030
|
+
value: function listCounterpartyWalletAddressWithHttpInfo(opts) {
|
|
2031
|
+
opts = opts || {};
|
|
807
2032
|
var postBody = null;
|
|
808
2033
|
if (postBody && postBody.toJSON) {
|
|
809
2034
|
postBody = postBody.toJSON();
|
|
810
2035
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
'
|
|
2036
|
+
var pathParams = {};
|
|
2037
|
+
var queryParams = {
|
|
2038
|
+
'limit': opts['limit'],
|
|
2039
|
+
'before': opts['before'],
|
|
2040
|
+
'after': opts['after'],
|
|
2041
|
+
'counterparty_id': opts['counterparty_id'],
|
|
2042
|
+
'chain_ids': opts['chain_ids'],
|
|
2043
|
+
'wallet_address': opts['wallet_address']
|
|
817
2044
|
};
|
|
818
|
-
var queryParams = {};
|
|
819
2045
|
var headerParams = {};
|
|
820
2046
|
var formParams = {};
|
|
821
2047
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
822
2048
|
var contentTypes = [];
|
|
823
2049
|
var accepts = ['application/json'];
|
|
824
|
-
var returnType =
|
|
825
|
-
return this.apiClient.callApi('/payments/
|
|
2050
|
+
var returnType = _ListCounterpartyWalletAddress200Response["default"];
|
|
2051
|
+
return this.apiClient.callApi('/payments/counterparty/wallet_address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
826
2052
|
}
|
|
827
2053
|
|
|
828
2054
|
/**
|
|
829
|
-
*
|
|
830
|
-
* This operation retrieves the information of
|
|
831
|
-
* @param {
|
|
832
|
-
* @
|
|
2055
|
+
* List counterparty wallet addresses
|
|
2056
|
+
* This operation retrieves the information of counterparty wallet addresses.
|
|
2057
|
+
* @param {Object} opts Optional parameters
|
|
2058
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2059
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2060
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2061
|
+
* @param {String} opts.counterparty_id The counterparty ID.
|
|
2062
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain.
|
|
2063
|
+
* @param {String} opts.wallet_address The wallet address.
|
|
2064
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListCounterpartyWalletAddress200Response}
|
|
833
2065
|
*/
|
|
834
2066
|
}, {
|
|
835
|
-
key: "
|
|
836
|
-
value: function
|
|
837
|
-
return this.
|
|
2067
|
+
key: "listCounterpartyWalletAddress",
|
|
2068
|
+
value: function listCounterpartyWalletAddress(opts) {
|
|
2069
|
+
return this.listCounterpartyWalletAddressWithHttpInfo(opts).then(function (response_and_data) {
|
|
838
2070
|
return response_and_data.data;
|
|
839
2071
|
});
|
|
840
2072
|
}
|
|
841
2073
|
|
|
842
2074
|
/**
|
|
843
|
-
*
|
|
844
|
-
*
|
|
2075
|
+
* List crypto addresses
|
|
2076
|
+
* 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.
|
|
845
2077
|
* @param {Object} opts Optional parameters
|
|
846
|
-
* @param {String} [
|
|
847
|
-
* @
|
|
848
|
-
* @param {module:model/AcquiringType} [acquiring_type]
|
|
849
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetSettlementInfoByIds200Response} and HTTP response
|
|
2078
|
+
* @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`
|
|
2079
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CryptoAddress>} and HTTP response
|
|
850
2080
|
*/
|
|
851
2081
|
}, {
|
|
852
|
-
key: "
|
|
853
|
-
value: function
|
|
2082
|
+
key: "listCryptoAddressesWithHttpInfo",
|
|
2083
|
+
value: function listCryptoAddressesWithHttpInfo(opts) {
|
|
854
2084
|
opts = opts || {};
|
|
855
2085
|
var postBody = null;
|
|
856
2086
|
if (postBody && postBody.toJSON) {
|
|
@@ -858,139 +2088,164 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
858
2088
|
}
|
|
859
2089
|
var pathParams = {};
|
|
860
2090
|
var queryParams = {
|
|
861
|
-
'
|
|
862
|
-
'currency': opts['currency'],
|
|
863
|
-
'acquiring_type': opts['acquiring_type']
|
|
2091
|
+
'token_id': opts['token_id']
|
|
864
2092
|
};
|
|
865
2093
|
var headerParams = {};
|
|
866
2094
|
var formParams = {};
|
|
867
2095
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
868
2096
|
var contentTypes = [];
|
|
869
2097
|
var accepts = ['application/json'];
|
|
870
|
-
var returnType =
|
|
871
|
-
return this.apiClient.callApi('/payments/
|
|
2098
|
+
var returnType = [_CryptoAddress["default"]];
|
|
2099
|
+
return this.apiClient.callApi('/payments/crypto_addresses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
872
2100
|
}
|
|
873
2101
|
|
|
874
2102
|
/**
|
|
875
|
-
*
|
|
876
|
-
*
|
|
2103
|
+
* List crypto addresses
|
|
2104
|
+
* 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.
|
|
877
2105
|
* @param {Object} opts Optional parameters
|
|
878
|
-
* @param {String} opts.
|
|
879
|
-
* @
|
|
880
|
-
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
881
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetSettlementInfoByIds200Response}
|
|
2106
|
+
* @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`
|
|
2107
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CryptoAddress>}
|
|
882
2108
|
*/
|
|
883
2109
|
}, {
|
|
884
|
-
key: "
|
|
885
|
-
value: function
|
|
886
|
-
return this.
|
|
2110
|
+
key: "listCryptoAddresses",
|
|
2111
|
+
value: function listCryptoAddresses(opts) {
|
|
2112
|
+
return this.listCryptoAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
887
2113
|
return response_and_data.data;
|
|
888
2114
|
});
|
|
889
2115
|
}
|
|
890
2116
|
|
|
891
2117
|
/**
|
|
892
|
-
*
|
|
893
|
-
* This operation retrieves the information of
|
|
894
|
-
* @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`
|
|
895
|
-
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
2118
|
+
* List destination bank accounts
|
|
2119
|
+
* This operation retrieves the information of destination bank accounts.
|
|
896
2120
|
* @param {Object} opts Optional parameters
|
|
897
|
-
* @param {
|
|
898
|
-
* @
|
|
2121
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2122
|
+
* @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.
|
|
2123
|
+
* @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.
|
|
2124
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
2125
|
+
* @param {String} [destination_id] The destination ID.
|
|
2126
|
+
* @param {module:model/BankAccountStatus} [bank_account_status] BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo.
|
|
2127
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinationBankAccounts200Response} and HTTP response
|
|
899
2128
|
*/
|
|
900
2129
|
}, {
|
|
901
|
-
key: "
|
|
902
|
-
value: function
|
|
2130
|
+
key: "listDestinationBankAccountsWithHttpInfo",
|
|
2131
|
+
value: function listDestinationBankAccountsWithHttpInfo(opts) {
|
|
903
2132
|
opts = opts || {};
|
|
904
2133
|
var postBody = null;
|
|
905
2134
|
if (postBody && postBody.toJSON) {
|
|
906
2135
|
postBody = postBody.toJSON();
|
|
907
2136
|
}
|
|
908
|
-
// verify the required parameter 'token_id' is set
|
|
909
|
-
if (token_id === undefined || token_id === null) {
|
|
910
|
-
throw new Error("Missing the required parameter 'token_id' when calling getTopUpAddress");
|
|
911
|
-
}
|
|
912
|
-
// verify the required parameter 'custom_payer_id' is set
|
|
913
|
-
if (custom_payer_id === undefined || custom_payer_id === null) {
|
|
914
|
-
throw new Error("Missing the required parameter 'custom_payer_id' when calling getTopUpAddress");
|
|
915
|
-
}
|
|
916
2137
|
var pathParams = {};
|
|
917
2138
|
var queryParams = {
|
|
918
|
-
'
|
|
919
|
-
'
|
|
920
|
-
'
|
|
2139
|
+
'limit': opts['limit'],
|
|
2140
|
+
'before': opts['before'],
|
|
2141
|
+
'after': opts['after'],
|
|
2142
|
+
'keyword': opts['keyword'],
|
|
2143
|
+
'destination_id': opts['destination_id'],
|
|
2144
|
+
'bank_account_status': opts['bank_account_status']
|
|
921
2145
|
};
|
|
922
2146
|
var headerParams = {};
|
|
923
2147
|
var formParams = {};
|
|
924
2148
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
925
2149
|
var contentTypes = [];
|
|
926
2150
|
var accepts = ['application/json'];
|
|
927
|
-
var returnType =
|
|
928
|
-
return this.apiClient.callApi('/payments/
|
|
2151
|
+
var returnType = _ListDestinationBankAccounts200Response["default"];
|
|
2152
|
+
return this.apiClient.callApi('/payments/destination/bank_account', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
929
2153
|
}
|
|
930
2154
|
|
|
931
2155
|
/**
|
|
932
|
-
*
|
|
933
|
-
* This operation retrieves the information of
|
|
934
|
-
* @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`
|
|
935
|
-
* @param {String} custom_payer_id A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
2156
|
+
* List destination bank accounts
|
|
2157
|
+
* This operation retrieves the information of destination bank accounts.
|
|
936
2158
|
* @param {Object} opts Optional parameters
|
|
937
|
-
* @param {
|
|
938
|
-
* @
|
|
2159
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2160
|
+
* @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.
|
|
2161
|
+
* @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.
|
|
2162
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
2163
|
+
* @param {String} opts.destination_id The destination ID.
|
|
2164
|
+
* @param {module:model/BankAccountStatus} opts.bank_account_status BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo.
|
|
2165
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinationBankAccounts200Response}
|
|
939
2166
|
*/
|
|
940
2167
|
}, {
|
|
941
|
-
key: "
|
|
942
|
-
value: function
|
|
943
|
-
return this.
|
|
2168
|
+
key: "listDestinationBankAccounts",
|
|
2169
|
+
value: function listDestinationBankAccounts(opts) {
|
|
2170
|
+
return this.listDestinationBankAccountsWithHttpInfo(opts).then(function (response_and_data) {
|
|
944
2171
|
return response_and_data.data;
|
|
945
2172
|
});
|
|
946
2173
|
}
|
|
947
2174
|
|
|
948
2175
|
/**
|
|
949
|
-
* List
|
|
950
|
-
* This operation retrieves the information of
|
|
951
|
-
* @
|
|
2176
|
+
* List destination wallet addresses
|
|
2177
|
+
* This operation retrieves the information of destination wallet addresses.
|
|
2178
|
+
* @param {Object} opts Optional parameters
|
|
2179
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2180
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2181
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2182
|
+
* @param {String} [destination_id] The destination ID.
|
|
2183
|
+
* @param {String} [chain_ids] The chain ID, which is the unique identifier of a blockchain.
|
|
2184
|
+
* @param {String} [wallet_address] The wallet address.
|
|
2185
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinationWalletAddresses200Response} and HTTP response
|
|
952
2186
|
*/
|
|
953
2187
|
}, {
|
|
954
|
-
key: "
|
|
955
|
-
value: function
|
|
2188
|
+
key: "listDestinationWalletAddressesWithHttpInfo",
|
|
2189
|
+
value: function listDestinationWalletAddressesWithHttpInfo(opts) {
|
|
2190
|
+
opts = opts || {};
|
|
956
2191
|
var postBody = null;
|
|
957
2192
|
if (postBody && postBody.toJSON) {
|
|
958
2193
|
postBody = postBody.toJSON();
|
|
959
2194
|
}
|
|
960
2195
|
var pathParams = {};
|
|
961
|
-
var queryParams = {
|
|
2196
|
+
var queryParams = {
|
|
2197
|
+
'limit': opts['limit'],
|
|
2198
|
+
'before': opts['before'],
|
|
2199
|
+
'after': opts['after'],
|
|
2200
|
+
'destination_id': opts['destination_id'],
|
|
2201
|
+
'chain_ids': opts['chain_ids'],
|
|
2202
|
+
'wallet_address': opts['wallet_address']
|
|
2203
|
+
};
|
|
962
2204
|
var headerParams = {};
|
|
963
2205
|
var formParams = {};
|
|
964
2206
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
965
2207
|
var contentTypes = [];
|
|
966
2208
|
var accepts = ['application/json'];
|
|
967
|
-
var returnType = [
|
|
968
|
-
return this.apiClient.callApi('/payments/
|
|
2209
|
+
var returnType = _ListDestinationWalletAddresses200Response["default"];
|
|
2210
|
+
return this.apiClient.callApi('/payments/destination/wallet_address', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
969
2211
|
}
|
|
970
2212
|
|
|
971
2213
|
/**
|
|
972
|
-
* List
|
|
973
|
-
* This operation retrieves the information of
|
|
974
|
-
* @
|
|
2214
|
+
* List destination wallet addresses
|
|
2215
|
+
* This operation retrieves the information of destination wallet addresses.
|
|
2216
|
+
* @param {Object} opts Optional parameters
|
|
2217
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2218
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2219
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2220
|
+
* @param {String} opts.destination_id The destination ID.
|
|
2221
|
+
* @param {String} opts.chain_ids The chain ID, which is the unique identifier of a blockchain.
|
|
2222
|
+
* @param {String} opts.wallet_address The wallet address.
|
|
2223
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinationWalletAddresses200Response}
|
|
975
2224
|
*/
|
|
976
2225
|
}, {
|
|
977
|
-
key: "
|
|
978
|
-
value: function
|
|
979
|
-
return this.
|
|
2226
|
+
key: "listDestinationWalletAddresses",
|
|
2227
|
+
value: function listDestinationWalletAddresses(opts) {
|
|
2228
|
+
return this.listDestinationWalletAddressesWithHttpInfo(opts).then(function (response_and_data) {
|
|
980
2229
|
return response_and_data.data;
|
|
981
2230
|
});
|
|
982
2231
|
}
|
|
983
2232
|
|
|
984
2233
|
/**
|
|
985
|
-
* List
|
|
986
|
-
* This operation retrieves
|
|
2234
|
+
* List all destinations
|
|
2235
|
+
* This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names.
|
|
987
2236
|
* @param {Object} opts Optional parameters
|
|
988
|
-
* @param {
|
|
989
|
-
* @
|
|
2237
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2238
|
+
* @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.
|
|
2239
|
+
* @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.
|
|
2240
|
+
* @param {String} [keyword] A search term used for fuzzy matching of merchant names.
|
|
2241
|
+
* @param {module:model/DestinationType} [destination_type] DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization.
|
|
2242
|
+
* @param {String} [country] The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
2243
|
+
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
2244
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListDestinations200Response} and HTTP response
|
|
990
2245
|
*/
|
|
991
2246
|
}, {
|
|
992
|
-
key: "
|
|
993
|
-
value: function
|
|
2247
|
+
key: "listDestinationsWithHttpInfo",
|
|
2248
|
+
value: function listDestinationsWithHttpInfo(opts) {
|
|
994
2249
|
opts = opts || {};
|
|
995
2250
|
var postBody = null;
|
|
996
2251
|
if (postBody && postBody.toJSON) {
|
|
@@ -998,28 +2253,40 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
998
2253
|
}
|
|
999
2254
|
var pathParams = {};
|
|
1000
2255
|
var queryParams = {
|
|
1001
|
-
'
|
|
2256
|
+
'limit': opts['limit'],
|
|
2257
|
+
'before': opts['before'],
|
|
2258
|
+
'after': opts['after'],
|
|
2259
|
+
'keyword': opts['keyword'],
|
|
2260
|
+
'destination_type': opts['destination_type'],
|
|
2261
|
+
'country': opts['country'],
|
|
2262
|
+
'merchant_ids': opts['merchant_ids']
|
|
1002
2263
|
};
|
|
1003
2264
|
var headerParams = {};
|
|
1004
2265
|
var formParams = {};
|
|
1005
2266
|
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1006
2267
|
var contentTypes = [];
|
|
1007
2268
|
var accepts = ['application/json'];
|
|
1008
|
-
var returnType = [
|
|
1009
|
-
return this.apiClient.callApi('/payments/
|
|
2269
|
+
var returnType = _ListDestinations200Response["default"];
|
|
2270
|
+
return this.apiClient.callApi('/payments/destination', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1010
2271
|
}
|
|
1011
2272
|
|
|
1012
2273
|
/**
|
|
1013
|
-
* List
|
|
1014
|
-
* This operation retrieves
|
|
2274
|
+
* List all destinations
|
|
2275
|
+
* This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names.
|
|
1015
2276
|
* @param {Object} opts Optional parameters
|
|
1016
|
-
* @param {
|
|
1017
|
-
* @
|
|
2277
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2278
|
+
* @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.
|
|
2279
|
+
* @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.
|
|
2280
|
+
* @param {String} opts.keyword A search term used for fuzzy matching of merchant names.
|
|
2281
|
+
* @param {module:model/DestinationType} opts.destination_type DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization.
|
|
2282
|
+
* @param {String} opts.country The country of the destination, in ISO 3166-1 alpha-3 format.
|
|
2283
|
+
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
2284
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListDestinations200Response}
|
|
1018
2285
|
*/
|
|
1019
2286
|
}, {
|
|
1020
|
-
key: "
|
|
1021
|
-
value: function
|
|
1022
|
-
return this.
|
|
2287
|
+
key: "listDestinations",
|
|
2288
|
+
value: function listDestinations(opts) {
|
|
2289
|
+
return this.listDestinationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1023
2290
|
return response_and_data.data;
|
|
1024
2291
|
});
|
|
1025
2292
|
}
|
|
@@ -1078,16 +2345,16 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1078
2345
|
|
|
1079
2346
|
/**
|
|
1080
2347
|
* List merchant balances
|
|
1081
|
-
* This operation retrieves the balance information for specified merchants.
|
|
2348
|
+
* This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1082
2349
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1083
|
-
* @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.
|
|
1084
2350
|
* @param {Object} opts Optional parameters
|
|
1085
2351
|
* @param {String} [merchant_ids] A list of merchant IDs to query.
|
|
2352
|
+
* @param {module:model/AcquiringType} [acquiring_type]
|
|
1086
2353
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMerchantBalances200Response} and HTTP response
|
|
1087
2354
|
*/
|
|
1088
2355
|
}, {
|
|
1089
2356
|
key: "listMerchantBalancesWithHttpInfo",
|
|
1090
|
-
value: function listMerchantBalancesWithHttpInfo(token_id,
|
|
2357
|
+
value: function listMerchantBalancesWithHttpInfo(token_id, opts) {
|
|
1091
2358
|
opts = opts || {};
|
|
1092
2359
|
var postBody = null;
|
|
1093
2360
|
if (postBody && postBody.toJSON) {
|
|
@@ -1097,15 +2364,11 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1097
2364
|
if (token_id === undefined || token_id === null) {
|
|
1098
2365
|
throw new Error("Missing the required parameter 'token_id' when calling listMerchantBalances");
|
|
1099
2366
|
}
|
|
1100
|
-
// verify the required parameter 'acquiring_type' is set
|
|
1101
|
-
if (acquiring_type === undefined || acquiring_type === null) {
|
|
1102
|
-
throw new Error("Missing the required parameter 'acquiring_type' when calling listMerchantBalances");
|
|
1103
|
-
}
|
|
1104
2367
|
var pathParams = {};
|
|
1105
2368
|
var queryParams = {
|
|
1106
2369
|
'merchant_ids': opts['merchant_ids'],
|
|
1107
2370
|
'token_id': token_id,
|
|
1108
|
-
'acquiring_type': acquiring_type
|
|
2371
|
+
'acquiring_type': opts['acquiring_type']
|
|
1109
2372
|
};
|
|
1110
2373
|
var headerParams = {};
|
|
1111
2374
|
var formParams = {};
|
|
@@ -1118,17 +2381,17 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1118
2381
|
|
|
1119
2382
|
/**
|
|
1120
2383
|
* List merchant balances
|
|
1121
|
-
* This operation retrieves the balance information for specified merchants.
|
|
2384
|
+
* This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1122
2385
|
* @param {String} token_id The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
1123
|
-
* @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.
|
|
1124
2386
|
* @param {Object} opts Optional parameters
|
|
1125
2387
|
* @param {String} opts.merchant_ids A list of merchant IDs to query.
|
|
2388
|
+
* @param {module:model/AcquiringType} opts.acquiring_type
|
|
1126
2389
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMerchantBalances200Response}
|
|
1127
2390
|
*/
|
|
1128
2391
|
}, {
|
|
1129
2392
|
key: "listMerchantBalances",
|
|
1130
|
-
value: function listMerchantBalances(token_id,
|
|
1131
|
-
return this.listMerchantBalancesWithHttpInfo(token_id,
|
|
2393
|
+
value: function listMerchantBalances(token_id, opts) {
|
|
2394
|
+
return this.listMerchantBalancesWithHttpInfo(token_id, opts).then(function (response_and_data) {
|
|
1132
2395
|
return response_and_data.data;
|
|
1133
2396
|
});
|
|
1134
2397
|
}
|
|
@@ -1200,7 +2463,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1200
2463
|
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1201
2464
|
* @param {String} [merchant_id] The merchant ID.
|
|
1202
2465
|
* @param {String} [psp_order_id] A unique reference code assigned by the developer to identify this order in their system.
|
|
1203
|
-
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2466
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1204
2467
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPaymentOrders200Response} and HTTP response
|
|
1205
2468
|
*/
|
|
1206
2469
|
}, {
|
|
@@ -1238,7 +2501,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1238
2501
|
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1239
2502
|
* @param {String} opts.merchant_id The merchant ID.
|
|
1240
2503
|
* @param {String} opts.psp_order_id A unique reference code assigned by the developer to identify this order in their system.
|
|
1241
|
-
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2504
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1242
2505
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPaymentOrders200Response}
|
|
1243
2506
|
*/
|
|
1244
2507
|
}, {
|
|
@@ -1335,6 +2598,113 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1335
2598
|
});
|
|
1336
2599
|
}
|
|
1337
2600
|
|
|
2601
|
+
/**
|
|
2602
|
+
* List all payout items
|
|
2603
|
+
* This operation retrieves the information of all payout items. You can filter the result by merchant ID or status.
|
|
2604
|
+
* @param {Object} opts Optional parameters
|
|
2605
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2606
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2607
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2608
|
+
* @param {String} [source_account]
|
|
2609
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2610
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPayoutItems200Response} and HTTP response
|
|
2611
|
+
*/
|
|
2612
|
+
}, {
|
|
2613
|
+
key: "listPayoutItemsWithHttpInfo",
|
|
2614
|
+
value: function listPayoutItemsWithHttpInfo(opts) {
|
|
2615
|
+
opts = opts || {};
|
|
2616
|
+
var postBody = null;
|
|
2617
|
+
if (postBody && postBody.toJSON) {
|
|
2618
|
+
postBody = postBody.toJSON();
|
|
2619
|
+
}
|
|
2620
|
+
var pathParams = {};
|
|
2621
|
+
var queryParams = {
|
|
2622
|
+
'limit': opts['limit'],
|
|
2623
|
+
'before': opts['before'],
|
|
2624
|
+
'after': opts['after'],
|
|
2625
|
+
'source_account': opts['source_account'],
|
|
2626
|
+
'statuses': opts['statuses']
|
|
2627
|
+
};
|
|
2628
|
+
var headerParams = {};
|
|
2629
|
+
var formParams = {};
|
|
2630
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2631
|
+
var contentTypes = [];
|
|
2632
|
+
var accepts = ['application/json'];
|
|
2633
|
+
var returnType = _ListPayoutItems200Response["default"];
|
|
2634
|
+
return this.apiClient.callApi('/payments/payout_items', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* List all payout items
|
|
2639
|
+
* This operation retrieves the information of all payout items. You can filter the result by merchant ID or status.
|
|
2640
|
+
* @param {Object} opts Optional parameters
|
|
2641
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2642
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2643
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2644
|
+
* @param {String} opts.source_account
|
|
2645
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
2646
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPayoutItems200Response}
|
|
2647
|
+
*/
|
|
2648
|
+
}, {
|
|
2649
|
+
key: "listPayoutItems",
|
|
2650
|
+
value: function listPayoutItems(opts) {
|
|
2651
|
+
return this.listPayoutItemsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2652
|
+
return response_and_data.data;
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
|
|
2656
|
+
/**
|
|
2657
|
+
* List all payouts
|
|
2658
|
+
* This operation retrieves the information of all payouts.
|
|
2659
|
+
* @param {Object} opts Optional parameters
|
|
2660
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
2661
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2662
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2663
|
+
* @param {String} [request_id] The request ID.
|
|
2664
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListPayouts200Response} and HTTP response
|
|
2665
|
+
*/
|
|
2666
|
+
}, {
|
|
2667
|
+
key: "listPayoutsWithHttpInfo",
|
|
2668
|
+
value: function listPayoutsWithHttpInfo(opts) {
|
|
2669
|
+
opts = opts || {};
|
|
2670
|
+
var postBody = null;
|
|
2671
|
+
if (postBody && postBody.toJSON) {
|
|
2672
|
+
postBody = postBody.toJSON();
|
|
2673
|
+
}
|
|
2674
|
+
var pathParams = {};
|
|
2675
|
+
var queryParams = {
|
|
2676
|
+
'limit': opts['limit'],
|
|
2677
|
+
'before': opts['before'],
|
|
2678
|
+
'after': opts['after'],
|
|
2679
|
+
'request_id': opts['request_id']
|
|
2680
|
+
};
|
|
2681
|
+
var headerParams = {};
|
|
2682
|
+
var formParams = {};
|
|
2683
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2684
|
+
var contentTypes = [];
|
|
2685
|
+
var accepts = ['application/json'];
|
|
2686
|
+
var returnType = _ListPayouts200Response["default"];
|
|
2687
|
+
return this.apiClient.callApi('/payments/payouts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
/**
|
|
2691
|
+
* List all payouts
|
|
2692
|
+
* This operation retrieves the information of all payouts.
|
|
2693
|
+
* @param {Object} opts Optional parameters
|
|
2694
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
2695
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
2696
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
2697
|
+
* @param {String} opts.request_id The request ID.
|
|
2698
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListPayouts200Response}
|
|
2699
|
+
*/
|
|
2700
|
+
}, {
|
|
2701
|
+
key: "listPayouts",
|
|
2702
|
+
value: function listPayouts(opts) {
|
|
2703
|
+
return this.listPayoutsWithHttpInfo(opts).then(function (response_and_data) {
|
|
2704
|
+
return response_and_data.data;
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
|
|
1338
2708
|
/**
|
|
1339
2709
|
* List all settlement details
|
|
1340
2710
|
* This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status.
|
|
@@ -1343,7 +2713,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1343
2713
|
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1344
2714
|
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1345
2715
|
* @param {String} [merchant_id] The merchant ID.
|
|
1346
|
-
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2716
|
+
* @param {String} [statuses] A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1347
2717
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSettlementDetails200Response} and HTTP response
|
|
1348
2718
|
*/
|
|
1349
2719
|
}, {
|
|
@@ -1379,7 +2749,7 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1379
2749
|
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
1380
2750
|
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
1381
2751
|
* @param {String} opts.merchant_id The merchant ID.
|
|
1382
|
-
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2752
|
+
* @param {String} opts.statuses A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details)
|
|
1383
2753
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSettlementDetails200Response}
|
|
1384
2754
|
*/
|
|
1385
2755
|
}, {
|
|
@@ -1593,6 +2963,42 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1593
2963
|
});
|
|
1594
2964
|
}
|
|
1595
2965
|
|
|
2966
|
+
/**
|
|
2967
|
+
* Query destination whitelist enabled status
|
|
2968
|
+
* This operation retrieves the information of whether the destination whitelist is enabled.
|
|
2969
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueryDestinationWhitelistEnabled200Response} and HTTP response
|
|
2970
|
+
*/
|
|
2971
|
+
}, {
|
|
2972
|
+
key: "queryDestinationWhitelistEnabledWithHttpInfo",
|
|
2973
|
+
value: function queryDestinationWhitelistEnabledWithHttpInfo() {
|
|
2974
|
+
var postBody = null;
|
|
2975
|
+
if (postBody && postBody.toJSON) {
|
|
2976
|
+
postBody = postBody.toJSON();
|
|
2977
|
+
}
|
|
2978
|
+
var pathParams = {};
|
|
2979
|
+
var queryParams = {};
|
|
2980
|
+
var headerParams = {};
|
|
2981
|
+
var formParams = {};
|
|
2982
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
2983
|
+
var contentTypes = [];
|
|
2984
|
+
var accepts = ['application/json'];
|
|
2985
|
+
var returnType = _QueryDestinationWhitelistEnabled200Response["default"];
|
|
2986
|
+
return this.apiClient.callApi('/payments/destination/enable_whitelist', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
/**
|
|
2990
|
+
* Query destination whitelist enabled status
|
|
2991
|
+
* This operation retrieves the information of whether the destination whitelist is enabled.
|
|
2992
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueryDestinationWhitelistEnabled200Response}
|
|
2993
|
+
*/
|
|
2994
|
+
}, {
|
|
2995
|
+
key: "queryDestinationWhitelistEnabled",
|
|
2996
|
+
value: function queryDestinationWhitelistEnabled() {
|
|
2997
|
+
return this.queryDestinationWhitelistEnabledWithHttpInfo().then(function (response_and_data) {
|
|
2998
|
+
return response_and_data.data;
|
|
2999
|
+
});
|
|
3000
|
+
}
|
|
3001
|
+
|
|
1596
3002
|
/**
|
|
1597
3003
|
* Update bank account
|
|
1598
3004
|
* This operation updates the information of an existing bank account.
|
|
@@ -1642,6 +3048,153 @@ var PaymentApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
1642
3048
|
});
|
|
1643
3049
|
}
|
|
1644
3050
|
|
|
3051
|
+
/**
|
|
3052
|
+
* Update counterparty
|
|
3053
|
+
* This operation updates the information of a specified counterparty.
|
|
3054
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
3055
|
+
* @param {Object} opts Optional parameters
|
|
3056
|
+
* @param {module:model/UpdateCounterpartyByIdRequest} [UpdateCounterpartyByIdRequest] The request body to update a counterparty.
|
|
3057
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Counterparty} and HTTP response
|
|
3058
|
+
*/
|
|
3059
|
+
}, {
|
|
3060
|
+
key: "updateCounterpartyByIdWithHttpInfo",
|
|
3061
|
+
value: function updateCounterpartyByIdWithHttpInfo(counterparty_id, opts) {
|
|
3062
|
+
opts = opts || {};
|
|
3063
|
+
var postBody = opts['UpdateCounterpartyByIdRequest'];
|
|
3064
|
+
if (postBody && postBody.toJSON) {
|
|
3065
|
+
postBody = postBody.toJSON();
|
|
3066
|
+
}
|
|
3067
|
+
// verify the required parameter 'counterparty_id' is set
|
|
3068
|
+
if (counterparty_id === undefined || counterparty_id === null) {
|
|
3069
|
+
throw new Error("Missing the required parameter 'counterparty_id' when calling updateCounterpartyById");
|
|
3070
|
+
}
|
|
3071
|
+
var pathParams = {
|
|
3072
|
+
'counterparty_id': counterparty_id
|
|
3073
|
+
};
|
|
3074
|
+
var queryParams = {};
|
|
3075
|
+
var headerParams = {};
|
|
3076
|
+
var formParams = {};
|
|
3077
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
3078
|
+
var contentTypes = ['application/json'];
|
|
3079
|
+
var accepts = ['application/json'];
|
|
3080
|
+
var returnType = _Counterparty["default"];
|
|
3081
|
+
return this.apiClient.callApi('/payments/counterparty/{counterparty_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* Update counterparty
|
|
3086
|
+
* This operation updates the information of a specified counterparty.
|
|
3087
|
+
* @param {String} counterparty_id The counterparty ID.
|
|
3088
|
+
* @param {Object} opts Optional parameters
|
|
3089
|
+
* @param {module:model/UpdateCounterpartyByIdRequest} opts.UpdateCounterpartyByIdRequest The request body to update a counterparty.
|
|
3090
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Counterparty}
|
|
3091
|
+
*/
|
|
3092
|
+
}, {
|
|
3093
|
+
key: "updateCounterpartyById",
|
|
3094
|
+
value: function updateCounterpartyById(counterparty_id, opts) {
|
|
3095
|
+
return this.updateCounterpartyByIdWithHttpInfo(counterparty_id, opts).then(function (response_and_data) {
|
|
3096
|
+
return response_and_data.data;
|
|
3097
|
+
});
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* Update destination bank account
|
|
3102
|
+
* This operation updates the information of a specified destination bank account.
|
|
3103
|
+
* @param {String} bank_account_id The bank account ID.
|
|
3104
|
+
* @param {Object} opts Optional parameters
|
|
3105
|
+
* @param {module:model/UpdateDestinationBankAccount} [UpdateDestinationBankAccount] The request body to update a destination bank account.
|
|
3106
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DestinationBankAccount} and HTTP response
|
|
3107
|
+
*/
|
|
3108
|
+
}, {
|
|
3109
|
+
key: "updateDestinationBankAccountByIdWithHttpInfo",
|
|
3110
|
+
value: function updateDestinationBankAccountByIdWithHttpInfo(bank_account_id, opts) {
|
|
3111
|
+
opts = opts || {};
|
|
3112
|
+
var postBody = opts['UpdateDestinationBankAccount'];
|
|
3113
|
+
if (postBody && postBody.toJSON) {
|
|
3114
|
+
postBody = postBody.toJSON();
|
|
3115
|
+
}
|
|
3116
|
+
// verify the required parameter 'bank_account_id' is set
|
|
3117
|
+
if (bank_account_id === undefined || bank_account_id === null) {
|
|
3118
|
+
throw new Error("Missing the required parameter 'bank_account_id' when calling updateDestinationBankAccountById");
|
|
3119
|
+
}
|
|
3120
|
+
var pathParams = {
|
|
3121
|
+
'bank_account_id': bank_account_id
|
|
3122
|
+
};
|
|
3123
|
+
var queryParams = {};
|
|
3124
|
+
var headerParams = {};
|
|
3125
|
+
var formParams = {};
|
|
3126
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
3127
|
+
var contentTypes = ['application/json'];
|
|
3128
|
+
var accepts = ['application/json'];
|
|
3129
|
+
var returnType = _DestinationBankAccount["default"];
|
|
3130
|
+
return this.apiClient.callApi('/payments/destination/bank_account/{bank_account_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
/**
|
|
3134
|
+
* Update destination bank account
|
|
3135
|
+
* This operation updates the information of a specified destination bank account.
|
|
3136
|
+
* @param {String} bank_account_id The bank account ID.
|
|
3137
|
+
* @param {Object} opts Optional parameters
|
|
3138
|
+
* @param {module:model/UpdateDestinationBankAccount} opts.UpdateDestinationBankAccount The request body to update a destination bank account.
|
|
3139
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DestinationBankAccount}
|
|
3140
|
+
*/
|
|
3141
|
+
}, {
|
|
3142
|
+
key: "updateDestinationBankAccountById",
|
|
3143
|
+
value: function updateDestinationBankAccountById(bank_account_id, opts) {
|
|
3144
|
+
return this.updateDestinationBankAccountByIdWithHttpInfo(bank_account_id, opts).then(function (response_and_data) {
|
|
3145
|
+
return response_and_data.data;
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
/**
|
|
3150
|
+
* Update destination
|
|
3151
|
+
* This operation updates the information of a specified destination.
|
|
3152
|
+
* @param {String} destination_id The destination ID.
|
|
3153
|
+
* @param {Object} opts Optional parameters
|
|
3154
|
+
* @param {module:model/UpdateDestinationByIdRequest} [UpdateDestinationByIdRequest] The request body to create a destination.
|
|
3155
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Destination} and HTTP response
|
|
3156
|
+
*/
|
|
3157
|
+
}, {
|
|
3158
|
+
key: "updateDestinationByIdWithHttpInfo",
|
|
3159
|
+
value: function updateDestinationByIdWithHttpInfo(destination_id, opts) {
|
|
3160
|
+
opts = opts || {};
|
|
3161
|
+
var postBody = opts['UpdateDestinationByIdRequest'];
|
|
3162
|
+
if (postBody && postBody.toJSON) {
|
|
3163
|
+
postBody = postBody.toJSON();
|
|
3164
|
+
}
|
|
3165
|
+
// verify the required parameter 'destination_id' is set
|
|
3166
|
+
if (destination_id === undefined || destination_id === null) {
|
|
3167
|
+
throw new Error("Missing the required parameter 'destination_id' when calling updateDestinationById");
|
|
3168
|
+
}
|
|
3169
|
+
var pathParams = {
|
|
3170
|
+
'destination_id': destination_id
|
|
3171
|
+
};
|
|
3172
|
+
var queryParams = {};
|
|
3173
|
+
var headerParams = {};
|
|
3174
|
+
var formParams = {};
|
|
3175
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
3176
|
+
var contentTypes = ['application/json'];
|
|
3177
|
+
var accepts = ['application/json'];
|
|
3178
|
+
var returnType = _Destination["default"];
|
|
3179
|
+
return this.apiClient.callApi('/payments/destination/{destination_id}/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* Update destination
|
|
3184
|
+
* This operation updates the information of a specified destination.
|
|
3185
|
+
* @param {String} destination_id The destination ID.
|
|
3186
|
+
* @param {Object} opts Optional parameters
|
|
3187
|
+
* @param {module:model/UpdateDestinationByIdRequest} opts.UpdateDestinationByIdRequest The request body to create a destination.
|
|
3188
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Destination}
|
|
3189
|
+
*/
|
|
3190
|
+
}, {
|
|
3191
|
+
key: "updateDestinationById",
|
|
3192
|
+
value: function updateDestinationById(destination_id, opts) {
|
|
3193
|
+
return this.updateDestinationByIdWithHttpInfo(destination_id, opts).then(function (response_and_data) {
|
|
3194
|
+
return response_and_data.data;
|
|
3195
|
+
});
|
|
3196
|
+
}
|
|
3197
|
+
|
|
1645
3198
|
/**
|
|
1646
3199
|
* Update merchant
|
|
1647
3200
|
* This operation updates the information of an existing merchant.
|