@cobo/cobo-waas2 1.16.0 → 1.18.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 +46 -6
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AppWorkflowsApi.js +22 -22
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/OrganizationsApi.js +79 -0
- package/dist/api/PaymentApi.js +265 -55
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/api/WalletsApi.js +11 -8
- package/dist/index.js +252 -14
- package/dist/model/Account.js +174 -0
- package/dist/model/AcquiringType.js +61 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AppWorkflow.js +7 -7
- package/dist/model/AppWorkflowField.js +5 -5
- package/dist/model/AppWorkflowPolicy.js +1 -1
- package/dist/model/ApprovalEntry.js +1 -1
- package/dist/model/ApprovalRequest.js +5 -3
- package/dist/model/ApprovalRequestDetail.js +2 -1
- package/dist/model/ApprovalUser.js +4 -4
- package/dist/model/BalanceUpdateInfo.js +170 -0
- package/dist/model/BalanceUpdateInfoEventData.js +297 -0
- package/dist/model/BankAccount.js +2 -2
- package/dist/model/ChainInfo.js +1 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CreateApprovalRequest201Response.js +2 -1
- package/dist/model/CreateMerchantRequest.js +13 -0
- package/dist/model/CreatePaymentOrderRequest.js +14 -5
- package/dist/model/CreateRefundRequest.js +41 -8
- package/dist/model/CreateSettlement.js +28 -12
- package/dist/model/CreateSettlementRequestRequest.js +27 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/CustodialTransferDestination.js +137 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimatedFILFee.js +170 -0
- package/dist/model/EstimatedFILFeeSlow.js +186 -0
- package/dist/model/EstimatedFee.js +68 -12
- package/dist/model/EstimatedSOLFee.js +170 -0
- package/dist/model/EstimatedSOLFeeSlow.js +184 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
- package/dist/model/FILBase.js +88 -0
- package/dist/model/FILPrice.js +114 -0
- package/dist/model/FeeType.js +10 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/GraphQLError.js +135 -0
- package/dist/model/GraphQLErrorLocationsInner.js +92 -0
- package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
- package/dist/model/GraphQLResponse.js +119 -0
- package/dist/model/ListTopUpPayers200Response.js +123 -0
- package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +15 -2
- package/dist/model/Order.js +16 -7
- package/dist/model/PayerAccount.js +189 -0
- package/dist/model/PaymentOrderEventData.js +33 -15
- package/dist/model/PaymentRefundEventData.js +66 -11
- package/dist/model/PaymentSettlementEvent.js +14 -9
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +1 -1
- package/dist/model/PolicyActionContent.js +6 -4
- package/dist/model/PolicyCondition.js +5 -5
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/Refund.js +39 -4
- package/dist/model/RefundStatus.js +5 -0
- package/dist/model/RequestApproval.js +9 -9
- package/dist/model/RevokeApprovalRequest201Response.js +2 -1
- package/dist/model/RevokeApprovalRequestRequest.js +2 -2
- package/dist/model/SOLBase.js +101 -0
- package/dist/model/SOLComputeUnit.js +101 -0
- package/dist/model/Settlement.js +3 -3
- package/dist/model/SettlementDetail.js +24 -6
- package/dist/model/SettlementInfo.js +11 -2
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/SwapActivityDetail.js +30 -0
- package/dist/model/SwapActivitySigners.js +110 -0
- package/dist/model/SwapQuote.js +17 -4
- package/dist/model/SwapSingingStatus.js +71 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TopUpAddress.js +230 -0
- package/dist/model/TransactionCoboCategory.js +20 -0
- package/dist/model/TransactionDestination.js +14 -38
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmCalldataInfo.js +1 -1
- package/dist/model/TransactionFILFee.js +229 -0
- package/dist/model/TransactionFee.js +107 -9
- package/dist/model/TransactionRequestFILFee.js +186 -0
- package/dist/model/TransactionRequestFee.js +89 -9
- package/dist/model/TransactionRequestSOLFee.js +168 -0
- package/dist/model/TransactionSOLFee.js +229 -0
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +44 -16
- package/dist/model/TransferDestinationType.js +5 -0
- package/dist/model/UpdateMerchantByIdRequest.js +13 -0
- package/dist/model/UpdateRefundByIdRequest.js +110 -0
- package/dist/model/UpdateTopUpAddress.js +141 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEvent.js +2 -2
- package/dist/model/WebhookEventData.js +83 -13
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventLog.js +2 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Account.md +14 -0
- package/docs/AcquiringType.md +12 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressesEventData.md +3 -1
- package/docs/AppWorkflow.md +3 -3
- package/docs/AppWorkflowField.md +2 -2
- package/docs/AppWorkflowsApi.md +12 -12
- package/docs/ApprovalRequest.md +2 -2
- package/docs/ApprovalRequestDetail.md +1 -1
- package/docs/ApprovalUser.md +2 -2
- package/docs/BalanceUpdateInfo.md +13 -0
- package/docs/BalanceUpdateInfoEventData.md +47 -0
- package/docs/BankAccount.md +2 -2
- package/docs/ChainInfo.md +1 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CreateApprovalRequest201Response.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateRefundRequest.md +5 -2
- package/docs/CreateSettlement.md +7 -6
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimatedFILFee.md +13 -0
- package/docs/EstimatedFILFeeSlow.md +12 -0
- package/docs/EstimatedFee.md +3 -3
- package/docs/EstimatedSOLFee.md +13 -0
- package/docs/EstimatedSOLFeeSlow.md +12 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/FILBase.md +9 -0
- package/docs/FILPrice.md +11 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/FeeType.md +4 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/GraphQLError.md +11 -0
- package/docs/GraphQLErrorLocationsInner.md +10 -0
- package/docs/GraphQLRequest.md +11 -0
- package/docs/GraphQLResponse.md +10 -0
- package/docs/ListTopUpPayers200Response.md +10 -0
- package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +6 -5
- package/docs/OrganizationsApi.md +55 -0
- package/docs/PayerAccount.md +14 -0
- package/docs/PaymentApi.md +247 -29
- package/docs/PaymentOrderEventData.md +9 -6
- package/docs/PaymentRefundEventData.md +10 -5
- package/docs/PaymentSettlementEvent.md +6 -4
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyActionContent.md +4 -4
- package/docs/PolicyCondition.md +2 -2
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/Refund.md +7 -4
- package/docs/RefundStatus.md +2 -0
- package/docs/RequestApproval.md +4 -4
- package/docs/RevokeApprovalRequest201Response.md +1 -1
- package/docs/RevokeApprovalRequestRequest.md +1 -1
- package/docs/SOLBase.md +10 -0
- package/docs/SOLComputeUnit.md +10 -0
- package/docs/Settlement.md +3 -3
- package/docs/SettlementDetail.md +8 -6
- package/docs/SettlementInfo.md +3 -2
- package/docs/SupportedToken.md +17 -0
- package/docs/SwapActivityDetail.md +1 -0
- package/docs/SwapActivitySigners.md +11 -0
- package/docs/SwapQuote.md +3 -2
- package/docs/SwapSingingStatus.md +16 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TopUpAddress.md +18 -0
- package/docs/TransactionCoboCategory.md +8 -0
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionEvmCalldataInfo.md +1 -1
- package/docs/TransactionFILFee.md +16 -0
- package/docs/TransactionFee.md +8 -1
- package/docs/TransactionRequestFILFee.md +13 -0
- package/docs/TransactionRequestFee.md +5 -1
- package/docs/TransactionRequestSOLFee.md +12 -0
- package/docs/TransactionSOLFee.md +16 -0
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TransferDestination.md +3 -3
- package/docs/TransferDestinationType.md +2 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -0
- package/docs/UpdateRefundByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +11 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +6 -4
- package/docs/WebhookEvent.md +1 -1
- package/docs/WebhookEventData.md +14 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventLog.md +1 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
- package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
|
@@ -48,7 +48,7 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
|
|
|
48
48
|
* @alias module:model/TransactionWebhookEventData
|
|
49
49
|
* @implements module:model/WebhookEventDataType
|
|
50
50
|
* @implements module:model/Transaction
|
|
51
|
-
* @param data_type {module:model/TransactionWebhookEventData.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.
|
|
51
|
+
* @param data_type {module:model/TransactionWebhookEventData.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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
52
52
|
* @param transaction_id {String} The transaction ID.
|
|
53
53
|
* @param wallet_id {String} For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.
|
|
54
54
|
* @param status {module:model/TransactionStatus}
|
|
@@ -344,7 +344,7 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
|
|
|
344
344
|
TransactionWebhookEventData.RequiredProperties = ["data_type", "transaction_id", "wallet_id", "status", "source", "destination", "initiator_type", "created_timestamp", "updated_timestamp"];
|
|
345
345
|
|
|
346
346
|
/**
|
|
347
|
-
* 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.
|
|
347
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
348
348
|
* @member {module:model/TransactionWebhookEventData.DataTypeEnum} data_type
|
|
349
349
|
*/
|
|
350
350
|
TransactionWebhookEventData.prototype['data_type'] = undefined;
|
|
@@ -525,7 +525,7 @@ TransactionWebhookEventData.prototype['updated_timestamp'] = undefined;
|
|
|
525
525
|
|
|
526
526
|
// Implement WebhookEventDataType interface:
|
|
527
527
|
/**
|
|
528
|
-
* 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.
|
|
528
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
529
529
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
530
530
|
*/
|
|
531
531
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -720,6 +720,11 @@ TransactionWebhookEventData['DataTypeEnum'] = {
|
|
|
720
720
|
* @const
|
|
721
721
|
*/
|
|
722
722
|
"TokenListing": "TokenListing",
|
|
723
|
+
/**
|
|
724
|
+
* value: "BalanceUpdateInfo"
|
|
725
|
+
* @const
|
|
726
|
+
*/
|
|
727
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
723
728
|
/**
|
|
724
729
|
* value: "PaymentOrder"
|
|
725
730
|
* @const
|
|
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _AddressTransferDestination = _interopRequireDefault(require("./AddressTransferDestination"));
|
|
9
9
|
var _AddressTransferDestinationAccountOutput = _interopRequireDefault(require("./AddressTransferDestinationAccountOutput"));
|
|
10
10
|
var _AddressTransferDestinationUtxoOutputsInner = _interopRequireDefault(require("./AddressTransferDestinationUtxoOutputsInner"));
|
|
11
|
+
var _CustodialTransferDestination = _interopRequireDefault(require("./CustodialTransferDestination"));
|
|
11
12
|
var _ExchangeTransferDestination = _interopRequireDefault(require("./ExchangeTransferDestination"));
|
|
12
13
|
var _TransferDestinationType = _interopRequireDefault(require("./TransferDestinationType"));
|
|
13
14
|
var _TransferDestination;
|
|
@@ -36,7 +37,7 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
36
37
|
/**
|
|
37
38
|
* Constructs a new <code>TransferDestination</code>.
|
|
38
39
|
* @alias module:model/TransferDestination
|
|
39
|
-
* @param {(module:model/AddressTransferDestination|module:model/ExchangeTransferDestination)} instance The actual instance to initialize TransferDestination.
|
|
40
|
+
* @param {(module:model/AddressTransferDestination|module:model/CustodialTransferDestination|module:model/ExchangeTransferDestination)} instance The actual instance to initialize TransferDestination.
|
|
40
41
|
*/
|
|
41
42
|
function TransferDestination() {
|
|
42
43
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -61,6 +62,10 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
61
62
|
this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
|
|
62
63
|
match++;
|
|
63
64
|
break;
|
|
65
|
+
case "CustodialWallet":
|
|
66
|
+
this.actualInstance = _CustodialTransferDestination["default"].constructFromObject(instance);
|
|
67
|
+
match++;
|
|
68
|
+
break;
|
|
64
69
|
case "ExchangeWallet":
|
|
65
70
|
this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
|
|
66
71
|
match++;
|
|
@@ -94,6 +99,29 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
94
99
|
// json data failed to deserialize into AddressTransferDestination
|
|
95
100
|
errorMessages.push("Failed to construct AddressTransferDestination: " + err);
|
|
96
101
|
}
|
|
102
|
+
try {
|
|
103
|
+
if (instance instanceof _CustodialTransferDestination["default"]) {
|
|
104
|
+
this.actualInstance = instance;
|
|
105
|
+
} else if (!!_CustodialTransferDestination["default"].validateJSON && _CustodialTransferDestination["default"].validateJSON(instance)) {
|
|
106
|
+
// plain JS object
|
|
107
|
+
// create CustodialTransferDestination from JS object
|
|
108
|
+
this.actualInstance = _CustodialTransferDestination["default"].constructFromObject(instance);
|
|
109
|
+
} else {
|
|
110
|
+
if (_CustodialTransferDestination["default"].constructFromObject(instance)) {
|
|
111
|
+
if (!!_CustodialTransferDestination["default"].constructFromObject(instance).toJSON) {
|
|
112
|
+
if (_CustodialTransferDestination["default"].constructFromObject(instance).toJSON()) {
|
|
113
|
+
this.actualInstance = _CustodialTransferDestination["default"].constructFromObject(instance);
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
this.actualInstance = _CustodialTransferDestination["default"].constructFromObject(instance);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
match++;
|
|
121
|
+
} catch (err) {
|
|
122
|
+
// json data failed to deserialize into CustodialTransferDestination
|
|
123
|
+
errorMessages.push("Failed to construct CustodialTransferDestination: " + err);
|
|
124
|
+
}
|
|
97
125
|
try {
|
|
98
126
|
if (instance instanceof _ExchangeTransferDestination["default"]) {
|
|
99
127
|
this.actualInstance = instance;
|
|
@@ -119,11 +147,11 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
119
147
|
}
|
|
120
148
|
|
|
121
149
|
// if (match > 1) {
|
|
122
|
-
// throw new Error("Multiple matches found constructing `TransferDestination` with oneOf schemas AddressTransferDestination, ExchangeTransferDestination. Input: " + JSON.stringify(instance));
|
|
150
|
+
// throw new Error("Multiple matches found constructing `TransferDestination` with oneOf schemas AddressTransferDestination, CustodialTransferDestination, ExchangeTransferDestination. Input: " + JSON.stringify(instance));
|
|
123
151
|
// } else
|
|
124
152
|
if (match === 0) {
|
|
125
153
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
126
|
-
// throw new Error("No match found constructing `TransferDestination` with oneOf schemas AddressTransferDestination, ExchangeTransferDestination. Details: " +
|
|
154
|
+
// throw new Error("No match found constructing `TransferDestination` with oneOf schemas AddressTransferDestination, CustodialTransferDestination, ExchangeTransferDestination. Details: " +
|
|
127
155
|
// errorMessages.join(", "));
|
|
128
156
|
return;
|
|
129
157
|
} else {// only 1 match
|
|
@@ -142,16 +170,16 @@ var TransferDestination = /*#__PURE__*/function () {
|
|
|
142
170
|
key: "getActualInstance",
|
|
143
171
|
value:
|
|
144
172
|
/**
|
|
145
|
-
* Gets the actual instance, which can be <code>AddressTransferDestination</code>, <code>ExchangeTransferDestination</code>.
|
|
146
|
-
* @return {(module:model/AddressTransferDestination|module:model/ExchangeTransferDestination)} The actual instance.
|
|
173
|
+
* Gets the actual instance, which can be <code>AddressTransferDestination</code>, <code>CustodialTransferDestination</code>, <code>ExchangeTransferDestination</code>.
|
|
174
|
+
* @return {(module:model/AddressTransferDestination|module:model/CustodialTransferDestination|module:model/ExchangeTransferDestination)} The actual instance.
|
|
147
175
|
*/
|
|
148
176
|
function getActualInstance() {
|
|
149
177
|
return this.actualInstance;
|
|
150
178
|
}
|
|
151
179
|
|
|
152
180
|
/**
|
|
153
|
-
* Sets the actual instance, which can be <code>AddressTransferDestination</code>, <code>ExchangeTransferDestination</code>.
|
|
154
|
-
* @param {(module:model/AddressTransferDestination|module:model/ExchangeTransferDestination)} obj The actual instance.
|
|
181
|
+
* Sets the actual instance, which can be <code>AddressTransferDestination</code>, <code>CustodialTransferDestination</code>, <code>ExchangeTransferDestination</code>.
|
|
182
|
+
* @param {(module:model/AddressTransferDestination|module:model/CustodialTransferDestination|module:model/ExchangeTransferDestination)} obj The actual instance.
|
|
155
183
|
*/
|
|
156
184
|
}, {
|
|
157
185
|
key: "setActualInstance",
|
|
@@ -202,13 +230,13 @@ TransferDestination.prototype['change_address'] = undefined;
|
|
|
202
230
|
TransferDestination.prototype['change_output_type'] = undefined;
|
|
203
231
|
|
|
204
232
|
/**
|
|
205
|
-
* Whether the transaction request must be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must be executed as a Cobo Loop transfer. - `false`: The transaction request may not be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_external` as `true`.
|
|
233
|
+
* Whether the transaction request must be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must be executed as a Cobo Loop transfer. - `false`: The transaction request may not be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_external` as `true`. If both are set to `false`, the system uses Cobo Loop by default if possible; otherwise, it proceeds with an on-chain transfer.
|
|
206
234
|
* @member {Boolean} force_internal
|
|
207
235
|
*/
|
|
208
236
|
TransferDestination.prototype['force_internal'] = undefined;
|
|
209
237
|
|
|
210
238
|
/**
|
|
211
|
-
* Whether the transaction request must not be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must not be executed as a Cobo Loop transfer. - `false`: The transaction request can be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_external` as `true`.
|
|
239
|
+
* Whether the transaction request must not be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction request must not be executed as a Cobo Loop transfer. - `false`: The transaction request can be executed as a Cobo Loop transfer. Please do not set both `force_internal` and `force_external` as `true`. If both are set to `false`, the system uses Cobo Loop by default if possible; otherwise, it proceeds with an on-chain transfer.
|
|
212
240
|
* @member {Boolean} force_external
|
|
213
241
|
*/
|
|
214
242
|
TransferDestination.prototype['force_external'] = undefined;
|
|
@@ -219,16 +247,16 @@ TransferDestination.prototype['force_external'] = undefined;
|
|
|
219
247
|
*/
|
|
220
248
|
TransferDestination.prototype['wallet_id'] = undefined;
|
|
221
249
|
|
|
222
|
-
/**
|
|
223
|
-
* The trading account type.
|
|
224
|
-
* @member {String} trading_account_type
|
|
225
|
-
*/
|
|
226
|
-
TransferDestination.prototype['trading_account_type'] = undefined;
|
|
227
|
-
|
|
228
250
|
/**
|
|
229
251
|
* The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
|
|
230
252
|
* @member {String} amount
|
|
231
253
|
*/
|
|
232
254
|
TransferDestination.prototype['amount'] = undefined;
|
|
233
|
-
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* The trading account type.
|
|
258
|
+
* @member {String} trading_account_type
|
|
259
|
+
*/
|
|
260
|
+
TransferDestination.prototype['trading_account_type'] = undefined;
|
|
261
|
+
TransferDestination.OneOf = ["AddressTransferDestination", "CustodialTransferDestination", "ExchangeTransferDestination"];
|
|
234
262
|
var _default = exports["default"] = TransferDestination;
|
|
@@ -35,6 +35,11 @@ var TransferDestinationType = exports["default"] = /*#__PURE__*/function () {
|
|
|
35
35
|
* @const
|
|
36
36
|
*/
|
|
37
37
|
_defineProperty(this, "Address", "Address");
|
|
38
|
+
/**
|
|
39
|
+
* value: "CustodialWallet"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "CustodialWallet", "CustodialWallet");
|
|
38
43
|
/**
|
|
39
44
|
* value: "ExchangeWallet"
|
|
40
45
|
* @const
|
|
@@ -59,6 +59,9 @@ var UpdateMerchantByIdRequest = /*#__PURE__*/function () {
|
|
|
59
59
|
if (data.hasOwnProperty('name')) {
|
|
60
60
|
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
61
61
|
}
|
|
62
|
+
if (data.hasOwnProperty('developer_fee_rate')) {
|
|
63
|
+
obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
66
|
return obj;
|
|
64
67
|
}
|
|
@@ -75,6 +78,10 @@ var UpdateMerchantByIdRequest = /*#__PURE__*/function () {
|
|
|
75
78
|
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
76
79
|
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
77
80
|
}
|
|
81
|
+
// ensure the json data is a string
|
|
82
|
+
if (data['developer_fee_rate'] && !(typeof data['developer_fee_rate'] === 'string' || data['developer_fee_rate'] instanceof String)) {
|
|
83
|
+
throw new Error("Expected the field `developer_fee_rate` to be a primitive type in the JSON string but got " + data['developer_fee_rate']);
|
|
84
|
+
}
|
|
78
85
|
return true;
|
|
79
86
|
}
|
|
80
87
|
}]);
|
|
@@ -84,4 +91,10 @@ var UpdateMerchantByIdRequest = /*#__PURE__*/function () {
|
|
|
84
91
|
* @member {String} name
|
|
85
92
|
*/
|
|
86
93
|
UpdateMerchantByIdRequest.prototype['name'] = undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions.
|
|
97
|
+
* @member {String} developer_fee_rate
|
|
98
|
+
*/
|
|
99
|
+
UpdateMerchantByIdRequest.prototype['developer_fee_rate'] = undefined;
|
|
87
100
|
var _default = exports["default"] = UpdateMerchantByIdRequest;
|
|
@@ -0,0 +1,110 @@
|
|
|
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 UpdateRefundByIdRequest model module.
|
|
29
|
+
* @module model/UpdateRefundByIdRequest
|
|
30
|
+
*/
|
|
31
|
+
var UpdateRefundByIdRequest = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>UpdateRefundByIdRequest</code>.
|
|
34
|
+
* @alias module:model/UpdateRefundByIdRequest
|
|
35
|
+
* @param to_address {String} The address where the refunded cryptocurrency will be sent.
|
|
36
|
+
*/
|
|
37
|
+
function UpdateRefundByIdRequest(to_address) {
|
|
38
|
+
_classCallCheck(this, UpdateRefundByIdRequest);
|
|
39
|
+
UpdateRefundByIdRequest.initialize(this, to_address);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(UpdateRefundByIdRequest, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, to_address) {
|
|
50
|
+
obj['to_address'] = to_address;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>UpdateRefundByIdRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/UpdateRefundByIdRequest} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/UpdateRefundByIdRequest} The populated <code>UpdateRefundByIdRequest</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new UpdateRefundByIdRequest();
|
|
65
|
+
if (data.hasOwnProperty('to_address')) {
|
|
66
|
+
obj['to_address'] = _ApiClient["default"].convertToType(data['to_address'], 'String');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>UpdateRefundByIdRequest</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateRefundByIdRequest</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(UpdateRefundByIdRequest.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data.hasOwnProperty(property)) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
} catch (err) {
|
|
92
|
+
_iterator.e(err);
|
|
93
|
+
} finally {
|
|
94
|
+
_iterator.f();
|
|
95
|
+
}
|
|
96
|
+
if (data['to_address'] && !(typeof data['to_address'] === 'string' || data['to_address'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `to_address` to be a primitive type in the JSON string but got " + data['to_address']);
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
UpdateRefundByIdRequest.RequiredProperties = ["to_address"];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The address where the refunded cryptocurrency will be sent.
|
|
107
|
+
* @member {String} to_address
|
|
108
|
+
*/
|
|
109
|
+
UpdateRefundByIdRequest.prototype['to_address'] = undefined;
|
|
110
|
+
var _default = exports["default"] = UpdateRefundByIdRequest;
|
|
@@ -0,0 +1,141 @@
|
|
|
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 UpdateTopUpAddress model module.
|
|
29
|
+
* @module model/UpdateTopUpAddress
|
|
30
|
+
*/
|
|
31
|
+
var UpdateTopUpAddress = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>UpdateTopUpAddress</code>.
|
|
34
|
+
* The request body to update top up address.
|
|
35
|
+
* @alias module:model/UpdateTopUpAddress
|
|
36
|
+
* @param merchant_id {String} The merchant ID.
|
|
37
|
+
* @param token_id {String} 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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
38
|
+
* @param custom_payer_id {String} Unique customer identifier on the merchant side, used to allocate a dedicated top-up address
|
|
39
|
+
*/
|
|
40
|
+
function UpdateTopUpAddress(merchant_id, token_id, custom_payer_id) {
|
|
41
|
+
_classCallCheck(this, UpdateTopUpAddress);
|
|
42
|
+
UpdateTopUpAddress.initialize(this, merchant_id, token_id, custom_payer_id);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(UpdateTopUpAddress, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, merchant_id, token_id, custom_payer_id) {
|
|
53
|
+
obj['merchant_id'] = merchant_id;
|
|
54
|
+
obj['token_id'] = token_id;
|
|
55
|
+
obj['custom_payer_id'] = custom_payer_id;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>UpdateTopUpAddress</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/UpdateTopUpAddress} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/UpdateTopUpAddress} The populated <code>UpdateTopUpAddress</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new UpdateTopUpAddress();
|
|
70
|
+
if (data.hasOwnProperty('merchant_id')) {
|
|
71
|
+
obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('token_id')) {
|
|
74
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('custom_payer_id')) {
|
|
77
|
+
obj['custom_payer_id'] = _ApiClient["default"].convertToType(data['custom_payer_id'], 'String');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Validates the JSON data with respect to <code>UpdateTopUpAddress</code>.
|
|
85
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateTopUpAddress</code>.
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "validateJSON",
|
|
90
|
+
value: function validateJSON(data) {
|
|
91
|
+
// check to make sure all required properties are present in the JSON string
|
|
92
|
+
var _iterator = _createForOfIteratorHelper(UpdateTopUpAddress.RequiredProperties),
|
|
93
|
+
_step;
|
|
94
|
+
try {
|
|
95
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
96
|
+
var property = _step.value;
|
|
97
|
+
if (!data.hasOwnProperty(property)) {
|
|
98
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// ensure the json data is a string
|
|
102
|
+
} catch (err) {
|
|
103
|
+
_iterator.e(err);
|
|
104
|
+
} finally {
|
|
105
|
+
_iterator.f();
|
|
106
|
+
}
|
|
107
|
+
if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['custom_payer_id'] && !(typeof data['custom_payer_id'] === 'string' || data['custom_payer_id'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `custom_payer_id` to be a primitive type in the JSON string but got " + data['custom_payer_id']);
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}]);
|
|
121
|
+
}();
|
|
122
|
+
UpdateTopUpAddress.RequiredProperties = ["merchant_id", "token_id", "custom_payer_id"];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The merchant ID.
|
|
126
|
+
* @member {String} merchant_id
|
|
127
|
+
*/
|
|
128
|
+
UpdateTopUpAddress.prototype['merchant_id'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
132
|
+
* @member {String} token_id
|
|
133
|
+
*/
|
|
134
|
+
UpdateTopUpAddress.prototype['token_id'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Unique customer identifier on the merchant side, used to allocate a dedicated top-up address
|
|
138
|
+
* @member {String} custom_payer_id
|
|
139
|
+
*/
|
|
140
|
+
UpdateTopUpAddress.prototype['custom_payer_id'] = undefined;
|
|
141
|
+
var _default = exports["default"] = UpdateTopUpAddress;
|
|
@@ -35,7 +35,7 @@ var WalletInfoEventData = /*#__PURE__*/function () {
|
|
|
35
35
|
* Constructs a new <code>WalletInfoEventData</code>.
|
|
36
36
|
* @alias module:model/WalletInfoEventData
|
|
37
37
|
* @implements module:model/WebhookEventDataType
|
|
38
|
-
* @param data_type {module:model/WalletInfoEventData.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.
|
|
38
|
+
* @param data_type {module:model/WalletInfoEventData.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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
39
39
|
*/
|
|
40
40
|
function WalletInfoEventData(data_type) {
|
|
41
41
|
_classCallCheck(this, WalletInfoEventData);
|
|
@@ -118,7 +118,7 @@ var WalletInfoEventData = /*#__PURE__*/function () {
|
|
|
118
118
|
WalletInfoEventData.RequiredProperties = ["data_type"];
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* 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.
|
|
121
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
122
122
|
* @member {module:model/WalletInfoEventData.DataTypeEnum} data_type
|
|
123
123
|
*/
|
|
124
124
|
WalletInfoEventData.prototype['data_type'] = undefined;
|
|
@@ -130,7 +130,7 @@ WalletInfoEventData.prototype['wallet'] = undefined;
|
|
|
130
130
|
|
|
131
131
|
// Implement WebhookEventDataType interface:
|
|
132
132
|
/**
|
|
133
|
-
* 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.
|
|
133
|
+
* 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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
|
|
134
134
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
135
135
|
*/
|
|
136
136
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -181,6 +181,11 @@ WalletInfoEventData['DataTypeEnum'] = {
|
|
|
181
181
|
* @const
|
|
182
182
|
*/
|
|
183
183
|
"TokenListing": "TokenListing",
|
|
184
|
+
/**
|
|
185
|
+
* value: "BalanceUpdateInfo"
|
|
186
|
+
* @const
|
|
187
|
+
*/
|
|
188
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
184
189
|
/**
|
|
185
190
|
* value: "PaymentOrder"
|
|
186
191
|
* @const
|
|
@@ -37,7 +37,7 @@ var WebhookEvent = /*#__PURE__*/function () {
|
|
|
37
37
|
* The webhook event payload.
|
|
38
38
|
* @alias module:model/WebhookEvent
|
|
39
39
|
* @param url {String} The webhook endpoint URL.
|
|
40
|
-
* @param created_timestamp {Number} The time when the event
|
|
40
|
+
* @param created_timestamp {Number} The time when the event type was triggered, in Unix timestamp format (milliseconds). - The value remains unchanged across retries. - The default webhook timeout is 2 seconds.
|
|
41
41
|
* @param type {module:model/WebhookEventType}
|
|
42
42
|
* @param data {module:model/WebhookEventData}
|
|
43
43
|
*/
|
|
@@ -157,7 +157,7 @@ WebhookEvent.prototype['event_id'] = undefined;
|
|
|
157
157
|
WebhookEvent.prototype['url'] = undefined;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* The time when the event
|
|
160
|
+
* The time when the event type was triggered, in Unix timestamp format (milliseconds). - The value remains unchanged across retries. - The default webhook timeout is 2 seconds.
|
|
161
161
|
* @member {Number} created_timestamp
|
|
162
162
|
*/
|
|
163
163
|
WebhookEvent.prototype['created_timestamp'] = undefined;
|