@cobo/cobo-waas2 1.31.0 → 1.32.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 (44) hide show
  1. package/README.md +5 -1
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +4 -4
  4. package/dist/api/FeeStationApi.js +4 -4
  5. package/dist/api/PaymentApi.js +53 -14
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/api/WalletsApi.js +83 -0
  8. package/dist/index.js +14 -0
  9. package/dist/model/CreateDestinationBankAccount.js +26 -0
  10. package/dist/model/DestinationBankAccount.js +26 -0
  11. package/dist/model/DestinationBankAccountDetail.js +26 -0
  12. package/dist/model/IntermediaryBankInfo.js +4 -6
  13. package/dist/model/MerchantBalance.js +4 -6
  14. package/dist/model/ReportType.js +5 -0
  15. package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +26 -0
  16. package/dist/model/TransactionRawTxInfo.js +32 -1
  17. package/dist/model/TransactionSelectedUtxo.js +39 -0
  18. package/dist/model/TransactionUtxoChange.js +13 -0
  19. package/dist/model/TriggerTestPaymentWebhookEventResponse.js +83 -0
  20. package/dist/model/TriggerTestPaymentsWebhookEventRequest.js +115 -0
  21. package/dist/model/UTXO.js +48 -0
  22. package/dist/model/UpdateDestinationBankAccount.js +26 -0
  23. package/dist/model/WebhookEventType.js +10 -0
  24. package/docs/AutoSweepApi.md +2 -2
  25. package/docs/CreateDestinationBankAccount.md +2 -0
  26. package/docs/DestinationBankAccount.md +2 -0
  27. package/docs/DestinationBankAccountDetail.md +2 -0
  28. package/docs/FeeStationApi.md +2 -2
  29. package/docs/IntermediaryBankInfo.md +1 -1
  30. package/docs/MerchantBalance.md +1 -1
  31. package/docs/PaymentApi.md +59 -6
  32. package/docs/ReportType.md +2 -0
  33. package/docs/TransactionDepositToAddressDestinationTxInfo.md +2 -0
  34. package/docs/TransactionRawTxInfo.md +2 -1
  35. package/docs/TransactionSelectedUtxo.md +3 -0
  36. package/docs/TransactionUtxoChange.md +1 -0
  37. package/docs/TransactionsApi.md +2 -2
  38. package/docs/TriggerTestPaymentWebhookEventResponse.md +9 -0
  39. package/docs/TriggerTestPaymentsWebhookEventRequest.md +10 -0
  40. package/docs/UTXO.md +4 -0
  41. package/docs/UpdateDestinationBankAccount.md +2 -0
  42. package/docs/WalletsApi.md +71 -0
  43. package/docs/WebhookEventType.md +4 -0
  44. package/package.json +1 -1
@@ -59,6 +59,12 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
59
59
  if (data.hasOwnProperty('vout_n')) {
60
60
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
61
61
  }
62
+ if (data.hasOwnProperty('object_id')) {
63
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('version')) {
66
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
67
+ }
62
68
  }
63
69
  return obj;
64
70
  }
@@ -71,6 +77,14 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
71
77
  }, {
72
78
  key: "validateJSON",
73
79
  value: function validateJSON(data) {
80
+ // ensure the json data is a string
81
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
82
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
83
+ }
84
+ // ensure the json data is a string
85
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
86
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
87
+ }
74
88
  return true;
75
89
  }
76
90
  }]);
@@ -80,4 +94,16 @@ var TransactionDepositToAddressDestinationTxInfo = /*#__PURE__*/function () {
80
94
  * @member {Number} vout_n
81
95
  */
82
96
  TransactionDepositToAddressDestinationTxInfo.prototype['vout_n'] = undefined;
97
+
98
+ /**
99
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
100
+ * @member {String} object_id
101
+ */
102
+ TransactionDepositToAddressDestinationTxInfo.prototype['object_id'] = undefined;
103
+
104
+ /**
105
+ * Object version number.
106
+ * @member {String} version
107
+ */
108
+ TransactionDepositToAddressDestinationTxInfo.prototype['version'] = undefined;
83
109
  var _default = exports["default"] = TransactionDepositToAddressDestinationTxInfo;
@@ -75,7 +75,10 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
75
75
  obj['unsigned_raw_tx'] = _ApiClient["default"].convertToType(data['unsigned_raw_tx'], 'String');
76
76
  }
