@cobo/cobo-waas2 1.23.0 → 1.24.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 +45 -6
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +194 -47
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +224 -14
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateMerchantRequest.js +13 -6
- package/dist/model/CreatePaymentOrderRequest.js +14 -1
- package/dist/model/CreateSettlement.js +2 -2
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedFILFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedSOLFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
- package/dist/model/FeeStationGasStationType.js +61 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
- package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
- package/dist/model/Merchant.js +9 -0
- package/dist/model/MerchantBalance.js +3 -3
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +107 -0
- package/dist/model/{RawMessageSignDestination.js → PaymentEstimateFeeRequest.js} +51 -37
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentRefundEventData.js +22 -2
- package/dist/model/PaymentSettlementEvent.js +62 -6
- package/dist/model/PspBalance.js +3 -3
- package/dist/model/Refund.js +17 -1
- package/dist/model/SettleRequestStatus.js +5 -0
- package/dist/model/Settlement.js +45 -3
- package/dist/model/SettlementDetail.js +33 -1
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
- package/dist/model/SolContractCallDestination.js +30 -0
- package/dist/model/StellarContractCallContractParam.js +164 -0
- package/dist/model/StellarContractCallContractType.js +56 -0
- package/dist/model/StellarContractCallDestination.js +125 -0
- package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
- package/dist/model/StellarContractCallTrustLineParam.js +133 -0
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SwapActivity.js +9 -9
- package/dist/model/SwapActivityApprovers.js +1 -1
- package/dist/model/SwapActivityDetail.js +34 -18
- package/dist/model/SwapActivitySigners.js +2 -2
- package/dist/model/SwapActivityTimeline.js +5 -5
- package/dist/model/SwapEstimateFee.js +147 -0
- package/dist/model/SwapQuote.js +18 -31
- package/dist/model/SwapReceivingTransaction.js +133 -0
- package/dist/model/SwapToken.js +9 -9
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionDestination.js +48 -8
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionEvmLegacyFee.js +1 -1
- package/dist/model/TransactionFILFee.js +1 -1
- package/dist/model/TransactionFixedFee.js +1 -1
- package/dist/model/TransactionFuelingInfo.js +13 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFILFee.js +1 -1
- package/dist/model/TransactionRequestSOLFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSOLFee.js +1 -1
- package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
- package/dist/model/TransactionSolContractDestination.js +30 -0
- package/dist/model/TransactionStellarContractParam.js +164 -0
- package/dist/model/TransactionStellarContractType.js +56 -0
- package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
- package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
- package/dist/model/TransactionStellarTrustLineParam.js +133 -0
- package/dist/model/TransactionUtxoFee.js +1 -1
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +19 -1
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/BridgingFee.md +11 -0
- package/docs/CommissionFee.md +9 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateMerchantRequest.md +2 -1
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/FeeStationApi.md +53 -0
- package/docs/FeeStationCheckFeeStationUsage.md +14 -0
- package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
- package/docs/FeeStationGasStationType.md +12 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/Merchant.md +1 -0
- package/docs/MerchantBalance.md +3 -3
- package/docs/MessageSignDestination.md +0 -1
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentApi.md +196 -21
- package/docs/PaymentEstimateFee.md +10 -0
- package/docs/PaymentEstimateFee201Response.md +9 -0
- package/docs/PaymentEstimateFeeRequest.md +10 -0
- package/docs/PaymentEstimatedFee.md +13 -0
- package/docs/PaymentFeeType.md +16 -0
- package/docs/PaymentRefundEventData.md +2 -1
- package/docs/PaymentSettlementEvent.md +6 -3
- package/docs/PspBalance.md +3 -3
- package/docs/Refund.md +2 -1
- package/docs/SettleRequestStatus.md +2 -0
- package/docs/Settlement.md +6 -3
- package/docs/SettlementDetail.md +3 -1
- package/docs/SettlementInfo.md +6 -6
- package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
- package/docs/SolContractCallDestination.md +1 -0
- package/docs/StellarContractCallContractParam.md +11 -0
- package/docs/StellarContractCallContractType.md +10 -0
- package/docs/StellarContractCallDestination.md +10 -0
- package/docs/StellarContractCallTrustLineOperationType.md +10 -0
- package/docs/StellarContractCallTrustLineParam.md +11 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SwapActivity.md +9 -9
- package/docs/SwapActivityDetail.md +10 -9
- package/docs/SwapActivitySigners.md +1 -1
- package/docs/SwapActivityTimeline.md +3 -3
- package/docs/SwapEstimateFee.md +12 -0
- package/docs/SwapQuote.md +10 -11
- package/docs/SwapReceivingTransaction.md +11 -0
- package/docs/SwapToken.md +6 -6
- package/docs/SwapsApi.md +356 -0
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionDestination.md +2 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionFuelingInfo.md +1 -0
- package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
- package/docs/TransactionSolContractDestination.md +1 -0
- package/docs/TransactionStellarContractParam.md +11 -0
- package/docs/TransactionStellarContractType.md +10 -0
- package/docs/TransactionStellarDestination.md +10 -0
- package/docs/TransactionStellarTrustLineOperationType.md +10 -0
- package/docs/TransactionStellarTrustLineParam.md +11 -0
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WebhookEventData.md +4 -1
- package/package.json +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
package/dist/model/Refund.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
8
9
|
var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
|
|
9
10
|
var _RefundStatus = _interopRequireDefault(require("./RefundStatus"));
|
|
10
11
|
var _RefundType = _interopRequireDefault(require("./RefundType"));
|
|
@@ -126,6 +127,9 @@ var Refund = /*#__PURE__*/function () {
|
|
|
126
127
|
if (data.hasOwnProperty('merchant_fee_token_id')) {
|
|
127
128
|
obj['merchant_fee_token_id'] = _ApiClient["default"].convertToType(data['merchant_fee_token_id'], 'String');
|
|
128
129
|
}
|
|
130
|
+
if (data.hasOwnProperty('commission_fee')) {
|
|
131
|
+
obj['commission_fee'] = _CommissionFee["default"].constructFromObject(data['commission_fee']);
|
|
132
|
+
}
|
|
129
133
|
}
|
|
130
134
|
return obj;
|
|
131
135
|
}
|
|
@@ -218,6 +222,13 @@ var Refund = /*#__PURE__*/function () {
|
|
|
218
222
|
if (data['merchant_fee_token_id'] && !(typeof data['merchant_fee_token_id'] === 'string' || data['merchant_fee_token_id'] instanceof String)) {
|
|
219
223
|
throw new Error("Expected the field `merchant_fee_token_id` to be a primitive type in the JSON string but got " + data['merchant_fee_token_id']);
|
|
220
224
|
}
|
|
225
|
+
// validate the optional field `commission_fee`
|
|
226
|
+
if (data['commission_fee']) {
|
|
227
|
+
// data not null
|
|
228
|
+
if (!!_CommissionFee["default"].validateJSON) {
|
|
229
|
+
_CommissionFee["default"].validateJSON(data['commission_fee']);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
221
232
|
return true;
|
|
222
233
|
}
|
|
223
234
|
}]);
|
|
@@ -295,7 +306,7 @@ Refund.prototype['created_timestamp'] = undefined;
|
|
|
295
306
|
Refund.prototype['updated_timestamp'] = undefined;
|
|
296
307
|
|
|
297
308
|
/**
|
|
298
|
-
* The initiator of this settlement request. Can return either an API key or the
|
|
309
|
+
* The initiator of this settlement request. Can return either an API key or the Payments App's ID. - Format `api_key_<API_KEY>`: Indicates the settlement request was initiated via the Payments API using the API key. - Format `app_<APP_ID>`: Indicates the settlement request was initiated through the Payments App using the App ID.
|
|
299
310
|
* @member {String} initiator
|
|
300
311
|
*/
|
|
301
312
|
Refund.prototype['initiator'] = undefined;
|
|
@@ -323,4 +334,9 @@ Refund.prototype['merchant_fee_amount'] = undefined;
|
|
|
323
334
|
* @member {String} merchant_fee_token_id
|
|
324
335
|
*/
|
|
325
336
|
Refund.prototype['merchant_fee_token_id'] = undefined;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
340
|
+
*/
|
|
341
|
+
Refund.prototype['commission_fee'] = undefined;
|
|
326
342
|
var _default = exports["default"] = Refund;
|
|
@@ -55,6 +55,11 @@ var SettleRequestStatus = exports["default"] = /*#__PURE__*/function () {
|
|
|
55
55
|
* @const
|
|
56
56
|
*/
|
|
57
57
|
_defineProperty(this, "Failed", "Failed");
|
|
58
|
+
/**
|
|
59
|
+
* value: "Canceled"
|
|
60
|
+
* @const
|
|
61
|
+
*/
|
|
62
|
+
_defineProperty(this, "Canceled", "Canceled");
|
|
58
63
|
/**
|
|
59
64
|
* value: "unknown_default_open_api"
|
|
60
65
|
* @const
|
package/dist/model/Settlement.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AcquiringType = _interopRequireDefault(require("./AcquiringType"));
|
|
9
|
+
var _BankAccount = _interopRequireDefault(require("./BankAccount"));
|
|
9
10
|
var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
|
|
10
11
|
var _SettleRequestStatus = _interopRequireDefault(require("./SettleRequestStatus"));
|
|
11
12
|
var _SettlementDetail = _interopRequireDefault(require("./SettlementDetail"));
|
|
@@ -103,6 +104,15 @@ var Settlement = /*#__PURE__*/function () {
|
|
|
103
104
|
if (data.hasOwnProperty('settlement_type')) {
|
|
104
105
|
obj['settlement_type'] = _SettlementType["default"].constructFromObject(data['settlement_type']);
|
|
105
106
|
}
|
|
107
|
+
if (data.hasOwnProperty('currency')) {
|
|
108
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('received_amount_fiat')) {
|
|
111
|
+
obj['received_amount_fiat'] = _ApiClient["default"].convertToType(data['received_amount_fiat'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('bank_account')) {
|
|
114
|
+
obj['bank_account'] = _BankAccount["default"].constructFromObject(data['bank_account']);
|
|
115
|
+
}
|
|
106
116
|
}
|
|
107
117
|
return obj;
|
|
108
118
|
}
|
|
@@ -163,6 +173,21 @@ var Settlement = /*#__PURE__*/function () {
|
|
|
163
173
|
if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
|
|
164
174
|
throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
|
|
165
175
|
}
|
|
176
|
+
// ensure the json data is a string
|
|
177
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
178
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['received_amount_fiat'] && !(typeof data['received_amount_fiat'] === 'string' || data['received_amount_fiat'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `received_amount_fiat` to be a primitive type in the JSON string but got " + data['received_amount_fiat']);
|
|
183
|
+
}
|
|
184
|
+
// validate the optional field `bank_account`
|
|
185
|
+
if (data['bank_account']) {
|
|
186
|
+
// data not null
|
|
187
|
+
if (!!_BankAccount["default"].validateJSON) {
|
|
188
|
+
_BankAccount["default"].validateJSON(data['bank_account']);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
166
191
|
return true;
|
|
167
192
|
}
|
|
168
193
|
}]);
|
|
@@ -192,19 +217,19 @@ Settlement.prototype['status'] = undefined;
|
|
|
192
217
|
Settlement.prototype['settlements'] = undefined;
|
|
193
218
|
|
|
194
219
|
/**
|
|
195
|
-
* The
|
|
220
|
+
* The created time of the settlement request, represented as a UNIX timestamp in seconds.
|
|
196
221
|
* @member {Number} created_timestamp
|
|
197
222
|
*/
|
|
198
223
|
Settlement.prototype['created_timestamp'] = undefined;
|
|
199
224
|
|
|
200
225
|
/**
|
|
201
|
-
* The
|
|
226
|
+
* The updated time of the settlement request, represented as a UNIX timestamp in seconds.
|
|
202
227
|
* @member {Number} updated_timestamp
|
|
203
228
|
*/
|
|
204
229
|
Settlement.prototype['updated_timestamp'] = undefined;
|
|
205
230
|
|
|
206
231
|
/**
|
|
207
|
-
* The initiator of this settlement request. Can return either an API key or the
|
|
232
|
+
* The initiator of this settlement request. Can return either an API key or the Payments App's ID. - Format `api_key_<API_KEY>`: Indicates the settlement request was initiated via the Payments API using the API key. - Format `app_<APP_ID>`: Indicates the settlement request was initiated through the Payments App using the App ID.
|
|
208
233
|
* @member {String} initiator
|
|
209
234
|
*/
|
|
210
235
|
Settlement.prototype['initiator'] = undefined;
|
|
@@ -223,4 +248,21 @@ Settlement.prototype['payout_channel'] = undefined;
|
|
|
223
248
|
* @member {module:model/SettlementType} settlement_type
|
|
224
249
|
*/
|
|
225
250
|
Settlement.prototype['settlement_type'] = undefined;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The fiat currency for the settlement request.
|
|
254
|
+
* @member {String} currency
|
|
255
|
+
*/
|
|
256
|
+
Settlement.prototype['currency'] = undefined;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The received fiat amount of this settlement request.
|
|
260
|
+
* @member {String} received_amount_fiat
|
|
261
|
+
*/
|
|
262
|
+
Settlement.prototype['received_amount_fiat'] = undefined;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* @member {module:model/BankAccount} bank_account
|
|
266
|
+
*/
|
|
267
|
+
Settlement.prototype['bank_account'] = undefined;
|
|
226
268
|
var _default = exports["default"] = Settlement;
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AcquiringType = _interopRequireDefault(require("./AcquiringType"));
|
|
9
9
|
var _BankAccount = _interopRequireDefault(require("./BankAccount"));
|
|
10
|
+
var _BridgingFee = _interopRequireDefault(require("./BridgingFee"));
|
|
11
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
10
12
|
var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
|
|
11
13
|
var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
|
|
12
14
|
var _SettleStatus = _interopRequireDefault(require("./SettleStatus"));
|
|
@@ -112,6 +114,12 @@ var SettlementDetail = /*#__PURE__*/function () {
|
|
|
112
114
|
if (data.hasOwnProperty('order_ids')) {
|
|
113
115
|
obj['order_ids'] = _ApiClient["default"].convertToType(data['order_ids'], ['String']);
|
|
114
116
|
}
|
|
117
|
+
if (data.hasOwnProperty('commission_fee')) {
|
|
118
|
+
obj['commission_fee'] = _CommissionFee["default"].constructFromObject(data['commission_fee']);
|
|
119
|
+
}
|
|
120
|
+
if (data.hasOwnProperty('bridging_fee')) {
|
|
121
|
+
obj['bridging_fee'] = _BridgingFee["default"].constructFromObject(data['bridging_fee']);
|
|
122
|
+
}
|
|
115
123
|
}
|
|
116
124
|
return obj;
|
|
117
125
|
}
|
|
@@ -188,6 +196,20 @@ var SettlementDetail = /*#__PURE__*/function () {
|
|
|
188
196
|
if (!Array.isArray(data['order_ids'])) {
|
|
189
197
|
throw new Error("Expected the field `order_ids` to be an array in the JSON data but got " + data['order_ids']);
|
|
190
198
|
}
|
|
199
|
+
// validate the optional field `commission_fee`
|
|
200
|
+
if (data['commission_fee']) {
|
|
201
|
+
// data not null
|
|
202
|
+
if (!!_CommissionFee["default"].validateJSON) {
|
|
203
|
+
_CommissionFee["default"].validateJSON(data['commission_fee']);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// validate the optional field `bridging_fee`
|
|
207
|
+
if (data['bridging_fee']) {
|
|
208
|
+
// data not null
|
|
209
|
+
if (!!_BridgingFee["default"].validateJSON) {
|
|
210
|
+
_BridgingFee["default"].validateJSON(data['bridging_fee']);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
191
213
|
return true;
|
|
192
214
|
}
|
|
193
215
|
}]);
|
|
@@ -257,7 +279,7 @@ SettlementDetail.prototype['created_timestamp'] = undefined;
|
|
|
257
279
|
SettlementDetail.prototype['updated_timestamp'] = undefined;
|
|
258
280
|
|
|
259
281
|
/**
|
|
260
|
-
* The ID of the crypto address used for crypto
|
|
282
|
+
* The ID of the crypto address used for crypto payouts.
|
|
261
283
|
* @member {String} crypto_address_id
|
|
262
284
|
*/
|
|
263
285
|
SettlementDetail.prototype['crypto_address_id'] = undefined;
|
|
@@ -283,4 +305,14 @@ SettlementDetail.prototype['settlement_request_id'] = undefined;
|
|
|
283
305
|
* @member {Array.<String>} order_ids
|
|
284
306
|
*/
|
|
285
307
|
SettlementDetail.prototype['order_ids'] = undefined;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
311
|
+
*/
|
|
312
|
+
SettlementDetail.prototype['commission_fee'] = undefined;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @member {module:model/BridgingFee} bridging_fee
|
|
316
|
+
*/
|
|
317
|
+
SettlementDetail.prototype['bridging_fee'] = undefined;
|
|
286
318
|
var _default = exports["default"] = SettlementDetail;
|
|
@@ -33,7 +33,7 @@ var SettlementInfo = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>SettlementInfo</code>.
|
|
35
35
|
* @alias module:model/SettlementInfo
|
|
36
|
-
* @param available_amount {String} This field
|
|
36
|
+
* @param available_amount {String} This field has been deprecated.
|
|
37
37
|
*/
|
|
38
38
|
function SettlementInfo(available_amount) {
|
|
39
39
|
_classCallCheck(this, SettlementInfo);
|
|
@@ -181,25 +181,25 @@ SettlementInfo.prototype['merchant_id'] = undefined;
|
|
|
181
181
|
SettlementInfo.prototype['token_id'] = undefined;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* This field
|
|
184
|
+
* This field has been deprecated.
|
|
185
185
|
* @member {String} available_amount
|
|
186
186
|
*/
|
|
187
187
|
SettlementInfo.prototype['available_amount'] = undefined;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* This field
|
|
190
|
+
* This field has been deprecated.
|
|
191
191
|
* @member {String} available_currency_balance
|
|
192
192
|
*/
|
|
193
193
|
SettlementInfo.prototype['available_currency_balance'] = undefined;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
* This field
|
|
196
|
+
* This field has been deprecated.
|
|
197
197
|
* @member {String} pending_amount
|
|
198
198
|
*/
|
|
199
199
|
SettlementInfo.prototype['pending_amount'] = undefined;
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* This field
|
|
202
|
+
* This field has been deprecated.
|
|
203
203
|
* @member {String} pending_currency_balance
|
|
204
204
|
*/
|
|
205
205
|
SettlementInfo.prototype['pending_currency_balance'] = undefined;
|
|
@@ -211,13 +211,13 @@ SettlementInfo.prototype['pending_currency_balance'] = undefined;
|
|
|
211
211
|
SettlementInfo.prototype['settled_amount'] = undefined;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
*
|
|
214
|
+
* This field has been deprecated.
|
|
215
215
|
* @member {String} available_balance
|
|
216
216
|
*/
|
|
217
217
|
SettlementInfo.prototype['available_balance'] = undefined;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
|
-
*
|
|
220
|
+
* The total balance in the specified cryptocurrency.
|
|
221
221
|
* @member {String} total_balance
|
|
222
222
|
*/
|
|
223
223
|
SettlementInfo.prototype['total_balance'] = undefined;
|
|
@@ -0,0 +1,126 @@
|
|
|
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 SolContractCallAddressLookupTableAccount model module.
|
|
29
|
+
* @module model/SolContractCallAddressLookupTableAccount
|
|
30
|
+
*/
|
|
31
|
+
var SolContractCallAddressLookupTableAccount = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>SolContractCallAddressLookupTableAccount</code>.
|
|
34
|
+
* The information about a Solana Address Lookup Table account.
|
|
35
|
+
* @alias module:model/SolContractCallAddressLookupTableAccount
|
|
36
|
+
* @param alt_account_key {String} The on-chain public key of the Address Lookup Table (ALT) account, identifying the specific lookup table.
|
|
37
|
+
* @param addresses {Array.<String>} An array of stored account addresses within the lookup table, which can be referenced in transactions by index.
|
|
38
|
+
*/
|
|
39
|
+
function SolContractCallAddressLookupTableAccount(alt_account_key, addresses) {
|
|
40
|
+
_classCallCheck(this, SolContractCallAddressLookupTableAccount);
|
|
41
|
+
SolContractCallAddressLookupTableAccount.initialize(this, alt_account_key, addresses);
|
|
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(SolContractCallAddressLookupTableAccount, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, alt_account_key, addresses) {
|
|
52
|
+
obj['alt_account_key'] = alt_account_key;
|
|
53
|
+
obj['addresses'] = addresses;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>SolContractCallAddressLookupTableAccount</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/SolContractCallAddressLookupTableAccount} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/SolContractCallAddressLookupTableAccount} The populated <code>SolContractCallAddressLookupTableAccount</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new SolContractCallAddressLookupTableAccount();
|
|
68
|
+
if (data.hasOwnProperty('alt_account_key')) {
|
|
69
|
+
obj['alt_account_key'] = _ApiClient["default"].convertToType(data['alt_account_key'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('addresses')) {
|
|
72
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], ['String']);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>SolContractCallAddressLookupTableAccount</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>SolContractCallAddressLookupTableAccount</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(SolContractCallAddressLookupTableAccount.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['alt_account_key'] && !(typeof data['alt_account_key'] === 'string' || data['alt_account_key'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `alt_account_key` to be a primitive type in the JSON string but got " + data['alt_account_key']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
if (!Array.isArray(data['addresses'])) {
|
|
107
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
112
|
+
}();
|
|
113
|
+
SolContractCallAddressLookupTableAccount.RequiredProperties = ["alt_account_key", "addresses"];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The on-chain public key of the Address Lookup Table (ALT) account, identifying the specific lookup table.
|
|
117
|
+
* @member {String} alt_account_key
|
|
118
|
+
*/
|
|
119
|
+
SolContractCallAddressLookupTableAccount.prototype['alt_account_key'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* An array of stored account addresses within the lookup table, which can be referenced in transactions by index.
|
|
123
|
+
* @member {Array.<String>} addresses
|
|
124
|
+
*/
|
|
125
|
+
SolContractCallAddressLookupTableAccount.prototype['addresses'] = undefined;
|
|
126
|
+
var _default = exports["default"] = SolContractCallAddressLookupTableAccount;
|
|
@@ -6,6 +6,7 @@ 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 _SolContractCallAddressLookupTableAccount = _interopRequireDefault(require("./SolContractCallAddressLookupTableAccount"));
|
|
9
10
|
var _SolContractCallInstruction = _interopRequireDefault(require("./SolContractCallInstruction"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
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); }
|
|
@@ -73,6 +74,9 @@ var SolContractCallDestination = /*#__PURE__*/function () {
|
|
|
73
74
|
if (data.hasOwnProperty('instructions')) {
|
|
74
75
|
obj['instructions'] = _ApiClient["default"].convertToType(data['instructions'], [_SolContractCallInstruction["default"]]);
|
|
75
76
|
}
|
|
77
|
+
if (data.hasOwnProperty('address_lookup_table_accounts')) {
|
|
78
|
+
obj['address_lookup_table_accounts'] = _ApiClient["default"].convertToType(data['address_lookup_table_accounts'], [_SolContractCallAddressLookupTableAccount["default"]]);
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
return obj;
|
|
78
82
|
}
|
|
@@ -121,6 +125,27 @@ var SolContractCallDestination = /*#__PURE__*/function () {
|
|
|
121
125
|
}
|
|
122
126
|
;
|
|
123
127
|
}
|
|
128
|
+
if (data['address_lookup_table_accounts']) {
|
|
129
|
+
// data not null
|
|
130
|
+
// ensure the json data is an array
|
|
131
|
+
if (!Array.isArray(data['address_lookup_table_accounts'])) {
|
|
132
|
+
throw new Error("Expected the field `address_lookup_table_accounts` to be an array in the JSON data but got " + data['address_lookup_table_accounts']);
|
|
133
|
+
}
|
|
134
|
+
// validate the optional field `address_lookup_table_accounts` (array)
|
|
135
|
+
var _iterator3 = _createForOfIteratorHelper(data['address_lookup_table_accounts']),
|
|
136
|
+
_step3;
|
|
137
|
+
try {
|
|
138
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
139
|
+
var _item = _step3.value;
|
|
140
|
+
_SolContractCallAddressLookupTableAccount["default"].validateJSON(_item);
|
|
141
|
+
}
|
|
142
|
+
} catch (err) {
|
|
143
|
+
_iterator3.e(err);
|
|
144
|
+
} finally {
|
|
145
|
+
_iterator3.f();
|
|
146
|
+
}
|
|
147
|
+
;
|
|
148
|
+
}
|
|
124
149
|
return true;
|
|
125
150
|
}
|
|
126
151
|
}]);
|
|
@@ -136,4 +161,9 @@ SolContractCallDestination.prototype['destination_type'] = undefined;
|
|
|
136
161
|
* @member {Array.<module:model/SolContractCallInstruction>} instructions
|
|
137
162
|
*/
|
|
138
163
|
SolContractCallDestination.prototype['instructions'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @member {Array.<module:model/SolContractCallAddressLookupTableAccount>} address_lookup_table_accounts
|
|
167
|
+
*/
|
|
168
|
+
SolContractCallDestination.prototype['address_lookup_table_accounts'] = undefined;
|
|
139
169
|
var _default = exports["default"] = SolContractCallDestination;
|
|
@@ -0,0 +1,164 @@
|
|
|
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 _StellarContractCallContractType = _interopRequireDefault(require("./StellarContractCallContractType"));
|
|
9
|
+
var _StellarContractCallTrustLineOperationType = _interopRequireDefault(require("./StellarContractCallTrustLineOperationType"));
|
|
10
|
+
var _StellarContractCallTrustLineParam = _interopRequireDefault(require("./StellarContractCallTrustLineParam"));
|
|
11
|
+
var _StellarContractCallContractParam;
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
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 _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The StellarContractCallContractParam model module.
|
|
31
|
+
* @module model/StellarContractCallContractParam
|
|
32
|
+
*/
|
|
33
|
+
var StellarContractCallContractParam = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>StellarContractCallContractParam</code>.
|
|
36
|
+
* @alias module:model/StellarContractCallContractParam
|
|
37
|
+
* @param {(module:model/StellarContractCallTrustLineParam)} instance The actual instance to initialize StellarContractCallContractParam.
|
|
38
|
+
*/
|
|
39
|
+
function StellarContractCallContractParam() {
|
|
40
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
41
|
+
_classCallCheck(this, StellarContractCallContractParam);
|
|
42
|
+
/**
|
|
43
|
+
* Returns the JSON representation of the actual instance.
|
|
44
|
+
* @return {string}
|
|
45
|
+
*/
|
|
46
|
+
_defineProperty(this, "toJSON", function () {
|
|
47
|
+
return this.getActualInstance();
|
|
48
|
+
});
|
|
49
|
+
if (instance === null) {
|
|
50
|
+
this.actualInstance = null;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var match = 0;
|
|
54
|
+
var errorMessages = [];
|
|
55
|
+
var discriminatorValue = instance["contract_type"];
|
|
56
|
+
if (discriminatorValue) {
|
|
57
|
+
switch (discriminatorValue) {
|
|
58
|
+
case "TrustLine":
|
|
59
|
+
this.actualInstance = _StellarContractCallTrustLineParam["default"].constructFromObject(instance);
|
|
60
|
+
match++;
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
if (instance instanceof _StellarContractCallTrustLineParam["default"]) {
|
|
70
|
+
this.actualInstance = instance;
|
|
71
|
+
} else if (!!_StellarContractCallTrustLineParam["default"].validateJSON && _StellarContractCallTrustLineParam["default"].validateJSON(instance)) {
|
|
72
|
+
// plain JS object
|
|
73
|
+
// create StellarContractCallTrustLineParam from JS object
|
|
74
|
+
this.actualInstance = _StellarContractCallTrustLineParam["default"].constructFromObject(instance);
|
|
75
|
+
} else {
|
|
76
|
+
if (_StellarContractCallTrustLineParam["default"].constructFromObject(instance)) {
|
|
77
|
+
if (!!_StellarContractCallTrustLineParam["default"].constructFromObject(instance).toJSON) {
|
|
78
|
+
if (_StellarContractCallTrustLineParam["default"].constructFromObject(instance).toJSON()) {
|
|
79
|
+
this.actualInstance = _StellarContractCallTrustLineParam["default"].constructFromObject(instance);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
this.actualInstance = _StellarContractCallTrustLineParam["default"].constructFromObject(instance);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
match++;
|
|
87
|
+
} catch (err) {
|
|
88
|
+
// json data failed to deserialize into StellarContractCallTrustLineParam
|
|
89
|
+
errorMessages.push("Failed to construct StellarContractCallTrustLineParam: " + err);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// if (match > 1) {
|
|
93
|
+
// throw new Error("Multiple matches found constructing `StellarContractCallContractParam` with oneOf schemas StellarContractCallTrustLineParam. Input: " + JSON.stringify(instance));
|
|
94
|
+
// } else
|
|
95
|
+
if (match === 0) {
|
|
96
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
97
|
+
// throw new Error("No match found constructing `StellarContractCallContractParam` with oneOf schemas StellarContractCallTrustLineParam. Details: " +
|
|
98
|
+
// errorMessages.join(", "));
|
|
99
|
+
return;
|
|
100
|
+
} else {// only 1 match
|
|
101
|
+
// the input is valid
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Constructs a <code>StellarContractCallContractParam</code> from a plain JavaScript object, optionally creating a new instance.
|
|
107
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
108
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
109
|
+
* @param {module:model/StellarContractCallContractParam} obj Optional instance to populate.
|
|
110
|
+
* @return {module:model/StellarContractCallContractParam} The populated <code>StellarContractCallContractParam</code> instance.
|
|
111
|
+
*/
|
|
112
|
+
return _createClass(StellarContractCallContractParam, [{
|
|
113
|
+
key: "getActualInstance",
|
|
114
|
+
value:
|
|
115
|
+
/**
|
|
116
|
+
* Gets the actual instance, which can be <code>StellarContractCallTrustLineParam</code>.
|
|
117
|
+
* @return {(module:model/StellarContractCallTrustLineParam)} The actual instance.
|
|
118
|
+
*/
|
|
119
|
+
function getActualInstance() {
|
|
120
|
+
return this.actualInstance;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets the actual instance, which can be <code>StellarContractCallTrustLineParam</code>.
|
|
125
|
+
* @param {(module:model/StellarContractCallTrustLineParam)} obj The actual instance.
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "setActualInstance",
|
|
129
|
+
value: function setActualInstance(obj) {
|
|
130
|
+
this.actualInstance = StellarContractCallContractParam.constructFromObject(obj).getActualInstance();
|
|
131
|
+
}
|
|
132
|
+
}], [{
|
|
133
|
+
key: "constructFromObject",
|
|
134
|
+
value: function constructFromObject(data, obj) {
|
|
135
|
+
return new StellarContractCallContractParam(data);
|
|
136
|
+
}
|
|
137
|
+
}]);
|
|
138
|
+
}();
|
|
139
|
+
/**
|
|
140
|
+
* @member {module:model/StellarContractCallContractType} contract_type
|
|
141
|
+
*/
|
|
142
|
+
_StellarContractCallContractParam = StellarContractCallContractParam;
|
|
143
|
+
/**
|
|
144
|
+
* Create an instance of StellarContractCallContractParam from a JSON string.
|
|
145
|
+
* @param {string} json_string JSON string.
|
|
146
|
+
* @return {module:model/StellarContractCallContractParam} An instance of StellarContractCallContractParam.
|
|
147
|
+
*/
|
|
148
|
+
_defineProperty(StellarContractCallContractParam, "fromJSON", function (json_string) {
|
|
149
|
+
return _StellarContractCallContractParam.constructFromObject(JSON.parse(json_string));
|
|
150
|
+
});
|
|
151
|
+
StellarContractCallContractParam.prototype['contract_type'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The token ID, which is the unique identifier of a token.
|
|
155
|
+
* @member {String} token_id
|
|
156
|
+
*/
|
|
157
|
+
StellarContractCallContractParam.prototype['token_id'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @member {module:model/StellarContractCallTrustLineOperationType} operation_type
|
|
161
|
+
*/
|
|
162
|
+
StellarContractCallContractParam.prototype['operation_type'] = undefined;
|
|
163
|
+
StellarContractCallContractParam.OneOf = ["StellarContractCallTrustLineParam"];
|
|
164
|
+
var _default = exports["default"] = StellarContractCallContractParam;
|