@cobo/cobo-waas2 1.24.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +45 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +2 -2
  4. package/dist/api/ComplianceApi.js +132 -2
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/FeeStationApi.js +6 -6
  7. package/dist/api/PaymentApi.js +109 -24
  8. package/dist/api/TokenizationApi.js +122 -4
  9. package/dist/api/TransactionsApi.js +4 -4
  10. package/dist/index.js +217 -14
  11. package/dist/model/AddressesEventData.js +8 -3
  12. package/dist/model/AutoFuelType.js +5 -0
  13. package/dist/model/BalanceUpdateInfoEventData.js +8 -3
  14. package/dist/model/BridgingFee.js +4 -4
  15. package/dist/model/ChainsEventData.js +8 -3
  16. package/dist/model/CommissionFee.js +2 -2
  17. package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
  18. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +305 -0
  19. package/dist/model/CreateCryptoAddressRequest.js +1 -1
  20. package/dist/model/CreateMerchantRequest.js +2 -2
  21. package/dist/model/CreateOrderLinkRequest.js +129 -0
  22. package/dist/model/CreatePaymentOrderRequest.js +21 -8
  23. package/dist/model/CreateRefundLinkRequest.js +129 -0
  24. package/dist/model/CreateRefundRequest.js +2 -2
  25. package/dist/model/CreateSettlement.js +2 -28
  26. package/dist/model/CreateSettlementRequestRequest.js +3 -3
  27. package/dist/model/CustodialTransferDestination.js +1 -1
  28. package/dist/model/FeeStationCheckFeeStationUsage.js +28 -10
  29. package/dist/model/FeeStationCheckFeeStationUsageResponse.js +33 -20
  30. package/dist/model/FeeStationSponsorTransactionDescription.js +125 -0
  31. package/dist/model/FundsStatusType.js +111 -0
  32. package/dist/model/KytScreeningsDecisionsType.js +71 -0
  33. package/dist/model/KytScreeningsEventData.js +155 -0
  34. package/dist/model/KytScreeningsReviewType.js +61 -0
  35. package/dist/model/KytScreeningsTransaction.js +144 -0
  36. package/dist/model/KytScreeningsTransactionType.js +61 -0
  37. package/dist/model/Link.js +125 -0
  38. package/dist/model/LinkDisplayInfo.js +100 -0
  39. package/dist/model/MPCVaultEventData.js +8 -3
  40. package/dist/model/Merchant.js +3 -3
  41. package/dist/model/MerchantBalance.js +1 -1
  42. package/dist/model/Order.js +13 -0
  43. package/dist/model/OrderLinkBusinessInfo.js +261 -0
  44. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +125 -0
  45. package/dist/model/OtcFee.js +3 -3
  46. package/dist/model/PaymentAddressUpdateEventData.js +8 -3
  47. package/dist/model/PaymentEstimateFee.js +4 -4
  48. package/dist/model/PaymentEstimateFee201Response.js +1 -0
  49. package/dist/model/PaymentEstimateFeeRequest.js +2 -1
  50. package/dist/model/PaymentEstimatedFee.js +4 -4
  51. package/dist/model/PaymentOrderEventData.js +26 -3
  52. package/dist/model/PaymentRefundEventData.js +8 -3
  53. package/dist/model/PaymentSettlementEvent.js +12 -7
  54. package/dist/model/PaymentTransactionEventData.js +8 -3
  55. package/dist/model/PspBalance.js +1 -1
  56. package/dist/model/RefundLinkBusinessInfo.js +162 -0
  57. package/dist/model/RefundStatus.js +10 -0
  58. package/dist/model/ReviewStatusType.js +91 -0
  59. package/dist/model/Settlement.js +2 -2
  60. package/dist/model/SubmitKytResponse.js +122 -0
  61. package/dist/model/SubmitKytScreeningsDecisionsBody.js +122 -0
  62. package/dist/model/SubmitKytScreeningsReviewBody.js +122 -0
  63. package/dist/model/SupportedToken.js +1 -1
  64. package/dist/model/SuspendedTokenEventData.js +8 -3
  65. package/dist/model/SwapQuote.js +18 -18
  66. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  67. package/dist/model/TokenListingEventData.js +8 -3
  68. package/dist/model/TokenizationERC20TokenParams.js +5 -5
  69. package/dist/model/{TokenizationTokenPermissionParams.js → TokenizationERC20TokenPermissionParams.js} +23 -23
  70. package/dist/model/TokenizationERC20WrappedTokenParams.js +177 -0
  71. package/dist/model/TokenizationERC20WrappedTokenPermissionParams.js +166 -0
  72. package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +38 -11
  73. package/dist/model/TokenizationIssueTokenParamsTokenParams.js +72 -10
  74. package/dist/model/TokenizationListPermissionsResponse.js +146 -0
  75. package/dist/model/TokenizationListPermissionsResponseDataInner.js +126 -0
  76. package/dist/model/TokenizationOperationType.js +5 -0
  77. package/dist/model/TokenizationPermissionAction.js +66 -0
  78. package/dist/model/TokenizationSOLWrappedTokenParams.js +177 -0
  79. package/dist/model/TokenizationSolWrappedTokenPermissionParams.js +127 -0
  80. package/dist/model/TokenizationTokenDetailInfo.js +51 -5
  81. package/dist/model/TokenizationTokenInfo.js +26 -4
  82. package/dist/model/TokenizationTokenPermissionType.js +5 -0
  83. package/dist/model/TokenizationTokenStandard.js +10 -0
  84. package/dist/model/{TokenizationTokenPermissionsResponse.js → TokenizationUpdateAddressPermissions.js} +51 -53
  85. package/dist/model/TokenizationUpdatePermissionsEstimateFeeParams.js +198 -0
  86. package/dist/model/TokenizationUpdatePermissionsParams.js +145 -0
  87. package/dist/model/TokenizationUpdatePermissionsRequest.js +213 -0
  88. package/dist/model/TokensEventData.js +8 -3
  89. package/dist/model/TransactionCoboCategory.js +35 -0
  90. package/dist/model/TransactionWebhookEventData.js +8 -3
  91. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  92. package/dist/model/WalletInfoEventData.js +8 -3
  93. package/dist/model/WebhookEventData.js +64 -12
  94. package/dist/model/WebhookEventDataType.js +7 -2
  95. package/dist/model/WebhookEventType.js +10 -0
  96. package/docs/AddressesEventData.md +3 -1
  97. package/docs/AutoFuelType.md +2 -0
  98. package/docs/AutoSweepApi.md +2 -2
  99. package/docs/BalanceUpdateInfoEventData.md +3 -1
  100. package/docs/BridgingFee.md +3 -3
  101. package/docs/ChainsEventData.md +3 -1
  102. package/docs/CommissionFee.md +1 -1
  103. package/docs/ComplianceApi.md +158 -1
  104. package/docs/ComplianceDispositionUpdateEventData.md +3 -1
  105. package/docs/ComplianceKytScreeningsUpdateEventData.md +57 -0
  106. package/docs/CreateCryptoAddressRequest.md +1 -1
  107. package/docs/CreateMerchantRequest.md +2 -2
  108. package/docs/CreateOrderLinkRequest.md +10 -0
  109. package/docs/CreatePaymentOrderRequest.md +6 -5
  110. package/docs/CreateRefundLinkRequest.md +10 -0
  111. package/docs/CreateRefundRequest.md +2 -2
  112. package/docs/CreateSettlement.md +1 -3
  113. package/docs/CreateSettlementRequestRequest.md +3 -3
  114. package/docs/DevelopersWebhooksApi.md +1 -1
  115. package/docs/FeeStationApi.md +4 -4
  116. package/docs/FeeStationCheckFeeStationUsage.md +4 -2
  117. package/docs/FeeStationCheckFeeStationUsageResponse.md +4 -3
  118. package/docs/FeeStationSponsorTransactionDescription.md +10 -0
  119. package/docs/FundsStatusType.md +32 -0
  120. package/docs/KytScreeningsDecisionsType.md +16 -0
  121. package/docs/KytScreeningsEventData.md +13 -0
  122. package/docs/KytScreeningsReviewType.md +12 -0
  123. package/docs/KytScreeningsTransaction.md +12 -0
  124. package/docs/KytScreeningsTransactionType.md +12 -0
  125. package/docs/Link.md +10 -0
  126. package/docs/LinkDisplayInfo.md +10 -0
  127. package/docs/MPCVaultEventData.md +3 -1
  128. package/docs/Merchant.md +2 -2
  129. package/docs/MerchantBalance.md +1 -1
  130. package/docs/Order.md +1 -0
  131. package/docs/OrderLinkBusinessInfo.md +19 -0
  132. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +10 -0
  133. package/docs/OtcFee.md +2 -2
  134. package/docs/PaymentAddressUpdateEventData.md +3 -1
  135. package/docs/PaymentApi.md +118 -12
  136. package/docs/PaymentEstimateFee.md +2 -2
  137. package/docs/PaymentEstimateFee201Response.md +1 -1
  138. package/docs/PaymentEstimateFeeRequest.md +1 -1
  139. package/docs/PaymentEstimatedFee.md +2 -2
  140. package/docs/PaymentOrderEventData.md +4 -1
  141. package/docs/PaymentRefundEventData.md +3 -1
  142. package/docs/PaymentSettlementEvent.md +5 -3
  143. package/docs/PaymentTransactionEventData.md +3 -1
  144. package/docs/PspBalance.md +1 -1
  145. package/docs/RefundLinkBusinessInfo.md +13 -0
  146. package/docs/RefundStatus.md +4 -0
  147. package/docs/ReviewStatusType.md +24 -0
  148. package/docs/Settlement.md +2 -2
  149. package/docs/SubmitKytResponse.md +10 -0
  150. package/docs/SubmitKytScreeningsDecisionsBody.md +10 -0
  151. package/docs/SubmitKytScreeningsReviewBody.md +10 -0
  152. package/docs/SupportedToken.md +1 -1
  153. package/docs/SuspendedTokenEventData.md +3 -1
  154. package/docs/SwapQuote.md +10 -10
  155. package/docs/TSSRequestWebhookEventData.md +3 -1
  156. package/docs/TokenListingEventData.md +3 -1
  157. package/docs/TokenizationApi.md +120 -2
  158. package/docs/TokenizationERC20TokenParams.md +1 -1
  159. package/docs/{TokenizationTokenPermissionParams.md → TokenizationERC20TokenPermissionParams.md} +1 -1
  160. package/docs/TokenizationERC20WrappedTokenParams.md +14 -0
  161. package/docs/TokenizationERC20WrappedTokenPermissionParams.md +15 -0
  162. package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -1
  163. package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -1
  164. package/docs/TokenizationListPermissionsResponse.md +10 -0
  165. package/docs/TokenizationListPermissionsResponseDataInner.md +10 -0
  166. package/docs/TokenizationOperationType.md +2 -0
  167. package/docs/TokenizationPermissionAction.md +14 -0
  168. package/docs/TokenizationSOLWrappedTokenParams.md +14 -0
  169. package/docs/TokenizationSolWrappedTokenPermissionParams.md +12 -0
  170. package/docs/TokenizationTokenDetailInfo.md +3 -0
  171. package/docs/TokenizationTokenInfo.md +2 -0
  172. package/docs/TokenizationTokenPermissionType.md +2 -0
  173. package/docs/TokenizationTokenStandard.md +4 -0
  174. package/docs/TokenizationUpdateAddressPermissions.md +11 -0
  175. package/docs/TokenizationUpdatePermissionsEstimateFeeParams.md +13 -0
  176. package/docs/TokenizationUpdatePermissionsParams.md +10 -0
  177. package/docs/TokenizationUpdatePermissionsRequest.md +13 -0
  178. package/docs/TokensEventData.md +3 -1
  179. package/docs/TransactionCoboCategory.md +14 -0
  180. package/docs/TransactionWebhookEventData.md +3 -1
  181. package/docs/TransactionsApi.md +2 -2
  182. package/docs/UpdateMerchantByIdRequest.md +1 -1
  183. package/docs/WalletInfoEventData.md +3 -1
  184. package/docs/WebhookEventData.md +10 -4
  185. package/docs/WebhookEventDataType.md +3 -1
  186. package/docs/WebhookEventType.md +4 -0
  187. package/package.json +1 -1
  188. package/docs/TokenizationTokenPermissionsResponse.md +0 -10