77
77
  if (data.hasOwnProperty('utxo_change')) {
78
- obj['utxo_change'] = _TransactionUtxoChange["default"].constructFromObject(data['utxo_change']);
78
+ obj['utxo_change'] = _ApiClient["default"].convertToType(data['utxo_change'], _TransactionUtxoChange["default"]);
79
+ }
80
+ if (data.hasOwnProperty('utxo_changes')) {
81
+ obj['utxo_changes'] = _ApiClient["default"].convertToType(data['utxo_changes'], [_TransactionUtxoChange["default"]]);
79
82
  }
80
83
  }
81
84
  return obj;
@@ -125,6 +128,27 @@ var TransactionRawTxInfo = /*#__PURE__*/function () {
125
128
  _TransactionUtxoChange["default"].validateJSON(data['utxo_change']);
126
129
  }
127
130
  }
131
+ if (data['utxo_changes']) {
132
+ // data not null
133
+ // ensure the json data is an array
134
+ if (!Array.isArray(data['utxo_changes'])) {
135
+ throw new Error("Expected the field `utxo_changes` to be an array in the JSON data but got " + data['utxo_changes']);
136
+ }
137
+ // validate the optional field `utxo_changes` (array)
138
+ var _iterator2 = _createForOfIteratorHelper(data['utxo_changes']),
139
+ _step2;
140
+ try {
141
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
142
+ var _item = _step2.value;
143
+ _TransactionUtxoChange["default"].validateJSON(_item);
144
+ }
145
+ } catch (err) {
146
+ _iterator2.e(err);
147
+ } finally {
148
+ _iterator2.f();
149
+ }
150
+ ;
151
+ }
128
152
  return true;
129
153
  }
130
154
  }]);
@@ -154,7 +178,14 @@ TransactionRawTxInfo.prototype['raw_tx'] = undefined;
154
178
  TransactionRawTxInfo.prototype['unsigned_raw_tx'] = undefined;
155
179
 
156
180
  /**
181
+ * Deprecated. Use `utxo_changes` instead.
157
182
  * @member {module:model/TransactionUtxoChange} utxo_change
158
183
  */
159
184
  TransactionRawTxInfo.prototype['utxo_change'] = undefined;
185
+
186
+ /**
187
+ * The UTXO change outputs in the transaction.
188
+ * @member {Array.<module:model/TransactionUtxoChange>} utxo_changes
189
+ */
190
+ TransactionRawTxInfo.prototype['utxo_changes'] = undefined;
160
191
  var _default = exports["default"] = TransactionRawTxInfo;
@@ -63,6 +63,9 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('vout_n')) {
64
64
  obj['vout_n'] = _ApiClient["default"].convertToType(data['vout_n'], 'Number');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  if (data.hasOwnProperty('address')) {
67
70
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
68
71
  }
@@ -75,6 +78,12 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
75
78
  if (data.hasOwnProperty('revealed_script')) {
76
79
  obj['revealed_script'] = _ApiClient["default"].convertToType(data['revealed_script'], 'String');
77
80
  }
81
+ if (data.hasOwnProperty('object_id')) {
82
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('version')) {
85
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
86
+ }
78
87
  }
79
88
  return obj;
80
89
  }
@@ -92,6 +101,10 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
92
101
  throw new Error("Expected the field `tx_hash` to be a primitive type in the JSON string but got " + data['tx_hash']);
93
102
  }
94
103
  // ensure the json data is a string
104
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
105
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
106
+ }
107
+ // ensure the json data is a string
95
108
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
96
109
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
97
110
  }
