@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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _OrderLinkBusinessInfoCustomExchangeRatesInner = _interopRequireDefault(require("./OrderLinkBusinessInfoCustomExchangeRatesInner"));
|
|
9
|
+
var _OrderLinkBusinessInfoPayableAmountsInner = _interopRequireDefault(require("./OrderLinkBusinessInfoPayableAmountsInner"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
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); }
|
|
11
12
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -33,16 +34,13 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
33
34
|
/**
|
|
34
35
|
* Constructs a new <code>OrderLinkBusinessInfo</code>.
|
|
35
36
|
* @alias module:model/OrderLinkBusinessInfo
|
|
36
|
-
* @param token_ids {Array.<String>} An array of token IDs representing the cryptocurrencies and chains available for payment. These options will be shown to users on the payment page for them to choose from. Supported token IDs 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`
|
|
37
|
-
* @param currency {String} The currency in which both the order amount (`order_amount`) and the developer fee (`fee_amount`) are denominated. Only the following values are supported: `USD`, `USDT`, or `USDC`.
|
|
38
|
-
* @param fee_amount {String} The developer fee for the order, denominated in the currency specified by `currency`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
|
|
39
37
|
* @param merchant_id {String} The merchant ID.
|
|
40
|
-
* @param order_amount {String} The base amount of the order, excluding the developer fee (specified in `fee_amount`), denominated in the currency specified by `currency`. Values must be greater than `0` and contain two decimal places.
|
|
41
38
|
* @param psp_order_code {String} A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters.
|
|
39
|
+
* @param fee_amount {String} The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
|
|
42
40
|
*/
|
|
43
|
-
function OrderLinkBusinessInfo(
|
|
41
|
+
function OrderLinkBusinessInfo(merchant_id, psp_order_code, fee_amount) {
|
|
44
42
|
_classCallCheck(this, OrderLinkBusinessInfo);
|
|
45
|
-
OrderLinkBusinessInfo.initialize(this,
|
|
43
|
+
OrderLinkBusinessInfo.initialize(this, merchant_id, psp_order_code, fee_amount);
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
/**
|
|
@@ -52,13 +50,10 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
52
50
|
*/
|
|
53
51
|
return _createClass(OrderLinkBusinessInfo, null, [{
|
|
54
52
|
key: "initialize",
|
|
55
|
-
value: function initialize(obj,
|
|
56
|
-
obj['token_ids'] = token_ids;
|
|
57
|
-
obj['currency'] = currency;
|
|
58
|
-
obj['fee_amount'] = fee_amount;
|
|
53
|
+
value: function initialize(obj, merchant_id, psp_order_code, fee_amount) {
|
|
59
54
|
obj['merchant_id'] = merchant_id;
|
|
60
|
-
obj['order_amount'] = order_amount;
|
|
61
55
|
obj['psp_order_code'] = psp_order_code;
|
|
56
|
+
obj['fee_amount'] = fee_amount;
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
/**
|
|
@@ -73,39 +68,51 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
73
68
|
value: function constructFromObject(data, obj) {
|
|
74
69
|
if (data) {
|
|
75
70
|
obj = obj || new OrderLinkBusinessInfo();
|
|
76
|
-
if (data.hasOwnProperty('token_ids')) {
|
|
77
|
-
obj['token_ids'] = _ApiClient["default"].convertToType(data['token_ids'], ['String']);
|
|
78
|
-
}
|
|
79
|
-
if (data.hasOwnProperty('custom_exchange_rates')) {
|
|
80
|
-
obj['custom_exchange_rates'] = _ApiClient["default"].convertToType(data['custom_exchange_rates'], [_OrderLinkBusinessInfoCustomExchangeRatesInner["default"]]);
|
|
81
|
-
}
|
|
82
|
-
if (data.hasOwnProperty('currency')) {
|
|
83
|
-
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
84
|
-
}
|
|
85
|
-
if (data.hasOwnProperty('fee_amount')) {
|
|
86
|
-
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
87
|
-
}
|
|
88
71
|
if (data.hasOwnProperty('merchant_id')) {
|
|
89
72
|
obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
|
|
90
73
|
}
|
|
91
|
-
if (data.hasOwnProperty('order_amount')) {
|
|
92
|
-
obj['order_amount'] = _ApiClient["default"].convertToType(data['order_amount'], 'String');
|
|
93
|
-
}
|
|
94
74
|
if (data.hasOwnProperty('merchant_order_code')) {
|
|
95
75
|
obj['merchant_order_code'] = _ApiClient["default"].convertToType(data['merchant_order_code'], 'String');
|
|
96
76
|
}
|
|
97
77
|
if (data.hasOwnProperty('psp_order_code')) {
|
|
98
78
|
obj['psp_order_code'] = _ApiClient["default"].convertToType(data['psp_order_code'], 'String');
|
|
99
79
|
}
|
|
80
|
+
if (data.hasOwnProperty('pricing_currency')) {
|
|
81
|
+
obj['pricing_currency'] = _ApiClient["default"].convertToType(data['pricing_currency'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('pricing_amount')) {
|
|
84
|
+
obj['pricing_amount'] = _ApiClient["default"].convertToType(data['pricing_amount'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
87
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('payable_currencies')) {
|
|
90
|
+
obj['payable_currencies'] = _ApiClient["default"].convertToType(data['payable_currencies'], ['String']);
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('payable_amounts')) {
|
|
93
|
+
obj['payable_amounts'] = _ApiClient["default"].convertToType(data['payable_amounts'], [_OrderLinkBusinessInfoPayableAmountsInner["default"]]);
|
|
94
|
+
}
|
|
100
95
|
if (data.hasOwnProperty('expired_in')) {
|
|
101
96
|
obj['expired_in'] = _ApiClient["default"].convertToType(data['expired_in'], 'Number');
|
|
102
97
|
}
|
|
103
|
-
if (data.hasOwnProperty('use_dedicated_address')) {
|
|
104
|
-
obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
|
|
105
|
-
}
|
|
106
98
|
if (data.hasOwnProperty('amount_tolerance')) {
|
|
107
99
|
obj['amount_tolerance'] = _ApiClient["default"].convertToType(data['amount_tolerance'], 'String');
|
|
108
100
|
}
|
|
101
|
+
if (data.hasOwnProperty('currency')) {
|
|
102
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('order_amount')) {
|
|
105
|
+
obj['order_amount'] = _ApiClient["default"].convertToType(data['order_amount'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('token_ids')) {
|
|
108
|
+
obj['token_ids'] = _ApiClient["default"].convertToType(data['token_ids'], ['String']);
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('custom_exchange_rates')) {
|
|
111
|
+
obj['custom_exchange_rates'] = _ApiClient["default"].convertToType(data['custom_exchange_rates'], [_OrderLinkBusinessInfoCustomExchangeRatesInner["default"]]);
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('use_dedicated_address')) {
|
|
114
|
+
obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
|
|
115
|
+
}
|
|
109
116
|
}
|
|
110
117
|
return obj;
|
|
111
118
|
}
|
|
@@ -128,28 +135,52 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
128
135
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
|
-
// ensure the json data is
|
|
138
|
+
// ensure the json data is a string
|
|
132
139
|
} catch (err) {
|
|
133
140
|
_iterator.e(err);
|
|
134
141
|
} finally {
|
|
135
142
|
_iterator.f();
|
|
136
143
|
}
|
|
137
|
-
if (!
|
|
138
|
-
throw new Error("Expected the field `
|
|
144
|
+
if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
|
|
139
146
|
}
|
|
140
|
-
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['merchant_order_code'] && !(typeof data['merchant_order_code'] === 'string' || data['merchant_order_code'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `merchant_order_code` to be a primitive type in the JSON string but got " + data['merchant_order_code']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['pricing_currency'] && !(typeof data['pricing_currency'] === 'string' || data['pricing_currency'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `pricing_currency` to be a primitive type in the JSON string but got " + data['pricing_currency']);
|
|
158
|
+
}
|
|
159
|
+
// ensure the json data is a string
|
|
160
|
+
if (data['pricing_amount'] && !(typeof data['pricing_amount'] === 'string' || data['pricing_amount'] instanceof String)) {
|
|
161
|
+
throw new Error("Expected the field `pricing_amount` to be a primitive type in the JSON string but got " + data['pricing_amount']);
|
|
162
|
+
}
|
|
163
|
+
// ensure the json data is a string
|
|
164
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
165
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
166
|
+
}
|
|
167
|
+
// ensure the json data is an array
|
|
168
|
+
if (!Array.isArray(data['payable_currencies'])) {
|
|
169
|
+
throw new Error("Expected the field `payable_currencies` to be an array in the JSON data but got " + data['payable_currencies']);
|
|
170
|
+
}
|
|
171
|
+
if (data['payable_amounts']) {
|
|
141
172
|
// data not null
|
|
142
173
|
// ensure the json data is an array
|
|
143
|
-
if (!Array.isArray(data['
|
|
144
|
-
throw new Error("Expected the field `
|
|
174
|
+
if (!Array.isArray(data['payable_amounts'])) {
|
|
175
|
+
throw new Error("Expected the field `payable_amounts` to be an array in the JSON data but got " + data['payable_amounts']);
|
|
145
176
|
}
|
|
146
|
-
// validate the optional field `
|
|
147
|
-
var _iterator2 = _createForOfIteratorHelper(data['
|
|
177
|
+
// validate the optional field `payable_amounts` (array)
|
|
178
|
+
var _iterator2 = _createForOfIteratorHelper(data['payable_amounts']),
|
|
148
179
|
_step2;
|
|
149
180
|
try {
|
|
150
181
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
151
182
|
var item = _step2.value;
|
|
152
|
-
|
|
183
|
+
_OrderLinkBusinessInfoPayableAmountsInner["default"].validateJSON(item);
|
|
153
184
|
}
|
|
154
185
|
} catch (err) {
|
|
155
186
|
_iterator2.e(err);
|
|
@@ -159,86 +190,95 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
159
190
|
;
|
|
160
191
|
}
|
|
161
192
|
// ensure the json data is a string
|
|
162
|
-
if (data['
|
|
163
|
-
throw new Error("Expected the field `
|
|
164
|
-
}
|
|
165
|
-
// ensure the json data is a string
|
|
166
|
-
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
167
|
-
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
193
|
+
if (data['amount_tolerance'] && !(typeof data['amount_tolerance'] === 'string' || data['amount_tolerance'] instanceof String)) {
|
|
194
|
+
throw new Error("Expected the field `amount_tolerance` to be a primitive type in the JSON string but got " + data['amount_tolerance']);
|
|
168
195
|
}
|
|
169
196
|
// ensure the json data is a string
|
|
170
|
-
if (data['
|
|
171
|
-
throw new Error("Expected the field `
|
|
197
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
198
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
172
199
|
}
|
|
173
200
|
// ensure the json data is a string
|
|
174
201
|
if (data['order_amount'] && !(typeof data['order_amount'] === 'string' || data['order_amount'] instanceof String)) {
|
|
175
202
|
throw new Error("Expected the field `order_amount` to be a primitive type in the JSON string but got " + data['order_amount']);
|
|
176
203
|
}
|
|
177
|
-
// ensure the json data is
|
|
178
|
-
if (
|
|
179
|
-
throw new Error("Expected the field `
|
|
180
|
-
}
|
|
181
|
-
// ensure the json data is a string
|
|
182
|
-
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
183
|
-
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
204
|
+
// ensure the json data is an array
|
|
205
|
+
if (!Array.isArray(data['token_ids'])) {
|
|
206
|
+
throw new Error("Expected the field `token_ids` to be an array in the JSON data but got " + data['token_ids']);
|
|
184
207
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
208
|
+
if (data['custom_exchange_rates']) {
|
|
209
|
+
// data not null
|
|
210
|
+
// ensure the json data is an array
|
|
211
|
+
if (!Array.isArray(data['custom_exchange_rates'])) {
|
|
212
|
+
throw new Error("Expected the field `custom_exchange_rates` to be an array in the JSON data but got " + data['custom_exchange_rates']);
|
|
213
|
+
}
|
|
214
|
+
// validate the optional field `custom_exchange_rates` (array)
|
|
215
|
+
var _iterator3 = _createForOfIteratorHelper(data['custom_exchange_rates']),
|
|
216
|
+
_step3;
|
|
217
|
+
try {
|
|
218
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
219
|
+
var _item = _step3.value;
|
|
220
|
+
_OrderLinkBusinessInfoCustomExchangeRatesInner["default"].validateJSON(_item);
|
|
221
|
+
}
|
|
222
|
+
} catch (err) {
|
|
223
|
+
_iterator3.e(err);
|
|
224
|
+
} finally {
|
|
225
|
+
_iterator3.f();
|
|
226
|
+
}
|
|
227
|
+
;
|
|
188
228
|
}
|
|
189
229
|
return true;
|
|
190
230
|
}
|
|
191
231
|
}]);
|
|
192
232
|
}();
|
|
193
|
-
OrderLinkBusinessInfo.RequiredProperties = ["
|
|
233
|
+
OrderLinkBusinessInfo.RequiredProperties = ["merchant_id", "psp_order_code", "fee_amount"];
|
|
194
234
|
|
|
195
235
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @member {
|
|
236
|
+
* The merchant ID.
|
|
237
|
+
* @member {String} merchant_id
|
|
198
238
|
*/
|
|
199
|
-
OrderLinkBusinessInfo.prototype['
|
|
239
|
+
OrderLinkBusinessInfo.prototype['merchant_id'] = undefined;
|
|
200
240
|
|
|
201
241
|
/**
|
|
202
|
-
* A
|
|
203
|
-
* @member {
|
|
242
|
+
* A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters.
|
|
243
|
+
* @member {String} merchant_order_code
|
|
204
244
|
*/
|
|
205
|
-
OrderLinkBusinessInfo.prototype['
|
|
245
|
+
OrderLinkBusinessInfo.prototype['merchant_order_code'] = undefined;
|
|
206
246
|
|
|
207
247
|
/**
|
|
208
|
-
*
|
|
209
|
-
* @member {String}
|
|
248
|
+
* A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters.
|
|
249
|
+
* @member {String} psp_order_code
|
|
210
250
|
*/
|
|
211
|
-
OrderLinkBusinessInfo.prototype['
|
|
251
|
+
OrderLinkBusinessInfo.prototype['psp_order_code'] = undefined;
|
|
212
252
|
|
|
213
253
|
/**
|
|
214
|
-
* The
|
|
215
|
-
* @member {String}
|
|
254
|
+
* The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported.
|
|
255
|
+
* @member {String} pricing_currency
|
|
216
256
|
*/
|
|
217
|
-
OrderLinkBusinessInfo.prototype['
|
|
257
|
+
OrderLinkBusinessInfo.prototype['pricing_currency'] = undefined;
|
|
218
258
|
|
|
219
259
|
/**
|
|
220
|
-
* The
|
|
221
|
-
* @member {String}
|
|
260
|
+
* The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places.
|
|
261
|
+
* @member {String} pricing_amount
|
|
222
262
|
*/
|
|
223
|
-
OrderLinkBusinessInfo.prototype['
|
|
263
|
+
OrderLinkBusinessInfo.prototype['pricing_amount'] = undefined;
|
|
224
264
|
|
|
225
265
|
/**
|
|
226
|
-
* The
|
|
227
|
-
* @member {String}
|
|
266
|
+
* The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
|
|
267
|
+
* @member {String} fee_amount
|
|
228
268
|
*/
|
|
229
|
-
OrderLinkBusinessInfo.prototype['
|
|
269
|
+
OrderLinkBusinessInfo.prototype['fee_amount'] = undefined;
|
|
230
270
|
|
|
231
271
|
/**
|
|
232
|
-
*
|
|
233
|
-
* @member {String}
|
|
272
|
+
* List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values.
|
|
273
|
+
* @member {Array.<String>} payable_currencies
|
|
234
274
|
*/
|
|
235
|
-
OrderLinkBusinessInfo.prototype['
|
|
275
|
+
OrderLinkBusinessInfo.prototype['payable_currencies'] = undefined;
|
|
236
276
|
|
|
237
277
|
/**
|
|
238
|
-
*
|
|
239
|
-
* @member {
|
|
278
|
+
* Optional list of payable amounts for different tokens. If provided, these amounts will be used instead of calculating the amounts based on the exchange rate.
|
|
279
|
+
* @member {Array.<module:model/OrderLinkBusinessInfoPayableAmountsInner>} payable_amounts
|
|
240
280
|
*/
|
|
241
|
-
OrderLinkBusinessInfo.prototype['
|
|
281
|
+
OrderLinkBusinessInfo.prototype['payable_amounts'] = undefined;
|
|
242
282
|
|
|
243
283
|
/**
|
|
244
284
|
* The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event.
|
|
@@ -248,14 +288,38 @@ OrderLinkBusinessInfo.prototype['psp_order_code'] = undefined;
|
|
|
248
288
|
OrderLinkBusinessInfo.prototype['expired_in'] = 1800;
|
|
249
289
|
|
|
250
290
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @member {
|
|
291
|
+
* Allowed amount deviation, precision to 1 decimal place.
|
|
292
|
+
* @member {String} amount_tolerance
|
|
253
293
|
*/
|
|
254
|
-
OrderLinkBusinessInfo.prototype['
|
|
294
|
+
OrderLinkBusinessInfo.prototype['amount_tolerance'] = undefined;
|
|
255
295
|
|
|
256
296
|
/**
|
|
257
|
-
* The
|
|
258
|
-
* @member {String}
|
|
297
|
+
* The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported.
|
|
298
|
+
* @member {String} currency
|
|
259
299
|
*/
|
|
260
|
-
OrderLinkBusinessInfo.prototype['
|
|
300
|
+
OrderLinkBusinessInfo.prototype['currency'] = undefined;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places.
|
|
304
|
+
* @member {String} order_amount
|
|
305
|
+
*/
|
|
306
|
+
OrderLinkBusinessInfo.prototype['order_amount'] = undefined;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values.
|
|
310
|
+
* @member {Array.<String>} token_ids
|
|
311
|
+
*/
|
|
312
|
+
OrderLinkBusinessInfo.prototype['token_ids'] = undefined;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Optional list of final exchange rates for different tokens. If provided, these rates will be used instead of real-time market rates.
|
|
316
|
+
* @member {Array.<module:model/OrderLinkBusinessInfoCustomExchangeRatesInner>} custom_exchange_rates
|
|
317
|
+
*/
|
|
318
|
+
OrderLinkBusinessInfo.prototype['custom_exchange_rates'] = undefined;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used.
|
|
322
|
+
* @member {Boolean} use_dedicated_address
|
|
323
|
+
*/
|
|
324
|
+
OrderLinkBusinessInfo.prototype['use_dedicated_address'] = undefined;
|
|
261
325
|
var _default = exports["default"] = OrderLinkBusinessInfo;
|
|
@@ -32,8 +32,8 @@ var OrderLinkBusinessInfoCustomExchangeRatesInner = /*#__PURE__*/function () {
|
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>OrderLinkBusinessInfoCustomExchangeRatesInner</code>.
|
|
34
34
|
* @alias module:model/OrderLinkBusinessInfoCustomExchangeRatesInner
|
|
35
|
-
* @param token_id {String} The token ID
|
|
36
|
-
* @param exchange_rate {String} The exchange rate to use for this token
|
|
35
|
+
* @param token_id {String} The cryptocurrency token ID
|
|
36
|
+
* @param exchange_rate {String} The fixed exchange rate to use for this token
|
|
37
37
|
*/
|
|
38
38
|
function OrderLinkBusinessInfoCustomExchangeRatesInner(token_id, exchange_rate) {
|
|
39
39
|
_classCallCheck(this, OrderLinkBusinessInfoCustomExchangeRatesInner);
|
|
@@ -112,13 +112,13 @@ var OrderLinkBusinessInfoCustomExchangeRatesInner = /*#__PURE__*/function () {
|
|
|
112
112
|
OrderLinkBusinessInfoCustomExchangeRatesInner.RequiredProperties = ["token_id", "exchange_rate"];
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* The token ID
|
|
115
|
+
* The cryptocurrency token ID
|
|
116
116
|
* @member {String} token_id
|
|
117
117
|
*/
|
|
118
118
|
OrderLinkBusinessInfoCustomExchangeRatesInner.prototype['token_id'] = undefined;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* The exchange rate to use for this token
|
|
121
|
+
* The fixed exchange rate to use for this token
|
|
122
122
|
* @member {String} exchange_rate
|
|
123
123
|
*/
|
|
124
124
|
OrderLinkBusinessInfoCustomExchangeRatesInner.prototype['exchange_rate'] = undefined;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The OrderLinkBusinessInfoPayableAmountsInner model module.
|
|
29
|
+
* @module model/OrderLinkBusinessInfoPayableAmountsInner
|
|
30
|
+
*/
|
|
31
|
+
var OrderLinkBusinessInfoPayableAmountsInner = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>OrderLinkBusinessInfoPayableAmountsInner</code>.
|
|
34
|
+
* @alias module:model/OrderLinkBusinessInfoPayableAmountsInner
|
|
35
|
+
* @param token_id {String} The cryptocurrency token ID
|
|
36
|
+
* @param amount {String} The actual payable amount of the order in the cryptocurrency.
|
|
37
|
+
*/
|
|
38
|
+
function OrderLinkBusinessInfoPayableAmountsInner(token_id, amount) {
|
|
39
|
+
_classCallCheck(this, OrderLinkBusinessInfoPayableAmountsInner);
|
|
40
|
+
OrderLinkBusinessInfoPayableAmountsInner.initialize(this, token_id, amount);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(OrderLinkBusinessInfoPayableAmountsInner, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, token_id, amount) {
|
|
51
|
+
obj['token_id'] = token_id;
|
|
52
|
+
obj['amount'] = amount;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>OrderLinkBusinessInfoPayableAmountsInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/OrderLinkBusinessInfoPayableAmountsInner} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/OrderLinkBusinessInfoPayableAmountsInner} The populated <code>OrderLinkBusinessInfoPayableAmountsInner</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new OrderLinkBusinessInfoPayableAmountsInner();
|
|
67
|
+
if (data.hasOwnProperty('token_id')) {
|
|
68
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('amount')) {
|
|
71
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>OrderLinkBusinessInfoPayableAmountsInner</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OrderLinkBusinessInfoPayableAmountsInner</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(OrderLinkBusinessInfoPayableAmountsInner.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
}();
|
|
112
|
+
OrderLinkBusinessInfoPayableAmountsInner.RequiredProperties = ["token_id", "amount"];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The cryptocurrency token ID
|
|
116
|
+
* @member {String} token_id
|
|
117
|
+
*/
|
|
118
|
+
OrderLinkBusinessInfoPayableAmountsInner.prototype['token_id'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The actual payable amount of the order in the cryptocurrency.
|
|
122
|
+
* @member {String} amount
|
|
123
|
+
*/
|
|
124
|
+
OrderLinkBusinessInfoPayableAmountsInner.prototype['amount'] = undefined;
|
|
125
|
+
var _default = exports["default"] = OrderLinkBusinessInfoPayableAmountsInner;
|
|
@@ -34,7 +34,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>PaymentAddressUpdateEventData</code>.
|
|
35
35
|
* @alias module:model/PaymentAddressUpdateEventData
|
|
36
36
|
* @implements module:model/WebhookEventDataType
|
|
37
|
-
* @param data_type {module:model/PaymentAddressUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
37
|
+
* @param data_type {module:model/PaymentAddressUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
38
38
|
* @param custom_payer_id {String} A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
39
39
|
* @param payer_id {String} A unique identifier assigned by Cobo to track and identify individual payers.
|
|
40
40
|
* @param chain {String} The chain ID.
|
|
@@ -152,7 +152,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
|
|
|
152
152
|
PaymentAddressUpdateEventData.RequiredProperties = ["data_type", "custom_payer_id", "payer_id", "chain", "previous_address", "updated_address"];
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
155
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
156
156
|
* @member {module:model/PaymentAddressUpdateEventData.DataTypeEnum} data_type
|
|
157
157
|
*/
|
|
158
158
|
PaymentAddressUpdateEventData.prototype['data_type'] = undefined;
|
|
@@ -189,7 +189,7 @@ PaymentAddressUpdateEventData.prototype['updated_address'] = undefined;
|
|
|
189
189
|
|
|
190
190
|
// Implement WebhookEventDataType interface:
|
|
191
191
|
/**
|
|
192
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
192
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
193
193
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
194
194
|
*/
|
|
195
195
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -265,6 +265,11 @@ PaymentAddressUpdateEventData['DataTypeEnum'] = {
|
|
|
265
265
|
* @const
|
|
266
266
|
*/
|
|
267
267
|
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
268
|
+
/**
|
|
269
|
+
* value: "PaymentPayout"
|
|
270
|
+
* @const
|
|
271
|
+
*/
|
|
272
|
+
"PaymentPayout": "PaymentPayout",
|
|
268
273
|
/**
|
|
269
274
|
* value: "BalanceUpdateInfo"
|
|
270
275
|
* @const
|