@cobo/cobo-waas2 1.23.0 → 1.25.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 (243) hide show
  1. package/README.md +68 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +6 -6
  4. package/dist/api/ComplianceApi.js +132 -2
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/FeeStationApi.js +47 -4
  7. package/dist/api/PaymentApi.js +246 -56
  8. package/dist/api/SwapsApi.js +374 -0
  9. package/dist/api/TransactionsApi.js +4 -4
  10. package/dist/index.js +336 -14
  11. package/dist/model/AddressInfo.js +13 -0
  12. package/dist/model/AddressesEventData.js +8 -3
  13. package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
  14. package/dist/model/BalanceUpdateInfoEventData.js +8 -3
  15. package/dist/model/BridgingFee.js +136 -0
  16. package/dist/model/ChainsEventData.js +8 -3
  17. package/dist/model/CommissionFee.js +110 -0
  18. package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
  19. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +305 -0
  20. package/dist/model/ContractCallDestination.js +48 -8
  21. package/dist/model/ContractCallDestinationType.js +5 -0
  22. package/dist/model/CreateMerchantRequest.js +15 -8
  23. package/dist/model/CreateOrderLinkRequest.js +129 -0
  24. package/dist/model/CreatePaymentOrderRequest.js +27 -1
  25. package/dist/model/CreateRefundRequest.js +2 -2
  26. package/dist/model/CreateSettlement.js +3 -29
  27. package/dist/model/CreateSettlementRequestRequest.js +39 -0
  28. package/dist/model/CreateSwapActivityRequest.js +193 -0
  29. package/dist/model/CustodialTransferDestination.js +1 -1
  30. package/dist/model/EstimateContractCallFeeParams.js +1 -1
  31. package/dist/model/EstimateFeeParams.js +1 -1
  32. package/dist/model/EstimateTransferFeeParams.js +1 -1
  33. package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
  34. package/dist/model/EstimatedEvmLegacyFee.js +1 -1
  35. package/dist/model/EstimatedFILFee.js +1 -1
  36. package/dist/model/EstimatedFixedFee.js +1 -1
  37. package/dist/model/EstimatedSOLFee.js +1 -1
  38. package/dist/model/EstimatedUtxoFee.js +1 -1
  39. package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
  40. package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
  41. package/dist/model/FeeStationGasStationType.js +61 -0
  42. package/dist/model/FundsStatusType.js +111 -0
  43. package/dist/model/KytScreeningsDecisionsType.js +71 -0
  44. package/dist/model/KytScreeningsEventData.js +155 -0
  45. package/dist/model/KytScreeningsReviewType.js +61 -0
  46. package/dist/model/KytScreeningsTransaction.js +144 -0
  47. package/dist/model/KytScreeningsTransactionType.js +61 -0
  48. package/dist/model/Link.js +125 -0
  49. package/dist/model/LinkDisplayInfo.js +100 -0
  50. package/dist/model/ListSwapActivities200Response.js +123 -0
  51. package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
  52. package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
  53. package/dist/model/MPCVaultEventData.js +8 -3
  54. package/dist/model/Merchant.js +12 -3
  55. package/dist/model/MerchantBalance.js +3 -3
  56. package/dist/model/MessageSignDestination.js +8 -70
  57. package/dist/model/Order.js +13 -0
  58. package/dist/model/OrderLinkBusinessInfo.js +261 -0
  59. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +125 -0
  60. package/dist/model/OtcFee.js +123 -0
  61. package/dist/model/PaymentAddressUpdateEventData.js +8 -3
  62. package/dist/model/PaymentEstimateFee.js +125 -0
  63. package/dist/model/PaymentEstimateFee201Response.js +108 -0
  64. package/dist/model/PaymentEstimateFeeRequest.js +137 -0
  65. package/dist/model/PaymentEstimatedFee.js +173 -0
  66. package/dist/model/PaymentFeeType.js +71 -0
  67. package/dist/model/PaymentOrderEventData.js +26 -3
  68. package/dist/model/PaymentRefundEventData.js +30 -5
  69. package/dist/model/PaymentSettlementEvent.js +70 -9
  70. package/dist/model/PaymentTransactionEventData.js +8 -3
  71. package/dist/model/PspBalance.js +3 -3
  72. package/dist/model/Refund.js +17 -1
  73. package/dist/model/ReviewStatusType.js +91 -0
  74. package/dist/model/SettleRequestStatus.js +5 -0
  75. package/dist/model/Settlement.js +45 -3
  76. package/dist/model/SettlementDetail.js +33 -1
  77. package/dist/model/SettlementInfo.js +7 -7
  78. package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
  79. package/dist/model/SolContractCallDestination.js +30 -0
  80. package/dist/model/StellarContractCallContractParam.js +164 -0
  81. package/dist/model/StellarContractCallContractType.js +56 -0
  82. package/dist/model/StellarContractCallDestination.js +125 -0
  83. package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
  84. package/dist/model/StellarContractCallTrustLineParam.js +133 -0
  85. package/dist/model/SubmitKytResponse.js +122 -0
  86. package/dist/model/SubmitKytScreeningsDecisionsBody.js +122 -0
  87. package/dist/model/{RawMessageSignDestination.js → SubmitKytScreeningsReviewBody.js} +36 -36
  88. package/dist/model/SupportedToken.js +9 -0
  89. package/dist/model/SuspendedTokenEventData.js +8 -3
  90. package/dist/model/SwapActivity.js +9 -9
  91. package/dist/model/SwapActivityApprovers.js +1 -1
  92. package/dist/model/SwapActivityDetail.js +34 -18
  93. package/dist/model/SwapActivitySigners.js +2 -2
  94. package/dist/model/SwapActivityTimeline.js +5 -5
  95. package/dist/model/SwapEstimateFee.js +147 -0
  96. package/dist/model/SwapQuote.js +18 -31
  97. package/dist/model/SwapReceivingTransaction.js +133 -0
  98. package/dist/model/SwapToken.js +9 -9
  99. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  100. package/dist/model/TokenListingEventData.js +8 -3
  101. package/dist/model/TokensEventData.js +8 -3
  102. package/dist/model/TransactionCoboCategory.js +5 -0
  103. package/dist/model/TransactionDestination.js +48 -8
  104. package/dist/model/TransactionDestinationType.js +5 -0
  105. package/dist/model/TransactionEvmEip1559Fee.js +1 -1
  106. package/dist/model/TransactionEvmLegacyFee.js +1 -1
  107. package/dist/model/TransactionFILFee.js +1 -1
  108. package/dist/model/TransactionFixedFee.js +1 -1
  109. package/dist/model/TransactionFuelingInfo.js +13 -0
  110. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
  111. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
  112. package/dist/model/TransactionRequestFILFee.js +1 -1
  113. package/dist/model/TransactionRequestSOLFee.js +1 -1
  114. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  115. package/dist/model/TransactionSOLFee.js +1 -1
  116. package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
  117. package/dist/model/TransactionSolContractDestination.js +30 -0
  118. package/dist/model/TransactionStellarContractParam.js +164 -0
  119. package/dist/model/TransactionStellarContractType.js +56 -0
  120. package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
  121. package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
  122. package/dist/model/TransactionStellarTrustLineParam.js +133 -0
  123. package/dist/model/TransactionUtxoFee.js +1 -1
  124. package/dist/model/TransactionWebhookEventData.js +8 -3
  125. package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
  126. package/dist/model/UpdateTopUpAddress.js +4 -6
  127. package/dist/model/WalletInfoEventData.js +8 -3
  128. package/dist/model/WalletSetup.js +66 -0
  129. package/dist/model/WebhookEventData.js +81 -11
  130. package/dist/model/WebhookEventDataType.js +7 -2
  131. package/dist/model/WebhookEventType.js +10 -0
  132. package/docs/AddressBooksApi.md +3 -3
  133. package/docs/AddressInfo.md +1 -0
  134. package/docs/AddressesEventData.md +3 -1
  135. package/docs/AddressesEventDataAllOfAddresses.md +1 -0
  136. package/docs/BalanceUpdateInfoEventData.md +3 -1
  137. package/docs/BridgingFee.md +11 -0
  138. package/docs/ChainsEventData.md +3 -1
  139. package/docs/CommissionFee.md +9 -0
  140. package/docs/ComplianceApi.md +158 -1
  141. package/docs/ComplianceDispositionUpdateEventData.md +3 -1
  142. package/docs/ComplianceKytScreeningsUpdateEventData.md +57 -0
  143. package/docs/ContractCallDestination.md +2 -0
  144. package/docs/ContractCallDestinationType.md +2 -0
  145. package/docs/CreateMerchantRequest.md +3 -2
  146. package/docs/CreateOrderLinkRequest.md +10 -0
  147. package/docs/CreatePaymentOrderRequest.md +3 -1
  148. package/docs/CreateRefundRequest.md +2 -2
  149. package/docs/CreateSettlement.md +2 -4
  150. package/docs/CreateSettlementRequestRequest.md +3 -0
  151. package/docs/CreateSwapActivityRequest.md +15 -0
  152. package/docs/DevelopersWebhooksApi.md +1 -1
  153. package/docs/EstimateContractCallFeeParams.md +1 -1
  154. package/docs/EstimateFeeParams.md +1 -1
  155. package/docs/EstimateTransferFeeParams.md +1 -1
  156. package/docs/FeeStationApi.md +53 -0
  157. package/docs/FeeStationCheckFeeStationUsage.md +14 -0
  158. package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
  159. package/docs/FeeStationGasStationType.md +12 -0
  160. package/docs/FundsStatusType.md +32 -0
  161. package/docs/KytScreeningsDecisionsType.md +16 -0
  162. package/docs/KytScreeningsEventData.md +13 -0
  163. package/docs/KytScreeningsReviewType.md +12 -0
  164. package/docs/KytScreeningsTransaction.md +12 -0
  165. package/docs/KytScreeningsTransactionType.md +12 -0
  166. package/docs/Link.md +10 -0
  167. package/docs/LinkDisplayInfo.md +10 -0
  168. package/docs/ListSwapActivities200Response.md +10 -0
  169. package/docs/ListSwapEnabledTokens200Response.md +10 -0
  170. package/docs/ListTopUpPayerAccounts200Response.md +10 -0
  171. package/docs/MPCVaultEventData.md +3 -1
  172. package/docs/Merchant.md +3 -2
  173. package/docs/MerchantBalance.md +3 -3
  174. package/docs/MessageSignDestination.md +0 -1
  175. package/docs/Order.md +1 -0
  176. package/docs/OrderLinkBusinessInfo.md +19 -0
  177. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +10 -0
  178. package/docs/OtcFee.md +10 -0
  179. package/docs/PaymentAddressUpdateEventData.md +3 -1
  180. package/docs/PaymentApi.md +253 -25
  181. package/docs/PaymentEstimateFee.md +10 -0
  182. package/docs/PaymentEstimateFee201Response.md +9 -0
  183. package/docs/PaymentEstimateFeeRequest.md +10 -0
  184. package/docs/PaymentEstimatedFee.md +13 -0
  185. package/docs/PaymentFeeType.md +16 -0
  186. package/docs/PaymentOrderEventData.md +4 -1
  187. package/docs/PaymentRefundEventData.md +5 -2
  188. package/docs/PaymentSettlementEvent.md +9 -4
  189. package/docs/PaymentTransactionEventData.md +3 -1
  190. package/docs/PspBalance.md +3 -3
  191. package/docs/Refund.md +2 -1
  192. package/docs/ReviewStatusType.md +24 -0
  193. package/docs/SettleRequestStatus.md +2 -0
  194. package/docs/Settlement.md +6 -3
  195. package/docs/SettlementDetail.md +3 -1
  196. package/docs/SettlementInfo.md +6 -6
  197. package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
  198. package/docs/SolContractCallDestination.md +1 -0
  199. package/docs/StellarContractCallContractParam.md +11 -0
  200. package/docs/StellarContractCallContractType.md +10 -0
  201. package/docs/StellarContractCallDestination.md +10 -0
  202. package/docs/StellarContractCallTrustLineOperationType.md +10 -0
  203. package/docs/StellarContractCallTrustLineParam.md +11 -0
  204. package/docs/SubmitKytResponse.md +10 -0
  205. package/docs/SubmitKytScreeningsDecisionsBody.md +10 -0
  206. package/docs/SubmitKytScreeningsReviewBody.md +10 -0
  207. package/docs/SupportedToken.md +1 -0
  208. package/docs/SuspendedTokenEventData.md +3 -1
  209. package/docs/SwapActivity.md +9 -9
  210. package/docs/SwapActivityDetail.md +10 -9
  211. package/docs/SwapActivitySigners.md +1 -1
  212. package/docs/SwapActivityTimeline.md +3 -3
  213. package/docs/SwapEstimateFee.md +12 -0
  214. package/docs/SwapQuote.md +10 -11
  215. package/docs/SwapReceivingTransaction.md +11 -0
  216. package/docs/SwapToken.md +6 -6
  217. package/docs/SwapsApi.md +356 -0
  218. package/docs/TSSRequestWebhookEventData.md +3 -1
  219. package/docs/TokenListingEventData.md +3 -1
  220. package/docs/TokensEventData.md +3 -1
  221. package/docs/TransactionCoboCategory.md +2 -0
  222. package/docs/TransactionDestination.md +2 -0
  223. package/docs/TransactionDestinationType.md +2 -0
  224. package/docs/TransactionFuelingInfo.md +1 -0
  225. package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
  226. package/docs/TransactionSolContractDestination.md +1 -0
  227. package/docs/TransactionStellarContractParam.md +11 -0
  228. package/docs/TransactionStellarContractType.md +10 -0
  229. package/docs/TransactionStellarDestination.md +10 -0
  230. package/docs/TransactionStellarTrustLineOperationType.md +10 -0
  231. package/docs/TransactionStellarTrustLineParam.md +11 -0
  232. package/docs/TransactionWebhookEventData.md +3 -1
  233. package/docs/TransactionsApi.md +2 -2
  234. package/docs/UpdateBankAccountByIdRequest.md +9 -0
  235. package/docs/UpdateTopUpAddress.md +1 -1
  236. package/docs/WalletInfoEventData.md +3 -1
  237. package/docs/WalletSetup.md +14 -0
  238. package/docs/WebhookEventData.md +12 -3
  239. package/docs/WebhookEventDataType.md +3 -1
  240. package/docs/WebhookEventType.md +4 -0
  241. package/package.json +1 -1
  242. package/docs/BTCEIP191MessageSignDestination.md +0 -10
  243. package/docs/RawMessageSignDestination.md +0 -10
