@cobo/cobo-waas2 1.25.0 → 1.26.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 +21 -5
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +2 -2
- package/dist/api/FeeStationApi.js +6 -6
- package/dist/api/PaymentApi.js +48 -6
- package/dist/api/TokenizationApi.js +122 -4
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/index.js +105 -14
- package/dist/model/AutoFuelType.js +5 -0
- package/dist/model/CreateCryptoAddressRequest.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +8 -8
- package/dist/model/CreateRefundLinkRequest.js +129 -0
- package/dist/model/FeeStationCheckFeeStationUsage.js +28 -10
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
- package/dist/model/FeeStationSponsorTransactionDescription.js +125 -0
- package/dist/model/Link.js +2 -2
- package/dist/model/LinkDisplayInfo.js +2 -2
- package/dist/model/MerchantBalance.js +1 -1
- package/dist/model/Order.js +1 -1
- package/dist/model/OrderLinkBusinessInfo.js +11 -11
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/PaymentOrderEventData.js +2 -2
- package/dist/model/PspBalance.js +1 -1
- package/dist/model/RefundLinkBusinessInfo.js +162 -0
- package/dist/model/RefundStatus.js +10 -0
- package/dist/model/SubmitKytScreeningsReviewBody.js +1 -1
- package/dist/model/SwapQuote.js +18 -18
- package/dist/model/TokenizationERC20TokenParams.js +5 -5
- package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
- package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
- package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
- package/dist/model/TokenizationListPermissionsResponse.js +146 -0
- package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
- package/dist/model/TokenizationOperationType.js +5 -0
- package/dist/model/TokenizationPermissionAction.js +66 -0
- package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
- package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
- package/dist/model/TokenizationTokenDetailInfo.js +51 -5
- package/dist/model/TokenizationTokenInfo.js +26 -4
- package/dist/model/TokenizationTokenPermissionType.js +5 -0
- package/dist/model/TokenizationTokenStandard.js +10 -0
- package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
- package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
- package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
- package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
- package/dist/model/TransactionCoboCategory.js +35 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AutoFuelType.md +2 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/ComplianceApi.md +1 -1
- package/docs/CreateCryptoAddressRequest.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +5 -5
- package/docs/CreateRefundLinkRequest.md +10 -0
- package/docs/FeeStationApi.md +4 -4
- package/docs/FeeStationCheckFeeStationUsage.md +4 -2
- package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
- package/docs/FeeStationSponsorTransactionDescription.md +10 -0
- package/docs/Link.md +1 -1
- package/docs/LinkDisplayInfo.md +2 -2
- package/docs/MerchantBalance.md +1 -1
- package/docs/Order.md +1 -1
- package/docs/OrderLinkBusinessInfo.md +7 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/PaymentApi.md +56 -3
- package/docs/PaymentOrderEventData.md +1 -1
- package/docs/PspBalance.md +1 -1
- package/docs/RefundLinkBusinessInfo.md +13 -0
- package/docs/RefundStatus.md +4 -0
- package/docs/SwapQuote.md +10 -10
- package/docs/TokenizationApi.md +120 -2
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
- package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
- package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
- package/docs/TokenizationListPermissionsResponse.md +10 -0
- package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
- package/docs/TokenizationOperationType.md +2 -0
- package/docs/TokenizationPermissionAction.md +14 -0
- package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
- package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
- package/docs/TokenizationTokenDetailInfo.md +3 -0
- package/docs/TokenizationTokenInfo.md +2 -0
- package/docs/TokenizationTokenPermissionType.md +2 -0
- package/docs/TokenizationTokenStandard.md +4 -0
- package/docs/TokenizationUpdateAddressPermissions.md +11 -0
- package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdatePermissionsParams.md +10 -0
- package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
- package/docs/TransactionCoboCategory.md +14 -0
- package/docs/TransactionsApi.md +1 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WebhookEventData.md +1 -1
- package/package.json +1 -1
- package/docs/TokenizationTokenPermissionsResponse.md +0 -10
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _TokenizationPermissionAction = _interopRequireDefault(require("./TokenizationPermissionAction"));
|
|
9
|
+
var _TokenizationTokenPermissionType = _interopRequireDefault(require("./TokenizationTokenPermissionType"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
12
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -26,19 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
27
|
*
|
|
27
28
|
*/
|
|
28
29
|
/**
|
|
29
|
-
* The
|
|
30
|
-
* @module model/
|
|
30
|
+
* The TokenizationUpdateAddressPermissions model module.
|
|
31
|
+
* @module model/TokenizationUpdateAddressPermissions
|
|
31
32
|
*/
|
|
32
|
-
var
|
|
33
|
+
var TokenizationUpdateAddressPermissions = /*#__PURE__*/function () {
|
|
33
34
|
/**
|
|
34
|
-
* Constructs a new <code>
|
|
35
|
-
* @alias module:model/
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
35
|
+
* Constructs a new <code>TokenizationUpdateAddressPermissions</code>.
|
|
36
|
+
* @alias module:model/TokenizationUpdateAddressPermissions
|
|
37
|
+
* @param address {String} The address to manage permissions for.
|
|
38
|
+
* @param action {module:model/TokenizationPermissionAction}
|
|
39
|
+
* @param permissions {Array.<module:model/TokenizationTokenPermissionType>} The list of permissions to be applied.
|
|
38
40
|
*/
|
|
39
|
-
function
|
|
40
|
-
_classCallCheck(this,
|
|
41
|
-
|
|
41
|
+
function TokenizationUpdateAddressPermissions(address, action, permissions) {
|
|
42
|
+
_classCallCheck(this, TokenizationUpdateAddressPermissions);
|
|
43
|
+
TokenizationUpdateAddressPermissions.initialize(this, address, action, permissions);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
/**
|
|
@@ -46,45 +48,49 @@ var TokenizationTokenPermissionsResponse = /*#__PURE__*/function () {
|
|
|
46
48
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
49
|
* Only for internal use.
|
|
48
50
|
*/
|
|
49
|
-
return _createClass(
|
|
51
|
+
return _createClass(TokenizationUpdateAddressPermissions, null, [{
|
|
50
52
|
key: "initialize",
|
|
51
|
-
value: function initialize(obj,
|
|
53
|
+
value: function initialize(obj, address, action, permissions) {
|
|
54
|
+
obj['address'] = address;
|
|
55
|
+
obj['action'] = action;
|
|
52
56
|
obj['permissions'] = permissions;
|
|
53
|
-
obj['total_count'] = total_count;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
/**
|
|
57
|
-
* Constructs a <code>
|
|
60
|
+
* Constructs a <code>TokenizationUpdateAddressPermissions</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
61
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
62
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
-
* @param {module:model/
|
|
61
|
-
* @return {module:model/
|
|
63
|
+
* @param {module:model/TokenizationUpdateAddressPermissions} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/TokenizationUpdateAddressPermissions} The populated <code>TokenizationUpdateAddressPermissions</code> instance.
|
|
62
65
|
*/
|
|
63
66
|
}, {
|
|
64
67
|
key: "constructFromObject",
|
|
65
68
|
value: function constructFromObject(data, obj) {
|
|
66
69
|
if (data) {
|
|
67
|
-
obj = obj || new
|
|
68
|
-
if (data.hasOwnProperty('
|
|
69
|
-
obj['
|
|
70
|
+
obj = obj || new TokenizationUpdateAddressPermissions();
|
|
71
|
+
if (data.hasOwnProperty('address')) {
|
|
72
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('action')) {
|
|
75
|
+
obj['action'] = _TokenizationPermissionAction["default"].constructFromObject(data['action']);
|
|
70
76
|
}
|
|
71
|
-
if (data.hasOwnProperty('
|
|
72
|
-
obj['
|
|
77
|
+
if (data.hasOwnProperty('permissions')) {
|
|
78
|
+
obj['permissions'] = _ApiClient["default"].convertToType(data['permissions'], [_TokenizationTokenPermissionType["default"]]);
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
return obj;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
/**
|
|
79
|
-
* Validates the JSON data with respect to <code>
|
|
85
|
+
* Validates the JSON data with respect to <code>TokenizationUpdateAddressPermissions</code>.
|
|
80
86
|
* @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>
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationUpdateAddressPermissions</code>.
|
|
82
88
|
*/
|
|
83
89
|
}, {
|
|
84
90
|
key: "validateJSON",
|
|
85
91
|
value: function validateJSON(data) {
|
|
86
92
|
// check to make sure all required properties are present in the JSON string
|
|
87
|
-
var _iterator = _createForOfIteratorHelper(
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(TokenizationUpdateAddressPermissions.RequiredProperties),
|
|
88
94
|
_step;
|
|
89
95
|
try {
|
|
90
96
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -93,47 +99,39 @@ var TokenizationTokenPermissionsResponse = /*#__PURE__*/function () {
|
|
|
93
99
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
94
100
|
}
|
|
95
101
|
}
|
|
102
|
+
// ensure the json data is a string
|
|
96
103
|
} catch (err) {
|
|
97
104
|
_iterator.e(err);
|
|
98
105
|
} finally {
|
|
99
106
|
_iterator.f();
|
|
100
107
|
}
|
|
101
|
-
if (data['
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// validate the optional field `permissions` (array)
|
|
108
|
-
var _iterator2 = _createForOfIteratorHelper(data['permissions']),
|
|
109
|
-
_step2;
|
|
110
|
-
try {
|
|
111
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
112
|
-
var item = _step2.value;
|
|
113
|
-
_TokenizationTokenPermission["default"].validateJSON(item);
|
|
114
|
-
}
|
|
115
|
-
} catch (err) {
|
|
116
|
-
_iterator2.e(err);
|
|
117
|
-
} finally {
|
|
118
|
-
_iterator2.f();
|
|
119
|
-
}
|
|
120
|
-
;
|
|
108
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is an array
|
|
112
|
+
if (!Array.isArray(data['permissions'])) {
|
|
113
|
+
throw new Error("Expected the field `permissions` to be an array in the JSON data but got " + data['permissions']);
|
|
121
114
|
}
|
|
122
115
|
return true;
|
|
123
116
|
}
|
|
124
117
|
}]);
|
|
125
118
|
}();
|
|
126
|
-
|
|
119
|
+
TokenizationUpdateAddressPermissions.RequiredProperties = ["address", "action", "permissions"];
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The address to manage permissions for.
|
|
123
|
+
* @member {String} address
|
|
124
|
+
*/
|
|
125
|
+
TokenizationUpdateAddressPermissions.prototype['address'] = undefined;
|
|
127
126
|
|
|
128
127
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @member {Array.<module:model/TokenizationTokenPermission>} permissions
|
|
128
|
+
* @member {module:model/TokenizationPermissionAction} action
|
|
131
129
|
*/
|
|
132
|
-
|
|
130
|
+
TokenizationUpdateAddressPermissions.prototype['action'] = undefined;
|
|
133
131
|
|
|
134
132
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @member {
|
|
133
|
+
* The list of permissions to be applied.
|
|
134
|
+
* @member {Array.<module:model/TokenizationTokenPermissionType>} permissions
|
|
137
135
|
*/
|
|
138
|
-
|
|
139
|
-
var _default = exports["default"] =
|
|
136
|
+
TokenizationUpdateAddressPermissions.prototype['permissions'] = undefined;
|
|
137
|
+
var _default = exports["default"] = TokenizationUpdateAddressPermissions;
|
|
@@ -0,0 +1,198 @@
|
|
|
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 _TokenizationOperationType = _interopRequireDefault(require("./TokenizationOperationType"));
|
|
9
|
+
var _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
|
|
10
|
+
var _TokenizationUpdateAddressPermissions = _interopRequireDefault(require("./TokenizationUpdateAddressPermissions"));
|
|
11
|
+
var _TokenizationUpdatePermissionsParams = _interopRequireDefault(require("./TokenizationUpdatePermissionsParams"));
|
|
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 _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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The TokenizationUpdatePermissionsEstimateFeeParams model module.
|
|
33
|
+
* @module model/TokenizationUpdatePermissionsEstimateFeeParams
|
|
34
|
+
*/
|
|
35
|
+
var TokenizationUpdatePermissionsEstimateFeeParams = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>TokenizationUpdatePermissionsEstimateFeeParams</code>.
|
|
38
|
+
* @alias module:model/TokenizationUpdatePermissionsEstimateFeeParams
|
|
39
|
+
* @implements module:model/TokenizationUpdatePermissionsParams
|
|
40
|
+
* @param source {module:model/TokenizationTokenOperationSource}
|
|
41
|
+
* @param addresses {Array.<module:model/TokenizationUpdateAddressPermissions>}
|
|
42
|
+
* @param operation_type {module:model/TokenizationOperationType}
|
|
43
|
+
* @param token_id {String} The ID of the token.
|
|
44
|
+
*/
|
|
45
|
+
function TokenizationUpdatePermissionsEstimateFeeParams(source, addresses, operation_type, token_id) {
|
|
46
|
+
_classCallCheck(this, TokenizationUpdatePermissionsEstimateFeeParams);
|
|
47
|
+
_TokenizationUpdatePermissionsParams["default"].initialize(this, source, addresses);
|
|
48
|
+
TokenizationUpdatePermissionsEstimateFeeParams.initialize(this, source, addresses, operation_type, token_id);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(TokenizationUpdatePermissionsEstimateFeeParams, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, source, addresses, operation_type, token_id) {
|
|
59
|
+
obj['source'] = source;
|
|
60
|
+
obj['addresses'] = addresses;
|
|
61
|
+
obj['operation_type'] = operation_type;
|
|
62
|
+
obj['token_id'] = token_id;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>TokenizationUpdatePermissionsEstimateFeeParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/TokenizationUpdatePermissionsEstimateFeeParams} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/TokenizationUpdatePermissionsEstimateFeeParams} The populated <code>TokenizationUpdatePermissionsEstimateFeeParams</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new TokenizationUpdatePermissionsEstimateFeeParams();
|
|
77
|
+
_TokenizationUpdatePermissionsParams["default"].constructFromObject(data, obj);
|
|
78
|
+
if (data.hasOwnProperty('source')) {
|
|
79
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('addresses')) {
|
|
82
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [_TokenizationUpdateAddressPermissions["default"]]);
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('operation_type')) {
|
|
85
|
+
obj['operation_type'] = _TokenizationOperationType["default"].constructFromObject(data['operation_type']);
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('token_id')) {
|
|
88
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('request_id')) {
|
|
91
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return obj;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Validates the JSON data with respect to <code>TokenizationUpdatePermissionsEstimateFeeParams</code>.
|
|
99
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
100
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationUpdatePermissionsEstimateFeeParams</code>.
|
|
101
|
+
*/
|
|
102
|
+
}, {
|
|
103
|
+
key: "validateJSON",
|
|
104
|
+
value: function validateJSON(data) {
|
|
105
|
+
// check to make sure all required properties are present in the JSON string
|
|
106
|
+
var _iterator = _createForOfIteratorHelper(TokenizationUpdatePermissionsEstimateFeeParams.RequiredProperties),
|
|
107
|
+
_step;
|
|
108
|
+
try {
|
|
109
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
110
|
+
var property = _step.value;
|
|
111
|
+
if (!data.hasOwnProperty(property)) {
|
|
112
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// validate the optional field `source`
|
|
116
|
+
} catch (err) {
|
|
117
|
+
_iterator.e(err);
|
|
118
|
+
} finally {
|
|
119
|
+
_iterator.f();
|
|
120
|
+
}
|
|
121
|
+
if (data['source']) {
|
|
122
|
+
// data not null
|
|
123
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
124
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (data['addresses']) {
|
|
128
|
+
// data not null
|
|
129
|
+
// ensure the json data is an array
|
|
130
|
+
if (!Array.isArray(data['addresses'])) {
|
|
131
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
132
|
+
}
|
|
133
|
+
// validate the optional field `addresses` (array)
|
|
134
|
+
var _iterator2 = _createForOfIteratorHelper(data['addresses']),
|
|
135
|
+
_step2;
|
|
136
|
+
try {
|
|
137
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
138
|
+
var item = _step2.value;
|
|
139
|
+
_TokenizationUpdateAddressPermissions["default"].validateJSON(item);
|
|
140
|
+
}
|
|
141
|
+
} catch (err) {
|
|
142
|
+
_iterator2.e(err);
|
|
143
|
+
} finally {
|
|
144
|
+
_iterator2.f();
|
|
145
|
+
}
|
|
146
|
+
;
|
|
147
|
+
}
|
|
148
|
+
// ensure the json data is a string
|
|
149
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
151
|
+
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
}]);
|
|
159
|
+
}();
|
|
160
|
+
TokenizationUpdatePermissionsEstimateFeeParams.RequiredProperties = ["source", "addresses", "operation_type", "token_id"];
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
164
|
+
*/
|
|
165
|
+
TokenizationUpdatePermissionsEstimateFeeParams.prototype['source'] = undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @member {Array.<module:model/TokenizationUpdateAddressPermissions>} addresses
|
|
169
|
+
*/
|
|
170
|
+
TokenizationUpdatePermissionsEstimateFeeParams.prototype['addresses'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @member {module:model/TokenizationOperationType} operation_type
|
|
174
|
+
*/
|
|
175
|
+
TokenizationUpdatePermissionsEstimateFeeParams.prototype['operation_type'] = undefined;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The ID of the token.
|
|
179
|
+
* @member {String} token_id
|
|
180
|
+
*/
|
|
181
|
+
TokenizationUpdatePermissionsEstimateFeeParams.prototype['token_id'] = undefined;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
185
|
+
* @member {String} request_id
|
|
186
|
+
*/
|
|
187
|
+
TokenizationUpdatePermissionsEstimateFeeParams.prototype['request_id'] = undefined;
|
|
188
|
+
|
|
189
|
+
// Implement TokenizationUpdatePermissionsParams interface:
|
|
190
|
+
/**
|
|
191
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
192
|
+
*/
|
|
193
|
+
_TokenizationUpdatePermissionsParams["default"].prototype['source'] = undefined;
|
|
194
|
+
/**
|
|
195
|
+
* @member {Array.<module:model/TokenizationUpdateAddressPermissions>} addresses
|
|
196
|
+
*/
|
|
197
|
+
_TokenizationUpdatePermissionsParams["default"].prototype['addresses'] = undefined;
|
|
198
|
+
var _default = exports["default"] = TokenizationUpdatePermissionsEstimateFeeParams;
|
|
@@ -0,0 +1,145 @@
|
|
|
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 _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
|
|
9
|
+
var _TokenizationUpdateAddressPermissions = _interopRequireDefault(require("./TokenizationUpdateAddressPermissions"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
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; } }
|
|
14
|
+
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; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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 TokenizationUpdatePermissionsParams model module.
|
|
31
|
+
* @module model/TokenizationUpdatePermissionsParams
|
|
32
|
+
*/
|
|
33
|
+
var TokenizationUpdatePermissionsParams = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TokenizationUpdatePermissionsParams</code>.
|
|
36
|
+
* @alias module:model/TokenizationUpdatePermissionsParams
|
|
37
|
+
* @param source {module:model/TokenizationTokenOperationSource}
|
|
38
|
+
* @param addresses {Array.<module:model/TokenizationUpdateAddressPermissions>}
|
|
39
|
+
*/
|
|
40
|
+
function TokenizationUpdatePermissionsParams(source, addresses) {
|
|
41
|
+
_classCallCheck(this, TokenizationUpdatePermissionsParams);
|
|
42
|
+
TokenizationUpdatePermissionsParams.initialize(this, source, addresses);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(TokenizationUpdatePermissionsParams, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, source, addresses) {
|
|
53
|
+
obj['source'] = source;
|
|
54
|
+
obj['addresses'] = addresses;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>TokenizationUpdatePermissionsParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/TokenizationUpdatePermissionsParams} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/TokenizationUpdatePermissionsParams} The populated <code>TokenizationUpdatePermissionsParams</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new TokenizationUpdatePermissionsParams();
|
|
69
|
+
if (data.hasOwnProperty('source')) {
|
|
70
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('addresses')) {
|
|
73
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [_TokenizationUpdateAddressPermissions["default"]]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>TokenizationUpdatePermissionsParams</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationUpdatePermissionsParams</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// check to make sure all required properties are present in the JSON string
|
|
88
|
+
var _iterator = _createForOfIteratorHelper(TokenizationUpdatePermissionsParams.RequiredProperties),
|
|
89
|
+
_step;
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var property = _step.value;
|
|
93
|
+
if (!data.hasOwnProperty(property)) {
|
|
94
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// validate the optional field `source`
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['source']) {
|
|
104
|
+
// data not null
|
|
105
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
106
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (data['addresses']) {
|
|
110
|
+
// data not null
|
|
111
|
+
// ensure the json data is an array
|
|
112
|
+
if (!Array.isArray(data['addresses'])) {
|
|
113
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
114
|
+
}
|
|
115
|
+
// validate the optional field `addresses` (array)
|
|
116
|
+
var _iterator2 = _createForOfIteratorHelper(data['addresses']),
|
|
117
|
+
_step2;
|
|
118
|
+
try {
|
|
119
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
120
|
+
var item = _step2.value;
|
|
121
|
+
_TokenizationUpdateAddressPermissions["default"].validateJSON(item);
|
|
122
|
+
}
|
|
123
|
+
} catch (err) {
|
|
124
|
+
_iterator2.e(err);
|
|
125
|
+
} finally {
|
|
126
|
+
_iterator2.f();
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
}]);
|
|
133
|
+
}();
|
|
134
|
+
TokenizationUpdatePermissionsParams.RequiredProperties = ["source", "addresses"];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
138
|
+
*/
|
|
139
|
+
TokenizationUpdatePermissionsParams.prototype['source'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {Array.<module:model/TokenizationUpdateAddressPermissions>} addresses
|
|
143
|
+
*/
|
|
144
|
+
TokenizationUpdatePermissionsParams.prototype['addresses'] = undefined;
|
|
145
|
+
var _default = exports["default"] = TokenizationUpdatePermissionsParams;
|