@cobo/cobo-waas2 1.34.0 → 1.36.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 (71) hide show
  1. package/README.md +28 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/PaymentApi.js +126 -91
  4. package/dist/api/TravelRuleApi.js +293 -6
  5. package/dist/index.js +133 -7
  6. package/dist/model/AddressVerification.js +172 -0
  7. package/dist/model/AddressVerificationDetail.js +204 -0
  8. package/dist/model/AddressVerificationDetailSatoshiTestDetail.js +299 -0
  9. package/dist/model/AddressVerificationDetailSignatureDetail.js +172 -0
  10. package/dist/model/AddressVerificationMethod.js +61 -0
  11. package/dist/model/AddressVerificationStatus.js +66 -0
  12. package/dist/model/ApprovalUserDetail.js +9 -0
  13. package/dist/model/{UpdateBankAccountByIdRequest.js → CancelSatoshiTestChallengeRequest.js} +31 -28
  14. package/dist/model/ChainInfo.js +13 -0
  15. package/dist/model/CreateBulkSendRequest.js +13 -0
  16. package/dist/model/CreateSatoshiTestChallengeRequest.js +176 -0
  17. package/dist/model/GetTransactionLimitation200Response.js +10 -1
  18. package/dist/model/ListAddressVerifications200Response.js +147 -0
  19. package/dist/model/ListBulkSends200Response.js +123 -0
  20. package/dist/model/ListPayerTransactions200Response.js +123 -0
  21. package/dist/model/ListTopUpPayers200ResponseDataInner.js +14 -1
  22. package/dist/model/OrderLinkBusinessInfo.js +2 -2
  23. package/dist/model/OriginalMainGroupHandling.js +61 -0
  24. package/dist/model/PaymentBulkSend.js +13 -0
  25. package/dist/model/PaymentBulkSendEvent.js +18 -0
  26. package/dist/model/SatoshiTestCancelResult.js +144 -0
  27. package/dist/model/SatoshiTestChallenge.js +239 -0
  28. package/dist/model/SatoshiTestChallengeAction.js +61 -0
  29. package/dist/model/SatoshiTestChallengeStatus.js +81 -0
  30. package/dist/model/SignatureChallenge.js +137 -0
  31. package/dist/model/SignatureDetail.js +146 -0
  32. package/dist/model/TransactionCoboCategory.js +20 -0
  33. package/dist/model/TravelRuleTransactionType.js +61 -0
  34. package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +9 -0
  35. package/dist/model/WebhookEventData.js +1 -1
  36. package/dist/model/WebhookEventType.js +5 -0
  37. package/docs/AddressVerification.md +14 -0
  38. package/docs/AddressVerificationDetail.md +16 -0
  39. package/docs/AddressVerificationDetailSatoshiTestDetail.md +19 -0
  40. package/docs/AddressVerificationDetailSignatureDetail.md +12 -0
  41. package/docs/AddressVerificationMethod.md +12 -0
  42. package/docs/AddressVerificationStatus.md +14 -0
  43. package/docs/ApprovalUserDetail.md +1 -0
  44. package/docs/CancelSatoshiTestChallengeRequest.md +9 -0
  45. package/docs/ChainInfo.md +1 -0
  46. package/docs/CreateBulkSendRequest.md +1 -0
  47. package/docs/CreateSatoshiTestChallengeRequest.md +14 -0
  48. package/docs/GetTransactionLimitation200Response.md +2 -1
  49. package/docs/ListAddressVerifications200Response.md +10 -0
  50. package/docs/ListBulkSends200Response.md +10 -0
  51. package/docs/ListPayerTransactions200Response.md +10 -0
  52. package/docs/ListTopUpPayers200ResponseDataInner.md +2 -1
  53. package/docs/OrderLinkBusinessInfo.md +1 -1
  54. package/docs/OriginalMainGroupHandling.md +12 -0
  55. package/docs/PaymentApi.md +107 -83
  56. package/docs/PaymentBulkSend.md +1 -0
  57. package/docs/PaymentBulkSendEvent.md +1 -0
  58. package/docs/SatoshiTestCancelResult.md +21 -0
  59. package/docs/SatoshiTestChallenge.md +19 -0
  60. package/docs/SatoshiTestChallengeAction.md +12 -0
  61. package/docs/SatoshiTestChallengeStatus.md +20 -0
  62. package/docs/SignatureChallenge.md +11 -0
  63. package/docs/SignatureDetail.md +12 -0
  64. package/docs/TransactionCoboCategory.md +8 -0
  65. package/docs/TravelRuleApi.md +325 -1
  66. package/docs/TravelRuleTransactionType.md +12 -0
  67. package/docs/UpdateKeyShareHolderGroupByIdRequest.md +1 -0
  68. package/docs/WebhookEventData.md +1 -1
  69. package/docs/WebhookEventType.md +2 -0
  70. package/package.json +1 -1
  71. package/docs/UpdateBankAccountByIdRequest.md +0 -9
