@cobo/cobo-waas2 1.30.0 → 1.31.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.
Files changed (70) hide show
  1. package/README.md +5 -36
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/PaymentApi.js +39 -931
  4. package/dist/index.js +21 -105
  5. package/dist/model/Balance.js +14 -0
  6. package/dist/model/BridgingFee.js +9 -0
  7. package/dist/model/ContractCallParams.js +16 -0
  8. package/dist/model/CreatePaymentOrderRequest.js +4 -3
  9. package/dist/model/CreateTopUpAddresses.js +2 -2
  10. package/dist/model/CreateWalletAddress.js +2 -2
  11. package/dist/model/PaymentBridgeStatus.js +61 -0
  12. package/dist/model/PaymentBulkSendItem.js +9 -9
  13. package/dist/model/PaymentPayout.js +35 -4
  14. package/dist/model/PaymentPayoutDetail.js +49 -13
  15. package/dist/model/PaymentPayoutEvent.js +49 -13
  16. package/dist/model/PreCheck.js +89 -0
  17. package/dist/model/SkipCheckType.js +56 -0
  18. package/dist/model/SupportedToken.js +17 -17
  19. package/dist/model/TransferParams.js +16 -0
  20. package/dist/model/WebhookEventData.js +6 -0
  21. package/dist/model/WebhookEventType.js +15 -0
  22. package/docs/Balance.md +1 -0
  23. package/docs/BridgingFee.md +1 -0
  24. package/docs/ContractCallParams.md +1 -0
  25. package/docs/CreatePaymentOrderRequest.md +2 -2
  26. package/docs/CreateTopUpAddresses.md +1 -1
  27. package/docs/CreateWalletAddress.md +1 -1
  28. package/docs/PaymentApi.md +117 -1138
  29. package/docs/PaymentBridgeStatus.md +12 -0
  30. package/docs/PaymentBulkSendItem.md +5 -5
  31. package/docs/PaymentPayout.md +2 -1
  32. package/docs/PaymentPayoutDetail.md +2 -1
  33. package/docs/PaymentPayoutEvent.md +2 -1
  34. package/docs/PreCheck.md +9 -0
  35. package/docs/SkipCheckType.md +10 -0
  36. package/docs/SupportedToken.md +10 -10
  37. package/docs/TransferParams.md +1 -0
  38. package/docs/WebhookEventData.md +1 -0
  39. package/docs/WebhookEventType.md +6 -0
  40. package/package.json +1 -1
  41. package/dist/model/CreateCounterpartyWalletAddressRequest.js +0 -140
  42. package/dist/model/CreateDestinationBankAccountRequest.js +0 -272
  43. package/dist/model/CreateDestinationWalletAddressRequest.js +0 -140
  44. package/dist/model/DeleteCounterparty200Response.js +0 -110
  45. package/dist/model/DeleteCounterpartyWalletAddress200Response.js +0 -110
  46. package/dist/model/DeleteDestination200Response.js +0 -110
  47. package/dist/model/DeleteDestinationBankAccount200Response.js +0 -110
  48. package/dist/model/DeleteDestinationWalletAddress200Response.js +0 -110
  49. package/dist/model/EnableDestinationWhitelistRequest.js +0 -106
  50. package/dist/model/ListCounterpartyWalletAddress200Response.js +0 -123
  51. package/dist/model/ListDestinationBankAccounts200Response.js +0 -123
  52. package/dist/model/ListDestinationWalletAddresses200Response.js +0 -123
  53. package/dist/model/QueryDestinationWhitelistEnabled200Response.js +0 -106
  54. package/dist/model/UpdateCounterpartyByIdRequest.js +0 -160
  55. package/dist/model/UpdateDestinationByIdRequest.js +0 -173
  56. package/docs/CreateCounterpartyWalletAddressRequest.md +0 -11
  57. package/docs/CreateDestinationBankAccountRequest.md +0 -20
  58. package/docs/CreateDestinationWalletAddressRequest.md +0 -11
  59. package/docs/DeleteCounterparty200Response.md +0 -9
  60. package/docs/DeleteCounterpartyWalletAddress200Response.md +0 -9
  61. package/docs/DeleteDestination200Response.md +0 -9
  62. package/docs/DeleteDestinationBankAccount200Response.md +0 -9
  63. package/docs/DeleteDestinationWalletAddress200Response.md +0 -9
  64. package/docs/EnableDestinationWhitelistRequest.md +0 -9
  65. package/docs/ListCounterpartyWalletAddress200Response.md +0 -10
  66. package/docs/ListDestinationBankAccounts200Response.md +0 -10
  67. package/docs/ListDestinationWalletAddresses200Response.md +0 -10
  68. package/docs/QueryDestinationWhitelistEnabled200Response.md +0 -9
  69. package/docs/UpdateCounterpartyByIdRequest.md +0 -13
  70. package/docs/UpdateDestinationByIdRequest.md +0 -14