@@ -0,0 +1,305 @@
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 _FundsStatusType = _interopRequireDefault(require("./FundsStatusType"));
9
+ var _KytScreeningsEventData = _interopRequireDefault(require("./KytScreeningsEventData"));
10
+ var _KytScreeningsTransactionType = _interopRequireDefault(require("./KytScreeningsTransactionType"));
11
+ var _ReviewStatusType = _interopRequireDefault(require("./ReviewStatusType"));
12
+ var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ 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); }
15
+ 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; } } }; }
16
+ 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; } }
17
+ 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; }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Cobo Wallet as a Service 2.0
24
+ *
25
+ * Contact: help@cobo.com
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * The ComplianceKytScreeningsUpdateEventData model module.
34
+ * @module model/ComplianceKytScreeningsUpdateEventData
35
+ */
36
+ var ComplianceKytScreeningsUpdateEventData = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>ComplianceKytScreeningsUpdateEventData</code>.
39
+ * @alias module:model/ComplianceKytScreeningsUpdateEventData
40
+ * @implements module:model/WebhookEventDataType
41
+ * @implements module:model/KytScreeningsEventData
42
+ * @param data_type {module:model/ComplianceKytScreeningsUpdateEventData.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.
43
+ * @param transaction_id {String} The transaction ID.
44
+ * @param transaction_type {module:model/KytScreeningsTransactionType}
45
+ * @param review_status {module:model/ReviewStatusType}
46
+ * @param funds_status {module:model/FundsStatusType}
47
+ * @param updated_timestamp {Number} The time when the KYT screening information was updated, in Unix timestamp format, measured in milliseconds.
48
+ */
49
+ function ComplianceKytScreeningsUpdateEventData(data_type, transaction_id, transaction_type, review_status, funds_status, updated_timestamp) {
50
+ _classCallCheck(this, ComplianceKytScreeningsUpdateEventData);
51
+ _WebhookEventDataType["default"].initialize(this, data_type);
52
+ _KytScreeningsEventData["default"].initialize(this, transaction_id, transaction_type, review_status, funds_status, updated_timestamp);
53
+ ComplianceKytScreeningsUpdateEventData.initialize(this, data_type, transaction_id, transaction_type, review_status, funds_status, updated_timestamp);
54
+ }
55
+
56
+ /**
57
+ * Initializes the fields of this object.
58
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
59
+ * Only for internal use.
60
+ */
61
+ return _createClass(ComplianceKytScreeningsUpdateEventData, null, [{
62
+ key: "initialize",
63
+ value: function initialize(obj, data_type, transaction_id, transaction_type, review_status, funds_status, updated_timestamp) {
64
+ obj['data_type'] = data_type;
65
+ obj['transaction_id'] = transaction_id;
66
+ obj['transaction_type'] = transaction_type;
67
+ obj['review_status'] = review_status;
68
+ obj['funds_status'] = funds_status;
69
+ obj['updated_timestamp'] = updated_timestamp;
70
+ }
71
+
72
+ /**
73
+ * Constructs a <code>ComplianceKytScreeningsUpdateEventData</code> from a plain JavaScript object, optionally creating a new instance.
74
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @param {module:model/ComplianceKytScreeningsUpdateEventData} obj Optional instance to populate.
77
+ * @return {module:model/ComplianceKytScreeningsUpdateEventData} The populated <code>ComplianceKytScreeningsUpdateEventData</code> instance.
78
+ */
79
+ }, {
80
+ key: "constructFromObject",
81
+ value: function constructFromObject(data, obj) {
82
+ if (data) {
83
+ obj = obj || new ComplianceKytScreeningsUpdateEventData();
84
+ _WebhookEventDataType["default"].constructFromObject(data, obj);
85
+ _KytScreeningsEventData["default"].constructFromObject(data, obj);
86
+ if (data.hasOwnProperty('data_type')) {
87
+ obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('transaction_id')) {
90
+ obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('transaction_type')) {
93
+ obj['transaction_type'] = _KytScreeningsTransactionType["default"].constructFromObject(data['transaction_type']);
94
+ }
95
+ if (data.hasOwnProperty('review_status')) {
96
+ obj['review_status'] = _ReviewStatusType["default"].constructFromObject(data['review_status']);
97
+ }
98
+ if (data.hasOwnProperty('funds_status')) {
99
+ obj['funds_status'] = _FundsStatusType["default"].constructFromObject(data['funds_status']);
100
+ }
101
+ if (data.hasOwnProperty('updated_timestamp')) {
102
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
103
+ }
104
+ }
105
+ return obj;
106
+ }
107
+
108
+ /**
109
+ * Validates the JSON data with respect to <code>ComplianceKytScreeningsUpdateEventData</code>.
110
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
111
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ComplianceKytScreeningsUpdateEventData</code>.
112
+ */
113
+ }, {
114
+ key: "validateJSON",
115
+ value: function validateJSON(data) {
116
+ // check to make sure all required properties are present in the JSON string
117
+ var _iterator = _createForOfIteratorHelper(ComplianceKytScreeningsUpdateEventData.RequiredProperties),
118
+ _step;
119
+ try {
120
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
121
+ var property = _step.value;
122
+ if (!data.hasOwnProperty(property)) {
123
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
124
+ }
125
+ }
126
+ // ensure the json data is a string
127
+ } catch (err) {
128
+ _iterator.e(err);
129
+ } finally {
130
+ _iterator.f();
131
+ }
132
+ if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
133
+ throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
137
+ throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
138
+ }
139
+ return true;
140
+ }
141
+ }]);
142
+ }();
143
+ ComplianceKytScreeningsUpdateEventData.RequiredProperties = ["data_type", "transaction_id", "transaction_type", "review_status", "funds_status", "updated_timestamp"];
144
+
145
+ /**
146
+ * 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.
147
+ * @member {module:model/ComplianceKytScreeningsUpdateEventData.DataTypeEnum} data_type
148
+ */
149
+ ComplianceKytScreeningsUpdateEventData.prototype['data_type'] = undefined;
150
+
151
+ /**
152
+ * The transaction ID.
153
+ * @member {String} transaction_id
154
+ */
155
+ ComplianceKytScreeningsUpdateEventData.prototype['transaction_id'] = undefined;
156
+
157
+ /**
158
+ * @member {module:model/KytScreeningsTransactionType} transaction_type
159
+ */
160
+ ComplianceKytScreeningsUpdateEventData.prototype['transaction_type'] = undefined;
161
+
162
+ /**
163
+ * @member {module:model/ReviewStatusType} review_status
164
+ */
165
+ ComplianceKytScreeningsUpdateEventData.prototype['review_status'] = undefined;
166
+
167
+ /**
168
+ * @member {module:model/FundsStatusType} funds_status
169
+ */
170
+ ComplianceKytScreeningsUpdateEventData.prototype['funds_status'] = undefined;
171
+
172
+ /**
173
+ * The time when the KYT screening information was updated, in Unix timestamp format, measured in milliseconds.
174
+ * @member {Number} updated_timestamp
175
+ */
176
+ ComplianceKytScreeningsUpdateEventData.prototype['updated_timestamp'] = undefined;
177
+
178
+ // Implement WebhookEventDataType interface:
179
+ /**
180
+ * 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.
181
+ * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
182
+ */
183
+ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
184
+ // Implement KytScreeningsEventData interface:
185
+ /**
186
+ * The transaction ID.
187
+ * @member {String} transaction_id
188
+ */
189
+ _KytScreeningsEventData["default"].prototype['transaction_id'] = undefined;
190
+ /**
191
+ * @member {module:model/KytScreeningsTransactionType} transaction_type
192
+ */
193
+ _KytScreeningsEventData["default"].prototype['transaction_type'] = undefined;
194
+ /**
195
+ * @member {module:model/ReviewStatusType} review_status
196
+ */
197
+ _KytScreeningsEventData["default"].prototype['review_status'] = undefined;
198
+ /**
199
+ * @member {module:model/FundsStatusType} funds_status
200
+ */
201
+ _KytScreeningsEventData["default"].prototype['funds_status'] = undefined;
202
+ /**
203
+ * The time when the KYT screening information was updated, in Unix timestamp format, measured in milliseconds.
204
+ * @member {Number} updated_timestamp
205
+ */
206
+ _KytScreeningsEventData["default"].prototype['updated_timestamp'] = undefined;
207
+
208
+ /**
209
+ * Allowed values for the <code>data_type</code> property.
210
+ * @enum {String}
211
+ * @readonly
212
+ */
213
+ ComplianceKytScreeningsUpdateEventData['DataTypeEnum'] = {
214
+ /**
215
+ * value: "Transaction"
216
+ * @const
217
+ */
218
+ "Transaction": "Transaction",
219
+ /**
220
+ * value: "TSSRequest"
221
+ * @const
222
+ */
223
+ "TSSRequest": "TSSRequest",
224
+ /**
225
+ * value: "Addresses"
226
+ * @const
227
+ */
228
+ "Addresses": "Addresses",
229
+ /**
230
+ * value: "WalletInfo"
231
+ * @const
232
+ */
233
+ "WalletInfo": "WalletInfo",
234
+ /**
235
+ * value: "MPCVault"
236
+ * @const
237
+ */
238
+ "MPCVault": "MPCVault",
239
+ /**
240
+ * value: "Chains"
241
+ * @const
242
+ */
243
+ "Chains": "Chains",
244
+ /**
245
+ * value: "Tokens"
246
+ * @const
247
+ */
248
+ "Tokens": "Tokens",
249
+ /**
250
+ * value: "TokenListing"
251
+ * @const
252
+ */
253
+ "TokenListing": "TokenListing",
254
+ /**
255
+ * value: "PaymentOrder"
256
+ * @const
257
+ */
258
+ "PaymentOrder": "PaymentOrder",
259
+ /**
260
+ * value: "PaymentRefund"
261
+ * @const
262
+ */
263
+ "PaymentRefund": "PaymentRefund",
264
+ /**
265
+ * value: "PaymentSettlement"
266
+ * @const
267
+ */
268
+ "PaymentSettlement": "PaymentSettlement",
269
+ /**
270
+ * value: "PaymentTransaction"
271
+ * @const
272
+ */
273
+ "PaymentTransaction": "PaymentTransaction",
274
+ /**
275
+ * value: "PaymentAddressUpdate"
276
+ * @const
277
+ */
278
+ "PaymentAddressUpdate": "PaymentAddressUpdate",
279
+ /**
280
+ * value: "BalanceUpdateInfo"
281
+ * @const
282
+ */
283
+ "BalanceUpdateInfo": "BalanceUpdateInfo",
284
+ /**
285
+ * value: "SuspendedToken"
286
+ * @const
287
+ */
288
+ "SuspendedToken": "SuspendedToken",
289
+ /**
290
+ * value: "ComplianceDisposition"
291
+ * @const
292
+ */
293
+ "ComplianceDisposition": "ComplianceDisposition",
294
+ /**
295
+ * value: "ComplianceKytScreenings"
296
+ * @const
297
+ */
298
+ "ComplianceKytScreenings": "ComplianceKytScreenings",
299
+ /**
300
+ * value: "unknown_default_open_api"
301
+ * @const
302
+ */
303
+ "unknown_default_open_api": "unknown_default_open_api"
304
+ };
305
+ var _default = exports["default"] = ComplianceKytScreeningsUpdateEventData;
@@ -7,8 +7,11 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ContractCallDestinationType = _interopRequireDefault(require("./ContractCallDestinationType"));
9
9
  var _EvmContractCallDestination = _interopRequireDefault(require("./EvmContractCallDestination"));
