@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/model/Order.js
CHANGED
|
@@ -36,21 +36,18 @@ var Order = /*#__PURE__*/function () {
|
|
|
36
36
|
* Constructs a new <code>Order</code>.
|
|
37
37
|
* @alias module:model/Order
|
|
38
38
|
* @param order_id {String} The order ID.
|
|
39
|
-
* @param
|
|
40
|
-
* @param chain_id {String} The ID of the blockchain network where the payment transaction should be made. Supported chains: - USDC: `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC` - USDT: `TRON`, `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC`
|
|
41
|
-
* @param payable_amount {String} The cryptocurrency amount to be paid for this order.
|
|
42
|
-
* @param receive_address {String} The recipient wallet address to be used for the payment transaction.
|
|
43
|
-
* @param currency {String} The fiat currency of the order.
|
|
44
|
-
* @param order_amount {String} The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`).
|
|
39
|
+
* @param psp_order_code {String} A unique reference code assigned by the developer to identify this order in their system.
|
|
45
40
|
* @param fee_amount {String} The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge.
|
|
41
|
+
* @param chain_id {String} The ID of the blockchain network where the payment transaction should be made.
|
|
42
|
+
* @param payable_amount {String} The cryptocurrency amount to be paid for this order.
|
|
46
43
|
* @param exchange_rate {String} The exchange rate between a currency pair. Expressed as the amount of fiat currency per one unit of cryptocurrency. For example, if the cryptocurrency is USDT and the fiat currency is USD, a rate of \"0.99\" means 1 USDT = 0.99 USD.
|
|
47
|
-
* @param
|
|
44
|
+
* @param receive_address {String} The recipient wallet address to be used for the payment transaction.
|
|
48
45
|
* @param status {module:model/OrderStatus}
|
|
49
46
|
* @param received_token_amount {String} The total cryptocurrency amount received for this order. Updates until the expiration time. Precision matches the token standard (e.g., 6 decimals for USDT).
|
|
50
47
|
*/
|
|
51
|
-
function Order(order_id,
|
|
48
|
+
function Order(order_id, psp_order_code, fee_amount, chain_id, payable_amount, exchange_rate, receive_address, status, received_token_amount) {
|
|
52
49
|
_classCallCheck(this, Order);
|
|
53
|
-
Order.initialize(this, order_id,
|
|
50
|
+
Order.initialize(this, order_id, psp_order_code, fee_amount, chain_id, payable_amount, exchange_rate, receive_address, status, received_token_amount);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
/**
|
|
@@ -60,17 +57,14 @@ var Order = /*#__PURE__*/function () {
|
|
|
60
57
|
*/
|
|
61
58
|
return _createClass(Order, null, [{
|
|
62
59
|
key: "initialize",
|
|
63
|
-
value: function initialize(obj, order_id,
|
|
60
|
+
value: function initialize(obj, order_id, psp_order_code, fee_amount, chain_id, payable_amount, exchange_rate, receive_address, status, received_token_amount) {
|
|
64
61
|
obj['order_id'] = order_id;
|
|
65
|
-
obj['
|
|
62
|
+
obj['psp_order_code'] = psp_order_code;
|
|
63
|
+
obj['fee_amount'] = fee_amount;
|
|
66
64
|
obj['chain_id'] = chain_id;
|
|
67
65
|
obj['payable_amount'] = payable_amount;
|
|
68
|
-
obj['receive_address'] = receive_address;
|
|
69
|
-
obj['currency'] = currency;
|
|
70
|
-
obj['order_amount'] = order_amount;
|
|
71
|
-
obj['fee_amount'] = fee_amount;
|
|
72
66
|
obj['exchange_rate'] = exchange_rate;
|
|
73
|
-
obj['
|
|
67
|
+
obj['receive_address'] = receive_address;
|
|
74
68
|
obj['status'] = status;
|
|
75
69
|
obj['received_token_amount'] = received_token_amount;
|
|
76
70
|
}
|
|
@@ -93,38 +87,38 @@ var Order = /*#__PURE__*/function () {
|
|
|
93
87
|
if (data.hasOwnProperty('merchant_id')) {
|
|
94
88
|
obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
|
|
95
89
|
}
|
|
96
|
-
if (data.hasOwnProperty('
|
|
97
|
-
obj['
|
|
98
|
-
}
|
|
99
|
-
if (data.hasOwnProperty('chain_id')) {
|
|
100
|
-
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
101
|
-
}
|
|
102
|
-
if (data.hasOwnProperty('payable_amount')) {
|
|
103
|
-
obj['payable_amount'] = _ApiClient["default"].convertToType(data['payable_amount'], 'String');
|
|
90
|
+
if (data.hasOwnProperty('merchant_order_code')) {
|
|
91
|
+
obj['merchant_order_code'] = _ApiClient["default"].convertToType(data['merchant_order_code'], 'String');
|
|
104
92
|
}
|
|
105
|
-
if (data.hasOwnProperty('
|
|
106
|
-
obj['
|
|
93
|
+
if (data.hasOwnProperty('psp_order_code')) {
|
|
94
|
+
obj['psp_order_code'] = _ApiClient["default"].convertToType(data['psp_order_code'], 'String');
|
|
107
95
|
}
|
|
108
|
-
if (data.hasOwnProperty('
|
|
109
|
-
obj['
|
|
96
|
+
if (data.hasOwnProperty('pricing_currency')) {
|
|
97
|
+
obj['pricing_currency'] = _ApiClient["default"].convertToType(data['pricing_currency'], 'String');
|
|
110
98
|
}
|
|
111
|
-
if (data.hasOwnProperty('
|
|
112
|
-
obj['
|
|
99
|
+
if (data.hasOwnProperty('pricing_amount')) {
|
|
100
|
+
obj['pricing_amount'] = _ApiClient["default"].convertToType(data['pricing_amount'], 'String');
|
|
113
101
|
}
|
|
114
102
|
if (data.hasOwnProperty('fee_amount')) {
|
|
115
103
|
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
116
104
|
}
|
|
105
|
+
if (data.hasOwnProperty('payable_currency')) {
|
|
106
|
+
obj['payable_currency'] = _ApiClient["default"].convertToType(data['payable_currency'], 'String');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
109
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('payable_amount')) {
|
|
112
|
+
obj['payable_amount'] = _ApiClient["default"].convertToType(data['payable_amount'], 'String');
|
|
113
|
+
}
|
|
117
114
|
if (data.hasOwnProperty('exchange_rate')) {
|
|
118
115
|
obj['exchange_rate'] = _ApiClient["default"].convertToType(data['exchange_rate'], 'String');
|
|
119
116
|
}
|
|
120
|
-
if (data.hasOwnProperty('
|
|
121
|
-
obj['
|
|
122
|
-
}
|
|
123
|
-
if (data.hasOwnProperty('merchant_order_code')) {
|
|
124
|
-
obj['merchant_order_code'] = _ApiClient["default"].convertToType(data['merchant_order_code'], 'String');
|
|
117
|
+
if (data.hasOwnProperty('amount_tolerance')) {
|
|
118
|
+
obj['amount_tolerance'] = _ApiClient["default"].convertToType(data['amount_tolerance'], 'String');
|
|
125
119
|
}
|
|
126
|
-
if (data.hasOwnProperty('
|
|
127
|
-
obj['
|
|
120
|
+
if (data.hasOwnProperty('receive_address')) {
|
|
121
|
+
obj['receive_address'] = _ApiClient["default"].convertToType(data['receive_address'], 'String');
|
|
128
122
|
}
|
|
129
123
|
if (data.hasOwnProperty('status')) {
|
|
130
124
|
obj['status'] = _OrderStatus["default"].constructFromObject(data['status']);
|
|
@@ -132,6 +126,9 @@ var Order = /*#__PURE__*/function () {
|
|
|
132
126
|
if (data.hasOwnProperty('received_token_amount')) {
|
|
133
127
|
obj['received_token_amount'] = _ApiClient["default"].convertToType(data['received_token_amount'], 'String');
|
|
134
128
|
}
|
|
129
|
+
if (data.hasOwnProperty('expired_at')) {
|
|
130
|
+
obj['expired_at'] = _ApiClient["default"].convertToType(data['expired_at'], 'Number');
|
|
131
|
+
}
|
|
135
132
|
if (data.hasOwnProperty('created_timestamp')) {
|
|
136
133
|
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
137
134
|
}
|
|
@@ -141,12 +138,18 @@ var Order = /*#__PURE__*/function () {
|
|
|
141
138
|
if (data.hasOwnProperty('transactions')) {
|
|
142
139
|
obj['transactions'] = _ApiClient["default"].convertToType(data['transactions'], [_PaymentTransaction["default"]]);
|
|
143
140
|
}
|
|
141
|
+
if (data.hasOwnProperty('currency')) {
|
|
142
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
143
|
+
}
|
|
144
|
+
if (data.hasOwnProperty('order_amount')) {
|
|
145
|
+
obj['order_amount'] = _ApiClient["default"].convertToType(data['order_amount'], 'String');
|
|
146
|
+
}
|
|
147
|
+
if (data.hasOwnProperty('token_id')) {
|
|
148
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
149
|
+
}
|
|
144
150
|
if (data.hasOwnProperty('settlement_status')) {
|
|
145
151
|
obj['settlement_status'] = _SettleStatus["default"].constructFromObject(data['settlement_status']);
|
|
146
152
|
}
|
|
147
|
-
if (data.hasOwnProperty('amount_tolerance')) {
|
|
148
|
-
obj['amount_tolerance'] = _ApiClient["default"].convertToType(data['amount_tolerance'], 'String');
|
|
149
|
-
}
|
|
150
153
|
}
|
|
151
154
|
return obj;
|
|
152
155
|
}
|
|
@@ -183,44 +186,48 @@ var Order = /*#__PURE__*/function () {
|
|
|
183
186
|
throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
|
|
184
187
|
}
|
|
185
188
|
// ensure the json data is a string
|
|
186
|
-
if (data['
|
|
187
|
-
throw new Error("Expected the field `
|
|
189
|
+
if (data['merchant_order_code'] && !(typeof data['merchant_order_code'] === 'string' || data['merchant_order_code'] instanceof String)) {
|
|
190
|
+
throw new Error("Expected the field `merchant_order_code` to be a primitive type in the JSON string but got " + data['merchant_order_code']);
|
|
188
191
|
}
|
|
189
192
|
// ensure the json data is a string
|
|
190
|
-
if (data['
|
|
191
|
-
throw new Error("Expected the field `
|
|
193
|
+
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
194
|
+
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
192
195
|
}
|
|
193
196
|
// ensure the json data is a string
|
|
194
|
-
if (data['
|
|
195
|
-
throw new Error("Expected the field `
|
|
197
|
+
if (data['pricing_currency'] && !(typeof data['pricing_currency'] === 'string' || data['pricing_currency'] instanceof String)) {
|
|
198
|
+
throw new Error("Expected the field `pricing_currency` to be a primitive type in the JSON string but got " + data['pricing_currency']);
|
|
196
199
|
}
|
|
197
200
|
// ensure the json data is a string
|
|
198
|
-
if (data['
|
|
199
|
-
throw new Error("Expected the field `
|
|
201
|
+
if (data['pricing_amount'] && !(typeof data['pricing_amount'] === 'string' || data['pricing_amount'] instanceof String)) {
|
|
202
|
+
throw new Error("Expected the field `pricing_amount` to be a primitive type in the JSON string but got " + data['pricing_amount']);
|
|
200
203
|
}
|
|
201
204
|
// ensure the json data is a string
|
|
202
|
-
if (data['
|
|
203
|
-
throw new Error("Expected the field `
|
|
205
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
206
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
204
207
|
}
|
|
205
208
|
// ensure the json data is a string
|
|
206
|
-
if (data['
|
|
207
|
-
throw new Error("Expected the field `
|
|
209
|
+
if (data['payable_currency'] && !(typeof data['payable_currency'] === 'string' || data['payable_currency'] instanceof String)) {
|
|
210
|
+
throw new Error("Expected the field `payable_currency` to be a primitive type in the JSON string but got " + data['payable_currency']);
|
|
208
211
|
}
|
|
209
212
|
// ensure the json data is a string
|
|
210
|
-
if (data['
|
|
211
|
-
throw new Error("Expected the field `
|
|
213
|
+
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
214
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
215
|
+
}
|
|
216
|
+
// ensure the json data is a string
|
|
217
|
+
if (data['payable_amount'] && !(typeof data['payable_amount'] === 'string' || data['payable_amount'] instanceof String)) {
|
|
218
|
+
throw new Error("Expected the field `payable_amount` to be a primitive type in the JSON string but got " + data['payable_amount']);
|
|
212
219
|
}
|
|
213
220
|
// ensure the json data is a string
|
|
214
221
|
if (data['exchange_rate'] && !(typeof data['exchange_rate'] === 'string' || data['exchange_rate'] instanceof String)) {
|
|
215
222
|
throw new Error("Expected the field `exchange_rate` to be a primitive type in the JSON string but got " + data['exchange_rate']);
|
|
216
223
|
}
|
|
217
224
|
// ensure the json data is a string
|
|
218
|
-
if (data['
|
|
219
|
-
throw new Error("Expected the field `
|
|
225
|
+
if (data['amount_tolerance'] && !(typeof data['amount_tolerance'] === 'string' || data['amount_tolerance'] instanceof String)) {
|
|
226
|
+
throw new Error("Expected the field `amount_tolerance` to be a primitive type in the JSON string but got " + data['amount_tolerance']);
|
|
220
227
|
}
|
|
221
228
|
// ensure the json data is a string
|
|
222
|
-
if (data['
|
|
223
|
-
throw new Error("Expected the field `
|
|
229
|
+
if (data['receive_address'] && !(typeof data['receive_address'] === 'string' || data['receive_address'] instanceof String)) {
|
|
230
|
+
throw new Error("Expected the field `receive_address` to be a primitive type in the JSON string but got " + data['receive_address']);
|
|
224
231
|
}
|
|
225
232
|
// ensure the json data is a string
|
|
226
233
|
if (data['received_token_amount'] && !(typeof data['received_token_amount'] === 'string' || data['received_token_amount'] instanceof String)) {
|
|
@@ -248,14 +255,22 @@ var Order = /*#__PURE__*/function () {
|
|
|
248
255
|
;
|
|
249
256
|
}
|
|
250
257
|
// ensure the json data is a string
|
|
251
|
-
if (data['
|
|
252
|
-
throw new Error("Expected the field `
|
|
258
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
259
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
260
|
+
}
|
|
261
|
+
// ensure the json data is a string
|
|
262
|
+
if (data['order_amount'] && !(typeof data['order_amount'] === 'string' || data['order_amount'] instanceof String)) {
|
|
263
|
+
throw new Error("Expected the field `order_amount` to be a primitive type in the JSON string but got " + data['order_amount']);
|
|
264
|
+
}
|
|
265
|
+
// ensure the json data is a string
|
|
266
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
267
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
253
268
|
}
|
|
254
269
|
return true;
|
|
255
270
|
}
|
|
256
271
|
}]);
|
|
257
272
|
}();
|
|
258
|
-
Order.RequiredProperties = ["order_id", "
|
|
273
|
+
Order.RequiredProperties = ["order_id", "psp_order_code", "fee_amount", "chain_id", "payable_amount", "exchange_rate", "receive_address", "status", "received_token_amount"];
|
|
259
274
|
|
|
260
275
|
/**
|
|
261
276
|
* The order ID.
|
|
@@ -270,70 +285,70 @@ Order.prototype['order_id'] = undefined;
|
|
|
270
285
|
Order.prototype['merchant_id'] = undefined;
|
|
271
286
|
|
|
272
287
|
/**
|
|
273
|
-
*
|
|
274
|
-
* @member {String}
|
|
288
|
+
* A unique reference code assigned by the merchant to identify this order in their system.
|
|
289
|
+
* @member {String} merchant_order_code
|
|
275
290
|
*/
|
|
276
|
-
Order.prototype['
|
|
291
|
+
Order.prototype['merchant_order_code'] = undefined;
|
|
277
292
|
|
|
278
293
|
/**
|
|
279
|
-
*
|
|
280
|
-
* @member {String}
|
|
294
|
+
* A unique reference code assigned by the developer to identify this order in their system.
|
|
295
|
+
* @member {String} psp_order_code
|
|
281
296
|
*/
|
|
282
|
-
Order.prototype['
|
|
297
|
+
Order.prototype['psp_order_code'] = undefined;
|
|
283
298
|
|
|
284
299
|
/**
|
|
285
|
-
* The
|
|
286
|
-
* @member {String}
|
|
300
|
+
* The fiat currency of the order.
|
|
301
|
+
* @member {String} pricing_currency
|
|
287
302
|
*/
|
|
288
|
-
Order.prototype['
|
|
303
|
+
Order.prototype['pricing_currency'] = undefined;
|
|
289
304
|
|
|
290
305
|
/**
|
|
291
|
-
* The
|
|
292
|
-
* @member {String}
|
|
306
|
+
* The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`).
|
|
307
|
+
* @member {String} pricing_amount
|
|
293
308
|
*/
|
|
294
|
-
Order.prototype['
|
|
309
|
+
Order.prototype['pricing_amount'] = undefined;
|
|
295
310
|
|
|
296
311
|
/**
|
|
297
|
-
* The fiat currency
|
|
298
|
-
* @member {String}
|
|
312
|
+
* The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge.
|
|
313
|
+
* @member {String} fee_amount
|
|
299
314
|
*/
|
|
300
|
-
Order.prototype['
|
|
315
|
+
Order.prototype['fee_amount'] = undefined;
|
|
301
316
|
|
|
302
317
|
/**
|
|
303
|
-
* The
|
|
304
|
-
* @member {String}
|
|
318
|
+
* The ID of the cryptocurrency used for payment.
|
|
319
|
+
* @member {String} payable_currency
|
|
305
320
|
*/
|
|
306
|
-
Order.prototype['
|
|
321
|
+
Order.prototype['payable_currency'] = undefined;
|
|
307
322
|
|
|
308
323
|
/**
|
|
309
|
-
* The
|
|
310
|
-
* @member {String}
|
|
324
|
+
* The ID of the blockchain network where the payment transaction should be made.
|
|
325
|
+
* @member {String} chain_id
|
|
311
326
|
*/
|
|
312
|
-
Order.prototype['
|
|
327
|
+
Order.prototype['chain_id'] = undefined;
|
|
313
328
|
|
|
314
329
|
/**
|
|
315
|
-
* The
|
|
316
|
-
* @member {String}
|
|
330
|
+
* The cryptocurrency amount to be paid for this order.
|
|
331
|
+
* @member {String} payable_amount
|
|
317
332
|
*/
|
|
318
|
-
Order.prototype['
|
|
333
|
+
Order.prototype['payable_amount'] = undefined;
|
|
319
334
|
|
|
320
335
|
/**
|
|
321
|
-
* The
|
|
322
|
-
* @member {
|
|
336
|
+
* The exchange rate between a currency pair. Expressed as the amount of fiat currency per one unit of cryptocurrency. For example, if the cryptocurrency is USDT and the fiat currency is USD, a rate of \"0.99\" means 1 USDT = 0.99 USD.
|
|
337
|
+
* @member {String} exchange_rate
|
|
323
338
|
*/
|
|
324
|
-
Order.prototype['
|
|
339
|
+
Order.prototype['exchange_rate'] = undefined;
|
|
325
340
|
|
|
326
341
|
/**
|
|
327
|
-
*
|
|
328
|
-
* @member {String}
|
|
342
|
+
* Allowed amount deviation.
|
|
343
|
+
* @member {String} amount_tolerance
|
|
329
344
|
*/
|
|
330
|
-
Order.prototype['
|
|
345
|
+
Order.prototype['amount_tolerance'] = undefined;
|
|
331
346
|
|
|
332
347
|
/**
|
|
333
|
-
*
|
|
334
|
-
* @member {String}
|
|
348
|
+
* The recipient wallet address to be used for the payment transaction.
|
|
349
|
+
* @member {String} receive_address
|
|
335
350
|
*/
|
|
336
|
-
Order.prototype['
|
|
351
|
+
Order.prototype['receive_address'] = undefined;
|
|
337
352
|
|
|
338
353
|
/**
|
|
339
354
|
* @member {module:model/OrderStatus} status
|
|
@@ -347,31 +362,49 @@ Order.prototype['status'] = undefined;
|
|
|
347
362
|
Order.prototype['received_token_amount'] = undefined;
|
|
348
363
|
|
|
349
364
|
/**
|
|
350
|
-
* The
|
|
365
|
+
* The expiration time of the pay-in order, represented as a UNIX timestamp in seconds.
|
|
366
|
+
* @member {Number} expired_at
|
|
367
|
+
*/
|
|
368
|
+
Order.prototype['expired_at'] = undefined;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The created time of the order, represented as a UNIX timestamp in seconds.
|
|
351
372
|
* @member {Number} created_timestamp
|
|
352
373
|
*/
|
|
353
374
|
Order.prototype['created_timestamp'] = undefined;
|
|
354
375
|
|
|
355
376
|
/**
|
|
356
|
-
* The
|
|
377
|
+
* The updated time of the order, represented as a UNIX timestamp in seconds.
|
|
357
378
|
* @member {Number} updated_timestamp
|
|
358
379
|
*/
|
|
359
380
|
Order.prototype['updated_timestamp'] = undefined;
|
|
360
381
|
|
|
361
382
|
/**
|
|
362
|
-
* An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the
|
|
383
|
+
* An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the settlement process.
|
|
363
384
|
* @member {Array.<module:model/PaymentTransaction>} transactions
|
|
364
385
|
*/
|
|
365
386
|
Order.prototype['transactions'] = undefined;
|
|
366
387
|
|
|
367
388
|
/**
|
|
368
|
-
*
|
|
389
|
+
* The fiat currency of the order.
|
|
390
|
+
* @member {String} currency
|
|
369
391
|
*/
|
|
370
|
-
Order.prototype['
|
|
392
|
+
Order.prototype['currency'] = undefined;
|
|
371
393
|
|
|
372
394
|
/**
|
|
373
|
-
* The
|
|
374
|
-
* @member {String}
|
|
395
|
+
* The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`).
|
|
396
|
+
* @member {String} order_amount
|
|
375
397
|
*/
|
|
376
|
-
Order.prototype['
|
|
398
|
+
Order.prototype['order_amount'] = undefined;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* The ID of the cryptocurrency used for payment.
|
|
402
|
+
* @member {String} token_id
|
|
403
|
+
*/
|
|
404
|
+
Order.prototype['token_id'] = undefined;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @member {module:model/SettleStatus} settlement_status
|
|
408
|
+
*/
|
|
409
|
+
Order.prototype['settlement_status'] = undefined;
|
|
377
410
|
var _default = exports["default"] = Order;
|