@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
@@ -7,12 +7,10 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _BTCBIP137MessageSignDestination = _interopRequireDefault(require("./BTCBIP137MessageSignDestination"));
9
9
  var _BTCBIP322MessageSignDestination = _interopRequireDefault(require("./BTCBIP322MessageSignDestination"));
10
- var _BTCEIP191MessageSignDestination = _interopRequireDefault(require("./BTCEIP191MessageSignDestination"));
11
10
  var _CosmosAdr36MessageSignDestination = _interopRequireDefault(require("./CosmosAdr36MessageSignDestination"));
12
11
  var _EvmEIP191MessageSignDestination = _interopRequireDefault(require("./EvmEIP191MessageSignDestination"));
13
12
  var _EvmEIP712MessageSignDestination = _interopRequireDefault(require("./EvmEIP712MessageSignDestination"));
14
13
  var _MessageSignDestinationType = _interopRequireDefault(require("./MessageSignDestinationType"));
15
- var _RawMessageSignDestination = _interopRequireDefault(require("./RawMessageSignDestination"));
16
14
  var _MessageSignDestination;
17
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
18
16
  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); }
@@ -39,7 +37,7 @@ var MessageSignDestination = /*#__PURE__*/function () {
39
37
  /**
40
38
  * Constructs a new <code>MessageSignDestination</code>.
41
39
  * @alias module:model/MessageSignDestination
42
- * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} instance The actual instance to initialize MessageSignDestination.
40
+ * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} instance The actual instance to initialize MessageSignDestination.
43
41
  */
44
42
  function MessageSignDestination() {
45
43
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -68,10 +66,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
68
66
  this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
69
67
  match++;
70
68
  break;
71
- case "BTC_EIP_191_Signature":
72
- this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
73
- match++;
74
- break;
75
69
  case "COSMOS_ADR_36_Signature":
76
70
  this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
77
71
  match++;
@@ -84,10 +78,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
84
78
  this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
85
79
  match++;
86
80
  break;
87
- case "Raw_Message_Signature":
88
- this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
89
- match++;
90
- break;
91
81
  default:
92
82
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
93
83
  break;
@@ -140,52 +130,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
140
130
  // json data failed to deserialize into EvmEIP712MessageSignDestination
141
131
  errorMessages.push("Failed to construct EvmEIP712MessageSignDestination: " + err);
142
132
  }
143
- try {
144
- if (instance instanceof _RawMessageSignDestination["default"]) {
145
- this.actualInstance = instance;
146
- } else if (!!_RawMessageSignDestination["default"].validateJSON && _RawMessageSignDestination["default"].validateJSON(instance)) {
147
- // plain JS object
148
- // create RawMessageSignDestination from JS object
149
- this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
150
- } else {
151
- if (_RawMessageSignDestination["default"].constructFromObject(instance)) {
152
- if (!!_RawMessageSignDestination["default"].constructFromObject(instance).toJSON) {
153
- if (_RawMessageSignDestination["default"].constructFromObject(instance).toJSON()) {
154
- this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
155
- }
156
- } else {
157
- this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
158
- }
159
- }
160
- }
161
- match++;
162
- } catch (err) {
163
- // json data failed to deserialize into RawMessageSignDestination
164
- errorMessages.push("Failed to construct RawMessageSignDestination: " + err);
165
- }
166
- try {
167
- if (instance instanceof _BTCEIP191MessageSignDestination["default"]) {
168
- this.actualInstance = instance;
169
- } else if (!!_BTCEIP191MessageSignDestination["default"].validateJSON && _BTCEIP191MessageSignDestination["default"].validateJSON(instance)) {
170
- // plain JS object
171
- // create BTCEIP191MessageSignDestination from JS object
172
- this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
173
- } else {
174
- if (_BTCEIP191MessageSignDestination["default"].constructFromObject(instance)) {
175
- if (!!_BTCEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON) {
176
- if (_BTCEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
177
- this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
178
- }
179
- } else {
180
- this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
181
- }
182
- }
183
- }
184
- match++;
185
- } catch (err) {
186
- // json data failed to deserialize into BTCEIP191MessageSignDestination
187
- errorMessages.push("Failed to construct BTCEIP191MessageSignDestination: " + err);
188
- }
189
133
  try {
190
134
  if (instance instanceof _BTCBIP137MessageSignDestination["default"]) {
191
135
  this.actualInstance = instance;
@@ -257,11 +201,11 @@ var MessageSignDestination = /*#__PURE__*/function () {
257
201
  }
258
202
 
259
203
  // if (match > 1) {
260
- // throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, BTCEIP191MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Input: " + JSON.stringify(instance));
204
+ // throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination. Input: " + JSON.stringify(instance));
261
205
  // } else
262
206
  if (match === 0) {
263
207
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
264
- // throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, BTCEIP191MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination, RawMessageSignDestination. Details: " +
208
+ // throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination. Details: " +
265
209
  // errorMessages.join(", "));
266
210
  return;
267
211
  } else {// only 1 match
@@ -280,16 +224,16 @@ var MessageSignDestination = /*#__PURE__*/function () {
280
224
  key: "getActualInstance",
281
225
  value:
282
226
  /**
283
- * Gets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>BTCEIP191MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
284
- * @return {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} The actual instance.
227
+ * Gets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>.
228
+ * @return {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} The actual instance.
285
229
  */
286
230
  function getActualInstance() {
287
231
  return this.actualInstance;
288
232
  }
289
233
 
290
234
  /**
291
- * Sets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>BTCEIP191MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>, <code>RawMessageSignDestination</code>.
292
- * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/BTCEIP191MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination|module:model/RawMessageSignDestination)} obj The actual instance.
235
+ * Sets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>.
236
+ * @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} obj The actual instance.
293
237
  */
294
238
  }, {
295
239
  key: "setActualInstance",
@@ -329,12 +273,6 @@ MessageSignDestination.prototype['message'] = undefined;
329
273
  */
330
274
  MessageSignDestination.prototype['structured_data'] = undefined;
331
275
 
332
- /**
333
- * Message hash to be signed, in hexadecimal format.
334
- * @member {String} msg_hash
335
- */
336
- MessageSignDestination.prototype['msg_hash'] = undefined;
337
-
338
276
  /**
339
277
  * Message to be signed, in hexadecimal format.
340
278
  * @member {String} message_bip137
@@ -352,5 +290,5 @@ MessageSignDestination.prototype['message_bip322'] = undefined;
352
290
  * @member {String} message_cosmos_adr36
353
291
  */
354
292
  MessageSignDestination.prototype['message_cosmos_adr36'] = undefined;
355
- MessageSignDestination.OneOf = ["BTCBIP137MessageSignDestination", "BTCBIP322MessageSignDestination", "BTCEIP191MessageSignDestination", "CosmosAdr36MessageSignDestination", "EvmEIP191MessageSignDestination", "EvmEIP712MessageSignDestination", "RawMessageSignDestination"];
293
+ MessageSignDestination.OneOf = ["BTCBIP137MessageSignDestination", "BTCBIP322MessageSignDestination", "CosmosAdr36MessageSignDestination", "EvmEIP191MessageSignDestination", "EvmEIP712MessageSignDestination"];
356
294
  var _default = exports["default"] = MessageSignDestination;
@@ -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
+ * Allowed amount deviation.
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>} List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values.
37
+ * @param currency {String} The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported.
38
+ * @param fee_amount {String} The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. 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`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. 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
+ * List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values.
197
+ * @member {Array.<String>} token_ids
198
+ */
199
+ OrderLinkBusinessInfo.prototype['token_ids'] = undefined;
200
+
201
+ /**
202
+ * Optional list of final exchange rates for different tokens. If provided, these rates will be used instead of real-time market rates.
203
+ * @member {Array.<module:model/OrderLinkBusinessInfoCustomExchangeRatesInner>} custom_exchange_rates
204
+ */
205
+ OrderLinkBusinessInfo.prototype['custom_exchange_rates'] = undefined;
206
+
207
+ /**
208
+ * The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported.
209
+ * @member {String} currency
210
+ */
211
+ OrderLinkBusinessInfo.prototype['currency'] = undefined;
212
+
213
+ /**
214
+ * The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. 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`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. 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
+ * Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used.
252
+ * @member {Boolean} use_dedicated_address
253
+ */
254
+ OrderLinkBusinessInfo.prototype['use_dedicated_address'] = undefined;
255
+
256
+ /**
257
+ * Allowed amount deviation, precision to 1 decimal place.
258
+ * @member {String} amount_tolerance
259
+ */
260
+ OrderLinkBusinessInfo.prototype['amount_tolerance'] = undefined;
261
+ var _default = exports["default"] = OrderLinkBusinessInfo;
@@ -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 OrderLinkBusinessInfoCustomExchangeRatesInner model module.
29
+ * @module model/OrderLinkBusinessInfoCustomExchangeRatesInner
30
+ */
31
+ var OrderLinkBusinessInfoCustomExchangeRatesInner = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>OrderLinkBusinessInfoCustomExchangeRatesInner</code>.
34
+ * @alias module:model/OrderLinkBusinessInfoCustomExchangeRatesInner
35
+ * @param token_id {String} The cryptocurrency token ID
36
+ * @param exchange_rate {String} The fixed exchange rate to use for this token
37
+ */
38
+ function OrderLinkBusinessInfoCustomExchangeRatesInner(token_id, exchange_rate) {
39
+ _classCallCheck(this, OrderLinkBusinessInfoCustomExchangeRatesInner);
40
+ OrderLinkBusinessInfoCustomExchangeRatesInner.initialize(this, token_id, exchange_rate);
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(OrderLinkBusinessInfoCustomExchangeRatesInner, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, token_id, exchange_rate) {
51
+ obj['token_id'] = token_id;
52
+ obj['exchange_rate'] = exchange_rate;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>OrderLinkBusinessInfoCustomExchangeRatesInner</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/OrderLinkBusinessInfoCustomExchangeRatesInner} obj Optional instance to populate.
60
+ * @return {module:model/OrderLinkBusinessInfoCustomExchangeRatesInner} The populated <code>OrderLinkBusinessInfoCustomExchangeRatesInner</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new OrderLinkBusinessInfoCustomExchangeRatesInner();
67
+ if (data.hasOwnProperty('token_id')) {
68
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('exchange_rate')) {
71
+ obj['exchange_rate'] = _ApiClient["default"].convertToType(data['exchange_rate'], 'String');
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>OrderLinkBusinessInfoCustomExchangeRatesInner</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>OrderLinkBusinessInfoCustomExchangeRatesInner</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(OrderLinkBusinessInfoCustomExchangeRatesInner.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['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
102
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
103
+ }
104
+ // ensure the json data is a string
105
+ if (data['exchange_rate'] && !(typeof data['exchange_rate'] === 'string' || data['exchange_rate'] instanceof String)) {
106
+ throw new Error("Expected the field `exchange_rate` to be a primitive type in the JSON string but got " + data['exchange_rate']);
107
+ }
108
+ return true;
109
+ }
110
+ }]);
111
+ }();
112
+ OrderLinkBusinessInfoCustomExchangeRatesInner.RequiredProperties = ["token_id", "exchange_rate"];
113
+
114
+ /**
115
+ * The cryptocurrency token ID
116
+ * @member {String} token_id
117
+ */
118
+ OrderLinkBusinessInfoCustomExchangeRatesInner.prototype['token_id'] = undefined;
119
+
120
+ /**
121
+ * The fixed exchange rate to use for this token
122
+ * @member {String} exchange_rate
123
+ */
124
+ OrderLinkBusinessInfoCustomExchangeRatesInner.prototype['exchange_rate'] = undefined;
125
+ var _default = exports["default"] = OrderLinkBusinessInfoCustomExchangeRatesInner;