10
+ var _SolContractCallAddressLookupTableAccount = _interopRequireDefault(require("./SolContractCallAddressLookupTableAccount"));
10
11
  var _SolContractCallDestination = _interopRequireDefault(require("./SolContractCallDestination"));
11
12
  var _SolContractCallInstruction = _interopRequireDefault(require("./SolContractCallInstruction"));
13
+ var _StellarContractCallContractParam = _interopRequireDefault(require("./StellarContractCallContractParam"));
14
+ var _StellarContractCallDestination = _interopRequireDefault(require("./StellarContractCallDestination"));
12
15
  var _ContractCallDestination;
13
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
17
  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); }
@@ -35,7 +38,7 @@ var ContractCallDestination = /*#__PURE__*/function () {
35
38
  /**
36
39
  * Constructs a new <code>ContractCallDestination</code>.
37
40
  * @alias module:model/ContractCallDestination
38
- * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
41
+ * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
39
42
  */
40
43
  function ContractCallDestination() {
41
44
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -64,6 +67,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
64
67
  this.actualInstance = _SolContractCallDestination["default"].constructFromObject(instance);
65
68
  match++;
66
69
  break;
70
+ case "STELLAR_Contract":
71
+ this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
72
+ match++;
73
+ break;
67
74
  default:
68
75
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
69
76
  break;
@@ -116,13 +123,36 @@ var ContractCallDestination = /*#__PURE__*/function () {
116
123
  // json data failed to deserialize into SolContractCallDestination
117
124
  errorMessages.push("Failed to construct SolContractCallDestination: " + err);
118
125
  }
126
+ try {
127
+ if (instance instanceof _StellarContractCallDestination["default"]) {
128
+ this.actualInstance = instance;
129
+ } else if (!!_StellarContractCallDestination["default"].validateJSON && _StellarContractCallDestination["default"].validateJSON(instance)) {
130
+ // plain JS object
131
+ // create StellarContractCallDestination from JS object
132
+ this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
133
+ } else {
134
+ if (_StellarContractCallDestination["default"].constructFromObject(instance)) {
135
+ if (!!_StellarContractCallDestination["default"].constructFromObject(instance).toJSON) {
136
+ if (_StellarContractCallDestination["default"].constructFromObject(instance).toJSON()) {
137
+ this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
138
+ }
139
+ } else {
140
+ this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
141
+ }
142
+ }
143
+ }
144
+ match++;
145
+ } catch (err) {
146
+ // json data failed to deserialize into StellarContractCallDestination
147
+ errorMessages.push("Failed to construct StellarContractCallDestination: " + err);
148
+ }
119
149
 
120
150
  // if (match > 1) {
121
- // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Input: " + JSON.stringify(instance));
151
+ // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Input: " + JSON.stringify(instance));
122
152
  // } else
123
153
  if (match === 0) {
124
154
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
125
- // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination. Details: " +
155
+ // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Details: " +
126
156
  // errorMessages.join(", "));
127
157
  return;
128
158
  } else {// only 1 match
@@ -141,16 +171,16 @@ var ContractCallDestination = /*#__PURE__*/function () {
141
171
  key: "getActualInstance",
142
172
  value:
143
173
  /**
144
- * Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
145
- * @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} The actual instance.
174
+ * Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
175
+ * @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} The actual instance.
146
176
  */
147
177
  function getActualInstance() {
148
178
  return this.actualInstance;
149
179
  }
150
180
 
151
181
  /**
152
- * Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>.
153
- * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination)} obj The actual instance.
182
+ * Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
183
+ * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} obj The actual instance.
154
184
  */
155
185
  }, {
156
186
  key: "setActualInstance",
@@ -200,5 +230,15 @@ ContractCallDestination.prototype['calldata'] = undefined;
200
230
  * @member {Array.<module:model/SolContractCallInstruction>} instructions
201
231
  */
202
232
  ContractCallDestination.prototype['instructions'] = undefined;
203
- ContractCallDestination.OneOf = ["EvmContractCallDestination", "SolContractCallDestination"];
233
+
234
+ /**
235
+ * @member {Array.<module:model/SolContractCallAddressLookupTableAccount>} address_lookup_table_accounts
236
+ */
237
+ ContractCallDestination.prototype['address_lookup_table_accounts'] = undefined;
238
+
239
+ /**
240
+ * @member {module:model/StellarContractCallContractParam} contract_param
241
+ */
242
+ ContractCallDestination.prototype['contract_param'] = undefined;
243
+ ContractCallDestination.OneOf = ["EvmContractCallDestination", "SolContractCallDestination", "StellarContractCallDestination"];
204
244
  var _default = exports["default"] = ContractCallDestination;
@@ -40,6 +40,11 @@ var ContractCallDestinationType = exports["default"] = /*#__PURE__*/function ()
40
40
  * @const
41
41
  */
42
42
  _defineProperty(this, "SOL_Contract", "SOL_Contract");
43
+ /**
44
+ * value: "STELLAR_Contract"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "STELLAR_Contract", "STELLAR_Contract");
43
48
  /**
44
49
  * value: "unknown_default_open_api"
45
50
  * @const
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _WalletSetup = _interopRequireDefault(require("./WalletSetup"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
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); }
10
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; } } }; }
@@ -33,11 +34,10 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
33
34
  * Constructs a new <code>CreateMerchantRequest</code>.
34
35
  * @alias module:model/CreateMerchantRequest
35
36
  * @param name {String} The merchant name.
36
- * @param wallet_id {String} The ID of the wallet linked to the merchant.
37
37
  */
38
- function CreateMerchantRequest(name, wallet_id) {
38
+ function CreateMerchantRequest(name) {
39
39
  _classCallCheck(this, CreateMerchantRequest);
40
- CreateMerchantRequest.initialize(this, name, wallet_id);
40
+ CreateMerchantRequest.initialize(this, name);
41
41
  }
42
42
 
43
43
  /**
@@ -47,9 +47,8 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
47
47
  */
48
48
  return _createClass(CreateMerchantRequest, null, [{
49
49
  key: "initialize",
50
- value: function initialize(obj, name, wallet_id) {
50
+ value: function initialize(obj, name) {
51
51
  obj['name'] = name;
52
- obj['wallet_id'] = wallet_id;
53
52
  }
54
53
 
55
54
  /**
@@ -73,6 +72,9 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
73
72
  if (data.hasOwnProperty('developer_fee_rate')) {
74
73
  obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
75
74
  }
75
+ if (data.hasOwnProperty('wallet_setup')) {
76
+ obj['wallet_setup'] = _WalletSetup["default"].constructFromObject(data['wallet_setup']);
77
+ }
76
78
  }
77
79
  return obj;
78
80
  }
@@ -116,7 +118,7 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
116
118
  }
117
119
  }]);
118
120
  }();
119
- CreateMerchantRequest.RequiredProperties = ["name", "wallet_id"];
121
+ CreateMerchantRequest.RequiredProperties = ["name"];
120
122
 
121
123
  /**
122
124
  * The merchant name.
@@ -125,14 +127,19 @@ CreateMerchantRequest.RequiredProperties = ["name", "wallet_id"];
125
127
  CreateMerchantRequest.prototype['name'] = undefined;
126
128
 
127
129
  /**
128
- * The ID of the wallet linked to the merchant.
130
+ * This field has been deprecated.
129
131
  * @member {String} wallet_id
130
132
  */
131
133
  CreateMerchantRequest.prototype['wallet_id'] = undefined;
132
134
 
133
135
  /**
134
- * 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.
136
+ * The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. For more information on developer fee rate, please refer to [Amounts and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances).
135
137
  * @member {String} developer_fee_rate
136
138
  */
137
139
  CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
140
+
141
+ /**
142
+ * @member {module:model/WalletSetup} wallet_setup
143
+ */
144
+ CreateMerchantRequest.prototype['wallet_setup'] = undefined;
138
145
  var _default = exports["default"] = CreateMerchantRequest;
@@ -0,0 +1,129 @@
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 _LinkDisplayInfo = _interopRequireDefault(require("./LinkDisplayInfo"));
9
+ var _OrderLinkBusinessInfo = _interopRequireDefault(require("./OrderLinkBusinessInfo"));
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 CreateOrderLinkRequest model module.
31
+ * @module model/CreateOrderLinkRequest
32
+ */
33
+ var CreateOrderLinkRequest = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>CreateOrderLinkRequest</code>.
36
+ * @alias module:model/CreateOrderLinkRequest
37
+ * @param business_info {module:model/OrderLinkBusinessInfo}
38
+ */
39
+ function CreateOrderLinkRequest(business_info) {
40
+ _classCallCheck(this, CreateOrderLinkRequest);
41
+ CreateOrderLinkRequest.initialize(this, business_info);
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(CreateOrderLinkRequest, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, business_info) {
52
+ obj['business_info'] = business_info;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>CreateOrderLinkRequest</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/CreateOrderLinkRequest} obj Optional instance to populate.
60
+ * @return {module:model/CreateOrderLinkRequest} The populated <code>CreateOrderLinkRequest</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new CreateOrderLinkRequest();
67
+ if (data.hasOwnProperty('business_info')) {
68
+ obj['business_info'] = _OrderLinkBusinessInfo["default"].constructFromObject(data['business_info']);
69
+ }
70
+ if (data.hasOwnProperty('display_info')) {
71
+ obj['display_info'] = _LinkDisplayInfo["default"].constructFromObject(data['display_info']);
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>CreateOrderLinkRequest</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>CreateOrderLinkRequest</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(CreateOrderLinkRequest.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
+ // validate the optional field `business_info`
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ if (data['business_info']) {
102
+ // data not null
103
+ if (!!_OrderLinkBusinessInfo["default"].validateJSON) {
104
+ _OrderLinkBusinessInfo["default"].validateJSON(data['business_info']);
105
+ }
106
+ }
107
+ // validate the optional field `display_info`
108
+ if (data['display_info']) {
109
+ // data not null
110
+ if (!!_LinkDisplayInfo["default"].validateJSON) {
111
+ _LinkDisplayInfo["default"].validateJSON(data['display_info']);
112
+ }
113
+ }
114
+ return true;
115
+ }
116
+ }]);
117
+ }();
118
+ CreateOrderLinkRequest.RequiredProperties = ["business_info"];
119
+
120
+ /**
121
+ * @member {module:model/OrderLinkBusinessInfo} business_info
122
+ */
123
+ CreateOrderLinkRequest.prototype['business_info'] = undefined;
124
+
125
+ /**
126
+ * @member {module:model/LinkDisplayInfo} display_info
127
+ */
128
+ CreateOrderLinkRequest.prototype['display_info'] = undefined;
129
+ var _default = exports["default"] = CreateOrderLinkRequest;