@@ -0,0 +1,123 @@
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 _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _PaymentBulkSend = _interopRequireDefault(require("./PaymentBulkSend"));
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 ListBulkSends200Response model module.
31
+ * @module model/ListBulkSends200Response
32
+ */
33
+ var ListBulkSends200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListBulkSends200Response</code>.
36
+ * @alias module:model/ListBulkSends200Response
37
+ */
38
+ function ListBulkSends200Response() {
39
+ _classCallCheck(this, ListBulkSends200Response);
40
+ ListBulkSends200Response.initialize(this);
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(ListBulkSends200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListBulkSends200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListBulkSends200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListBulkSends200Response} The populated <code>ListBulkSends200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListBulkSends200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_PaymentBulkSend["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListBulkSends200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBulkSends200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _PaymentBulkSend["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/PaymentBulkSend>} data
116
+ */
117
+ ListBulkSends200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListBulkSends200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListBulkSends200Response;
@@ -0,0 +1,123 @@
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 _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
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 ListPayerTransactions200Response model module.
31
+ * @module model/ListPayerTransactions200Response
32
+ */
33
+ var ListPayerTransactions200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListPayerTransactions200Response</code>.
36
+ * @alias module:model/ListPayerTransactions200Response
37
+ */
38
+ function ListPayerTransactions200Response() {
39
+ _classCallCheck(this, ListPayerTransactions200Response);
40
+ ListPayerTransactions200Response.initialize(this);
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(ListPayerTransactions200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListPayerTransactions200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListPayerTransactions200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListPayerTransactions200Response} The populated <code>ListPayerTransactions200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListPayerTransactions200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_PaymentTransaction["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListPayerTransactions200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListPayerTransactions200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _PaymentTransaction["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/PaymentTransaction>} data
116
+ */
117
+ ListPayerTransactions200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListPayerTransactions200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListPayerTransactions200Response;
@@ -73,6 +73,9 @@ var ListTopUpPayers200ResponseDataInner = /*#__PURE__*/function () {
73
73
  if (data.hasOwnProperty('payer_id')) {
74
74
  obj['payer_id'] = _ApiClient["default"].convertToType(data['payer_id'], 'String');
75
75
  }
76
+ if (data.hasOwnProperty('custom_payer_id')) {
77
+ obj['custom_payer_id'] = _ApiClient["default"].convertToType(data['custom_payer_id'], 'String');
78
+ }
76
79
  if (data.hasOwnProperty('developer_fee_rate')) {
77
80
  obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
78
81
  }
@@ -121,6 +124,10 @@ var ListTopUpPayers200ResponseDataInner = /*#__PURE__*/function () {
121
124
  throw new Error("Expected the field `payer_id` to be a primitive type in the JSON string but got " + data['payer_id']);
122
125
  }
123
126
  // ensure the json data is a string
127
+ if (data['custom_payer_id'] && !(typeof data['custom_payer_id'] === 'string' || data['custom_payer_id'] instanceof String)) {
128
+ throw new Error("Expected the field `custom_payer_id` to be a primitive type in the JSON string but got " + data['custom_payer_id']);
129
+ }
130
+ // ensure the json data is a string
124
131
  if (data['developer_fee_rate'] && !(typeof data['developer_fee_rate'] === 'string' || data['developer_fee_rate'] instanceof String)) {
125
132
  throw new Error("Expected the field `developer_fee_rate` to be a primitive type in the JSON string but got " + data['developer_fee_rate']);
126
133
  }
@@ -163,6 +170,12 @@ ListTopUpPayers200ResponseDataInner.prototype['merchant_id'] = undefined;
163
170
  */
164
171
  ListTopUpPayers200ResponseDataInner.prototype['payer_id'] = undefined;
165
172
 
173
+ /**
174
+ * Unique user identifier on the merchant side, used to assign a dedicated deposit address.
175
+ * @member {String} custom_payer_id
176
+ */
177
+ ListTopUpPayers200ResponseDataInner.prototype['custom_payer_id'] = undefined;
178
+
166
179
  /**
167
180
  * The developer fee rate applied to top-up transactions made by this payer. Expressed as a decimal string where \"0.1\" represents 10%.
168
181
  * @member {String} developer_fee_rate
@@ -182,7 +195,7 @@ ListTopUpPayers200ResponseDataInner.prototype['created_timestamp'] = undefined;
182
195
  ListTopUpPayers200ResponseDataInner.prototype['updated_timestamp'] = undefined;
183
196
 
184
197
  /**
185
- * An array of top-up transactions associated with this payer.
198
+ * An array of transactions associated with this payer. <Note>This field returns up to the latest 200 transactions only and will be removed in a future version. Use the dedicated payer transactions API to paginate through transactions.</Note>
186
199
  * @member {Array.<module:model/PaymentTransaction>} transactions
187
200
  */
188
201
  ListTopUpPayers200ResponseDataInner.prototype['transactions'] = undefined;
@@ -36,7 +36,7 @@ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
36
36
  * @alias module:model/OrderLinkBusinessInfo
37
37
  * @param merchant_id {String} The merchant ID.
38
38
  * @param psp_order_code {String} A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters.
39
- * @param pricing_currency {String} The pricing currency that denominates `pricing_amount` and `fee_amount`. Currently, only `USD`/`USDT`/`USDC` are supported. This field is required.
39
+ * @param pricing_currency {String} The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com//payments/en/guides/supported-chains-and-tokens#pricing-currency).
40
40
  * @param pricing_amount {String} The base amount of the order, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
41
41
  * @param fee_amount {String} The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.
42
42
  * @param payable_currencies {Array.<String>} The IDs of the cryptocurrencies used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
@@ -257,7 +257,7 @@ OrderLinkBusinessInfo.prototype['merchant_order_code'] = undefined;
257
257
  OrderLinkBusinessInfo.prototype['psp_order_code'] = undefined;
258
258
 
259
259
  /**
260
- * The pricing currency that denominates `pricing_amount` and `fee_amount`. Currently, only `USD`/`USDT`/`USDC` are supported. This field is required.
260
+ * The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com//payments/en/guides/supported-chains-and-tokens#pricing-currency).
261
261
  * @member {String} pricing_currency
262
262
  */
263
263
  OrderLinkBusinessInfo.prototype['pricing_currency'] = undefined;
@@ -0,0 +1,61 @@
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 OriginalMainGroupHandling.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var OriginalMainGroupHandling = exports["default"] = /*#__PURE__*/function () {
31
+ function OriginalMainGroupHandling() {
32
+ _classCallCheck(this, OriginalMainGroupHandling);
33
+ /**
34
+ * value: "Invalidate"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Invalidate", "Invalidate");
38
+ /**
39
+ * value: "ConvertToSigningGroup"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "ConvertToSigningGroup", "ConvertToSigningGroup");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(OriginalMainGroupHandling, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>OriginalMainGroupHandling</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/OriginalMainGroupHandling} The enum <code>OriginalMainGroupHandling</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -77,6 +77,9 @@ var PaymentBulkSend = /*#__PURE__*/function () {
77
77
  if (data.hasOwnProperty('bulk_send_id')) {
78
78
  obj['bulk_send_id'] = _ApiClient["default"].convertToType(data['bulk_send_id'], 'String');
79
79
  }
80
+ if (data.hasOwnProperty('request_id')) {
81
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
82
+ }
80
83
  if (data.hasOwnProperty('source_account')) {
81
84
  obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
82
85
  }
@@ -127,6 +130,10 @@ var PaymentBulkSend = /*#__PURE__*/function () {
127
130
  throw new Error("Expected the field `bulk_send_id` to be a primitive type in the JSON string but got " + data['bulk_send_id']);
128
131
  }
129
132
  // ensure the json data is a string
133
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
134
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
135
+ }
136
+ // ensure the json data is a string
130
137
  if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
131
138
  throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
132
139
  }
@@ -146,6 +153,12 @@ PaymentBulkSend.RequiredProperties = ["bulk_send_id", "source_account", "executi
146
153
  */
147
154
  PaymentBulkSend.prototype['bulk_send_id'] = undefined;
148
155
 
156
+ /**
157
+ * The request ID.
158
+ * @member {String} request_id
159
+ */
160
+ PaymentBulkSend.prototype['request_id'] = undefined;
161
+
149
162
  /**
150
163
  * The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
151
164
  * @member {String} source_account
@@ -90,6 +90,9 @@ var PaymentBulkSendEvent = /*#__PURE__*/function () {
90
90
  if (data.hasOwnProperty('bulk_send_id')) {
91
91
  obj['bulk_send_id'] = _ApiClient["default"].convertToType(data['bulk_send_id'], 'String');
92
92
  }
93
+ if (data.hasOwnProperty('request_id')) {
94
+ obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
95
+ }
93
96
  if (data.hasOwnProperty('source_account')) {
94
97
  obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
95
98
  }
@@ -144,6 +147,10 @@ var PaymentBulkSendEvent = /*#__PURE__*/function () {
144
147
  throw new Error("Expected the field `bulk_send_id` to be a primitive type in the JSON string but got " + data['bulk_send_id']);
145
148
  }
146
149
  // ensure the json data is a string
150
+ if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
151
+ throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
152
+ }
153
+ // ensure the json data is a string
147
154
  if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
148
155
  throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
149
156
  }
@@ -169,6 +176,12 @@ PaymentBulkSendEvent.prototype['data_type'] = undefined;
169
176
  */
170
177
  PaymentBulkSendEvent.prototype['bulk_send_id'] = undefined;
171
178
 
179
+ /**
180
+ * The request ID.
181
+ * @member {String} request_id
182
+ */
183
+ PaymentBulkSendEvent.prototype['request_id'] = undefined;
184
+
172
185
  /**
173
186
  * The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
174
187
  * @member {String} source_account
@@ -215,6 +228,11 @@ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
215
228
  * @member {String} bulk_send_id
216
229
  */
217
230
  _PaymentBulkSend["default"].prototype['bulk_send_id'] = undefined;
231
+ /**
232
+ * The request ID.
233
+ * @member {String} request_id
234
+ */
235
+ _PaymentBulkSend["default"].prototype['request_id'] = undefined;
218
236
  /**
219
237
  * The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
220
238
  * @member {String} source_account
@@ -0,0 +1,144 @@
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 SatoshiTestCancelResult model module.
29
+ * @module model/SatoshiTestCancelResult
30
+ */
31
+ var SatoshiTestCancelResult = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>SatoshiTestCancelResult</code>.
34
+ * Returned by [Cancel Satoshi Test challenge](#operation/cancel_satoshi_test_challenge).
35
+ * @alias module:model/SatoshiTestCancelResult
36
+ * @param challenge_id {String} The challenge that was cancelled.
37
+ * @param status {module:model/SatoshiTestCancelResult.StatusEnum} Final status after cancellation.
38
+ */
39
+ function SatoshiTestCancelResult(challenge_id, status) {
40
+ _classCallCheck(this, SatoshiTestCancelResult);
41
+ SatoshiTestCancelResult.initialize(this, challenge_id, status);
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(SatoshiTestCancelResult, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, challenge_id, status) {
52
+ obj['challenge_id'] = challenge_id;
53
+ obj['status'] = status;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>SatoshiTestCancelResult</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/SatoshiTestCancelResult} obj Optional instance to populate.
61
+ * @return {module:model/SatoshiTestCancelResult} The populated <code>SatoshiTestCancelResult</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new SatoshiTestCancelResult();
68
+ if (data.hasOwnProperty('challenge_id')) {
69
+ obj['challenge_id'] = _ApiClient["default"].convertToType(data['challenge_id'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('status')) {
72
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>SatoshiTestCancelResult</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SatoshiTestCancelResult</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(SatoshiTestCancelResult.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['challenge_id'] && !(typeof data['challenge_id'] === 'string' || data['challenge_id'] instanceof String)) {
103
+ throw new Error("Expected the field `challenge_id` to be a primitive type in the JSON string but got " + data['challenge_id']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
107
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ SatoshiTestCancelResult.RequiredProperties = ["challenge_id", "status"];
114
+
115
+ /**
116
+ * The challenge that was cancelled.
117
+ * @member {String} challenge_id
118
+ */
119
+ SatoshiTestCancelResult.prototype['challenge_id'] = undefined;
120
+
121
+ /**
122
+ * Final status after cancellation.
123
+ * @member {module:model/SatoshiTestCancelResult.StatusEnum} status
124
+ */
125
+ SatoshiTestCancelResult.prototype['status'] = undefined;
126
+
127
+ /**
128
+ * Allowed values for the <code>status</code> property.
129
+ * @enum {String}
130
+ * @readonly
131
+ */
132
+ SatoshiTestCancelResult['StatusEnum'] = {
133
+ /**
134
+ * value: "DELETED"
135
+ * @const
136
+ */
137
+ "DELETED": "DELETED",
138
+ /**
139
+ * value: "unknown_default_open_api"
140
+ * @const
141
+ */
142
+ "unknown_default_open_api": "unknown_default_open_api"
143
+ };
144
+ var _default = exports["default"] = SatoshiTestCancelResult;