@cobo/cobo-waas2 1.27.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 +33 -1
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +491 -36
- 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 +154 -0
- 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/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 +42 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- 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 +1 -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/CreateWalletParams.js +1 -1
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/LinkDisplayInfo.js +13 -0
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.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/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- 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/SwapActivityTimeline.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +106 -42
- 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/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 +1 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.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 +1 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/LinkDisplayInfo.md +1 -0
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.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 +527 -20
- 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/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +4 -2
- package/docs/RefundLinkBusinessInfo.md +1 -1
- 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/SwapActivityTimeline.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/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +21 -13
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ContractCallDestinationType = _interopRequireDefault(require("./ContractCallDestinationType"));
|
|
9
|
+
var _CosmosContractCallDestination = _interopRequireDefault(require("./CosmosContractCallDestination"));
|
|
10
|
+
var _CosmosContractCallMessage = _interopRequireDefault(require("./CosmosContractCallMessage"));
|
|
9
11
|
var _EvmContractCallDestination = _interopRequireDefault(require("./EvmContractCallDestination"));
|
|
10
12
|
var _SolContractCallAddressLookupTableAccount = _interopRequireDefault(require("./SolContractCallAddressLookupTableAccount"));
|
|
11
13
|
var _SolContractCallDestination = _interopRequireDefault(require("./SolContractCallDestination"));
|
|
@@ -39,7 +41,7 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
39
41
|
/**
|
|
40
42
|
* Constructs a new <code>ContractCallDestination</code>.
|
|
41
43
|
* @alias module:model/ContractCallDestination
|
|
42
|
-
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
|
|
44
|
+
* @param {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
|
|
43
45
|
*/
|
|
44
46
|
function ContractCallDestination() {
|
|
45
47
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -60,6 +62,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
60
62
|
var discriminatorValue = instance["destination_type"];
|
|
61
63
|
if (discriminatorValue) {
|
|
62
64
|
switch (discriminatorValue) {
|
|
65
|
+
case "COSMOS_Contract":
|
|
66
|
+
this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
|
|
67
|
+
match++;
|
|
68
|
+
break;
|
|
63
69
|
case "EVM_Contract":
|
|
64
70
|
this.actualInstance = _EvmContractCallDestination["default"].constructFromObject(instance);
|
|
65
71
|
match++;
|
|
@@ -174,13 +180,36 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
174
180
|
// json data failed to deserialize into TronContractCallDestination
|
|
175
181
|
errorMessages.push("Failed to construct TronContractCallDestination: " + err);
|
|
176
182
|
}
|
|
183
|
+
try {
|
|
184
|
+
if (instance instanceof _CosmosContractCallDestination["default"]) {
|
|
185
|
+
this.actualInstance = instance;
|
|
186
|
+
} else if (!!_CosmosContractCallDestination["default"].validateJSON && _CosmosContractCallDestination["default"].validateJSON(instance)) {
|
|
187
|
+
// plain JS object
|
|
188
|
+
// create CosmosContractCallDestination from JS object
|
|
189
|
+
this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
|
|
190
|
+
} else {
|
|
191
|
+
if (_CosmosContractCallDestination["default"].constructFromObject(instance)) {
|
|
192
|
+
if (!!_CosmosContractCallDestination["default"].constructFromObject(instance).toJSON) {
|
|
193
|
+
if (_CosmosContractCallDestination["default"].constructFromObject(instance).toJSON()) {
|
|
194
|
+
this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
match++;
|
|
202
|
+
} catch (err) {
|
|
203
|
+
// json data failed to deserialize into CosmosContractCallDestination
|
|
204
|
+
errorMessages.push("Failed to construct CosmosContractCallDestination: " + err);
|
|
205
|
+
}
|
|
177
206
|
|
|
178
207
|
// if (match > 1) {
|
|
179
|
-
// throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Input: " + JSON.stringify(instance));
|
|
208
|
+
// throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas CosmosContractCallDestination, EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Input: " + JSON.stringify(instance));
|
|
180
209
|
// } else
|
|
181
210
|
if (match === 0) {
|
|
182
211
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
183
|
-
// throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Details: " +
|
|
212
|
+
// throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas CosmosContractCallDestination, EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Details: " +
|
|
184
213
|
// errorMessages.join(", "));
|
|
185
214
|
return;
|
|
186
215
|
} else {// only 1 match
|
|
@@ -199,16 +228,16 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
199
228
|
key: "getActualInstance",
|
|
200
229
|
value:
|
|
201
230
|
/**
|
|
202
|
-
* Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
|
|
203
|
-
* @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} The actual instance.
|
|
231
|
+
* Gets the actual instance, which can be <code>CosmosContractCallDestination</code>, <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
|
|
232
|
+
* @return {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} The actual instance.
|
|
204
233
|
*/
|
|
205
234
|
function getActualInstance() {
|
|
206
235
|
return this.actualInstance;
|
|
207
236
|
}
|
|
208
237
|
|
|
209
238
|
/**
|
|
210
|
-
* Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
|
|
211
|
-
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} obj The actual instance.
|
|
239
|
+
* Sets the actual instance, which can be <code>CosmosContractCallDestination</code>, <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
|
|
240
|
+
* @param {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} obj The actual instance.
|
|
212
241
|
*/
|
|
213
242
|
}, {
|
|
214
243
|
key: "setActualInstance",
|
|
@@ -268,5 +297,10 @@ ContractCallDestination.prototype['address_lookup_table_accounts'] = undefined;
|
|
|
268
297
|
* @member {module:model/StellarContractCallContractParam} contract_param
|
|
269
298
|
*/
|
|
270
299
|
ContractCallDestination.prototype['contract_param'] = undefined;
|
|
271
|
-
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @member {Array.<module:model/CosmosContractCallMessage>} cosmos_messages
|
|
303
|
+
*/
|
|
304
|
+
ContractCallDestination.prototype['cosmos_messages'] = undefined;
|
|
305
|
+
ContractCallDestination.OneOf = ["CosmosContractCallDestination", "EvmContractCallDestination", "SolContractCallDestination", "StellarContractCallDestination", "TronContractCallDestination"];
|
|
272
306
|
var _default = exports["default"] = ContractCallDestination;
|
|
@@ -50,6 +50,11 @@ var ContractCallDestinationType = exports["default"] = /*#__PURE__*/function ()
|
|
|
50
50
|
* @const
|
|
51
51
|
*/
|
|
52
52
|
_defineProperty(this, "TRON_Contract", "TRON_Contract");
|
|
53
|
+
/**
|
|
54
|
+
* value: "COSMOS_Contract"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "COSMOS_Contract", "COSMOS_Contract");
|
|
53
58
|
/**
|
|
54
59
|
* value: "unknown_default_open_api"
|
|
55
60
|
* @const
|
|
@@ -73,9 +73,6 @@ var CosmosContractCallDestination = /*#__PURE__*/function () {
|
|
|
73
73
|
if (data.hasOwnProperty('cosmos_messages')) {
|
|
74
74
|
obj['cosmos_messages'] = _ApiClient["default"].convertToType(data['cosmos_messages'], [_CosmosContractCallMessage["default"]]);
|
|
75
75
|
}
|
|
76
|
-
if (data.hasOwnProperty('value')) {
|
|
77
|
-
obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
|
|
78
|
-
}
|
|
79
76
|
}
|
|
80
77
|
return obj;
|
|
81
78
|
}
|
|
@@ -124,10 +121,6 @@ var CosmosContractCallDestination = /*#__PURE__*/function () {
|
|
|
124
121
|
}
|
|
125
122
|
;
|
|
126
123
|
}
|
|
127
|
-
// ensure the json data is a string
|
|
128
|
-
if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
|
|
129
|
-
throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
|
|
130
|
-
}
|
|
131
124
|
return true;
|
|
132
125
|
}
|
|
133
126
|
}]);
|
|
@@ -143,10 +136,4 @@ CosmosContractCallDestination.prototype['destination_type'] = undefined;
|
|
|
143
136
|
* @member {Array.<module:model/CosmosContractCallMessage>} cosmos_messages
|
|
144
137
|
*/
|
|
145
138
|
CosmosContractCallDestination.prototype['cosmos_messages'] = undefined;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
|
|
149
|
-
* @member {String} value
|
|
150
|
-
*/
|
|
151
|
-
CosmosContractCallDestination.prototype['value'] = undefined;
|
|
152
139
|
var _default = exports["default"] = CosmosContractCallDestination;
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
var _AllocationRequest = _interopRequireDefault(require("./AllocationRequest"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
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); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The CreateBatchAllocationRequest model module.
|
|
30
|
+
* @module model/CreateBatchAllocationRequest
|
|
31
|
+
*/
|
|
32
|
+
var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreateBatchAllocationRequest</code>.
|
|
35
|
+
* @alias module:model/CreateBatchAllocationRequest
|
|
36
|
+
* @param request_id {String} The request ID that is used to track a allocation request. The request ID is provided by you and must be unique.
|
|
37
|
+
* @param allocation_requests {Array.<module:model/AllocationRequest>}
|
|
38
|
+
*/
|
|
39
|
+
function CreateBatchAllocationRequest(request_id, allocation_requests) {
|
|
40
|
+
_classCallCheck(this, CreateBatchAllocationRequest);
|
|
41
|
+
CreateBatchAllocationRequest.initialize(this, request_id, allocation_requests);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(CreateBatchAllocationRequest, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, request_id, allocation_requests) {
|
|
52
|
+
obj['request_id'] = request_id;
|
|
53
|
+
obj['allocation_requests'] = allocation_requests;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>CreateBatchAllocationRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/CreateBatchAllocationRequest} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/CreateBatchAllocationRequest} The populated <code>CreateBatchAllocationRequest</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new CreateBatchAllocationRequest();
|
|
68
|
+
if (data.hasOwnProperty('request_id')) {
|
|
69
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('allocation_requests')) {
|
|
72
|
+
obj['allocation_requests'] = _ApiClient["default"].convertToType(data['allocation_requests'], [_AllocationRequest["default"]]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>CreateBatchAllocationRequest</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBatchAllocationRequest</code>.
|
|
82
|
+
*/
|
|
83
|
+
}, {
|
|
84
|
+
key: "validateJSON",
|
|
85
|
+
value: function validateJSON(data) {
|
|
86
|
+
// check to make sure all required properties are present in the JSON string
|
|
87
|
+
var _iterator = _createForOfIteratorHelper(CreateBatchAllocationRequest.RequiredProperties),
|
|
88
|
+
_step;
|
|
89
|
+
try {
|
|
90
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
91
|
+
var property = _step.value;
|
|
92
|
+
if (!data.hasOwnProperty(property)) {
|
|
93
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
} catch (err) {
|
|
98
|
+
_iterator.e(err);
|
|
99
|
+
} finally {
|
|
100
|
+
_iterator.f();
|
|
101
|
+
}
|
|
102
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
104
|
+
}
|
|
105
|
+
if (data['allocation_requests']) {
|
|
106
|
+
// data not null
|
|
107
|
+
// ensure the json data is an array
|
|
108
|
+
if (!Array.isArray(data['allocation_requests'])) {
|
|
109
|
+
throw new Error("Expected the field `allocation_requests` to be an array in the JSON data but got " + data['allocation_requests']);
|
|
110
|
+
}
|
|
111
|
+
// validate the optional field `allocation_requests` (array)
|
|
112
|
+
var _iterator2 = _createForOfIteratorHelper(data['allocation_requests']),
|
|
113
|
+
_step2;
|
|
114
|
+
try {
|
|
115
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
116
|
+
var item = _step2.value;
|
|
117
|
+
_AllocationRequest["default"].validateJSON(item);
|
|
118
|
+
}
|
|
119
|
+
} catch (err) {
|
|
120
|
+
_iterator2.e(err);
|
|
121
|
+
} finally {
|
|
122
|
+
_iterator2.f();
|
|
123
|
+
}
|
|
124
|
+
;
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
}();
|
|
130
|
+
CreateBatchAllocationRequest.RequiredProperties = ["request_id", "allocation_requests"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The request ID that is used to track a allocation request. The request ID is provided by you and must be unique.
|
|
134
|
+
* @member {String} request_id
|
|
135
|
+
*/
|
|
136
|
+
CreateBatchAllocationRequest.prototype['request_id'] = undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @member {Array.<module:model/AllocationRequest>} allocation_requests
|
|
140
|
+
*/
|
|
141
|
+
CreateBatchAllocationRequest.prototype['allocation_requests'] = undefined;
|
|
142
|
+
var _default = exports["default"] = CreateBatchAllocationRequest;
|
|
@@ -135,7 +135,7 @@ CreateCustodialWalletParams.prototype['wallet_type'] = undefined;
|
|
|
135
135
|
CreateCustodialWalletParams.prototype['wallet_subtype'] = undefined;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
|
-
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
138
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Custodial Wallets (Web3 Wallets).
|
|
139
139
|
* @member {Boolean} enable_auto_sweep
|
|
140
140
|
*/
|
|
141
141
|
CreateCustodialWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -197,7 +197,7 @@ CreateExchangeWalletParams.prototype['wallet_type'] = undefined;
|
|
|
197
197
|
CreateExchangeWalletParams.prototype['wallet_subtype'] = undefined;
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
|
-
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
200
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Custodial Wallets (Web3 Wallets).
|
|
201
201
|
* @member {Boolean} enable_auto_sweep
|
|
202
202
|
*/
|
|
203
203
|
CreateExchangeWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -264,7 +264,7 @@ _CreateCustodialWalletParams["default"].prototype['wallet_type'] = undefined;
|
|
|
264
264
|
*/
|
|
265
265
|
_CreateCustodialWalletParams["default"].prototype['wallet_subtype'] = undefined;
|
|
266
266
|
/**
|
|
267
|
-
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
267
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Custodial Wallets (Web3 Wallets).
|
|
268
268
|
* @member {Boolean} enable_auto_sweep
|
|
269
269
|
*/
|
|
270
270
|
_CreateCustodialWalletParams["default"].prototype['enable_auto_sweep'] = undefined;
|
|
@@ -133,7 +133,7 @@ CreateMerchantRequest.prototype['name'] = undefined;
|
|
|
133
133
|
CreateMerchantRequest.prototype['wallet_id'] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/
|
|
136
|
+
* The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
137
137
|
* @member {String} developer_fee_rate
|
|
138
138
|
*/
|
|
139
139
|
CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
|
|
@@ -147,7 +147,7 @@ CreateMpcWalletParams.prototype['wallet_type'] = undefined;
|
|
|
147
147
|
CreateMpcWalletParams.prototype['wallet_subtype'] = undefined;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
150
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Custodial Wallets (Web3 Wallets).
|
|
151
151
|
* @member {Boolean} enable_auto_sweep
|
|
152
152
|
*/
|
|
153
153
|
CreateMpcWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -173,7 +173,7 @@ _CreateCustodialWalletParams["default"].prototype['wallet_type'] = undefined;
|
|
|
173
173
|
*/
|
|
174
174
|
_CreateCustodialWalletParams["default"].prototype['wallet_subtype'] = undefined;
|
|
175
175
|
/**
|
|
176
|
-
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
176
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Custodial Wallets (Web3 Wallets).
|
|
177
177
|
* @member {Boolean} enable_auto_sweep
|
|
178
178
|
*/
|
|
179
179
|
_CreateCustodialWalletParams["default"].prototype['enable_auto_sweep'] = undefined;
|