@@ -1,106 +0,0 @@
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 QueryDestinationWhitelistEnabled200Response model module.
29
- * @module model/QueryDestinationWhitelistEnabled200Response
30
- */
31
- var QueryDestinationWhitelistEnabled200Response = /*#__PURE__*/function () {
32
- /**
33
- * Constructs a new <code>QueryDestinationWhitelistEnabled200Response</code>.
34
- * @alias module:model/QueryDestinationWhitelistEnabled200Response
35
- * @param enable_destination_whitelist {Boolean} Indicates whether the destination whitelist is enabled.
36
- */
37
- function QueryDestinationWhitelistEnabled200Response(enable_destination_whitelist) {
38
- _classCallCheck(this, QueryDestinationWhitelistEnabled200Response);
39
- QueryDestinationWhitelistEnabled200Response.initialize(this, enable_destination_whitelist);
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(QueryDestinationWhitelistEnabled200Response, null, [{
48
- key: "initialize",
49
- value: function initialize(obj, enable_destination_whitelist) {
50
- obj['enable_destination_whitelist'] = enable_destination_whitelist;
51
- }
52
-
53
- /**
54
- * Constructs a <code>QueryDestinationWhitelistEnabled200Response</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/QueryDestinationWhitelistEnabled200Response} obj Optional instance to populate.
58
- * @return {module:model/QueryDestinationWhitelistEnabled200Response} The populated <code>QueryDestinationWhitelistEnabled200Response</code> instance.
59
- */
60
- }, {
61
- key: "constructFromObject",
62
- value: function constructFromObject(data, obj) {
63
- if (data) {
64
- obj = obj || new QueryDestinationWhitelistEnabled200Response();
65
- if (data.hasOwnProperty('enable_destination_whitelist')) {
66
- obj['enable_destination_whitelist'] = _ApiClient["default"].convertToType(data['enable_destination_whitelist'], 'Boolean');
67
- }
68
- }
69
- return obj;
70
- }
71
-
72
- /**
73
- * Validates the JSON data with respect to <code>QueryDestinationWhitelistEnabled200Response</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>QueryDestinationWhitelistEnabled200Response</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(QueryDestinationWhitelistEnabled200Response.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
- } catch (err) {
91
- _iterator.e(err);
92
- } finally {
93
- _iterator.f();
94
- }
95
- return true;
96
- }
97
- }]);
98
- }();
99
- QueryDestinationWhitelistEnabled200Response.RequiredProperties = ["enable_destination_whitelist"];
100
-
101
- /**
102
- * Indicates whether the destination whitelist is enabled.
103
- * @member {Boolean} enable_destination_whitelist
104
- */
105
- QueryDestinationWhitelistEnabled200Response.prototype['enable_destination_whitelist'] = undefined;
106
- var _default = exports["default"] = QueryDestinationWhitelistEnabled200Response;
@@ -1,160 +0,0 @@
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 _CounterpartyType = _interopRequireDefault(require("./CounterpartyType"));
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 UpdateCounterpartyByIdRequest model module.
30
- * @module model/UpdateCounterpartyByIdRequest
31
- */
32
- var UpdateCounterpartyByIdRequest = /*#__PURE__*/function () {
33
- /**
34
- * Constructs a new <code>UpdateCounterpartyByIdRequest</code>.
35
- * @alias module:model/UpdateCounterpartyByIdRequest
36
- * @param counterparty_name {String} The counterparty name.
37
- * @param counterparty_type {module:model/CounterpartyType}
38
- */
39
- function UpdateCounterpartyByIdRequest(counterparty_name, counterparty_type) {
40
- _classCallCheck(this, UpdateCounterpartyByIdRequest);
41
- UpdateCounterpartyByIdRequest.initialize(this, counterparty_name, counterparty_type);
42
- }
43
-
44
- /**
45
- * Initializes the fields of this object.
46
- * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
- * Only for internal use.
48
- */
49
- return _createClass(UpdateCounterpartyByIdRequest, null, [{
50
- key: "initialize",
51
- value: function initialize(obj, counterparty_name, counterparty_type) {
52
- obj['counterparty_name'] = counterparty_name;
53
- obj['counterparty_type'] = counterparty_type;
54
- }
55
-
56
- /**
57
- * Constructs a <code>UpdateCounterpartyByIdRequest</code> from a plain JavaScript object, optionally creating a new instance.
58
- * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
- * @param {Object} data The plain JavaScript object bearing properties of interest.
60
- * @param {module:model/UpdateCounterpartyByIdRequest} obj Optional instance to populate.
61
- * @return {module:model/UpdateCounterpartyByIdRequest} The populated <code>UpdateCounterpartyByIdRequest</code> instance.
62
- */
63
- }, {
64
- key: "constructFromObject",
65
- value: function constructFromObject(data, obj) {
66
- if (data) {
67
- obj = obj || new UpdateCounterpartyByIdRequest();
68
- if (data.hasOwnProperty('counterparty_name')) {
69
- obj['counterparty_name'] = _ApiClient["default"].convertToType(data['counterparty_name'], 'String');
70
- }
71
- if (data.hasOwnProperty('counterparty_type')) {
72
- obj['counterparty_type'] = _CounterpartyType["default"].constructFromObject(data['counterparty_type']);
73
- }
74
- if (data.hasOwnProperty('country')) {
75
- obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
76
- }
77
- if (data.hasOwnProperty('email')) {
78
- obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
79
- }
80
- if (data.hasOwnProperty('contact_address')) {
81
- obj['contact_address'] = _ApiClient["default"].convertToType(data['contact_address'], 'String');
82
- }
83
- }
84
- return obj;
85
- }
86
-
87
- /**
88
- * Validates the JSON data with respect to <code>UpdateCounterpartyByIdRequest</code>.
89
- * @param {Object} data The plain JavaScript object bearing properties of interest.
90
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateCounterpartyByIdRequest</code>.
91
- */
92
- }, {
93
- key: "validateJSON",
94
- value: function validateJSON(data) {
95
- // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(UpdateCounterpartyByIdRequest.RequiredProperties),
97
- _step;
98
- try {
99
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
- var property = _step.value;
101
- if (!data.hasOwnProperty(property)) {
102
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
- }
104
- }
105
- // ensure the json data is a string
106
- } catch (err) {
107
- _iterator.e(err);
108
- } finally {
109
- _iterator.f();
110
- }
111
- if (data['counterparty_name'] && !(typeof data['counterparty_name'] === 'string' || data['counterparty_name'] instanceof String)) {
112
- throw new Error("Expected the field `counterparty_name` to be a primitive type in the JSON string but got " + data['counterparty_name']);
113
- }
114
- // ensure the json data is a string
115
- if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
116
- throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
117
- }
118
- // ensure the json data is a string
119
- if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
120
- throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
121
- }
122
- // ensure the json data is a string
123
- if (data['contact_address'] && !(typeof data['contact_address'] === 'string' || data['contact_address'] instanceof String)) {
124
- throw new Error("Expected the field `contact_address` to be a primitive type in the JSON string but got " + data['contact_address']);
125
- }
126
- return true;
127
- }
128
- }]);
129
- }();
130
- UpdateCounterpartyByIdRequest.RequiredProperties = ["counterparty_name", "counterparty_type"];
131
-
132
- /**
133
- * The counterparty name.
134
- * @member {String} counterparty_name
135
- */
136
- UpdateCounterpartyByIdRequest.prototype['counterparty_name'] = undefined;
137
-
138
- /**
139
- * @member {module:model/CounterpartyType} counterparty_type
140
- */
141
- UpdateCounterpartyByIdRequest.prototype['counterparty_type'] = undefined;
142
-
143
- /**
144
- * The country of the counterparty, in ISO 3166-1 alpha-3 format.
145
- * @member {String} country
146
- */
147
- UpdateCounterpartyByIdRequest.prototype['country'] = undefined;
148
-
149
- /**
150
- * The email of the counterparty.
151
- * @member {String} email
152
- */
153
- UpdateCounterpartyByIdRequest.prototype['email'] = undefined;
154
-
155
- /**
156
- * The contact address of the counterparty.
157
- * @member {String} contact_address
158
- */
159
- UpdateCounterpartyByIdRequest.prototype['contact_address'] = undefined;
160
- var _default = exports["default"] = UpdateCounterpartyByIdRequest;
@@ -1,173 +0,0 @@
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 _DestinationType = _interopRequireDefault(require("./DestinationType"));
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 UpdateDestinationByIdRequest model module.
30
- * @module model/UpdateDestinationByIdRequest
31
- */
32
- var UpdateDestinationByIdRequest = /*#__PURE__*/function () {
33
- /**
34
- * Constructs a new <code>UpdateDestinationByIdRequest</code>.
35
- * @alias module:model/UpdateDestinationByIdRequest
36
- * @param destination_name {String} The destination name.
37
- * @param destination_type {module:model/DestinationType}
38
- */
39
- function UpdateDestinationByIdRequest(destination_name, destination_type) {
40
- _classCallCheck(this, UpdateDestinationByIdRequest);
41
- UpdateDestinationByIdRequest.initialize(this, destination_name, destination_type);
42
- }
43
-
44
- /**
45
- * Initializes the fields of this object.
46
- * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
- * Only for internal use.
48
- */
49
- return _createClass(UpdateDestinationByIdRequest, null, [{
50
- key: "initialize",
51
- value: function initialize(obj, destination_name, destination_type) {
52
- obj['destination_name'] = destination_name;
53
- obj['destination_type'] = destination_type;
54
- }
55
-
56
- /**
57
- * Constructs a <code>UpdateDestinationByIdRequest</code> from a plain JavaScript object, optionally creating a new instance.
58
- * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
- * @param {Object} data The plain JavaScript object bearing properties of interest.
60
- * @param {module:model/UpdateDestinationByIdRequest} obj Optional instance to populate.
61
- * @return {module:model/UpdateDestinationByIdRequest} The populated <code>UpdateDestinationByIdRequest</code> instance.
62
- */
63
- }, {
64
- key: "constructFromObject",
65
- value: function constructFromObject(data, obj) {
66
- if (data) {
67
- obj = obj || new UpdateDestinationByIdRequest();
68
- if (data.hasOwnProperty('destination_name')) {
69
- obj['destination_name'] = _ApiClient["default"].convertToType(data['destination_name'], 'String');
70
- }
71
- if (data.hasOwnProperty('destination_type')) {
72
- obj['destination_type'] = _DestinationType["default"].constructFromObject(data['destination_type']);
73
- }
74
- if (data.hasOwnProperty('merchant_id')) {
75
- obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
76
- }
77
- if (data.hasOwnProperty('country')) {
78
- obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
79
- }
80
- if (data.hasOwnProperty('email')) {
81
- obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
82
- }
83
- if (data.hasOwnProperty('contact_address')) {
84
- obj['contact_address'] = _ApiClient["default"].convertToType(data['contact_address'], 'String');
85
- }
86
- }
87
- return obj;
88
- }
89
-
90
- /**
91
- * Validates the JSON data with respect to <code>UpdateDestinationByIdRequest</code>.
92
- * @param {Object} data The plain JavaScript object bearing properties of interest.
93
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateDestinationByIdRequest</code>.
94
- */
95
- }, {
96
- key: "validateJSON",
97
- value: function validateJSON(data) {
98
- // check to make sure all required properties are present in the JSON string
99
- var _iterator = _createForOfIteratorHelper(UpdateDestinationByIdRequest.RequiredProperties),
100
- _step;
101
- try {
102
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
103
- var property = _step.value;
104
- if (!data.hasOwnProperty(property)) {
105
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
106
- }
107
- }
108
- // ensure the json data is a string
109
- } catch (err) {
110
- _iterator.e(err);
111
- } finally {
112
- _iterator.f();
113
- }
114
- if (data['destination_name'] && !(typeof data['destination_name'] === 'string' || data['destination_name'] instanceof String)) {
115
- throw new Error("Expected the field `destination_name` to be a primitive type in the JSON string but got " + data['destination_name']);
116
- }
117
- // ensure the json data is a string
118
- if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
119
- throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
120
- }
121
- // ensure the json data is a string
122
- if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
123
- throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
124
- }
125
- // ensure the json data is a string
126
- if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
127
- throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
128
- }
129
- // ensure the json data is a string
130
- if (data['contact_address'] && !(typeof data['contact_address'] === 'string' || data['contact_address'] instanceof String)) {
131
- throw new Error("Expected the field `contact_address` to be a primitive type in the JSON string but got " + data['contact_address']);
132
- }
133
- return true;
134
- }
135
- }]);
136
- }();
137
- UpdateDestinationByIdRequest.RequiredProperties = ["destination_name", "destination_type"];
138
-
139
- /**
140
- * The destination name.
141
- * @member {String} destination_name
142
- */
143
- UpdateDestinationByIdRequest.prototype['destination_name'] = undefined;
144
-
145
- /**
146
- * @member {module:model/DestinationType} destination_type
147
- */
148
- UpdateDestinationByIdRequest.prototype['destination_type'] = undefined;
149
-
150
- /**
151
- * The ID of the merchant linked to the destination.
152
- * @member {String} merchant_id
153
- */
154
- UpdateDestinationByIdRequest.prototype['merchant_id'] = undefined;
155
-
156
- /**
157
- * The country of the destination, in ISO 3166-1 alpha-3 format.
158
- * @member {String} country
159
- */
160
- UpdateDestinationByIdRequest.prototype['country'] = undefined;
161
-
162
- /**
163
- * The email of the destination.
164
- * @member {String} email
165
- */
166
- UpdateDestinationByIdRequest.prototype['email'] = undefined;
167
-
168
- /**
169
- * The contact address of the destination.
170
- * @member {String} contact_address
171
- */
172
- UpdateDestinationByIdRequest.prototype['contact_address'] = undefined;
173
- var _default = exports["default"] = UpdateDestinationByIdRequest;
@@ -1,11 +0,0 @@
1
- # CoboWaas2.CreateCounterpartyWalletAddressRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **counterparty_id** | **String** | The counterparty ID. |
8
- **address** | **String** | The wallet address. |
9
- **chain_id** | **String** | The chain ID of the cryptocurrency. |
10
-
11
-
@@ -1,20 +0,0 @@
1
- # CoboWaas2.CreateDestinationBankAccountRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **destination_id** | **String** | The destination ID. |
8
- **account_alias** | **String** | The alias of the bank account. |
9
- **account_number** | **String** | The bank account number. |
10
- **swift_code** | **String** | The SWIFT or BIC code of the bank. |
11
- **currency** | **String** | The currency of the bank account. |
12
- **beneficiary_name** | **String** | The name of the account holder. |
13
- **beneficiary_address** | **String** | The address of the account holder. |
14
- **bank_name** | **String** | The name of the bank. |
15
- **bank_address** | **String** | The address of the bank. |
16
- **iban_code** | **String** | The IBAN code of the bank account. | [optional]
17
- **further_credit** | **String** | The further credit of the bank account. | [optional]
18
- **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional]
19
-
20
-
@@ -1,11 +0,0 @@
1
- # CoboWaas2.CreateDestinationWalletAddressRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **destination_id** | **String** | The destination ID. |
8
- **address** | **String** | The wallet address. |
9
- **chain_id** | **String** | The chain ID of the cryptocurrency. |
10
-
11
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.DeleteCounterparty200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **counterparty_id** | **String** | The counterparty ID. |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.DeleteCounterpartyWalletAddress200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **wallet_address_id** | **String** | The wallet address ID under the counterparty. |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.DeleteDestination200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **destination_id** | **String** | The destination ID. |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.DeleteDestinationBankAccount200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **bank_account_id** | **String** | The destination bank account ID. |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.DeleteDestinationWalletAddress200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **wallet_address_id** | **String** | The wallet address ID under the destination. |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.EnableDestinationWhitelistRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **enable_destination_whitelist** | **Boolean** | Indicates whether to enable the destination whitelist. |
8
-
9
-
@@ -1,10 +0,0 @@
1
- # CoboWaas2.ListCounterpartyWalletAddress200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **data** | [**[CounterpartyWalletAddressDetail]**](CounterpartyWalletAddressDetail.md) | | [optional]
8
- **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
-
10
-
@@ -1,10 +0,0 @@
1
- # CoboWaas2.ListDestinationBankAccounts200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **data** | [**[DestinationBankAccountDetail]**](DestinationBankAccountDetail.md) | | [optional]
8
- **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
-
10
-
@@ -1,10 +0,0 @@
1
- # CoboWaas2.ListDestinationWalletAddresses200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **data** | [**[DestinationWalletAddressDetail]**](DestinationWalletAddressDetail.md) | | [optional]
8
- **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
-
10
-
@@ -1,9 +0,0 @@
1
- # CoboWaas2.QueryDestinationWhitelistEnabled200Response
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **enable_destination_whitelist** | **Boolean** | Indicates whether the destination whitelist is enabled. |
8
-
9
-
@@ -1,13 +0,0 @@
1
- # CoboWaas2.UpdateCounterpartyByIdRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **counterparty_name** | **String** | The counterparty name. |
8
- **counterparty_type** | [**CounterpartyType**](CounterpartyType.md) | |
9
- **country** | **String** | The country of the counterparty, in ISO 3166-1 alpha-3 format. | [optional]
10
- **email** | **String** | The email of the counterparty. | [optional]
11
- **contact_address** | **String** | The contact address of the counterparty. | [optional]
12
-
13
-
@@ -1,14 +0,0 @@
1
- # CoboWaas2.UpdateDestinationByIdRequest
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **destination_name** | **String** | The destination name. |
8
- **destination_type** | [**DestinationType**](DestinationType.md) | |
9
- **merchant_id** | **String** | The ID of the merchant linked to the destination. | [optional]
10
- **country** | **String** | The country of the destination, in ISO 3166-1 alpha-3 format. | [optional]
11
- **email** | **String** | The email of the destination. | [optional]
12
- **contact_address** | **String** | The contact address of the destination. | [optional]
13
-
14
-