@@ -107,6 +120,14 @@ var TransactionSelectedUtxo = /*#__PURE__*/function () {
107
120
  if (data['revealed_script'] && !(typeof data['revealed_script'] === 'string' || data['revealed_script'] instanceof String)) {
108
121
  throw new Error("Expected the field `revealed_script` to be a primitive type in the JSON string but got " + data['revealed_script']);
109
122
  }
123
+ // ensure the json data is a string
124
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
125
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
126
+ }
127
+ // ensure the json data is a string
128
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
129
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
130
+ }
110
131
  return true;
111
132
  }
112
133
  }]);
@@ -123,6 +144,12 @@ TransactionSelectedUtxo.prototype['tx_hash'] = undefined;
123
144
  */
124
145
  TransactionSelectedUtxo.prototype['vout_n'] = undefined;
125
146
 
147
+ /**
148
+ * The token ID of the UTXO.
149
+ * @member {String} token_id
150
+ */
151
+ TransactionSelectedUtxo.prototype['token_id'] = undefined;
152
+
126
153
  /**
127
154
  * The address of the UTXO.
128
155
  * @member {String} address
@@ -146,4 +173,16 @@ TransactionSelectedUtxo.prototype['redeem_script'] = undefined;
146
173
  * @member {String} revealed_script
147
174
  */
148
175
  TransactionSelectedUtxo.prototype['revealed_script'] = undefined;
176
+
177
+ /**
178
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
179
+ * @member {String} object_id
180
+ */
181
+ TransactionSelectedUtxo.prototype['object_id'] = undefined;
182
+
183
+ /**
184
+ * Object version number.
185
+ * @member {String} version
186
+ */
187
+ TransactionSelectedUtxo.prototype['version'] = undefined;
149
188
  var _default = exports["default"] = TransactionSelectedUtxo;
@@ -63,6 +63,9 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
63
63
  if (data.hasOwnProperty('value')) {
64
64
  obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
65
65
  }
66
+ if (data.hasOwnProperty('token_id')) {
67
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
68
+ }
66
69
  }
67
70
  return obj;
68
71
  }
@@ -83,6 +86,10 @@ var TransactionUtxoChange = /*#__PURE__*/function () {
83
86
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
84
87
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
85
88
  }
89
+ // ensure the json data is a string
90
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
91
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
92
+ }
86
93
  return true;
87
94
  }
88
95
  }]);
@@ -98,4 +105,10 @@ TransactionUtxoChange.prototype['address'] = undefined;
98
105
  * @member {String} value
99
106
  */
100
107
  TransactionUtxoChange.prototype['value'] = undefined;
108
+
109
+ /**
110
+ * The token ID of the UTXO change output.
111
+ * @member {String} token_id
112
+ */
113
+ TransactionUtxoChange.prototype['token_id'] = undefined;
101
114
  var _default = exports["default"] = TransactionUtxoChange;
