@cobo/cobo-waas2 1.26.0 → 1.28.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 (262) hide show
  1. package/README.md +96 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +2 -2
  4. package/dist/api/AutoSweepApi.js +4 -4
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/OAuthApi.js +4 -4
  7. package/dist/api/PaymentApi.js +1847 -294
  8. package/dist/api/StakingsApi.js +44 -2
  9. package/dist/api/SwapsApi.js +2 -2
  10. package/dist/api/TransactionsApi.js +6 -6
  11. package/dist/api/WalletsApi.js +14 -14
  12. package/dist/index.js +420 -7
  13. package/dist/model/AddressesEventData.js +8 -3
  14. package/dist/model/AllocationRecord.js +193 -0
  15. package/dist/model/AllocationRequest.js +167 -0
  16. package/dist/model/BabylonCreateStakingExpansion.js +157 -0
  17. package/dist/model/BabylonStakeExtra.js +26 -0
  18. package/dist/model/BabylonStakingRegistration.js +1 -1
  19. package/dist/model/BalanceUpdateInfoEventData.js +8 -3
  20. package/dist/model/BankAccountStatus.js +66 -0
  21. package/dist/model/BatchAllocation.js +190 -0
  22. package/dist/model/BatchAllocationDetail.js +188 -0
  23. package/dist/model/ChainsEventData.js +8 -3
  24. package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
  25. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
  26. package/dist/model/ContractCallDestination.js +72 -10
  27. package/dist/model/ContractCallDestinationType.js +10 -0
  28. package/dist/model/CosmosContractCallDestination.js +0 -13
  29. package/dist/model/Counterparty.js +195 -0
  30. package/dist/model/CounterpartyDetail.js +228 -0
  31. package/dist/model/CounterpartyType.js +61 -0
  32. package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
  33. package/dist/model/CreateBatchAllocationRequest.js +142 -0
  34. package/dist/model/CreateCounterpartyRequest.js +193 -0
  35. package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
  36. package/dist/model/CreateCustodialWalletParams.js +1 -1
  37. package/dist/model/CreateDestinationBankAccount.js +257 -0
  38. package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
  39. package/dist/model/CreateDestinationRequest.js +235 -0
  40. package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
  41. package/dist/model/CreateExchangeWalletParams.js +2 -2
  42. package/dist/model/CreateKeyShareHolder.js +1 -1
  43. package/dist/model/CreateMerchantRequest.js +1 -1
  44. package/dist/model/CreateMpcWalletParams.js +2 -2
  45. package/dist/model/CreatePaymentOrderRequest.js +115 -68
  46. package/dist/model/CreatePayoutRequest.js +192 -0
  47. package/dist/model/CreateRefundRequest.js +3 -3
  48. package/dist/model/CreateSafeWalletParams.js +1 -1
  49. package/dist/model/CreateSettlement.js +14 -1
  50. package/dist/model/CreateSettlementRequestRequest.js +1 -1
  51. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  52. package/dist/model/CreateStakeActivityExtra.js +12 -0
  53. package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
  54. package/dist/model/CreateWalletParams.js +1 -1
  55. package/dist/model/DeleteCounterparty200Response.js +110 -0
  56. package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
  57. package/dist/model/DeleteDestination200Response.js +110 -0
  58. package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
  59. package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
  60. package/dist/model/Destination.js +208 -0
  61. package/dist/model/DestinationBankAccount.js +301 -0
  62. package/dist/model/DestinationBankAccountDetail.js +394 -0
  63. package/dist/model/DestinationDetail.js +272 -0
  64. package/dist/model/DestinationType.js +61 -0
  65. package/dist/model/DestinationWalletAddressDetail.js +205 -0
  66. package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
  67. package/dist/model/EvmContractCallDestination.js +2 -2
  68. package/dist/model/ExchangeRate.js +140 -0
  69. package/dist/model/GetExchangeRate200Response.js +2 -2
  70. package/dist/model/IntermediaryBankInfo.js +140 -0
  71. package/dist/model/Link.js +4 -4
  72. package/dist/model/LinkDisplayInfo.js +15 -2
  73. package/dist/model/ListAllocations200Response.js +123 -0
  74. package/dist/model/ListBatchAllocations200Response.js +123 -0
  75. package/dist/model/ListCounterparties200Response.js +123 -0
  76. package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
  77. package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
  78. package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
  79. package/dist/model/ListDestinations200Response.js +123 -0
  80. package/dist/model/ListPayoutItems200Response.js +123 -0
  81. package/dist/model/ListPayouts200Response.js +123 -0
  82. package/dist/model/MPCVaultEventData.js +8 -3
  83. package/dist/model/MerchantBalance.js +28 -2
  84. package/dist/model/Order.js +135 -102
  85. package/dist/model/OrderLinkBusinessInfo.js +151 -87
  86. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
  87. package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
  88. package/dist/model/PaymentAddressUpdateEventData.js +8 -3
  89. package/dist/model/PaymentAllocationAmount.js +125 -0
  90. package/dist/model/PaymentOrderEventData.js +198 -145
  91. package/dist/model/PaymentPayout.js +250 -0
  92. package/dist/model/PaymentPayoutDetail.js +248 -0
  93. package/dist/model/PaymentPayoutEvent.js +433 -0
  94. package/dist/model/PaymentPayoutItem.js +298 -0
  95. package/dist/model/PaymentPayoutItemDetail.js +298 -0
  96. package/dist/model/PaymentPayoutItemStatus.js +76 -0
  97. package/dist/model/PaymentPayoutParam.js +165 -0
  98. package/dist/model/PaymentPayoutStatus.js +81 -0
  99. package/dist/model/PaymentRefundEventData.js +8 -3
  100. package/dist/model/PaymentSettlementEvent.js +8 -3
  101. package/dist/model/PaymentSourceType.js +61 -0
  102. package/dist/model/PaymentTransaction.js +32 -0
  103. package/dist/model/PaymentTransactionEventData.js +10 -5
  104. package/dist/model/PspBalance.js +28 -2
  105. package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
  106. package/dist/model/RefundLinkBusinessInfo.js +6 -6
  107. package/dist/model/SettlementDetail.js +13 -0
  108. package/dist/model/Stakings.js +33 -6
  109. package/dist/model/SuspendedTokenEventData.js +8 -3
  110. package/dist/model/SwapActivity.js +1 -1
  111. package/dist/model/SwapActivityDetail.js +2 -2
  112. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  113. package/dist/model/TokenListingEventData.js +8 -3
  114. package/dist/model/TokensEventData.js +8 -3
  115. package/dist/model/Transaction.js +1 -1
  116. package/dist/model/TransactionCosmosContractDestination.js +0 -13
  117. package/dist/model/TransactionDestination.js +38 -10
  118. package/dist/model/TransactionDestinationType.js +5 -0
  119. package/dist/model/TransactionDetail.js +2 -2
  120. package/dist/model/TransactionDetails.js +2 -2
  121. package/dist/model/TransactionTronContractDestination.js +150 -0
  122. package/dist/model/TransactionWebhookEventData.js +10 -5
  123. package/dist/model/TronContractCallDestination.js +150 -0
  124. package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
  125. package/dist/model/UpdateDestinationBankAccount.js +257 -0
  126. package/dist/model/UpdateDestinationByIdRequest.js +173 -0
  127. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  128. package/dist/model/WalletAddress.js +151 -0
  129. package/dist/model/WalletInfoEventData.js +8 -3
  130. package/dist/model/WebhookEventData.js +107 -43
  131. package/dist/model/WebhookEventDataType.js +7 -2
  132. package/dist/model/WebhookEventType.js +10 -0
  133. package/docs/AddressBooksApi.md +1 -1
  134. package/docs/AddressesEventData.md +3 -1
  135. package/docs/AllocationRecord.md +15 -0
  136. package/docs/AllocationRequest.md +13 -0
  137. package/docs/AutoSweepApi.md +2 -2
  138. package/docs/BabylonCreateStakingExpansion.md +12 -0
  139. package/docs/BabylonStakeExtra.md +2 -0
  140. package/docs/BalanceUpdateInfoEventData.md +3 -1
  141. package/docs/BankAccountStatus.md +14 -0
  142. package/docs/BatchAllocation.md +14 -0
  143. package/docs/BatchAllocationDetail.md +14 -0
  144. package/docs/ChainsEventData.md +3 -1
  145. package/docs/ComplianceDispositionUpdateEventData.md +3 -1
  146. package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
  147. package/docs/ContractCallDestination.md +3 -2
  148. package/docs/ContractCallDestinationType.md +4 -0
  149. package/docs/CosmosContractCallDestination.md +0 -1
  150. package/docs/Counterparty.md +16 -0
  151. package/docs/CounterpartyDetail.md +17 -0
  152. package/docs/CounterpartyType.md +12 -0
  153. package/docs/CounterpartyWalletAddressDetail.md +15 -0
  154. package/docs/CreateBatchAllocationRequest.md +10 -0
  155. package/docs/CreateCounterpartyRequest.md +14 -0
  156. package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
  157. package/docs/CreateCustodialWalletParams.md +1 -1
  158. package/docs/CreateDestinationBankAccount.md +19 -0
  159. package/docs/CreateDestinationBankAccountRequest.md +20 -0
  160. package/docs/CreateDestinationRequest.md +16 -0
  161. package/docs/CreateDestinationWalletAddressRequest.md +11 -0
  162. package/docs/CreateExchangeWalletParams.md +1 -1
  163. package/docs/CreateKeyShareHolder.md +1 -1
  164. package/docs/CreateMerchantRequest.md +1 -1
  165. package/docs/CreateMpcWalletParams.md +1 -1
  166. package/docs/CreatePaymentOrderRequest.md +15 -11
  167. package/docs/CreatePayoutRequest.md +14 -0
  168. package/docs/CreateRefundRequest.md +3 -3
  169. package/docs/CreateSafeWalletParams.md +1 -1
  170. package/docs/CreateSettlement.md +2 -1
  171. package/docs/CreateSettlementRequestRequest.md +1 -1
  172. package/docs/CreateSmartContractWalletParams.md +1 -1
  173. package/docs/CreateStakeActivityExtra.md +2 -0
  174. package/docs/CreateWalletAddress.md +10 -0
  175. package/docs/CreateWalletParams.md +1 -1
  176. package/docs/DeleteCounterparty200Response.md +9 -0
  177. package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
  178. package/docs/DeleteDestination200Response.md +9 -0
  179. package/docs/DeleteDestinationBankAccount200Response.md +9 -0
  180. package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
  181. package/docs/Destination.md +17 -0
  182. package/docs/DestinationBankAccount.md +23 -0
  183. package/docs/DestinationBankAccountDetail.md +30 -0
  184. package/docs/DestinationDetail.md +19 -0
  185. package/docs/DestinationType.md +12 -0
  186. package/docs/DestinationWalletAddressDetail.md +16 -0
  187. package/docs/DevelopersWebhooksApi.md +1 -1
  188. package/docs/EnableDestinationWhitelistRequest.md +9 -0
  189. package/docs/EvmContractCallDestination.md +1 -1
  190. package/docs/ExchangeRate.md +11 -0
  191. package/docs/GetExchangeRate200Response.md +1 -1
  192. package/docs/IntermediaryBankInfo.md +11 -0
  193. package/docs/Link.md +2 -2
  194. package/docs/LinkDisplayInfo.md +3 -2
  195. package/docs/ListAllocations200Response.md +10 -0
  196. package/docs/ListBatchAllocations200Response.md +10 -0
  197. package/docs/ListCounterparties200Response.md +10 -0
  198. package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
  199. package/docs/ListDestinationBankAccounts200Response.md +10 -0
  200. package/docs/ListDestinationWalletAddresses200Response.md +10 -0
  201. package/docs/ListDestinations200Response.md +10 -0
  202. package/docs/ListPayoutItems200Response.md +10 -0
  203. package/docs/ListPayouts200Response.md +10 -0
  204. package/docs/MPCVaultEventData.md +3 -1
  205. package/docs/MerchantBalance.md +4 -2
  206. package/docs/OAuthApi.md +2 -2
  207. package/docs/Order.md +16 -13
  208. package/docs/OrderLinkBusinessInfo.md +11 -7
  209. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
  210. package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
  211. package/docs/PaymentAddressUpdateEventData.md +3 -1
  212. package/docs/PaymentAllocationAmount.md +10 -0
  213. package/docs/PaymentApi.md +2153 -395
  214. package/docs/PaymentOrderEventData.md +19 -14
  215. package/docs/PaymentPayout.md +19 -0
  216. package/docs/PaymentPayoutDetail.md +19 -0
  217. package/docs/PaymentPayoutEvent.md +65 -0
  218. package/docs/PaymentPayoutItem.md +22 -0
  219. package/docs/PaymentPayoutItemDetail.md +22 -0
  220. package/docs/PaymentPayoutItemStatus.md +18 -0
  221. package/docs/PaymentPayoutParam.md +13 -0
  222. package/docs/PaymentPayoutStatus.md +20 -0
  223. package/docs/PaymentRefundEventData.md +3 -1
  224. package/docs/PaymentSettlementEvent.md +3 -1
  225. package/docs/PaymentSourceType.md +12 -0
  226. package/docs/PaymentTransaction.md +2 -0
  227. package/docs/PaymentTransactionEventData.md +4 -2
  228. package/docs/PspBalance.md +4 -2
  229. package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
  230. package/docs/RefundLinkBusinessInfo.md +4 -4
  231. package/docs/SettlementDetail.md +1 -0
  232. package/docs/Stakings.md +2 -1
  233. package/docs/StakingsApi.md +54 -1
  234. package/docs/SuspendedTokenEventData.md +3 -1
  235. package/docs/SwapActivity.md +1 -1
  236. package/docs/SwapActivityDetail.md +1 -1
  237. package/docs/SwapsApi.md +1 -1
  238. package/docs/TSSRequestWebhookEventData.md +3 -1
  239. package/docs/TokenListingEventData.md +3 -1
  240. package/docs/TokensEventData.md +3 -1
  241. package/docs/Transaction.md +1 -1
  242. package/docs/TransactionCosmosContractDestination.md +0 -1
  243. package/docs/TransactionDestination.md +2 -2
  244. package/docs/TransactionDestinationType.md +2 -0
  245. package/docs/TransactionDetail.md +1 -1
  246. package/docs/TransactionDetails.md +1 -1
  247. package/docs/TransactionTronContractDestination.md +12 -0
  248. package/docs/TransactionWebhookEventData.md +4 -2
  249. package/docs/TransactionsApi.md +3 -3
  250. package/docs/TronContractCallDestination.md +12 -0
  251. package/docs/UpdateCounterpartyByIdRequest.md +13 -0
  252. package/docs/UpdateDestinationBankAccount.md +19 -0
  253. package/docs/UpdateDestinationByIdRequest.md +14 -0
  254. package/docs/UpdateMerchantByIdRequest.md +1 -1
  255. package/docs/WalletAddress.md +12 -0
  256. package/docs/WalletInfoEventData.md +3 -1
  257. package/docs/WalletsApi.md +7 -7
  258. package/docs/WebhookEventData.md +22 -14
  259. package/docs/WebhookEventDataType.md +3 -1
  260. package/docs/WebhookEventType.md +4 -0
  261. package/package.json +1 -1
  262. package/docs/ReceivedAmountPerAddress.md +0 -10
