@cobo/cobo-waas2 1.22.0 → 1.23.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 +39 -14
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +26 -26
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/PaymentApi.js +16 -16
- package/dist/api/TokenizationApi.js +2 -2
- package/dist/api/TransactionsApi.js +16 -16
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +105 -7
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/ApprovalDetail.js +4 -4
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +9 -9
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +3 -3
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateSweepToAddress.js +1 -1
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +1 -1
- package/dist/model/MerchantBalance.js +7 -7
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +6 -6
- package/dist/model/PspBalance.js +7 -7
- package/dist/model/ReceivedAmountPerAddress.js +5 -5
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SweepToAddress.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +62 -10
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressesEventData.md +3 -1
- package/docs/ApprovalDetail.md +3 -3
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +18 -18
- package/docs/AutoSweepTask.md +5 -5
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +2 -2
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +1 -1
- package/docs/MerchantBalance.md +6 -6
- package/docs/OrgInfo.md +1 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +10 -10
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +5 -5
- package/docs/PspBalance.md +6 -6
- package/docs/ReceivedAmountPerAddress.md +2 -2
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationApi.md +2 -2
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +10 -10
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +8 -2
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
|
@@ -0,0 +1,146 @@
|
|
|
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 _DispositionStatus = _interopRequireDefault(require("./DispositionStatus"));
|
|
9
|
+
var _DispositionType = _interopRequireDefault(require("./DispositionType"));
|
|
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 DispositionQueryResponse model module.
|
|
31
|
+
* @module model/DispositionQueryResponse
|
|
32
|
+
*/
|
|
33
|
+
var DispositionQueryResponse = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>DispositionQueryResponse</code>.
|
|
36
|
+
* The response for a disposition query request.
|
|
37
|
+
* @alias module:model/DispositionQueryResponse
|
|
38
|
+
* @param transaction_id {String} The UUID of the transaction that the disposition applies to.
|
|
39
|
+
* @param disposition_type {module:model/DispositionType}
|
|
40
|
+
* @param disposition_status {module:model/DispositionStatus}
|
|
41
|
+
*/
|
|
42
|
+
function DispositionQueryResponse(transaction_id, disposition_type, disposition_status) {
|
|
43
|
+
_classCallCheck(this, DispositionQueryResponse);
|
|
44
|
+
DispositionQueryResponse.initialize(this, transaction_id, disposition_type, disposition_status);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(DispositionQueryResponse, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, transaction_id, disposition_type, disposition_status) {
|
|
55
|
+
obj['transaction_id'] = transaction_id;
|
|
56
|
+
obj['disposition_type'] = disposition_type;
|
|
57
|
+
obj['disposition_status'] = disposition_status;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>DispositionQueryResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/DispositionQueryResponse} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/DispositionQueryResponse} The populated <code>DispositionQueryResponse</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "constructFromObject",
|
|
69
|
+
value: function constructFromObject(data, obj) {
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new DispositionQueryResponse();
|
|
72
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
73
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('disposition_type')) {
|
|
76
|
+
obj['disposition_type'] = _DispositionType["default"].constructFromObject(data['disposition_type']);
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('disposition_status')) {
|
|
79
|
+
obj['disposition_status'] = _DispositionStatus["default"].constructFromObject(data['disposition_status']);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('disposition_transaction_id')) {
|
|
82
|
+
obj['disposition_transaction_id'] = _ApiClient["default"].convertToType(data['disposition_transaction_id'], 'String');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return obj;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Validates the JSON data with respect to <code>DispositionQueryResponse</code>.
|
|
90
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
91
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DispositionQueryResponse</code>.
|
|
92
|
+
*/
|
|
93
|
+
}, {
|
|
94
|
+
key: "validateJSON",
|
|
95
|
+
value: function validateJSON(data) {
|
|
96
|
+
// check to make sure all required properties are present in the JSON string
|
|
97
|
+
var _iterator = _createForOfIteratorHelper(DispositionQueryResponse.RequiredProperties),
|
|
98
|
+
_step;
|
|
99
|
+
try {
|
|
100
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
101
|
+
var property = _step.value;
|
|
102
|
+
if (!data.hasOwnProperty(property)) {
|
|
103
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// ensure the json data is a string
|
|
107
|
+
} catch (err) {
|
|
108
|
+
_iterator.e(err);
|
|
109
|
+
} finally {
|
|
110
|
+
_iterator.f();
|
|
111
|
+
}
|
|
112
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
113
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['disposition_transaction_id'] && !(typeof data['disposition_transaction_id'] === 'string' || data['disposition_transaction_id'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `disposition_transaction_id` to be a primitive type in the JSON string but got " + data['disposition_transaction_id']);
|
|
118
|
+
}
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}]);
|
|
122
|
+
}();
|
|
123
|
+
DispositionQueryResponse.RequiredProperties = ["transaction_id", "disposition_type", "disposition_status"];
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The UUID of the transaction that the disposition applies to.
|
|
127
|
+
* @member {String} transaction_id
|
|
128
|
+
*/
|
|
129
|
+
DispositionQueryResponse.prototype['transaction_id'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @member {module:model/DispositionType} disposition_type
|
|
133
|
+
*/
|
|
134
|
+
DispositionQueryResponse.prototype['disposition_type'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
138
|
+
*/
|
|
139
|
+
DispositionQueryResponse.prototype['disposition_status'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The UUID of the generated disposition transaction (if available).
|
|
143
|
+
* @member {String} disposition_transaction_id
|
|
144
|
+
*/
|
|
145
|
+
DispositionQueryResponse.prototype['disposition_transaction_id'] = undefined;
|
|
146
|
+
var _default = exports["default"] = DispositionQueryResponse;
|
|
@@ -0,0 +1,122 @@
|
|
|
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 _DispositionStatus = _interopRequireDefault(require("./DispositionStatus"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The DispositionResponse model module.
|
|
30
|
+
* @module model/DispositionResponse
|
|
31
|
+
*/
|
|
32
|
+
var DispositionResponse = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>DispositionResponse</code>.
|
|
35
|
+
* The response for a disposition request.
|
|
36
|
+
* @alias module:model/DispositionResponse
|
|
37
|
+
* @param transaction_id {String} The UUID of the transaction being processed for disposition.
|
|
38
|
+
* @param status {module:model/DispositionStatus}
|
|
39
|
+
*/
|
|
40
|
+
function DispositionResponse(transaction_id, status) {
|
|
41
|
+
_classCallCheck(this, DispositionResponse);
|
|
42
|
+
DispositionResponse.initialize(this, transaction_id, status);
|
|
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(DispositionResponse, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, transaction_id, status) {
|
|
53
|
+
obj['transaction_id'] = transaction_id;
|
|
54
|
+
obj['status'] = status;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>DispositionResponse</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/DispositionResponse} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/DispositionResponse} The populated <code>DispositionResponse</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new DispositionResponse();
|
|
69
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
70
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('status')) {
|
|
73
|
+
obj['status'] = _DispositionStatus["default"].constructFromObject(data['status']);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>DispositionResponse</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>DispositionResponse</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(DispositionResponse.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
|
+
// ensure the json data is a string
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}]);
|
|
109
|
+
}();
|
|
110
|
+
DispositionResponse.RequiredProperties = ["transaction_id", "status"];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The UUID of the transaction being processed for disposition.
|
|
114
|
+
* @member {String} transaction_id
|
|
115
|
+
*/
|
|
116
|
+
DispositionResponse.prototype['transaction_id'] = undefined;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @member {module:model/DispositionStatus} status
|
|
120
|
+
*/
|
|
121
|
+
DispositionResponse.prototype['status'] = undefined;
|
|
122
|
+
var _default = exports["default"] = DispositionResponse;
|
|
@@ -0,0 +1,116 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class DispositionStatus.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var DispositionStatus = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function DispositionStatus() {
|
|
32
|
+
_classCallCheck(this, DispositionStatus);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Submitted"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Submitted", "Submitted");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Refunding"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Refunding", "Refunding");
|
|
43
|
+
/**
|
|
44
|
+
* value: "Refunded"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "Refunded", "Refunded");
|
|
48
|
+
/**
|
|
49
|
+
* value: "RefundFailed"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "RefundFailed", "RefundFailed");
|
|
53
|
+
/**
|
|
54
|
+
* value: "Frozen"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "Frozen", "Frozen");
|
|
58
|
+
/**
|
|
59
|
+
* value: "Unfreezing"
|
|
60
|
+
* @const
|
|
61
|
+
*/
|
|
62
|
+
_defineProperty(this, "Unfreezing", "Unfreezing");
|
|
63
|
+
/**
|
|
64
|
+
* value: "Unfrozen"
|
|
65
|
+
* @const
|
|
66
|
+
*/
|
|
67
|
+
_defineProperty(this, "Unfrozen", "Unfrozen");
|
|
68
|
+
/**
|
|
69
|
+
* value: "UnfreezeFailed"
|
|
70
|
+
* @const
|
|
71
|
+
*/
|
|
72
|
+
_defineProperty(this, "UnfreezeFailed", "UnfreezeFailed");
|
|
73
|
+
/**
|
|
74
|
+
* value: "Isolating"
|
|
75
|
+
* @const
|
|
76
|
+
*/
|
|
77
|
+
_defineProperty(this, "Isolating", "Isolating");
|
|
78
|
+
/**
|
|
79
|
+
* value: "Isolated"
|
|
80
|
+
* @const
|
|
81
|
+
*/
|
|
82
|
+
_defineProperty(this, "Isolated", "Isolated");
|
|
83
|
+
/**
|
|
84
|
+
* value: "IsolateFailed"
|
|
85
|
+
* @const
|
|
86
|
+
*/
|
|
87
|
+
_defineProperty(this, "IsolateFailed", "IsolateFailed");
|
|
88
|
+
/**
|
|
89
|
+
* value: "CoboDisposition"
|
|
90
|
+
* @const
|
|
91
|
+
*/
|
|
92
|
+
_defineProperty(this, "CoboDisposition", "CoboDisposition");
|
|
93
|
+
/**
|
|
94
|
+
* value: "Normal"
|
|
95
|
+
* @const
|
|
96
|
+
*/
|
|
97
|
+
_defineProperty(this, "Normal", "Normal");
|
|
98
|
+
/**
|
|
99
|
+
* value: "unknown_default_open_api"
|
|
100
|
+
* @const
|
|
101
|
+
*/
|
|
102
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
103
|
+
}
|
|
104
|
+
return _createClass(DispositionStatus, null, [{
|
|
105
|
+
key: "constructFromObject",
|
|
106
|
+
value:
|
|
107
|
+
/**
|
|
108
|
+
* Returns a <code>DispositionStatus</code> enum value from a Javascript object name.
|
|
109
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
110
|
+
* @return {module:model/DispositionStatus} The enum <code>DispositionStatus</code> value.
|
|
111
|
+
*/
|
|
112
|
+
function constructFromObject(object) {
|
|
113
|
+
return object;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
@@ -0,0 +1,66 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class DispositionType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var DispositionType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function DispositionType() {
|
|
32
|
+
_classCallCheck(this, DispositionType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Unfreeze"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Unfreeze", "Unfreeze");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Refund"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Refund", "Refund");
|
|
43
|
+
/**
|
|
44
|
+
* value: "Isolate"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "Isolate", "Isolate");
|
|
48
|
+
/**
|
|
49
|
+
* value: "unknown_default_open_api"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
53
|
+
}
|
|
54
|
+
return _createClass(DispositionType, null, [{
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value:
|
|
57
|
+
/**
|
|
58
|
+
* Returns a <code>DispositionType</code> enum value from a Javascript object name.
|
|
59
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
60
|
+
* @return {module:model/DispositionType} The enum <code>DispositionType</code> value.
|
|
61
|
+
*/
|
|
62
|
+
function constructFromObject(object) {
|
|
63
|
+
return object;
|
|
64
|
+
}
|
|
65
|
+
}]);
|
|
66
|
+
}();
|
|
@@ -0,0 +1,167 @@
|
|
|
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 IsolateDisposition model module.
|
|
29
|
+
* @module model/IsolateDisposition
|
|
30
|
+
*/
|
|
31
|
+
var IsolateDisposition = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>IsolateDisposition</code>.
|
|
34
|
+
* The information about a request to isolate funds.
|
|
35
|
+
* @alias module:model/IsolateDisposition
|
|
36
|
+
* @param transaction_id {String} The UUID of the transaction whose funds are to be isolated. This identifies the original transaction that requires fund isolation.
|
|
37
|
+
* @param destination_address {String} The blockchain address to receive the isolated funds.
|
|
38
|
+
* @param disposition_amount {String} The amount to be isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
39
|
+
*/
|
|
40
|
+
function IsolateDisposition(transaction_id, destination_address, disposition_amount) {
|
|
41
|
+
_classCallCheck(this, IsolateDisposition);
|
|
42
|
+
IsolateDisposition.initialize(this, transaction_id, destination_address, disposition_amount);
|
|
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(IsolateDisposition, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, transaction_id, destination_address, disposition_amount) {
|
|
53
|
+
obj['transaction_id'] = transaction_id;
|
|
54
|
+
obj['destination_address'] = destination_address;
|
|
55
|
+
obj['disposition_amount'] = disposition_amount;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>IsolateDisposition</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/IsolateDisposition} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/IsolateDisposition} The populated <code>IsolateDisposition</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new IsolateDisposition();
|
|
70
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
71
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('destination_address')) {
|
|
74
|
+
obj['destination_address'] = _ApiClient["default"].convertToType(data['destination_address'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('disposition_amount')) {
|
|
77
|
+
obj['disposition_amount'] = _ApiClient["default"].convertToType(data['disposition_amount'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('category_names')) {
|
|
80
|
+
obj['category_names'] = _ApiClient["default"].convertToType(data['category_names'], ['String']);
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('description')) {
|
|
83
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates the JSON data with respect to <code>IsolateDisposition</code>.
|
|
91
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
92
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>IsolateDisposition</code>.
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "validateJSON",
|
|
96
|
+
value: function validateJSON(data) {
|
|
97
|
+
// check to make sure all required properties are present in the JSON string
|
|
98
|
+
var _iterator = _createForOfIteratorHelper(IsolateDisposition.RequiredProperties),
|
|
99
|
+
_step;
|
|
100
|
+
try {
|
|
101
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
102
|
+
var property = _step.value;
|
|
103
|
+
if (!data.hasOwnProperty(property)) {
|
|
104
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['destination_address'] && !(typeof data['destination_address'] === 'string' || data['destination_address'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `destination_address` to be a primitive type in the JSON string but got " + data['destination_address']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['disposition_amount'] && !(typeof data['disposition_amount'] === 'string' || data['disposition_amount'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `disposition_amount` to be a primitive type in the JSON string but got " + data['disposition_amount']);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is an array
|
|
125
|
+
if (!Array.isArray(data['category_names'])) {
|
|
126
|
+
throw new Error("Expected the field `category_names` to be an array in the JSON data but got " + data['category_names']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
}]);
|
|
135
|
+
}();
|
|
136
|
+
IsolateDisposition.RequiredProperties = ["transaction_id", "destination_address", "disposition_amount"];
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The UUID of the transaction whose funds are to be isolated. This identifies the original transaction that requires fund isolation.
|
|
140
|
+
* @member {String} transaction_id
|
|
141
|
+
*/
|
|
142
|
+
IsolateDisposition.prototype['transaction_id'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The blockchain address to receive the isolated funds.
|
|
146
|
+
* @member {String} destination_address
|
|
147
|
+
*/
|
|
148
|
+
IsolateDisposition.prototype['destination_address'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The amount to be isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
152
|
+
* @member {String} disposition_amount
|
|
153
|
+
*/
|
|
154
|
+
IsolateDisposition.prototype['disposition_amount'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Custom categories to identify and track this isolation transaction. Used for transaction classification and reporting.
|
|
158
|
+
* @member {Array.<String>} category_names
|
|
159
|
+
*/
|
|
160
|
+
IsolateDisposition.prototype['category_names'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Additional notes or description for the isolation.
|
|
164
|
+
* @member {String} description
|
|
165
|
+
*/
|
|
166
|
+
IsolateDisposition.prototype['description'] = undefined;
|
|
167
|
+
var _default = exports["default"] = IsolateDisposition;
|