@@ -0,0 +1,125 @@
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 Link model module.
29
+ * @module model/Link
30
+ */
31
+ var Link = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>Link</code>.
34
+ * @alias module:model/Link
35
+ * @param url {String} The base URL of the payment page. This URL should be combined with the `token` parameter to form the complete payment link.
36
+ * @param token {String} The unique payment token that should be appended to the URL as a query parameter. This token authenticates and identifies the specific payment session. The complete payment link should be constructed as: `[url]?token=[token]`
37
+ */
38
+ function Link(url, token) {
39
+ _classCallCheck(this, Link);
40
+ Link.initialize(this, url, token);
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(Link, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, url, token) {
51
+ obj['url'] = url;
52
+ obj['token'] = token;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>Link</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/Link} obj Optional instance to populate.
60
+ * @return {module:model/Link} The populated <code>Link</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new Link();
67
+ if (data.hasOwnProperty('url')) {
68
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('token')) {
71
+ obj['token'] = _ApiClient["default"].convertToType(data['token'], 'String');
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>Link</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Link</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // check to make sure all required properties are present in the JSON string
86
+ var _iterator = _createForOfIteratorHelper(Link.RequiredProperties),
87
+ _step;
88
+ try {
89
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
90
+ var property = _step.value;
91
+ if (!data.hasOwnProperty(property)) {
92
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
93
+ }
94
+ }
95
+ // ensure the json data is a string
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
102
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
103
+ }
104
+ // ensure the json data is a string
105
+ if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) {
106
+ throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']);
107
+ }
108
+ return true;
109
+ }
110
+ }]);
111
+ }();
112
+ Link.RequiredProperties = ["url", "token"];
113
+
114
+ /**
115
+ * The base URL of the payment page. This URL should be combined with the `token` parameter to form the complete payment link.
116
+ * @member {String} url
117
+ */
118
+ Link.prototype['url'] = undefined;
119
+
120
+ /**
121
+ * The unique payment token that should be appended to the URL as a query parameter. This token authenticates and identifies the specific payment session. The complete payment link should be constructed as: `[url]?token=[token]`
122
+ * @member {String} token
123
+ */
124
+ Link.prototype['token'] = undefined;
125
+ var _default = exports["default"] = Link;
@@ -0,0 +1,100 @@
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 LinkDisplayInfo model module.
26
+ * @module model/LinkDisplayInfo
27
+ */
28
+ var LinkDisplayInfo = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>LinkDisplayInfo</code>.
31
+ * @alias module:model/LinkDisplayInfo
32
+ */
33
+ function LinkDisplayInfo() {
34
+ _classCallCheck(this, LinkDisplayInfo);
35
+ LinkDisplayInfo.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(LinkDisplayInfo, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>LinkDisplayInfo</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/LinkDisplayInfo} obj Optional instance to populate.
52
+ * @return {module:model/LinkDisplayInfo} The populated <code>LinkDisplayInfo</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new LinkDisplayInfo();
59
+ if (data.hasOwnProperty('developer_name')) {
60
+ obj['developer_name'] = _ApiClient["default"].convertToType(data['developer_name'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('logo')) {
63
+ obj['logo'] = _ApiClient["default"].convertToType(data['logo'], 'String');
64
+ }
65
+ }
66
+ return obj;
67
+ }
68
+
69
+ /**
70
+ * Validates the JSON data with respect to <code>LinkDisplayInfo</code>.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>LinkDisplayInfo</code>.
73
+ */
74
+ }, {
75
+ key: "validateJSON",
76
+ value: function validateJSON(data) {
77
+ // ensure the json data is a string
78
+ if (data['developer_name'] && !(typeof data['developer_name'] === 'string' || data['developer_name'] instanceof String)) {
79
+ throw new Error("Expected the field `developer_name` to be a primitive type in the JSON string but got " + data['developer_name']);
80
+ }
81
+ // ensure the json data is a string
82
+ if (data['logo'] && !(typeof data['logo'] === 'string' || data['logo'] instanceof String)) {
83
+ throw new Error("Expected the field `logo` to be a primitive type in the JSON string but got " + data['logo']);
84
+ }
85
+ return true;
86
+ }
87
+ }]);
88
+ }();
89
+ /**
90
+ * The brand name to display to end users during the payment process.
91
+ * @member {String} developer_name
92
+ */
93
+ LinkDisplayInfo.prototype['developer_name'] = undefined;
94
+
95
+ /**
96
+ * The URL of your logo image to display to end users during the payment process.
97
+ * @member {String} logo
98
+ */
99
+ LinkDisplayInfo.prototype['logo'] = undefined;
100
+ var _default = exports["default"] = LinkDisplayInfo;
@@ -38,7 +38,7 @@ var MPCVaultEventData = /*#__PURE__*/function () {
38
38
  * @alias module:model/MPCVaultEventData
39
39
  * @implements module:model/WebhookEventDataType
40
40
  * @implements module:model/MPCVault
41
- * @param data_type {module:model/MPCVaultEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
41
+ * @param data_type {module:model/MPCVaultEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
42
42
  */
43
43
  function MPCVaultEventData(data_type) {
44
44
  _classCallCheck(this, MPCVaultEventData);
@@ -164,7 +164,7 @@ var MPCVaultEventData = /*#__PURE__*/function () {
164
164
  MPCVaultEventData.RequiredProperties = ["data_type"];
165
165
 
166
166
  /**
167
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
167
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
168
168
  * @member {module:model/MPCVaultEventData.DataTypeEnum} data_type
169
169
  */
170
170
  MPCVaultEventData.prototype['data_type'] = undefined;
@@ -205,7 +205,7 @@ MPCVaultEventData.prototype['created_timestamp'] = undefined;
205
205
 
206
206
  // Implement WebhookEventDataType interface:
207
207
  /**
208
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
208
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
209
209
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
210
210
  */
211
211
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -325,6 +325,11 @@ MPCVaultEventData['DataTypeEnum'] = {
325
325
  * @const
326
326
  */
327
327
  "ComplianceDisposition": "ComplianceDisposition",
328
+ /**
329
+ * value: "ComplianceKytScreenings"
330
+ * @const
331
+ */
332
+ "ComplianceKytScreenings": "ComplianceKytScreenings",
328
333
  /**
329
334
  * value: "unknown_default_open_api"
330
335
  * @const
@@ -35,7 +35,7 @@ var Merchant = /*#__PURE__*/function () {
35
35
  * @alias module:model/Merchant
36
36
  * @param merchant_id {String} The merchant ID.
37
37
  * @param name {String} The merchant name.
38
- * @param wallet_id {String} The ID of the linked wallet.
38
+ * @param wallet_id {String} This field has been deprecated.
39
39
  */
40
40
  function Merchant(merchant_id, name, wallet_id) {
41
41
  _classCallCheck(this, Merchant);
@@ -150,13 +150,13 @@ Merchant.prototype['merchant_id'] = undefined;
150
150
  Merchant.prototype['name'] = undefined;
151
151
 
152
152
  /**
153
- * The ID of the linked wallet.
153
+ * This field has been deprecated.
154
154
  * @member {String} wallet_id
155
155
  */
156
156
  Merchant.prototype['wallet_id'] = undefined;
157
157
 
158
158
  /**
159
- * The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate.
159
+ * The developer fee rate applied to this merchant.
160
160
  * @member {String} developer_fee_rate
161
161
  */
162
162
  Merchant.prototype['developer_fee_rate'] = undefined;
@@ -188,7 +188,7 @@ MerchantBalance.prototype['settled_amount'] = undefined;
188
188
  MerchantBalance.prototype['refunded_amount'] = undefined;
189
189
 
190
190
  /**
191
- * The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances)
191
+ * The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances)
192
192
  * @member {String} total_balance
193
193
  */
194
194
  MerchantBalance.prototype['total_balance'] = undefined;
@@ -144,6 +144,9 @@ var Order = /*#__PURE__*/function () {
144
144
  if (data.hasOwnProperty('settlement_status')) {
145
145
  obj['settlement_status'] = _SettleStatus["default"].constructFromObject(data['settlement_status']);
146
146
  }
147
+ if (data.hasOwnProperty('amount_tolerance')) {
148
+ obj['amount_tolerance'] = _ApiClient["default"].convertToType(data['amount_tolerance'], 'String');
149
+ }
147
150
  }
148
151
  return obj;
149
152
  }
@@ -244,6 +247,10 @@ var Order = /*#__PURE__*/function () {
244
247
  }
245
248
  ;
246
249
  }
250
+ // ensure the json data is a string
251
+ if (data['amount_tolerance'] && !(typeof data['amount_tolerance'] === 'string' || data['amount_tolerance'] instanceof String)) {
252
+ throw new Error("Expected the field `amount_tolerance` to be a primitive type in the JSON string but got " + data['amount_tolerance']);
253
+ }
247
254
  return true;
248
255
  }
249
256
  }]);
@@ -361,4 +368,10 @@ Order.prototype['transactions'] = undefined;
361
368
  * @member {module:model/SettleStatus} settlement_status
362
369
  */
363
370
  Order.prototype['settlement_status'] = undefined;
371
+
372
+ /**
373
+ * The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`.
374
+ * @member {String} amount_tolerance
375
+ */
376
+ Order.prototype['amount_tolerance'] = undefined;
364
377
  var _default = exports["default"] = Order;
@@ -0,0 +1,261 @@
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 _OrderLinkBusinessInfoCustomExchangeRatesInner = _interopRequireDefault(require("./OrderLinkBusinessInfoCustomExchangeRatesInner"));
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 OrderLinkBusinessInfo model module.
30
+ * @module model/OrderLinkBusinessInfo
31
+ */
32
+ var OrderLinkBusinessInfo = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>OrderLinkBusinessInfo</code>.
35
+ * @alias module:model/OrderLinkBusinessInfo
36
+ * @param token_ids {Array.<String>} An array of token IDs representing the cryptocurrencies and chains available for payment. These options will be shown to users on the payment page for them to choose from. Supported token IDs include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
37
+ * @param currency {String} The currency in which both the order amount (`order_amount`) and the developer fee (`fee_amount`) are denominated. Only the following values are supported: `USD`, `USDT`, or `USDC`.
38
+ * @param fee_amount {String} The developer fee for the order, denominated in the currency specified by `currency`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
39
+ * @param merchant_id {String} The merchant ID.
40
+ * @param order_amount {String} The base amount of the order, excluding the developer fee (specified in `fee_amount`), denominated in the currency specified by `currency`. Values must be greater than `0` and contain two decimal places.
41
+ * @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.
42
+ */
43
+ function OrderLinkBusinessInfo(token_ids, currency, fee_amount, merchant_id, order_amount, psp_order_code) {
44
+ _classCallCheck(this, OrderLinkBusinessInfo);
45
+ OrderLinkBusinessInfo.initialize(this, token_ids, currency, fee_amount, merchant_id, order_amount, psp_order_code);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(OrderLinkBusinessInfo, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, token_ids, currency, fee_amount, merchant_id, order_amount, psp_order_code) {
56
+ obj['token_ids'] = token_ids;
57
+ obj['currency'] = currency;
58
+ obj['fee_amount'] = fee_amount;
59
+ obj['merchant_id'] = merchant_id;
60
+ obj['order_amount'] = order_amount;
61
+ obj['psp_order_code'] = psp_order_code;
62
+ }
63
+
64
+ /**
65
+ * Constructs a <code>OrderLinkBusinessInfo</code> from a plain JavaScript object, optionally creating a new instance.
66
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
67
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
68
+ * @param {module:model/OrderLinkBusinessInfo} obj Optional instance to populate.
69
+ * @return {module:model/OrderLinkBusinessInfo} The populated <code>OrderLinkBusinessInfo</code> instance.
70
+ */
71
+ }, {
72
+ key: "constructFromObject",
73
+ value: function constructFromObject(data, obj) {
74
+ if (data) {
75
+ obj = obj || new OrderLinkBusinessInfo();
76
+ if (data.hasOwnProperty('token_ids')) {
77
+ obj['token_ids'] = _ApiClient["default"].convertToType(data['token_ids'], ['String']);
78
+ }
79
+ if (data.hasOwnProperty('custom_exchange_rates')) {
80
+ obj['custom_exchange_rates'] = _ApiClient["default"].convertToType(data['custom_exchange_rates'], [_OrderLinkBusinessInfoCustomExchangeRatesInner["default"]]);
81
+ }
82
+ if (data.hasOwnProperty('currency')) {
83
+ obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('fee_amount')) {
86
+ obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('merchant_id')) {
89
+ obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
90
+ }
91
+ if (data.hasOwnProperty('order_amount')) {
92
+ obj['order_amount'] = _ApiClient["default"].convertToType(data['order_amount'], 'String');
93
+ }
94
+ if (data.hasOwnProperty('merchant_order_code')) {
95
+ obj['merchant_order_code'] = _ApiClient["default"].convertToType(data['merchant_order_code'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('psp_order_code')) {
98
+ obj['psp_order_code'] = _ApiClient["default"].convertToType(data['psp_order_code'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('expired_in')) {
101
+ obj['expired_in'] = _ApiClient["default"].convertToType(data['expired_in'], 'Number');
102
+ }
103
+ if (data.hasOwnProperty('use_dedicated_address')) {
104
+ obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
105
+ }
106
+ if (data.hasOwnProperty('amount_tolerance')) {
107
+ obj['amount_tolerance'] = _ApiClient["default"].convertToType(data['amount_tolerance'], 'String');
108
+ }
109
+ }
110
+ return obj;
111
+ }
112
+
113
+ /**
114
+ * Validates the JSON data with respect to <code>OrderLinkBusinessInfo</code>.
115
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
116
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>OrderLinkBusinessInfo</code>.
117
+ */
118
+ }, {
119
+ key: "validateJSON",
120
+ value: function validateJSON(data) {
121
+ // check to make sure all required properties are present in the JSON string
122
+ var _iterator = _createForOfIteratorHelper(OrderLinkBusinessInfo.RequiredProperties),
123
+ _step;
124
+ try {
125
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
126
+ var property = _step.value;
127
+ if (!data.hasOwnProperty(property)) {
128
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
129
+ }
130
+ }
131
+ // ensure the json data is an array
132
+ } catch (err) {
133
+ _iterator.e(err);
134
+ } finally {
135
+ _iterator.f();
136
+ }
137
+ if (!Array.isArray(data['token_ids'])) {
138
+ throw new Error("Expected the field `token_ids` to be an array in the JSON data but got " + data['token_ids']);
139
+ }
140
+ if (data['custom_exchange_rates']) {
141
+ // data not null
142
+ // ensure the json data is an array
143
+ if (!Array.isArray(data['custom_exchange_rates'])) {
144
+ throw new Error("Expected the field `custom_exchange_rates` to be an array in the JSON data but got " + data['custom_exchange_rates']);
145
+ }
146
+ // validate the optional field `custom_exchange_rates` (array)
147
+ var _iterator2 = _createForOfIteratorHelper(data['custom_exchange_rates']),
148
+ _step2;
149
+ try {
150
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
151
+ var item = _step2.value;
152
+ _OrderLinkBusinessInfoCustomExchangeRatesInner["default"].validateJSON(item);
153
+ }
154
+ } catch (err) {
155
+ _iterator2.e(err);
156
+ } finally {
157
+ _iterator2.f();
158
+ }
159
+ ;
160
+ }
161
+ // ensure the json data is a string
162
+ if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
163
+ throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
164
+ }
165
+ // ensure the json data is a string
166
+ if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
167
+ throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
168
+ }
169
+ // ensure the json data is a string
170
+ if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
171
+ throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
172
+ }
173
+ // ensure the json data is a string
174
+ if (data['order_amount'] && !(typeof data['order_amount'] === 'string' || data['order_amount'] instanceof String)) {
175
+ throw new Error("Expected the field `order_amount` to be a primitive type in the JSON string but got " + data['order_amount']);
176
+ }
177
+ // ensure the json data is a string
178
+ if (data['merchant_order_code'] && !(typeof data['merchant_order_code'] === 'string' || data['merchant_order_code'] instanceof String)) {
179
+ throw new Error("Expected the field `merchant_order_code` to be a primitive type in the JSON string but got " + data['merchant_order_code']);
180
+ }
181
+ // ensure the json data is a string
182
+ if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
183
+ throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
184
+ }
185
+ // ensure the json data is a string
186
+ if (data['amount_tolerance'] && !(typeof data['amount_tolerance'] === 'string' || data['amount_tolerance'] instanceof String)) {
187
+ throw new Error("Expected the field `amount_tolerance` to be a primitive type in the JSON string but got " + data['amount_tolerance']);
188
+ }
189
+ return true;
190
+ }
191
+ }]);
192
+ }();
193
+ OrderLinkBusinessInfo.RequiredProperties = ["token_ids", "currency", "fee_amount", "merchant_id", "order_amount", "psp_order_code"];
194
+
195
+ /**
196
+ * An array of token IDs representing the cryptocurrencies and chains available for payment. These options will be shown to users on the payment page for them to choose from. Supported token IDs include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
197
+ * @member {Array.<String>} token_ids
198
+ */
199
+ OrderLinkBusinessInfo.prototype['token_ids'] = undefined;
200
+
201
+ /**
202
+ * A list of custom exchange rates defining how much one unit of a specific cryptocurrency (`token_id`) is valued in the selected fiat or crypto currency (`currency`). If this field is omitted, the system’s default exchange rates will apply. Each item specifies a `token_id` and its corresponding `exchange_rate`. For example, to treat 1 USDT (on Ethereum) as equivalent to 0.99 USD, provide: ```json { \"custom_exchange_rates\": [ { \"token_id\": \"ETH_USDT\", \"exchange_rate\": \"0.99\" } ], \"currency\": \"USD\" } ```
203
+ * @member {Array.<module:model/OrderLinkBusinessInfoCustomExchangeRatesInner>} custom_exchange_rates
204
+ */
205
+ OrderLinkBusinessInfo.prototype['custom_exchange_rates'] = undefined;
206
+
207
+ /**
208
+ * The currency in which both the order amount (`order_amount`) and the developer fee (`fee_amount`) are denominated. Only the following values are supported: `USD`, `USDT`, or `USDC`.
209
+ * @member {String} currency
210
+ */
211
+ OrderLinkBusinessInfo.prototype['currency'] = undefined;
212
+
213
+ /**
214
+ * The developer fee for the order, denominated in the currency specified by `currency`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
215
+ * @member {String} fee_amount
216
+ */
217
+ OrderLinkBusinessInfo.prototype['fee_amount'] = undefined;
218
+
219
+ /**
220
+ * The merchant ID.
221
+ * @member {String} merchant_id
222
+ */
223
+ OrderLinkBusinessInfo.prototype['merchant_id'] = undefined;
224
+
225
+ /**
226
+ * The base amount of the order, excluding the developer fee (specified in `fee_amount`), denominated in the currency specified by `currency`. Values must be greater than `0` and contain two decimal places.
227
+ * @member {String} order_amount
228
+ */
229
+ OrderLinkBusinessInfo.prototype['order_amount'] = undefined;
230
+
231
+ /**
232
+ * A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters.
233
+ * @member {String} merchant_order_code
234
+ */
235
+ OrderLinkBusinessInfo.prototype['merchant_order_code'] = undefined;
236
+
237
+ /**
238
+ * 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.
239
+ * @member {String} psp_order_code
240
+ */
241
+ OrderLinkBusinessInfo.prototype['psp_order_code'] = undefined;
242
+
243
+ /**
244
+ * The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event.
245
+ * @member {Number} expired_in
246
+ * @default 1800
247
+ */
248
+ OrderLinkBusinessInfo.prototype['expired_in'] = 1800;
249
+
250
+ /**
251
+ * This field has been deprecated.
252
+ * @member {Boolean} use_dedicated_address
253
+ */
254
+ OrderLinkBusinessInfo.prototype['use_dedicated_address'] = undefined;
255
+
256
+ /**
257
+ * The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`.
258
+ * @member {String} amount_tolerance
259
+ */
260
+ OrderLinkBusinessInfo.prototype['amount_tolerance'] = undefined;
261
+ var _default = exports["default"] = OrderLinkBusinessInfo;