@@ -0,0 +1,272 @@
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 _IntermediaryBankInfo = _interopRequireDefault(require("./IntermediaryBankInfo"));
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 CreateDestinationBankAccountRequest model module.
30
+ * @module model/CreateDestinationBankAccountRequest
31
+ */
32
+ var CreateDestinationBankAccountRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>CreateDestinationBankAccountRequest</code>.
35
+ * @alias module:model/CreateDestinationBankAccountRequest
36
+ * @param destination_id {String} The destination ID.
37
+ * @param account_alias {String} The alias of the bank account.
38
+ * @param account_number {String} The bank account number.
39
+ * @param swift_code {String} The SWIFT or BIC code of the bank.
40
+ * @param currency {String} The currency of the bank account.
41
+ * @param beneficiary_name {String} The name of the account holder.
42
+ * @param beneficiary_address {String} The address of the account holder.
43
+ * @param bank_name {String} The name of the bank.
44
+ * @param bank_address {String} The address of the bank.
45
+ */
46
+ function CreateDestinationBankAccountRequest(destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address) {
47
+ _classCallCheck(this, CreateDestinationBankAccountRequest);
48
+ CreateDestinationBankAccountRequest.initialize(this, destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(CreateDestinationBankAccountRequest, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, destination_id, account_alias, account_number, swift_code, currency, beneficiary_name, beneficiary_address, bank_name, bank_address) {
59
+ obj['destination_id'] = destination_id;
60
+ obj['account_alias'] = account_alias;
61
+ obj['account_number'] = account_number;
62
+ obj['swift_code'] = swift_code;
63
+ obj['currency'] = currency;
64
+ obj['beneficiary_name'] = beneficiary_name;
65
+ obj['beneficiary_address'] = beneficiary_address;
66
+ obj['bank_name'] = bank_name;
67
+ obj['bank_address'] = bank_address;
68
+ }
69
+
70
+ /**
71
+ * Constructs a <code>CreateDestinationBankAccountRequest</code> from a plain JavaScript object, optionally creating a new instance.
72
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
73
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
74
+ * @param {module:model/CreateDestinationBankAccountRequest} obj Optional instance to populate.
75
+ * @return {module:model/CreateDestinationBankAccountRequest} The populated <code>CreateDestinationBankAccountRequest</code> instance.
76
+ */
77
+ }, {
78
+ key: "constructFromObject",
79
+ value: function constructFromObject(data, obj) {
80
+ if (data) {
81
+ obj = obj || new CreateDestinationBankAccountRequest();
82
+ if (data.hasOwnProperty('destination_id')) {
83
+ obj['destination_id'] = _ApiClient["default"].convertToType(data['destination_id'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('account_alias')) {
86
+ obj['account_alias'] = _ApiClient["default"].convertToType(data['account_alias'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('account_number')) {
89
+ obj['account_number'] = _ApiClient["default"].convertToType(data['account_number'], 'String');
90
+ }
91
+ if (data.hasOwnProperty('swift_code')) {
92
+ obj['swift_code'] = _ApiClient["default"].convertToType(data['swift_code'], 'String');
93
+ }
94
+ if (data.hasOwnProperty('currency')) {
95
+ obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('beneficiary_name')) {
98
+ obj['beneficiary_name'] = _ApiClient["default"].convertToType(data['beneficiary_name'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('beneficiary_address')) {
101
+ obj['beneficiary_address'] = _ApiClient["default"].convertToType(data['beneficiary_address'], 'String');
102
+ }
103
+ if (data.hasOwnProperty('bank_name')) {
104
+ obj['bank_name'] = _ApiClient["default"].convertToType(data['bank_name'], 'String');
105
+ }
106
+ if (data.hasOwnProperty('bank_address')) {
107
+ obj['bank_address'] = _ApiClient["default"].convertToType(data['bank_address'], 'String');
108
+ }
109
+ if (data.hasOwnProperty('iban_code')) {
110
+ obj['iban_code'] = _ApiClient["default"].convertToType(data['iban_code'], 'String');
111
+ }
112
+ if (data.hasOwnProperty('further_credit')) {
113
+ obj['further_credit'] = _ApiClient["default"].convertToType(data['further_credit'], 'String');
114
+ }
115
+ if (data.hasOwnProperty('intermediary_bank_info')) {
116
+ obj['intermediary_bank_info'] = _IntermediaryBankInfo["default"].constructFromObject(data['intermediary_bank_info']);
117
+ }
118
+ }
119
+ return obj;
120
+ }
121
+
122
+ /**
123
+ * Validates the JSON data with respect to <code>CreateDestinationBankAccountRequest</code>.
124
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
125
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateDestinationBankAccountRequest</code>.
126
+ */
127
+ }, {
128
+ key: "validateJSON",
129
+ value: function validateJSON(data) {
130
+ // check to make sure all required properties are present in the JSON string
131
+ var _iterator = _createForOfIteratorHelper(CreateDestinationBankAccountRequest.RequiredProperties),
132
+ _step;
133
+ try {
134
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
135
+ var property = _step.value;
136
+ if (!data.hasOwnProperty(property)) {
137
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
138
+ }
139
+ }
140
+ // ensure the json data is a string
141
+ } catch (err) {
142
+ _iterator.e(err);
143
+ } finally {
144
+ _iterator.f();
145
+ }
146
+ if (data['destination_id'] && !(typeof data['destination_id'] === 'string' || data['destination_id'] instanceof String)) {
147
+ throw new Error("Expected the field `destination_id` to be a primitive type in the JSON string but got " + data['destination_id']);
148
+ }
149
+ // ensure the json data is a string
150
+ if (data['account_alias'] && !(typeof data['account_alias'] === 'string' || data['account_alias'] instanceof String)) {
151
+ throw new Error("Expected the field `account_alias` to be a primitive type in the JSON string but got " + data['account_alias']);
152
+ }
153
+ // ensure the json data is a string
154
+ if (data['account_number'] && !(typeof data['account_number'] === 'string' || data['account_number'] instanceof String)) {
155
+ throw new Error("Expected the field `account_number` to be a primitive type in the JSON string but got " + data['account_number']);
156
+ }
157
+ // ensure the json data is a string
158
+ if (data['swift_code'] && !(typeof data['swift_code'] === 'string' || data['swift_code'] instanceof String)) {
159
+ throw new Error("Expected the field `swift_code` to be a primitive type in the JSON string but got " + data['swift_code']);
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['beneficiary_name'] && !(typeof data['beneficiary_name'] === 'string' || data['beneficiary_name'] instanceof String)) {
167
+ throw new Error("Expected the field `beneficiary_name` to be a primitive type in the JSON string but got " + data['beneficiary_name']);
168
+ }
169
+ // ensure the json data is a string
170
+ if (data['beneficiary_address'] && !(typeof data['beneficiary_address'] === 'string' || data['beneficiary_address'] instanceof String)) {
171
+ throw new Error("Expected the field `beneficiary_address` to be a primitive type in the JSON string but got " + data['beneficiary_address']);
172
+ }
173
+ // ensure the json data is a string
174
+ if (data['bank_name'] && !(typeof data['bank_name'] === 'string' || data['bank_name'] instanceof String)) {
175
+ throw new Error("Expected the field `bank_name` to be a primitive type in the JSON string but got " + data['bank_name']);
176
+ }
177
+ // ensure the json data is a string
178
+ if (data['bank_address'] && !(typeof data['bank_address'] === 'string' || data['bank_address'] instanceof String)) {
179
+ throw new Error("Expected the field `bank_address` to be a primitive type in the JSON string but got " + data['bank_address']);
180
+ }
181
+ // ensure the json data is a string
182
+ if (data['iban_code'] && !(typeof data['iban_code'] === 'string' || data['iban_code'] instanceof String)) {
183
+ throw new Error("Expected the field `iban_code` to be a primitive type in the JSON string but got " + data['iban_code']);
184
+ }
185
+ // ensure the json data is a string
186
+ if (data['further_credit'] && !(typeof data['further_credit'] === 'string' || data['further_credit'] instanceof String)) {
187
+ throw new Error("Expected the field `further_credit` to be a primitive type in the JSON string but got " + data['further_credit']);
188
+ }
189
+ // validate the optional field `intermediary_bank_info`
190
+ if (data['intermediary_bank_info']) {
191
+ // data not null
192
+ if (!!_IntermediaryBankInfo["default"].validateJSON) {
193
+ _IntermediaryBankInfo["default"].validateJSON(data['intermediary_bank_info']);
194
+ }
195
+ }
196
+ return true;
197
+ }
198
+ }]);
199
+ }();
200
+ CreateDestinationBankAccountRequest.RequiredProperties = ["destination_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address"];
201
+
202
+ /**
203
+ * The destination ID.
204
+ * @member {String} destination_id
205
+ */
206
+ CreateDestinationBankAccountRequest.prototype['destination_id'] = undefined;
207
+
208
+ /**
209
+ * The alias of the bank account.
210
+ * @member {String} account_alias
211
+ */
212
+ CreateDestinationBankAccountRequest.prototype['account_alias'] = undefined;
213
+
214
+ /**
215
+ * The bank account number.
216
+ * @member {String} account_number
217
+ */
218
+ CreateDestinationBankAccountRequest.prototype['account_number'] = undefined;
219
+
220
+ /**
221
+ * The SWIFT or BIC code of the bank.
222
+ * @member {String} swift_code
223
+ */
224
+ CreateDestinationBankAccountRequest.prototype['swift_code'] = undefined;
225
+
226
+ /**
227
+ * The currency of the bank account.
228
+ * @member {String} currency
229
+ */
230
+ CreateDestinationBankAccountRequest.prototype['currency'] = undefined;
231
+
232
+ /**
233
+ * The name of the account holder.
234
+ * @member {String} beneficiary_name
235
+ */
236
+ CreateDestinationBankAccountRequest.prototype['beneficiary_name'] = undefined;
237
+
238
+ /**
239
+ * The address of the account holder.
240
+ * @member {String} beneficiary_address
241
+ */
242
+ CreateDestinationBankAccountRequest.prototype['beneficiary_address'] = undefined;
243
+
244
+ /**
245
+ * The name of the bank.
246
+ * @member {String} bank_name
247
+ */
248
+ CreateDestinationBankAccountRequest.prototype['bank_name'] = undefined;
249
+
250
+ /**
251
+ * The address of the bank.
252
+ * @member {String} bank_address
253
+ */
254
+ CreateDestinationBankAccountRequest.prototype['bank_address'] = undefined;
255
+
256
+ /**
257
+ * The IBAN code of the bank account.
258
+ * @member {String} iban_code
259
+ */
260
+ CreateDestinationBankAccountRequest.prototype['iban_code'] = undefined;
261
+
262
+ /**
263
+ * The further credit of the bank account.
264
+ * @member {String} further_credit
265
+ */
266
+ CreateDestinationBankAccountRequest.prototype['further_credit'] = undefined;
267
+
268
+ /**
269
+ * @member {module:model/IntermediaryBankInfo} intermediary_bank_info
270
+ */
271
+ CreateDestinationBankAccountRequest.prototype['intermediary_bank_info'] = undefined;
272
+ var _default = exports["default"] = CreateDestinationBankAccountRequest;
@@ -0,0 +1,235 @@
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 _CreateDestinationBankAccount = _interopRequireDefault(require("./CreateDestinationBankAccount"));
9
+ var _CreateWalletAddress = _interopRequireDefault(require("./CreateWalletAddress"));
10
+ var _DestinationType = _interopRequireDefault(require("./DestinationType"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ 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); }
13
+ 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; } } }; }
14
+ 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; } }
15
+ 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; }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ 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); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ 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); } /**
21
+ * Cobo Wallet as a Service 2.0
22
+ *
23
+ * Contact: help@cobo.com
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The CreateDestinationRequest model module.
32
+ * @module model/CreateDestinationRequest
33
+ */
34
+ var CreateDestinationRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>CreateDestinationRequest</code>.
37
+ * @alias module:model/CreateDestinationRequest
38
+ * @param destination_name {String} The destination name.
39
+ * @param destination_type {module:model/DestinationType}
40
+ */
41
+ function CreateDestinationRequest(destination_name, destination_type) {
42
+ _classCallCheck(this, CreateDestinationRequest);
43
+ CreateDestinationRequest.initialize(this, destination_name, destination_type);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(CreateDestinationRequest, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, destination_name, destination_type) {
54
+ obj['destination_name'] = destination_name;
55
+ obj['destination_type'] = destination_type;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>CreateDestinationRequest</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/CreateDestinationRequest} obj Optional instance to populate.
63
+ * @return {module:model/CreateDestinationRequest} The populated <code>CreateDestinationRequest</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new CreateDestinationRequest();
70
+ if (data.hasOwnProperty('destination_name')) {
71
+ obj['destination_name'] = _ApiClient["default"].convertToType(data['destination_name'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('destination_type')) {
74
+ obj['destination_type'] = _DestinationType["default"].constructFromObject(data['destination_type']);
75
+ }
76
+ if (data.hasOwnProperty('wallet_addresses')) {
77
+ obj['wallet_addresses'] = _ApiClient["default"].convertToType(data['wallet_addresses'], [_CreateWalletAddress["default"]]);
78
+ }
79
+ if (data.hasOwnProperty('bank_accounts')) {
80
+ obj['bank_accounts'] = _ApiClient["default"].convertToType(data['bank_accounts'], [_CreateDestinationBankAccount["default"]]);
81
+ }
82
+ if (data.hasOwnProperty('merchant_id')) {
83
+ obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('country')) {
86
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('email')) {
89
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
90
+ }
91
+ if (data.hasOwnProperty('contact_address')) {
92
+ obj['contact_address'] = _ApiClient["default"].convertToType(data['contact_address'], 'String');
93
+ }
94
+ }
95
+ return obj;
96
+ }
97
+
98
+ /**
99
+ * Validates the JSON data with respect to <code>CreateDestinationRequest</code>.
100
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
101
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateDestinationRequest</code>.
102
+ */
103
+ }, {
104
+ key: "validateJSON",
105
+ value: function validateJSON(data) {
106
+ // check to make sure all required properties are present in the JSON string
107
+ var _iterator = _createForOfIteratorHelper(CreateDestinationRequest.RequiredProperties),
108
+ _step;
109
+ try {
110
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
111
+ var property = _step.value;
112
+ if (!data.hasOwnProperty(property)) {
113
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
114
+ }
115
+ }
116
+ // ensure the json data is a string
117
+ } catch (err) {
118
+ _iterator.e(err);
119
+ } finally {
120
+ _iterator.f();
121
+ }
122
+ if (data['destination_name'] && !(typeof data['destination_name'] === 'string' || data['destination_name'] instanceof String)) {
123
+ throw new Error("Expected the field `destination_name` to be a primitive type in the JSON string but got " + data['destination_name']);
124
+ }
125
+ if (data['wallet_addresses']) {
126
+ // data not null
127
+ // ensure the json data is an array
128
+ if (!Array.isArray(data['wallet_addresses'])) {
129
+ throw new Error("Expected the field `wallet_addresses` to be an array in the JSON data but got " + data['wallet_addresses']);
130
+ }
131
+ // validate the optional field `wallet_addresses` (array)
132
+ var _iterator2 = _createForOfIteratorHelper(data['wallet_addresses']),
133
+ _step2;
134
+ try {
135
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
136
+ var item = _step2.value;
137
+ _CreateWalletAddress["default"].validateJSON(item);
138
+ }
139
+ } catch (err) {
140
+ _iterator2.e(err);
141
+ } finally {
142
+ _iterator2.f();
143
+ }
144
+ ;
145
+ }
146
+ if (data['bank_accounts']) {
147
+ // data not null
148
+ // ensure the json data is an array
149
+ if (!Array.isArray(data['bank_accounts'])) {
150
+ throw new Error("Expected the field `bank_accounts` to be an array in the JSON data but got " + data['bank_accounts']);
151
+ }
152
+ // validate the optional field `bank_accounts` (array)
153
+ var _iterator3 = _createForOfIteratorHelper(data['bank_accounts']),
154
+ _step3;
155
+ try {
156
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
157
+ var _item = _step3.value;
158
+ _CreateDestinationBankAccount["default"].validateJSON(_item);
159
+ }
160
+ } catch (err) {
161
+ _iterator3.e(err);
162
+ } finally {
163
+ _iterator3.f();
164
+ }
165
+ ;
166
+ }
167
+ // ensure the json data is a string
168
+ if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
169
+ throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
170
+ }
171
+ // ensure the json data is a string
172
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
173
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
174
+ }
175
+ // ensure the json data is a string
176
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
177
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
178
+ }
179
+ // ensure the json data is a string
180
+ if (data['contact_address'] && !(typeof data['contact_address'] === 'string' || data['contact_address'] instanceof String)) {
181
+ throw new Error("Expected the field `contact_address` to be a primitive type in the JSON string but got " + data['contact_address']);
182
+ }
183
+ return true;
184
+ }
185
+ }]);
186
+ }();
187
+ CreateDestinationRequest.RequiredProperties = ["destination_name", "destination_type"];
188
+
189
+ /**
190
+ * The destination name.
191
+ * @member {String} destination_name
192
+ */
193
+ CreateDestinationRequest.prototype['destination_name'] = undefined;
194
+
195
+ /**
196
+ * @member {module:model/DestinationType} destination_type
197
+ */
198
+ CreateDestinationRequest.prototype['destination_type'] = undefined;
199
+
200
+ /**
201
+ * The wallet addresses of the destination.
202
+ * @member {Array.<module:model/CreateWalletAddress>} wallet_addresses
203
+ */
204
+ CreateDestinationRequest.prototype['wallet_addresses'] = undefined;
205
+
206
+ /**
207
+ * The bank accounts of the destination.
208
+ * @member {Array.<module:model/CreateDestinationBankAccount>} bank_accounts
209
+ */
210
+ CreateDestinationRequest.prototype['bank_accounts'] = undefined;
211
+
212
+ /**
213
+ * The ID of the merchant linked to the destination.
214
+ * @member {String} merchant_id
215
+ */
216
+ CreateDestinationRequest.prototype['merchant_id'] = undefined;
217
+
218
+ /**
219
+ * The country of the destination, in ISO 3166-1 alpha-3 format.
220
+ * @member {String} country
221
+ */
222
+ CreateDestinationRequest.prototype['country'] = undefined;
223
+
224
+ /**
225
+ * The email of the destination.
226
+ * @member {String} email
227
+ */
228
+ CreateDestinationRequest.prototype['email'] = undefined;
229
+
230
+ /**
231
+ * The contact address of the destination.
232
+ * @member {String} contact_address
233
+ */
234
+ CreateDestinationRequest.prototype['contact_address'] = undefined;
235
+ var _default = exports["default"] = CreateDestinationRequest;
@@ -0,0 +1,140 @@
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 CreateDestinationWalletAddressRequest model module.
29
+ * @module model/CreateDestinationWalletAddressRequest
30
+ */
31
+ var CreateDestinationWalletAddressRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CreateDestinationWalletAddressRequest</code>.
34
+ * @alias module:model/CreateDestinationWalletAddressRequest
35
+ * @param destination_id {String} The destination ID.
36
+ * @param address {String} The wallet address.
37
+ * @param chain_id {String} The chain ID of the cryptocurrency.
38
+ */
39
+ function CreateDestinationWalletAddressRequest(destination_id, address, chain_id) {
40
+ _classCallCheck(this, CreateDestinationWalletAddressRequest);
41
+ CreateDestinationWalletAddressRequest.initialize(this, destination_id, address, chain_id);
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(CreateDestinationWalletAddressRequest, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, destination_id, address, chain_id) {
52
+ obj['destination_id'] = destination_id;
53
+ obj['address'] = address;
54
+ obj['chain_id'] = chain_id;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>CreateDestinationWalletAddressRequest</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/CreateDestinationWalletAddressRequest} obj Optional instance to populate.
62
+ * @return {module:model/CreateDestinationWalletAddressRequest} The populated <code>CreateDestinationWalletAddressRequest</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new CreateDestinationWalletAddressRequest();
69
+ if (data.hasOwnProperty('destination_id')) {
70
+ obj['destination_id'] = _ApiClient["default"].convertToType(data['destination_id'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('address')) {
73
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('chain_id')) {
76
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>CreateDestinationWalletAddressRequest</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateDestinationWalletAddressRequest</code>.
86
+ */
87
+ }, {
88
+ key: "validateJSON",
89
+ value: function validateJSON(data) {
90
+ // check to make sure all required properties are present in the JSON string
91
+ var _iterator = _createForOfIteratorHelper(CreateDestinationWalletAddressRequest.RequiredProperties),
92
+ _step;
93
+ try {
94
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
95
+ var property = _step.value;
96
+ if (!data.hasOwnProperty(property)) {
97
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
98
+ }
99
+ }
100
+ // ensure the json data is a string
101
+ } catch (err) {
102
+ _iterator.e(err);
103
+ } finally {
104
+ _iterator.f();
105
+ }
106
+ if (data['destination_id'] && !(typeof data['destination_id'] === 'string' || data['destination_id'] instanceof String)) {
107
+ throw new Error("Expected the field `destination_id` to be a primitive type in the JSON string but got " + data['destination_id']);
108
+ }
109
+ // ensure the json data is a string
110
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
111
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
115
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
116
+ }
117
+ return true;
118
+ }
119
+ }]);
120
+ }();
121
+ CreateDestinationWalletAddressRequest.RequiredProperties = ["destination_id", "address", "chain_id"];
122
+
123
+ /**
124
+ * The destination ID.
125
+ * @member {String} destination_id
126
+ */
127
+ CreateDestinationWalletAddressRequest.prototype['destination_id'] = undefined;
128
+
129
+ /**
130
+ * The wallet address.
131
+ * @member {String} address
132
+ */
133
+ CreateDestinationWalletAddressRequest.prototype['address'] = undefined;
134
+
135
+ /**
136
+ * The chain ID of the cryptocurrency.
137
+ * @member {String} chain_id
138
+ */
139
+ CreateDestinationWalletAddressRequest.prototype['chain_id'] = undefined;
140
+ var _default = exports["default"] = CreateDestinationWalletAddressRequest;