@@ -0,0 +1,83 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The TriggerTestPaymentWebhookEventResponse model module.
26
+ * @module model/TriggerTestPaymentWebhookEventResponse
27
+ */
28
+ var TriggerTestPaymentWebhookEventResponse = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>TriggerTestPaymentWebhookEventResponse</code>.
31
+ * @alias module:model/TriggerTestPaymentWebhookEventResponse
32
+ */
33
+ function TriggerTestPaymentWebhookEventResponse() {
34
+ _classCallCheck(this, TriggerTestPaymentWebhookEventResponse);
35
+ TriggerTestPaymentWebhookEventResponse.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(TriggerTestPaymentWebhookEventResponse, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>TriggerTestPaymentWebhookEventResponse</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/TriggerTestPaymentWebhookEventResponse} obj Optional instance to populate.
52
+ * @return {module:model/TriggerTestPaymentWebhookEventResponse} The populated <code>TriggerTestPaymentWebhookEventResponse</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new TriggerTestPaymentWebhookEventResponse();
59
+ if (data.hasOwnProperty('triggered')) {
60
+ obj['triggered'] = _ApiClient["default"].convertToType(data['triggered'], 'Boolean');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TriggerTestPaymentWebhookEventResponse</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ return true;
75
+ }
76
+ }]);
77
+ }();
78
+ /**
79
+ * Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered.
80
+ * @member {Boolean} triggered
81
+ */
82
+ TriggerTestPaymentWebhookEventResponse.prototype['triggered'] = undefined;
83
+ var _default = exports["default"] = TriggerTestPaymentWebhookEventResponse;
@@ -0,0 +1,115 @@
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 _WebhookEventType = _interopRequireDefault(require("./WebhookEventType"));
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 TriggerTestPaymentsWebhookEventRequest model module.
30
+ * @module model/TriggerTestPaymentsWebhookEventRequest
31
+ */
32
+ var TriggerTestPaymentsWebhookEventRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>TriggerTestPaymentsWebhookEventRequest</code>.
35
+ * @alias module:model/TriggerTestPaymentsWebhookEventRequest
36
+ * @param event_type {module:model/WebhookEventType}
37
+ */
38
+ function TriggerTestPaymentsWebhookEventRequest(event_type) {
39
+ _classCallCheck(this, TriggerTestPaymentsWebhookEventRequest);
40
+ TriggerTestPaymentsWebhookEventRequest.initialize(this, event_type);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(TriggerTestPaymentsWebhookEventRequest, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, event_type) {
51
+ obj['event_type'] = event_type;
52
+ }
53
+
54
+ /**
55
+ * Constructs a <code>TriggerTestPaymentsWebhookEventRequest</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/TriggerTestPaymentsWebhookEventRequest} obj Optional instance to populate.
59
+ * @return {module:model/TriggerTestPaymentsWebhookEventRequest} The populated <code>TriggerTestPaymentsWebhookEventRequest</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new TriggerTestPaymentsWebhookEventRequest();
66
+ if (data.hasOwnProperty('event_type')) {
67
+ obj['event_type'] = _WebhookEventType["default"].constructFromObject(data['event_type']);
68
+ }
69
+ if (data.hasOwnProperty('override_data')) {
70
+ obj['override_data'] = _ApiClient["default"].convertToType(data['override_data'], Object);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>TriggerTestPaymentsWebhookEventRequest</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TriggerTestPaymentsWebhookEventRequest</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(TriggerTestPaymentsWebhookEventRequest.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ TriggerTestPaymentsWebhookEventRequest.RequiredProperties = ["event_type"];
104
+
105
+ /**
106
+ * @member {module:model/WebhookEventType} event_type
107
+ */
108
+ TriggerTestPaymentsWebhookEventRequest.prototype['event_type'] = undefined;
109
+
110
+ /**
111
+ * An optional object to customize the webhook event payload. Include only the fields you want to override. The provided fields must match the webhook event data structure for the specified event type. For the full event data structure, refer to the `data.data` property in the response of [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). If this property is omitted, a default payload is returned.
112
+ * @member {Object} override_data
113
+ */
114
+ TriggerTestPaymentsWebhookEventRequest.prototype['override_data'] = undefined;
115
+ var _default = exports["default"] = TriggerTestPaymentsWebhookEventRequest;
@@ -84,6 +84,18 @@ var UTXO = /*#__PURE__*/function () {
84
84
  if (data.hasOwnProperty('is_frozen')) {
85
85
  obj['is_frozen'] = _ApiClient["default"].convertToType(data['is_frozen'], 'Boolean');
86
86
  }
87
+ if (data.hasOwnProperty('is_change')) {
88
+ obj['is_change'] = _ApiClient["default"].convertToType(data['is_change'], 'Boolean');
89
+ }
90
+ if (data.hasOwnProperty('chain_id')) {
91
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('object_id')) {
94
+ obj['object_id'] = _ApiClient["default"].convertToType(data['object_id'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('version')) {
97
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
98
+ }
87
99
  }
88
100
  return obj;
89
101
  }
@@ -112,6 +124,18 @@ var UTXO = /*#__PURE__*/function () {
112
124
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
113
125
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
114
126
  }
127
+ // ensure the json data is a string
128
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
129
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['object_id'] && !(typeof data['object_id'] === 'string' || data['object_id'] instanceof String)) {
133
+ throw new Error("Expected the field `object_id` to be a primitive type in the JSON string but got " + data['object_id']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
137
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
138
+ }
115
139
  return true;
116
140
  }
117
141
  }]);
