@cobo/cobo-waas2 1.20.0 → 1.22.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 (224) hide show
  1. package/README.md +60 -4
  2. package/dist/ApiClient.js +11 -2
  3. package/dist/PreRequestScript.js +2 -4
  4. package/dist/api/AutoSweepApi.js +289 -0
  5. package/dist/api/PaymentApi.js +386 -24
  6. package/dist/api/TokenizationApi.js +1024 -0
  7. package/dist/api/TransactionsApi.js +103 -2
  8. package/dist/api/WalletsApi.js +2 -2
  9. package/dist/crypto/ApiSigner.js +5 -1
  10. package/dist/index.js +175 -0
  11. package/dist/model/AddressesEventData.js +3 -3
  12. package/dist/model/ApprovalDetail.js +7 -7
  13. package/dist/model/AutoSweepTask.js +198 -0
  14. package/dist/model/AutoSweepTaskStatus.js +61 -0
  15. package/dist/model/BalanceUpdateInfoEventData.js +3 -3
  16. package/dist/model/ChainsEventData.js +3 -3
  17. package/dist/model/CreateAutoSweepTask.js +126 -0
  18. package/dist/model/CreateCryptoAddressRequest.js +138 -0
  19. package/dist/model/CreateCustodialWalletParams.js +9 -0
  20. package/dist/model/CreateExchangeWalletParams.js +14 -0
  21. package/dist/model/CreateMpcWalletParams.js +14 -0
  22. package/dist/model/CreatePaymentOrderRequest.js +5 -5
  23. package/dist/model/CreateSafeWalletParams.js +9 -0
  24. package/dist/model/CreateSettlement.js +27 -4
  25. package/dist/model/CreateSmartContractWalletParams.js +6 -0
  26. package/dist/model/CreateSweepToAddress.js +126 -0
  27. package/dist/model/CreateWalletParams.js +6 -0
  28. package/dist/model/CreatedWalletInfo.js +6 -0
  29. package/dist/model/CryptoAddress.js +12 -12
  30. package/dist/model/CustodialWalletInfo.js +9 -0
  31. package/dist/model/DeleteCryptoAddress201Response.js +110 -0
  32. package/dist/model/ExchangeWalletInfo.js +14 -0
  33. package/dist/model/ForcedSweep.js +9 -9
  34. package/dist/model/ForcedSweepRequest.js +8 -9
  35. package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
  36. package/dist/model/ListAutoSweepTask200Response.js +123 -0
  37. package/dist/model/ListMerchantBalances200Response.js +107 -0
  38. package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
  39. package/dist/model/ListSettlementDetails200Response.js +123 -0
  40. package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
  41. package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
  42. package/dist/model/MPCVaultEventData.js +3 -3
  43. package/dist/model/MPCWalletInfo.js +14 -0
  44. package/dist/model/MerchantBalance.js +201 -0
  45. package/dist/model/PaymentAddressUpdateEventData.js +13 -13
  46. package/dist/model/PaymentOrderEventData.js +3 -3
  47. package/dist/model/PaymentRefundEventData.js +3 -3
  48. package/dist/model/PaymentSettlementEvent.js +42 -3
  49. package/dist/model/PaymentTransactionEventData.js +6 -6
  50. package/dist/model/PaymentWalletBalance.js +177 -0
  51. package/dist/model/PspBalance.js +175 -0
  52. package/dist/model/ReceivedAmountPerAddress.js +126 -0
  53. package/dist/model/SafeWallet.js +9 -0
  54. package/dist/model/Settlement.js +27 -0
  55. package/dist/model/SettlementDetail.js +26 -0
  56. package/dist/model/SettlementInfo.js +7 -7
  57. package/dist/model/SmartContractWalletInfo.js +6 -0
  58. package/dist/model/SuspendedTokenEventData.js +3 -3
  59. package/dist/model/SweepToAddress.js +135 -0
  60. package/dist/model/SweepToAddressStatus.js +61 -0
  61. package/dist/model/TSSRequestWebhookEventData.js +3 -3
  62. package/dist/model/TokenListingEventData.js +3 -3
  63. package/dist/model/TokenizationActivityInfo.js +8 -4
  64. package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
  65. package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
  66. package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
  67. package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
  68. package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
  69. package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
  70. package/dist/model/TokenizationBurnTokenRequest.js +13 -0
  71. package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
  72. package/dist/model/TokenizationContractCallParamsData.js +43 -9
  73. package/dist/model/TokenizationContractCallRequest.js +13 -0
  74. package/dist/model/TokenizationContractCallType.js +5 -0
  75. package/dist/model/TokenizationERC20TokenParams.js +4 -4
  76. package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
  77. package/dist/model/TokenizationEvmContractCallParams.js +2 -2
  78. package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
  79. package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
  80. package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
  81. package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
  82. package/dist/model/TokenizationMintTokenRequest.js +13 -0
  83. package/dist/model/TokenizationMpcOperationSource.js +2 -2
  84. package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
  85. package/dist/model/TokenizationPauseTokenRequest.js +13 -0
  86. package/dist/model/TokenizationSOLTokenParams.js +173 -0
  87. package/dist/model/TokenizationSolContractCallParams.js +137 -0
  88. package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
  89. package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
  90. package/dist/model/TokenizationTokenDetailInfo.js +6 -6
  91. package/dist/model/TokenizationTokenInfo.js +4 -4
  92. package/dist/model/TokenizationTokenOperationSource.js +1 -1
  93. package/dist/model/TokenizationTokenPermissionParams.js +1 -1
  94. package/dist/model/TokenizationTokenPermissionType.js +15 -0
  95. package/dist/model/TokenizationTokenStandard.js +5 -0
  96. package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
  97. package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
  98. package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
  99. package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
  100. package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
  101. package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
  102. package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
  103. package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
  104. package/dist/model/TokenizationWeb3OperationSource.js +2 -2
  105. package/dist/model/TokensEventData.js +3 -3
  106. package/dist/model/TopUpAddress.js +0 -1
  107. package/dist/model/TransactionWebhookEventData.js +3 -3
  108. package/dist/model/UpdateCustodialWalletParams.js +13 -6
  109. package/dist/model/UpdateMpcWalletParams.js +13 -6
  110. package/dist/model/UpdateTopUpAddress.js +3 -3
  111. package/dist/model/UpdateWalletParams.js +6 -0
  112. package/dist/model/WalletInfo.js +6 -0
  113. package/dist/model/WalletInfoEventData.js +3 -3
  114. package/dist/model/WebhookEventData.js +19 -7
  115. package/dist/model/WebhookEventDataType.js +2 -2
  116. package/docs/AddressesEventData.md +1 -1
  117. package/docs/ApprovalDetail.md +1 -1
  118. package/docs/AutoSweepApi.md +285 -0
  119. package/docs/AutoSweepTask.md +16 -0
  120. package/docs/AutoSweepTaskStatus.md +12 -0
  121. package/docs/BalanceUpdateInfoEventData.md +1 -1
  122. package/docs/ChainsEventData.md +1 -1
  123. package/docs/CreateAutoSweepTask.md +10 -0
  124. package/docs/CreateCryptoAddressRequest.md +11 -0
  125. package/docs/CreateCustodialWalletParams.md +1 -0
  126. package/docs/CreateExchangeWalletParams.md +1 -0
  127. package/docs/CreateMpcWalletParams.md +1 -0
  128. package/docs/CreatePaymentOrderRequest.md +3 -3
  129. package/docs/CreateSafeWalletParams.md +1 -0
  130. package/docs/CreateSettlement.md +1 -1
  131. package/docs/CreateSmartContractWalletParams.md +1 -0
  132. package/docs/CreateSweepToAddress.md +10 -0
  133. package/docs/CreateWalletParams.md +1 -0
  134. package/docs/CreatedWalletInfo.md +1 -0
  135. package/docs/CryptoAddress.md +1 -1
  136. package/docs/CustodialWalletInfo.md +1 -0
  137. package/docs/DeleteCryptoAddress201Response.md +9 -0
  138. package/docs/ExchangeWalletInfo.md +1 -0
  139. package/docs/ForcedSweep.md +7 -7
  140. package/docs/ForcedSweepRequest.md +4 -4
  141. package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
  142. package/docs/ListAutoSweepTask200Response.md +10 -0
  143. package/docs/ListMerchantBalances200Response.md +9 -0
  144. package/docs/ListPaymentWalletBalances200Response.md +9 -0
  145. package/docs/ListSettlementDetails200Response.md +10 -0
  146. package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
  147. package/docs/ListWalletSweepToAddresses200Response.md +9 -0
  148. package/docs/MPCVaultEventData.md +1 -1
  149. package/docs/MPCWalletInfo.md +1 -0
  150. package/docs/MerchantBalance.md +16 -0
  151. package/docs/PaymentAddressUpdateEventData.md +6 -6
  152. package/docs/PaymentApi.md +403 -16
  153. package/docs/PaymentOrderEventData.md +1 -1
  154. package/docs/PaymentRefundEventData.md +1 -1
  155. package/docs/PaymentSettlementEvent.md +4 -1
  156. package/docs/PaymentTransactionEventData.md +4 -4
  157. package/docs/PaymentWalletBalance.md +14 -0
  158. package/docs/PspBalance.md +14 -0
  159. package/docs/ReceivedAmountPerAddress.md +10 -0
  160. package/docs/SafeWallet.md +1 -0
  161. package/docs/Settlement.md +3 -0
  162. package/docs/SettlementDetail.md +2 -0
  163. package/docs/SettlementInfo.md +6 -6
  164. package/docs/SmartContractWalletInfo.md +1 -0
  165. package/docs/SuspendedTokenEventData.md +1 -1
  166. package/docs/SweepToAddress.md +11 -0
  167. package/docs/SweepToAddressStatus.md +12 -0
  168. package/docs/TSSRequestWebhookEventData.md +1 -1
  169. package/docs/TokenListingEventData.md +1 -1
  170. package/docs/TokenizationActivityInfo.md +2 -2
  171. package/docs/TokenizationAllowlistActivationRequest.md +1 -0
  172. package/docs/TokenizationAllowlistAddressNote.md +3 -3
  173. package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
  174. package/docs/TokenizationApi.md +1069 -0
  175. package/docs/TokenizationBlocklistAddressNote.md +3 -3
  176. package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
  177. package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
  178. package/docs/TokenizationBurnTokenRequest.md +1 -0
  179. package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
  180. package/docs/TokenizationContractCallParamsData.md +2 -1
  181. package/docs/TokenizationContractCallRequest.md +1 -0
  182. package/docs/TokenizationContractCallType.md +2 -0
  183. package/docs/TokenizationERC20TokenParams.md +1 -1
  184. package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
  185. package/docs/TokenizationEvmContractCallParams.md +1 -1
  186. package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
  187. package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
  188. package/docs/TokenizationIssuedTokenRequest.md +2 -1
  189. package/docs/TokenizationMintEstimateFeeParams.md +1 -0
  190. package/docs/TokenizationMintTokenRequest.md +1 -0
  191. package/docs/TokenizationMpcOperationSource.md +1 -1
  192. package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
  193. package/docs/TokenizationPauseTokenRequest.md +1 -0
  194. package/docs/TokenizationSOLTokenParams.md +14 -0
  195. package/docs/TokenizationSolContractCallParams.md +10 -0
  196. package/docs/TokenizationSolTokenPermissionParams.md +13 -0
  197. package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
  198. package/docs/TokenizationTokenDetailInfo.md +1 -1
  199. package/docs/TokenizationTokenInfo.md +1 -1
  200. package/docs/TokenizationTokenOperationSource.md +1 -1
  201. package/docs/TokenizationTokenPermissionType.md +6 -0
  202. package/docs/TokenizationTokenStandard.md +2 -0
  203. package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
  204. package/docs/TokenizationUnpauseTokenRequest.md +1 -0
  205. package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
  206. package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
  207. package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
  208. package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
  209. package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
  210. package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
  211. package/docs/TokenizationWeb3OperationSource.md +1 -1
  212. package/docs/TokensEventData.md +1 -1
  213. package/docs/TransactionWebhookEventData.md +1 -1
  214. package/docs/TransactionsApi.md +113 -1
  215. package/docs/UpdateCustodialWalletParams.md +2 -1
  216. package/docs/UpdateMpcWalletParams.md +2 -1
  217. package/docs/UpdateTopUpAddress.md +1 -1
  218. package/docs/UpdateWalletParams.md +1 -0
  219. package/docs/WalletInfo.md +1 -0
  220. package/docs/WalletInfoEventData.md +1 -1
  221. package/docs/WalletsApi.md +1 -1
  222. package/docs/WebhookEventData.md +9 -7
  223. package/docs/WebhookEventDataType.md +1 -1
  224. package/package.json +1 -1
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _SettlementDetail = _interopRequireDefault(require("./SettlementDetail"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The ListSettlementDetails200Response model module.
31
+ * @module model/ListSettlementDetails200Response
32
+ */
33
+ var ListSettlementDetails200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListSettlementDetails200Response</code>.
36
+ * @alias module:model/ListSettlementDetails200Response
37
+ */
38
+ function ListSettlementDetails200Response() {
39
+ _classCallCheck(this, ListSettlementDetails200Response);
40
+ ListSettlementDetails200Response.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(ListSettlementDetails200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListSettlementDetails200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListSettlementDetails200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListSettlementDetails200Response} The populated <code>ListSettlementDetails200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListSettlementDetails200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SettlementDetail["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListSettlementDetails200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListSettlementDetails200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _SettlementDetail["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/SettlementDetail>} data
116
+ */
117
+ ListSettlementDetails200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListSettlementDetails200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListSettlementDetails200Response;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _TokenizationBlocklistAddressNote = _interopRequireDefault(require("./TokenizationBlocklistAddressNote"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The ListTokenizationBlocklistAddresses200Response model module.
31
+ * @module model/ListTokenizationBlocklistAddresses200Response
32
+ */
33
+ var ListTokenizationBlocklistAddresses200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListTokenizationBlocklistAddresses200Response</code>.
36
+ * @alias module:model/ListTokenizationBlocklistAddresses200Response
37
+ * @param data {Array.<module:model/TokenizationBlocklistAddressNote>}
38
+ * @param pagination {module:model/Pagination}
39
+ */
40
+ function ListTokenizationBlocklistAddresses200Response(data, pagination) {
41
+ _classCallCheck(this, ListTokenizationBlocklistAddresses200Response);
42
+ ListTokenizationBlocklistAddresses200Response.initialize(this, data, pagination);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(ListTokenizationBlocklistAddresses200Response, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, data, pagination) {
53
+ obj['data'] = data;
54
+ obj['pagination'] = pagination;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>ListTokenizationBlocklistAddresses200Response</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/ListTokenizationBlocklistAddresses200Response} obj Optional instance to populate.
62
+ * @return {module:model/ListTokenizationBlocklistAddresses200Response} The populated <code>ListTokenizationBlocklistAddresses200Response</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new ListTokenizationBlocklistAddresses200Response();
69
+ if (data.hasOwnProperty('data')) {
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_TokenizationBlocklistAddressNote["default"]]);
71
+ }
72
+ if (data.hasOwnProperty('pagination')) {
73
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>ListTokenizationBlocklistAddresses200Response</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListTokenizationBlocklistAddresses200Response</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(ListTokenizationBlocklistAddresses200Response.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['data']) {
103
+ // data not null
104
+ // ensure the json data is an array
105
+ if (!Array.isArray(data['data'])) {
106
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
107
+ }
108
+ // validate the optional field `data` (array)
109
+ var _iterator2 = _createForOfIteratorHelper(data['data']),
110
+ _step2;
111
+ try {
112
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
113
+ var item = _step2.value;
114
+ _TokenizationBlocklistAddressNote["default"].validateJSON(item);
115
+ }
116
+ } catch (err) {
117
+ _iterator2.e(err);
118
+ } finally {
119
+ _iterator2.f();
120
+ }
121
+ ;
122
+ }
123
+ // validate the optional field `pagination`
124
+ if (data['pagination']) {
125
+ // data not null
126
+ if (!!_Pagination["default"].validateJSON) {
127
+ _Pagination["default"].validateJSON(data['pagination']);
128
+ }
129
+ }
130
+ return true;
131
+ }
132
+ }]);
133
+ }();
134
+ ListTokenizationBlocklistAddresses200Response.RequiredProperties = ["data", "pagination"];
135
+
136
+ /**
137
+ * @member {Array.<module:model/TokenizationBlocklistAddressNote>} data
138
+ */
139
+ ListTokenizationBlocklistAddresses200Response.prototype['data'] = undefined;
140
+
141
+ /**
142
+ * @member {module:model/Pagination} pagination
143
+ */
144
+ ListTokenizationBlocklistAddresses200Response.prototype['pagination'] = undefined;
145
+ var _default = exports["default"] = ListTokenizationBlocklistAddresses200Response;
@@ -0,0 +1,107 @@
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 _SweepToAddress = _interopRequireDefault(require("./SweepToAddress"));
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 ListWalletSweepToAddresses200Response model module.
30
+ * @module model/ListWalletSweepToAddresses200Response
31
+ */
32
+ var ListWalletSweepToAddresses200Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>ListWalletSweepToAddresses200Response</code>.
35
+ * @alias module:model/ListWalletSweepToAddresses200Response
36
+ */
37
+ function ListWalletSweepToAddresses200Response() {
38
+ _classCallCheck(this, ListWalletSweepToAddresses200Response);
39
+ ListWalletSweepToAddresses200Response.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(ListWalletSweepToAddresses200Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>ListWalletSweepToAddresses200Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/ListWalletSweepToAddresses200Response} obj Optional instance to populate.
56
+ * @return {module:model/ListWalletSweepToAddresses200Response} The populated <code>ListWalletSweepToAddresses200Response</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new ListWalletSweepToAddresses200Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SweepToAddress["default"]]);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>ListWalletSweepToAddresses200Response</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListWalletSweepToAddresses200Response</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ if (data['data']) {
79
+ // data not null
80
+ // ensure the json data is an array
81
+ if (!Array.isArray(data['data'])) {
82
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
83
+ }
84
+ // validate the optional field `data` (array)
85
+ var _iterator = _createForOfIteratorHelper(data['data']),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var item = _step.value;
90
+ _SweepToAddress["default"].validateJSON(item);
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
97
+ ;
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ /**
104
+ * @member {Array.<module:model/SweepToAddress>} data
105
+ */
106
+ ListWalletSweepToAddresses200Response.prototype['data'] = undefined;
107
+ var _default = exports["default"] = ListWalletSweepToAddresses200Response;
@@ -38,7 +38,7 @@ var MPCVaultEventData = /*#__PURE__*/function () {
38
38
  * @alias module:model/MPCVaultEventData
39
39
  * @implements module:model/WebhookEventDataType
40
40
  * @implements module:model/MPCVault
41
- * @param data_type {module:model/MPCVaultEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
41
+ * @param data_type {module:model/MPCVaultEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
42
42
  */
43
43
  function MPCVaultEventData(data_type) {
44
44
  _classCallCheck(this, MPCVaultEventData);
@@ -164,7 +164,7 @@ var MPCVaultEventData = /*#__PURE__*/function () {
164
164
  MPCVaultEventData.RequiredProperties = ["data_type"];
165
165
 
166
166
  /**
167
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
167
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
168
168
  * @member {module:model/MPCVaultEventData.DataTypeEnum} data_type
169
169
  */
170
170
  MPCVaultEventData.prototype['data_type'] = undefined;
@@ -205,7 +205,7 @@ MPCVaultEventData.prototype['created_timestamp'] = undefined;
205
205
 
206
206
  // Implement WebhookEventDataType interface:
207
207
  /**
208
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The payment address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
208
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
209
209
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
210
210
  */
211
211
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -93,6 +93,9 @@ var MPCWalletInfo = /*#__PURE__*/function () {
93
93
  if (data.hasOwnProperty('org_id')) {
94
94
  obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
95
95
  }
96
+ if (data.hasOwnProperty('enable_auto_sweep')) {
97
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
98
+ }
96
99
  if (data.hasOwnProperty('project_id')) {
97
100
  obj['project_id'] = _ApiClient["default"].convertToType(data['project_id'], 'String');
98
101
  }
@@ -194,6 +197,12 @@ MPCWalletInfo.prototype['name'] = undefined;
194
197
  */
195
198
  MPCWalletInfo.prototype['org_id'] = undefined;
196
199
 
200
+ /**
201
+ * Enable the auto sweep feature for the wallet
202
+ * @member {Boolean} enable_auto_sweep
203
+ */
204
+ MPCWalletInfo.prototype['enable_auto_sweep'] = undefined;
205
+
197
206
  /**
198
207
  * The project ID.
199
208
  * @member {String} project_id
@@ -242,4 +251,9 @@ _CustodialWalletInfo["default"].prototype['name'] = undefined;
242
251
  * @member {String} org_id
243
252
  */
244
253
  _CustodialWalletInfo["default"].prototype['org_id'] = undefined;
254
+ /**
255
+ * Enable the auto sweep feature for the wallet
256
+ * @member {Boolean} enable_auto_sweep
257
+ */
258
+ _CustodialWalletInfo["default"].prototype['enable_auto_sweep'] = undefined;
245
259
  var _default = exports["default"] = MPCWalletInfo;
@@ -0,0 +1,201 @@
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 _AcquiringType = _interopRequireDefault(require("./AcquiringType"));
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 MerchantBalance model module.
30
+ * @module model/MerchantBalance
31
+ */
32
+ var MerchantBalance = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>MerchantBalance</code>.
35
+ * @alias module:model/MerchantBalance
36
+ * @param merchant_id {String} The merchant ID.
37
+ * @param token_id {String} The ID of the cryptocurrency.
38
+ * @param acquiring_type {module:model/AcquiringType}
39
+ */
40
+ function MerchantBalance(merchant_id, token_id, acquiring_type) {
41
+ _classCallCheck(this, MerchantBalance);
42
+ MerchantBalance.initialize(this, merchant_id, token_id, acquiring_type);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(MerchantBalance, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, merchant_id, token_id, acquiring_type) {
53
+ obj['merchant_id'] = merchant_id;
54
+ obj['token_id'] = token_id;
55
+ obj['acquiring_type'] = acquiring_type;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>MerchantBalance</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/MerchantBalance} obj Optional instance to populate.
63
+ * @return {module:model/MerchantBalance} The populated <code>MerchantBalance</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new MerchantBalance();
70
+ if (data.hasOwnProperty('merchant_id')) {
71
+ obj['merchant_id'] = _ApiClient["default"].convertToType(data['merchant_id'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('token_id')) {
74
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('acquiring_type')) {
77
+ obj['acquiring_type'] = _AcquiringType["default"].constructFromObject(data['acquiring_type']);
78
+ }
79
+ if (data.hasOwnProperty('total_received_amount')) {
80
+ obj['total_received_amount'] = _ApiClient["default"].convertToType(data['total_received_amount'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('settled_amount')) {
83
+ obj['settled_amount'] = _ApiClient["default"].convertToType(data['settled_amount'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('refunded_amount')) {
86
+ obj['refunded_amount'] = _ApiClient["default"].convertToType(data['refunded_amount'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('total_balance')) {
89
+ obj['total_balance'] = _ApiClient["default"].convertToType(data['total_balance'], 'String');
90
+ }
91
+ if (data.hasOwnProperty('available_balance')) {
92
+ obj['available_balance'] = _ApiClient["default"].convertToType(data['available_balance'], 'String');
93
+ }
94
+ }
95
+ return obj;
96
+ }
97
+
98
+ /**
99
+ * Validates the JSON data with respect to <code>MerchantBalance</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>MerchantBalance</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(MerchantBalance.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['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
123
+ throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
124
+ }
125
+ // ensure the json data is a string
126
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
127
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
128
+ }
129
+ // ensure the json data is a string
130
+ if (data['total_received_amount'] && !(typeof data['total_received_amount'] === 'string' || data['total_received_amount'] instanceof String)) {
131
+ throw new Error("Expected the field `total_received_amount` to be a primitive type in the JSON string but got " + data['total_received_amount']);
132
+ }
133
+ // ensure the json data is a string
134
+ if (data['settled_amount'] && !(typeof data['settled_amount'] === 'string' || data['settled_amount'] instanceof String)) {
135
+ throw new Error("Expected the field `settled_amount` to be a primitive type in the JSON string but got " + data['settled_amount']);
136
+ }
137
+ // ensure the json data is a string
138
+ if (data['refunded_amount'] && !(typeof data['refunded_amount'] === 'string' || data['refunded_amount'] instanceof String)) {
139
+ throw new Error("Expected the field `refunded_amount` to be a primitive type in the JSON string but got " + data['refunded_amount']);
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['total_balance'] && !(typeof data['total_balance'] === 'string' || data['total_balance'] instanceof String)) {
143
+ throw new Error("Expected the field `total_balance` to be a primitive type in the JSON string but got " + data['total_balance']);
144
+ }
145
+ // ensure the json data is a string
146
+ if (data['available_balance'] && !(typeof data['available_balance'] === 'string' || data['available_balance'] instanceof String)) {
147
+ throw new Error("Expected the field `available_balance` to be a primitive type in the JSON string but got " + data['available_balance']);
148
+ }
149
+ return true;
150
+ }
151
+ }]);
152
+ }();
153
+ MerchantBalance.RequiredProperties = ["merchant_id", "token_id", "acquiring_type"];
154
+
155
+ /**
156
+ * The merchant ID.
157
+ * @member {String} merchant_id
158
+ */
159
+ MerchantBalance.prototype['merchant_id'] = undefined;
160
+
161
+ /**
162
+ * The ID of the cryptocurrency.
163
+ * @member {String} token_id
164
+ */
165
+ MerchantBalance.prototype['token_id'] = undefined;
166
+
167
+ /**
168
+ * @member {module:model/AcquiringType} acquiring_type
169
+ */
170
+ MerchantBalance.prototype['acquiring_type'] = undefined;
171
+
172
+ /**
173
+ * The merchant total received amount.
174
+ * @member {String} total_received_amount
175
+ */
176
+ MerchantBalance.prototype['total_received_amount'] = undefined;
177
+
178
+ /**
179
+ * The merchant settled amount.
180
+ * @member {String} settled_amount
181
+ */
182
+ MerchantBalance.prototype['settled_amount'] = undefined;
183
+
184
+ /**
185
+ * The merchant total refunded amount.
186
+ * @member {String} refunded_amount
187
+ */
188
+ MerchantBalance.prototype['refunded_amount'] = undefined;
189
+
190
+ /**
191
+ * The merchant total balance.
192
+ * @member {String} total_balance
193
+ */
194
+ MerchantBalance.prototype['total_balance'] = undefined;
195
+
196
+ /**
197
+ * The merchant available balance.
198
+ * @member {String} available_balance
199
+ */
200
+ MerchantBalance.prototype['available_balance'] = undefined;
201
+ var _default = exports["default"] = MerchantBalance;