@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
|
@@ -0,0 +1,136 @@
|
|
|
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 BridgingFee model module.
|
|
29
|
+
* @module model/BridgingFee
|
|
30
|
+
*/
|
|
31
|
+
var BridgingFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>BridgingFee</code>.
|
|
34
|
+
* @alias module:model/BridgingFee
|
|
35
|
+
* @param fee_amount {String} The bridging fee amount.
|
|
36
|
+
*/
|
|
37
|
+
function BridgingFee(fee_amount) {
|
|
38
|
+
_classCallCheck(this, BridgingFee);
|
|
39
|
+
BridgingFee.initialize(this, fee_amount);
|
|
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(BridgingFee, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, fee_amount) {
|
|
50
|
+
obj['fee_amount'] = fee_amount;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>BridgingFee</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/BridgingFee} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/BridgingFee} The populated <code>BridgingFee</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new BridgingFee();
|
|
65
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
66
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('received_token_id')) {
|
|
69
|
+
obj['received_token_id'] = _ApiClient["default"].convertToType(data['received_token_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('received_amount')) {
|
|
72
|
+
obj['received_amount'] = _ApiClient["default"].convertToType(data['received_amount'], 'String');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>BridgingFee</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>BridgingFee</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(BridgingFee.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['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
if (data['received_token_id'] && !(typeof data['received_token_id'] === 'string' || data['received_token_id'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `received_token_id` to be a primitive type in the JSON string but got " + data['received_token_id']);
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is a string
|
|
110
|
+
if (data['received_amount'] && !(typeof data['received_amount'] === 'string' || data['received_amount'] instanceof String)) {
|
|
111
|
+
throw new Error("Expected the field `received_amount` to be a primitive type in the JSON string but got " + data['received_amount']);
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
117
|
+
BridgingFee.RequiredProperties = ["fee_amount"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The bridging fee amount.
|
|
121
|
+
* @member {String} fee_amount
|
|
122
|
+
*/
|
|
123
|
+
BridgingFee.prototype['fee_amount'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The received token id after bridge.
|
|
127
|
+
* @member {String} received_token_id
|
|
128
|
+
*/
|
|
129
|
+
BridgingFee.prototype['received_token_id'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The received amount after bridge.
|
|
133
|
+
* @member {String} received_amount
|
|
134
|
+
*/
|
|
135
|
+
BridgingFee.prototype['received_amount'] = undefined;
|
|
136
|
+
var _default = exports["default"] = BridgingFee;
|
|
@@ -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 CommissionFee model module.
|
|
29
|
+
* @module model/CommissionFee
|
|
30
|
+
*/
|
|
31
|
+
var CommissionFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>CommissionFee</code>.
|
|
34
|
+
* @alias module:model/CommissionFee
|
|
35
|
+
* @param fee_amount {String} The commission fee amount.
|
|
36
|
+
*/
|
|
37
|
+
function CommissionFee(fee_amount) {
|
|
38
|
+
_classCallCheck(this, CommissionFee);
|
|
39
|
+
CommissionFee.initialize(this, fee_amount);
|
|
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(CommissionFee, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, fee_amount) {
|
|
50
|
+
obj['fee_amount'] = fee_amount;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>CommissionFee</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/CommissionFee} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/CommissionFee} The populated <code>CommissionFee</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new CommissionFee();
|
|
65
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
66
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>CommissionFee</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>CommissionFee</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(CommissionFee.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['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
CommissionFee.RequiredProperties = ["fee_amount"];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The commission fee amount.
|
|
107
|
+
* @member {String} fee_amount
|
|
108
|
+
*/
|
|
109
|
+
CommissionFee.prototype['fee_amount'] = undefined;
|
|
110
|
+
var _default = exports["default"] = CommissionFee;
|
|
@@ -7,8 +7,11 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ContractCallDestinationType = _interopRequireDefault(require("./ContractCallDestinationType"));
|
|
9
9
|
var _EvmContractCallDestination = _interopRequireDefault(require("./EvmContractCallDestination"));
|
|
10
|
+
var _SolContractCallAddressLookupTableAccount = _interopRequireDefault(require("./SolContractCallAddressLookupTableAccount"));
|
|
10
11
|
var _SolContractCallDestination = _interopRequireDefault(require("./SolContractCallDestination"));
|
|
11
12
|
var _SolContractCallInstruction = _interopRequireDefault(require("./SolContractCallInstruction"));
|
|
13
|
+
var _StellarContractCallContractParam = _interopRequireDefault(require("./StellarContractCallContractParam"));
|
|
14
|
+
var _StellarContractCallDestination = _interopRequireDefault(require("./StellarContractCallDestination"));
|
|
12
15
|
var _ContractCallDestination;
|
|
13
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
17
|
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); }
|
|
@@ -35,7 +38,7 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
35
38
|
/**
|
|
36
39
|
* Constructs a new <code>ContractCallDestination</code>.
|
|
37
40
|
* @alias module:model/ContractCallDestination
|
|
38
|
-
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
|
|
41
|
+
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
|
|
39
42
|
*/
|
|
40
43
|
function ContractCallDestination() {
|
|
41
44
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -64,6 +67,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
64
67
|
this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
|
|
65
68
|
match++;
|
|
66
69
|
break;
|
|
70
|
+
case "STELLAR_Contract":
|
|
71
|
+
this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
|
|
72
|
+
match++;
|
|
73
|
+
break;
|
|
67
74
|
default:
|
|
68
75
|
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
69
76
|
break;
|
|
@@ -116,13 +123,36 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
116
123
|
// json data failed to deserialize into SolContractCallDestination
|
|
117
124
|
errorMessages.push("Failed to construct SolContractCallDestination: " + err);
|
|
118
125
|
}
|
|
126
|
+
try {
|
|
127
|
+
if (instance instanceof _StellarContractCallDestination["default"]) {
|
|
128
|
+
this.actualInstance = instance;
|
|
129
|
+
} else if (!!_StellarContractCallDestination["default"].validateJSON && _StellarContractCallDestination["default"].validateJSON(instance)) {
|
|
130
|
+
// plain JS object
|
|
131
|
+
// create StellarContractCallDestination from JS object
|
|
132
|
+
this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
|
|
133
|
+
} else {
|
|
134
|
+
if (_StellarContractCallDestination["default"].constructFromObject(instance)) {
|
|
135
|
+
if (!!_StellarContractCallDestination["default"].constructFromObject(instance).toJSON) {
|
|
136
|
+
if (_StellarContractCallDestination["default"].constructFromObject(instance).toJSON()) {
|
|
137
|
+
this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
match++;
|
|
145
|
+
} catch (err) {
|
|
146
|
+
// json data failed to deserialize into StellarContractCallDestination
|
|
147
|
+
errorMessages.push("Failed to construct StellarContractCallDestination: " + err);
|
|
148
|
+
}
|
|
119
149
|
|
|
120
150
|
// if (match > 1) {
|
|
121
|
-
// throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Input: " + JSON.stringify(instance));
|
|
151
|
+
// throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Input: " + JSON.stringify(instance));
|
|
122
152
|
// } else
|
|
123
153
|
if (match === 0) {
|
|
124
154
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
125
|
-
// throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Details: " +
|
|
155
|
+
// throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Details: " +
|
|
126
156
|
// errorMessages.join(", "));
|
|
127
157
|
return;
|
|
128
158
|
} else {// only 1 match
|
|
@@ -141,16 +171,16 @@ var ContractCallDestination = /*#__PURE__*/function () {
|
|
|
141
171
|
key: "getActualInstance",
|
|
142
172
|
value:
|
|
143
173
|
/**
|
|
144
|
-
* Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
|
|
145
|
-
* @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} The actual instance.
|
|
174
|
+
* Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
|
|
175
|
+
* @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} The actual instance.
|
|
146
176
|
*/
|
|
147
177
|
function getActualInstance() {
|
|
148
178
|
return this.actualInstance;
|
|
149
179
|
}
|
|
150
180
|
|
|
151
181
|
/**
|
|
152
|
-
* Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
|
|
153
|
-
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} obj The actual instance.
|
|
182
|
+
* Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
|
|
183
|
+
* @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} obj The actual instance.
|
|
154
184
|
*/
|
|
155
185
|
}, {
|
|
156
186
|
key: "setActualInstance",
|
|
@@ -200,5 +230,15 @@ ContractCallDestination.prototype['calldata'] = undefined;
|
|
|
200
230
|
* @member {Array.<module:model/SolContractCallInstruction>} instructions
|
|
201
231
|
*/
|
|
202
232
|
ContractCallDestination.prototype['instructions'] = undefined;
|
|
203
|
-
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* @member {Array.<module:model/SolContractCallAddressLookupTableAccount>} address_lookup_table_accounts
|
|
236
|
+
*/
|
|
237
|
+
ContractCallDestination.prototype['address_lookup_table_accounts'] = undefined;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* @member {module:model/StellarContractCallContractParam} contract_param
|
|
241
|
+
*/
|
|
242
|
+
ContractCallDestination.prototype['contract_param'] = undefined;
|
|
243
|
+
ContractCallDestination.OneOf = ["EvmContractCallDestination", "SolContractCallDestination", "StellarContractCallDestination"];
|
|
204
244
|
var _default = exports["default"] = ContractCallDestination;
|
|
@@ -40,6 +40,11 @@ var ContractCallDestinationType = exports["default"] = /*#__PURE__*/function ()
|
|
|
40
40
|
* @const
|
|
41
41
|
*/
|
|
42
42
|
_defineProperty(this, "SOL_Contract", "SOL_Contract");
|
|
43
|
+
/**
|
|
44
|
+
* value: "STELLAR_Contract"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "STELLAR_Contract", "STELLAR_Contract");
|
|
43
48
|
/**
|
|
44
49
|
* value: "unknown_default_open_api"
|
|
45
50
|
* @const
|
|
@@ -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 _WalletSetup = _interopRequireDefault(require("./WalletSetup"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
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); }
|
|
10
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; } } }; }
|
|
@@ -33,11 +34,10 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
33
34
|
* Constructs a new <code>CreateMerchantRequest</code>.
|
|
34
35
|
* @alias module:model/CreateMerchantRequest
|
|
35
36
|
* @param name {String} The merchant name.
|
|
36
|
-
* @param wallet_id {String} The ID of the wallet linked to the merchant.
|
|
37
37
|
*/
|
|
38
|
-
function CreateMerchantRequest(name
|
|
38
|
+
function CreateMerchantRequest(name) {
|
|
39
39
|
_classCallCheck(this, CreateMerchantRequest);
|
|
40
|
-
CreateMerchantRequest.initialize(this, name
|
|
40
|
+
CreateMerchantRequest.initialize(this, name);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -47,9 +47,8 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
47
47
|
*/
|
|
48
48
|
return _createClass(CreateMerchantRequest, null, [{
|
|
49
49
|
key: "initialize",
|
|
50
|
-
value: function initialize(obj, name
|
|
50
|
+
value: function initialize(obj, name) {
|
|
51
51
|
obj['name'] = name;
|
|
52
|
-
obj['wallet_id'] = wallet_id;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
/**
|
|
@@ -73,6 +72,9 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
73
72
|
if (data.hasOwnProperty('developer_fee_rate')) {
|
|
74
73
|
obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
|
|
75
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('wallet_setup')) {
|
|
76
|
+
obj['wallet_setup'] = _WalletSetup["default"].constructFromObject(data['wallet_setup']);
|
|
77
|
+
}
|
|
76
78
|
}
|
|
77
79
|
return obj;
|
|
78
80
|
}
|
|
@@ -116,7 +118,7 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
116
118
|
}
|
|
117
119
|
}]);
|
|
118
120
|
}();
|
|
119
|
-
CreateMerchantRequest.RequiredProperties = ["name"
|
|
121
|
+
CreateMerchantRequest.RequiredProperties = ["name"];
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* The merchant name.
|
|
@@ -135,4 +137,9 @@ CreateMerchantRequest.prototype['wallet_id'] = undefined;
|
|
|
135
137
|
* @member {String} developer_fee_rate
|
|
136
138
|
*/
|
|
137
139
|
CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/WalletSetup} wallet_setup
|
|
143
|
+
*/
|
|
144
|
+
CreateMerchantRequest.prototype['wallet_setup'] = undefined;
|
|
138
145
|
var _default = exports["default"] = CreateMerchantRequest;
|
|
@@ -97,6 +97,9 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
97
97
|
if (data.hasOwnProperty('use_dedicated_address')) {
|
|
98
98
|
obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
|
|
99
99
|
}
|
|
100
|
+
if (data.hasOwnProperty('custom_exchange_rate')) {
|
|
101
|
+
obj['custom_exchange_rate'] = _ApiClient["default"].convertToType(data['custom_exchange_rate'], 'String');
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
return obj;
|
|
102
105
|
}
|
|
@@ -152,6 +155,10 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
152
155
|
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
153
156
|
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
154
157
|
}
|
|
158
|
+
// ensure the json data is a string
|
|
159
|
+
if (data['custom_exchange_rate'] && !(typeof data['custom_exchange_rate'] === 'string' || data['custom_exchange_rate'] instanceof String)) {
|
|
160
|
+
throw new Error("Expected the field `custom_exchange_rate` to be a primitive type in the JSON string but got " + data['custom_exchange_rate']);
|
|
161
|
+
}
|
|
155
162
|
return true;
|
|
156
163
|
}
|
|
157
164
|
}]);
|
|
@@ -209,8 +216,14 @@ CreatePaymentOrderRequest.prototype['psp_order_code'] = undefined;
|
|
|
209
216
|
CreatePaymentOrderRequest.prototype['expired_in'] = 1800;
|
|
210
217
|
|
|
211
218
|
/**
|
|
212
|
-
*
|
|
219
|
+
* This field has been deprecated.
|
|
213
220
|
* @member {Boolean} use_dedicated_address
|
|
214
221
|
*/
|
|
215
222
|
CreatePaymentOrderRequest.prototype['use_dedicated_address'] = undefined;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* A custom exchange rate specified by the merchant. - Only effective when `currency` is `\"USD\"`. - Expressed as the amount of USD per 1 unit of the specified cryptocurrency. - If not provided, the system will use the default internal rate. Example: If the cryptocurrency is USDT and `custom_exchange_rate` = `\"0.99\"`, it means 1 USDT = 0.99 USD.
|
|
226
|
+
* @member {String} custom_exchange_rate
|
|
227
|
+
*/
|
|
228
|
+
CreatePaymentOrderRequest.prototype['custom_exchange_rate'] = undefined;
|
|
216
229
|
var _default = exports["default"] = CreatePaymentOrderRequest;
|
|
@@ -169,13 +169,13 @@ CreateSettlement.prototype['currency'] = undefined;
|
|
|
169
169
|
CreateSettlement.prototype['amount'] = undefined;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts.
|
|
172
|
+
* The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](https://www.cobo.com/developers/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts.
|
|
173
173
|
* @member {String} bank_account_id
|
|
174
174
|
*/
|
|
175
175
|
CreateSettlement.prototype['bank_account_id'] = undefined;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
|
-
* The ID of the crypto address used for crypto
|
|
178
|
+
* The ID of the crypto address used for crypto payouts. Specify this field when `payout_channel` is set to `Crypto`. Call [List crypto addresses](https://www.cobo.com/developers/v2/api-references/payment/list-crypto-addresses) to retrieve registered crypto addresses.
|
|
179
179
|
* @member {String} crypto_address_id
|
|
180
180
|
*/
|
|
181
181
|
CreateSettlement.prototype['crypto_address_id'] = undefined;
|
|
@@ -83,6 +83,15 @@ var CreateSettlementRequestRequest = /*#__PURE__*/function () {
|
|
|
83
83
|
if (data.hasOwnProperty('settlements')) {
|
|
84
84
|
obj['settlements'] = _ApiClient["default"].convertToType(data['settlements'], [_CreateSettlement["default"]]);
|
|
85
85
|
}
|
|
86
|
+
if (data.hasOwnProperty('bank_account_id')) {
|
|
87
|
+
obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('currency')) {
|
|
90
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('remark')) {
|
|
93
|
+
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
94
|
+
}
|
|
86
95
|
}
|
|
87
96
|
return obj;
|
|
88
97
|
}
|
|
@@ -135,6 +144,18 @@ var CreateSettlementRequestRequest = /*#__PURE__*/function () {
|
|
|
135
144
|
}
|
|
136
145
|
;
|
|
137
146
|
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['bank_account_id'] && !(typeof data['bank_account_id'] === 'string' || data['bank_account_id'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `bank_account_id` to be a primitive type in the JSON string but got " + data['bank_account_id']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
|
|
158
|
+
}
|
|
138
159
|
return true;
|
|
139
160
|
}
|
|
140
161
|
}]);
|
|
@@ -166,4 +187,22 @@ CreateSettlementRequestRequest.prototype['settlement_type'] = undefined;
|
|
|
166
187
|
* @member {Array.<module:model/CreateSettlement>} settlements
|
|
167
188
|
*/
|
|
168
189
|
CreateSettlementRequestRequest.prototype['settlements'] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* | Only used in OffRamp payout channel. The ID of the bank account where the settled funds will be deposited.
|
|
193
|
+
* @member {String} bank_account_id
|
|
194
|
+
*/
|
|
195
|
+
CreateSettlementRequestRequest.prototype['bank_account_id'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The fiat currency for the settlement request.
|
|
199
|
+
* @member {String} currency
|
|
200
|
+
*/
|
|
201
|
+
CreateSettlementRequestRequest.prototype['currency'] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The remark for the settlement request.
|
|
205
|
+
* @member {String} remark
|
|
206
|
+
*/
|
|
207
|
+
CreateSettlementRequestRequest.prototype['remark'] = undefined;
|
|
169
208
|
var _default = exports["default"] = CreateSettlementRequestRequest;
|