@@ -169,4 +193,28 @@ UTXO.prototype['confirmed_number'] = undefined;
169
193
  * @member {Boolean} is_frozen
170
194
  */
171
195
  UTXO.prototype['is_frozen'] = undefined;
196
+
197
+ /**
198
+ * Whether the UTXO is a change output of a transaction.
199
+ * @member {Boolean} is_change
200
+ */
201
+ UTXO.prototype['is_change'] = undefined;
202
+
203
+ /**
204
+ * The chain ID, which is the unique identifier of a blockchain.
205
+ * @member {String} chain_id
206
+ */
207
+ UTXO.prototype['chain_id'] = undefined;
208
+
209
+ /**
210
+ * The ID of the blockchain object to spend (e.g., SUI Coin object).
211
+ * @member {String} object_id
212
+ */
213
+ UTXO.prototype['object_id'] = undefined;
214
+
215
+ /**
216
+ * Object version number.
217
+ * @member {String} version
218
+ */
219
+ UTXO.prototype['version'] = undefined;
172
220
  var _default = exports["default"] = UTXO;
@@ -110,6 +110,12 @@ var UpdateDestinationBankAccount = /*#__PURE__*/function () {
110
110
  if (data.hasOwnProperty('intermediary_bank_info')) {
111
111
  obj['intermediary_bank_info'] = _IntermediaryBankInfo["default"].constructFromObject(data['intermediary_bank_info']);
112
112
  }
113
+ if (data.hasOwnProperty('country')) {
114
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
115
+ }
116
+ if (data.hasOwnProperty('city')) {
117
+ obj['city'] = _ApiClient["default"].convertToType(data['city'], 'String');
118
+ }
113
119
  }
114
120
  return obj;
115
121
  }
@@ -184,6 +190,14 @@ var UpdateDestinationBankAccount = /*#__PURE__*/function () {
184
190
  _IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
185
191
  }
186
192
  }
193
+ // ensure the json data is a string
194
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
195
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
196
+ }
197
+ // ensure the json data is a string
198
+ if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
199
+ throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
200
+ }
187
201
  return true;
188
202
  }
189
203
  }]);
@@ -254,4 +268,16 @@ UpdateDestinationBankAccount.prototype['further_credit'] = undefined;
254
268
  * @member {module:model/IntermediaryBankInfo} intermediary_bank_info
255
269
  */
256
270
  UpdateDestinationBankAccount.prototype['intermediary_bank_info'] = undefined;
271
+
272
+ /**
273
+ * Beneficiary's country, in ISO 3166-1 alpha-3 format.
274
+ * @member {String} country
275
+ */
276
+ UpdateDestinationBankAccount.prototype['country'] = undefined;
277
+
278
+ /**
279
+ * Beneficiary's city.
280
+ * @member {String} city
281
+ */
282
+ UpdateDestinationBankAccount.prototype['city'] = undefined;
257
283
  var _default = exports["default"] = UpdateDestinationBankAccount;
@@ -235,6 +235,16 @@ var WebhookEventType = exports["default"] = /*#__PURE__*/function () {
235
235
  * @const
236
236
  */
237
237
  _defineProperty(this, "payment.transaction.external.completed", "payment.transaction.external.completed");
238
+ /**
239
+ * value: "payment.transaction.settlement_network.created"
240
+ * @const
241
+ */
242
+ _defineProperty(this, "payment.transaction.settlement_network.created", "payment.transaction.settlement_network.created");
243
+ /**
244
+ * value: "payment.transaction.settlement_network.completed"
245
+ * @const
246
+ */
247
+ _defineProperty(this, "payment.transaction.settlement_network.completed", "payment.transaction.settlement_network.completed");
238
248
  /**
239
249
  * value: "compliance.disposition.status.updated"
240
250
  * @const
@@ -213,8 +213,8 @@ Name | Type | Description | Notes
213
213
  **wallet_id** | **String**| The wallet ID. |
214
214
  **token_id** | **String**| The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional]
215
215
  **task_ids** | **String**| A list of auto-sweep task IDs, separated by comma. | [optional]
216
- **min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
217
- **max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional]
216
+ **min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify &#x60;min_created_timestamp&#x60; without specifying &#x60;max_created_timestamp&#x60;, &#x60;max_created_timestamp&#x60; is automatically set to &#x60;min_created_timestamp&#x60; + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
217
+ **max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify &#x60;max_created_timestamp&#x60; without specifying &#x60;min_created_timestamp&#x60;, &#x60;min_created_timestamp&#x60; is automatically set to &#x60;max_created_timestamp&#x60; - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional]
218
218
  **limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
219
219
  **before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
220
220
  **after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
@@ -15,5 +15,7 @@ Name | Type | Description | Notes
15
15
  **iban_code** | **String** | The IBAN code of the bank account. | [optional]
16
16
  **further_credit** | **String** | The further credit of the bank account. | [optional]
17
17
  **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional]
18
+ **country** | **String** | Beneficiary&#39;s country, in ISO 3166-1 alpha-3 format. | [optional]
19
+ **city** | **String** | Beneficiary&#39;s city. | [optional]
18
20
 
19
21
 
@@ -19,5 +19,7 @@ Name | Type | Description | Notes
19
19
  **bank_account_status** | [**BankAccountStatus**](BankAccountStatus.md) | |
20
20
  **created_timestamp** | **Number** | The created time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
21
21
  **updated_timestamp** | **Number** | The updated time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
22
+ **country** | **String** | Beneficiary&#39;s country, in ISO 3166-1 alpha-3 format. | [optional]
23
+ **city** | **String** | Beneficiary&#39;s city. | [optional]
22
24
 
23
25
 
@@ -24,6 +24,8 @@ Name | Type | Description | Notes
24
24
  **further_credit** | **String** | The further credit of the bank account. | [optional]
25
25
  **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional]
26
26
  **bank_account_status** | [**BankAccountStatus**](BankAccountStatus.md) | |
27
+ **country** | **String** | Beneficiary&#39;s country, in ISO 3166-1 alpha-3 format. | [optional]
28
+ **city** | **String** | Beneficiary&#39;s city. | [optional]
27
29
  **created_timestamp** | **Number** | The created time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
28
30
  **updated_timestamp** | **Number** | The updated time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
29
31
 
@@ -286,8 +286,8 @@ Name | Type | Description | Notes
286
286
  **chain_ids** | **String**| A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). | [optional]
287
287
  **token_ids** | **String**| A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional]
288
288
  **asset_ids** | **String**| (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account. | [optional]
289
- **min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
290
- **max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional]
289
+ **min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify &#x60;min_created_timestamp&#x60; without specifying &#x60;max_created_timestamp&#x60;, &#x60;max_created_timestamp&#x60; is automatically set to &#x60;min_created_timestamp&#x60; + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
290
+ **max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify &#x60;max_created_timestamp&#x60; without specifying &#x60;min_created_timestamp&#x60;, &#x60;min_created_timestamp&#x60; is automatically set to &#x60;max_created_timestamp&#x60; - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional]
291
291
  **limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
292
292
  **before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
293
293
  **after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **bank_name** | **String** | The name of the intermediary bank. |
8
- **bank_address** | **String** | The address of the intermediary bank. |
8
+ **bank_address** | **String** | The address of the intermediary bank. | [optional]
9
9
  **bank_swift_code** | **String** | The SWIFT or BIC code of the intermediary bank. |
10
10
 
11
11
 
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **merchant_id** | **String** | The merchant ID. |
8
8
  **token_id** | **String** | The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format &#x60;{CHAIN}_{TOKEN}&#x60;. |
9
- **acquiring_type** | [**AcquiringType**](AcquiringType.md) | |
9
+ **acquiring_type** | [**AcquiringType**](AcquiringType.md) | | [optional]
10
10
  **total_received_amount** | **String** | The total amount of the token that has been received by the merchant. | [optional]
11
11
  **settled_amount** | **String** | The total amount of the token that has been paid out from the merchant&#39;s balance. | [optional]
12
12
  **payout_amount** | **String** | This field is reserved for future use. | [optional]