@cobo/cobo-waas2 1.28.0 → 1.30.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 (238) hide show
  1. package/README.md +88 -16
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AutoSweepApi.js +2 -2
  4. package/dist/api/ComplianceApi.js +144 -4
  5. package/dist/api/FeeStationApi.js +2 -2
  6. package/dist/api/GraphQLApi.js +85 -0
  7. package/dist/api/PaymentApi.js +1161 -154
  8. package/dist/api/StakingsApi.js +2 -2
  9. package/dist/api/SwapsApi.js +3 -0
  10. package/dist/api/TransactionsApi.js +6 -6
  11. package/dist/api/WalletsApi.js +18 -18
  12. package/dist/index.js +357 -28
  13. package/dist/model/AddressRiskLevel.js +71 -0
  14. package/dist/model/AddressesEventData.js +13 -3
  15. package/dist/model/{AllocationRecord.js → AllocationItem.js} +38 -35
  16. package/dist/model/{AllocationRequest.js → AllocationParam.js} +29 -26
  17. package/dist/model/BalanceUpdateInfoEventData.js +13 -3
  18. package/dist/model/BatchAllocation.js +12 -12
  19. package/dist/model/BatchAllocationDetail.js +15 -17
  20. package/dist/model/BridgingFee.js +3 -3
  21. package/dist/model/ChainsEventData.js +13 -3
  22. package/dist/model/CommissionFee.js +2 -2
  23. package/dist/model/ComplianceDispositionUpdateEventData.js +13 -3
  24. package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +346 -0
  25. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +13 -3
  26. package/dist/model/ContractCallParams.js +3 -3
  27. package/dist/model/CounterpartyWalletAddressDetail.js +2 -2
  28. package/dist/model/CreateBatchAllocationRequest.js +19 -19
  29. package/dist/model/CreateBulkSendRequest.js +167 -0
  30. package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +153 -0
  31. package/dist/model/CreateCounterpartyEntry201Response.js +143 -0
  32. package/dist/model/CreateCounterpartyEntryRequest.js +141 -0
  33. package/dist/model/CreateDestinationEntry201Response.js +172 -0
  34. package/dist/model/CreateDestinationEntryRequest.js +172 -0
  35. package/dist/model/CreateKyaScreeningsBody.js +129 -0
  36. package/dist/model/CreateMerchantRequest.js +1 -1
  37. package/dist/model/CreatePaymentOrderRequest.js +17 -15
  38. package/dist/model/CreatePayoutRequest.js +35 -28
  39. package/dist/model/CreateRefundRequest.js +2 -2
  40. package/dist/model/CreateReportRequest.js +156 -0
  41. package/dist/model/CreateTopUpAddresses.js +139 -0
  42. package/dist/model/CreateTopUpAddresses201Response.js +107 -0
  43. package/dist/model/CreateWalletAddress.js +2 -2
  44. package/dist/model/DeleteCounterpartyById200Response.js +110 -0
  45. package/dist/model/DeleteCounterpartyEntry200Response.js +110 -0
  46. package/dist/model/DeleteDestinationById200Response.js +110 -0
  47. package/dist/model/DeleteDestinationEntry200Response.js +110 -0
  48. package/dist/model/EntryType.js +61 -0
  49. package/dist/model/GetCounterpartyEntry200Response.js +90 -0
  50. package/dist/model/GetDestinationEntry200Response.js +106 -0
  51. package/dist/model/{ListPayoutItems200Response.js → GetReports200Response.js} +22 -22
  52. package/dist/model/KyaRiskAssessment.js +151 -0
  53. package/dist/model/KyaRiskDetail.js +126 -0
  54. package/dist/model/KyaRiskLevel.js +66 -0
  55. package/dist/model/KyaScreeningRequest.js +154 -0
  56. package/dist/model/KyaScreeningResult.js +222 -0
  57. package/dist/model/KyaScreeningResultRiskAssessment.js +171 -0
  58. package/dist/model/KyaScreeningStatus.js +71 -0
  59. package/dist/model/KyaScreeningsEventData.js +174 -0
  60. package/dist/model/LinkDisplayInfo.js +1 -1
  61. package/dist/model/{ListAllocations200Response.js → ListAllocationItems200Response.js} +22 -22
  62. package/dist/model/ListBulkSendItems200Response.js +123 -0
  63. package/dist/model/ListCounterpartyEntries200Response.js +123 -0
  64. package/dist/model/ListDestinationEntries200Response.js +153 -0
  65. package/dist/model/ListKyaScreenings200Response.js +145 -0
  66. package/dist/model/MPCVaultEventData.js +13 -3
  67. package/dist/model/MerchantBalance.js +4 -4
  68. package/dist/model/Order.js +10 -10
  69. package/dist/model/OrderLinkBusinessInfo.js +22 -16
  70. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +2 -4
  71. package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +4 -4
  72. package/dist/model/PaymentAddressUpdateEventData.js +13 -3
  73. package/dist/model/PaymentAllocationAmount.js +2 -2
  74. package/dist/model/PaymentBulkSend.js +182 -0
  75. package/dist/model/PaymentBulkSendEvent.js +359 -0
  76. package/dist/model/PaymentBulkSendExecutionMode.js +61 -0
  77. package/dist/model/PaymentBulkSendItem.js +190 -0
  78. package/dist/model/{PaymentPayoutItemStatus.js → PaymentBulkSendItemStatus.js} +11 -11
  79. package/dist/model/PaymentBulkSendItemValidationStatus.js +66 -0
  80. package/dist/model/PaymentBulkSendStatus.js +81 -0
  81. package/dist/model/PaymentEstimateFeeRequest.js +13 -0
  82. package/dist/model/PaymentFeeType.js +15 -0
  83. package/dist/model/PaymentOrderEventData.js +31 -21
  84. package/dist/model/PaymentPayout.js +64 -46
  85. package/dist/model/PaymentPayoutDetail.js +166 -52
  86. package/dist/model/PaymentPayoutEvent.js +152 -80
  87. package/dist/model/PaymentPayoutItem.js +9 -166
  88. package/dist/model/PaymentPayoutParam.js +6 -46
  89. package/dist/model/PaymentPayoutRecipientInfo.js +126 -0
  90. package/dist/model/PaymentPayoutStatus.js +9 -4
  91. package/dist/model/PaymentRefundEventData.js +13 -3
  92. package/dist/model/PaymentSettlementEvent.js +13 -3
  93. package/dist/model/PaymentTransactionEventData.js +13 -3
  94. package/dist/model/PspBalance.js +4 -4
  95. package/dist/model/RefundLinkBusinessInfo.js +1 -1
  96. package/dist/model/Report.js +209 -0
  97. package/dist/model/ReportExportFormat.js +66 -0
  98. package/dist/model/ReportStatus.js +61 -0
  99. package/dist/model/ReportType.js +121 -0
  100. package/dist/model/SuspendedTokenEventData.js +13 -3
  101. package/dist/model/TSSRequestWebhookEventData.js +13 -3
  102. package/dist/model/TokenListingEventData.js +13 -3
  103. package/dist/model/TokensEventData.js +13 -3
  104. package/dist/model/TransactionCoboCategory.js +5 -0
  105. package/dist/model/TransactionExtraType.js +5 -0
  106. package/dist/model/TransactionWalletConnectInfo.js +146 -0
  107. package/dist/model/TransactionWebhookEventData.js +13 -3
  108. package/dist/model/TransferParams.js +2 -2
  109. package/dist/model/UpdateCounterpartyRequest.js +160 -0
  110. package/dist/model/UpdateDestinationEntry200Response.js +90 -0
  111. package/dist/model/UpdateDestinationEntryRequest.js +135 -0
  112. package/dist/model/UpdateDestinationRequest.js +173 -0
  113. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  114. package/dist/model/WalletAddress.js +20 -2
  115. package/dist/model/WalletInfoEventData.js +13 -3
  116. package/dist/model/WebhookEventData.js +121 -28
  117. package/dist/model/WebhookEventDataType.js +12 -2
  118. package/dist/model/WebhookEventType.js +15 -0
  119. package/docs/AddressRiskLevel.md +16 -0
  120. package/docs/AddressesEventData.md +5 -1
  121. package/docs/AllocationItem.md +15 -0
  122. package/docs/AllocationParam.md +13 -0
  123. package/docs/AutoSweepApi.md +1 -1
  124. package/docs/BalanceUpdateInfoEventData.md +5 -1
  125. package/docs/BatchAllocation.md +2 -2
  126. package/docs/BatchAllocationDetail.md +1 -1
  127. package/docs/BridgingFee.md +2 -2
  128. package/docs/ChainsEventData.md +5 -1
  129. package/docs/CommissionFee.md +1 -1
  130. package/docs/ComplianceApi.md +163 -0
  131. package/docs/ComplianceDispositionUpdateEventData.md +5 -1
  132. package/docs/ComplianceKyaScreeningsUpdateEventData.md +64 -0
  133. package/docs/ComplianceKytScreeningsUpdateEventData.md +5 -1
  134. package/docs/ContractCallParams.md +2 -2
  135. package/docs/CounterpartyWalletAddressDetail.md +1 -1
  136. package/docs/CreateBatchAllocationRequest.md +2 -2
  137. package/docs/CreateBulkSendRequest.md +12 -0
  138. package/docs/CreateBulkSendRequestPayoutParamsInner.md +12 -0
  139. package/docs/CreateCounterpartyEntry201Response.md +10 -0
  140. package/docs/CreateCounterpartyEntryRequest.md +10 -0
  141. package/docs/CreateDestinationEntry201Response.md +11 -0
  142. package/docs/CreateDestinationEntryRequest.md +11 -0
  143. package/docs/CreateKyaScreeningsBody.md +9 -0
  144. package/docs/CreateMerchantRequest.md +1 -1
  145. package/docs/CreatePaymentOrderRequest.md +11 -11
  146. package/docs/CreatePayoutRequest.md +4 -4
  147. package/docs/CreateRefundRequest.md +2 -2
  148. package/docs/CreateReportRequest.md +13 -0
  149. package/docs/CreateTopUpAddresses.md +11 -0
  150. package/docs/CreateTopUpAddresses201Response.md +9 -0
  151. package/docs/CreateWalletAddress.md +1 -1
  152. package/docs/DeleteCounterpartyById200Response.md +9 -0
  153. package/docs/DeleteCounterpartyEntry200Response.md +9 -0
  154. package/docs/DeleteDestinationById200Response.md +9 -0
  155. package/docs/DeleteDestinationEntry200Response.md +9 -0
  156. package/docs/EntryType.md +12 -0
  157. package/docs/FeeStationApi.md +1 -1
  158. package/docs/GetCounterpartyEntry200Response.md +9 -0
  159. package/docs/GetDestinationEntry200Response.md +10 -0
  160. package/docs/{ListAllocations200Response.md → GetReports200Response.md} +2 -2
  161. package/docs/GraphQLApi.md +61 -0
  162. package/docs/KyaRiskAssessment.md +11 -0
  163. package/docs/KyaRiskDetail.md +10 -0
  164. package/docs/KyaRiskLevel.md +14 -0
  165. package/docs/KyaScreeningRequest.md +12 -0
  166. package/docs/KyaScreeningResult.md +17 -0
  167. package/docs/KyaScreeningResultRiskAssessment.md +11 -0
  168. package/docs/KyaScreeningStatus.md +16 -0
  169. package/docs/KyaScreeningsEventData.md +14 -0
  170. package/docs/LinkDisplayInfo.md +1 -1
  171. package/docs/{ListPayoutItems200Response.md → ListAllocationItems200Response.md} +2 -2
  172. package/docs/ListBulkSendItems200Response.md +10 -0
  173. package/docs/ListCounterpartyEntries200Response.md +10 -0
  174. package/docs/ListDestinationEntries200Response.md +11 -0
  175. package/docs/ListKyaScreenings200Response.md +10 -0
  176. package/docs/MPCVaultEventData.md +5 -1
  177. package/docs/MerchantBalance.md +4 -4
  178. package/docs/Order.md +8 -8
  179. package/docs/OrderLinkBusinessInfo.md +11 -11
  180. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
  181. package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +2 -2
  182. package/docs/PaymentAddressUpdateEventData.md +5 -1
  183. package/docs/PaymentAllocationAmount.md +1 -1
  184. package/docs/PaymentApi.md +1296 -198
  185. package/docs/PaymentBulkSend.md +15 -0
  186. package/docs/PaymentBulkSendEvent.md +65 -0
  187. package/docs/PaymentBulkSendExecutionMode.md +12 -0
  188. package/docs/PaymentBulkSendItem.md +15 -0
  189. package/docs/{PaymentPayoutItemStatus.md → PaymentBulkSendItemStatus.md} +3 -3
  190. package/docs/PaymentBulkSendItemValidationStatus.md +14 -0
  191. package/docs/PaymentBulkSendStatus.md +20 -0
  192. package/docs/PaymentEstimateFeeRequest.md +1 -0
  193. package/docs/PaymentFeeType.md +6 -0
  194. package/docs/PaymentOrderEventData.md +13 -9
  195. package/docs/PaymentPayout.md +8 -7
  196. package/docs/PaymentPayoutDetail.md +10 -8
  197. package/docs/PaymentPayoutEvent.md +15 -9
  198. package/docs/PaymentPayoutItem.md +2 -13
  199. package/docs/PaymentPayoutParam.md +1 -4
  200. package/docs/PaymentPayoutRecipientInfo.md +12 -0
  201. package/docs/PaymentPayoutStatus.md +4 -2
  202. package/docs/PaymentRefundEventData.md +5 -1
  203. package/docs/PaymentSettlementEvent.md +5 -1
  204. package/docs/PaymentTransactionEventData.md +5 -1
  205. package/docs/PspBalance.md +4 -4
  206. package/docs/RefundLinkBusinessInfo.md +1 -1
  207. package/docs/Report.md +17 -0
  208. package/docs/ReportExportFormat.md +14 -0
  209. package/docs/ReportStatus.md +12 -0
  210. package/docs/ReportType.md +36 -0
  211. package/docs/StakingsApi.md +1 -1
  212. package/docs/SuspendedTokenEventData.md +5 -1
  213. package/docs/SwapsApi.md +2 -0
  214. package/docs/TSSRequestWebhookEventData.md +5 -1
  215. package/docs/TokenListingEventData.md +5 -1
  216. package/docs/TokensEventData.md +5 -1
  217. package/docs/TransactionCoboCategory.md +2 -0
  218. package/docs/TransactionExtraType.md +2 -0
  219. package/docs/TransactionWalletConnectInfo.md +12 -0
  220. package/docs/TransactionWebhookEventData.md +5 -1
  221. package/docs/TransactionsApi.md +3 -3
  222. package/docs/TransferParams.md +1 -1
  223. package/docs/UpdateCounterpartyRequest.md +13 -0
  224. package/docs/UpdateDestinationEntry200Response.md +9 -0
  225. package/docs/UpdateDestinationEntryRequest.md +11 -0
  226. package/docs/UpdateDestinationRequest.md +14 -0
  227. package/docs/UpdateMerchantByIdRequest.md +1 -1
  228. package/docs/WalletAddress.md +3 -1
  229. package/docs/WalletInfoEventData.md +5 -1
  230. package/docs/WalletsApi.md +9 -9
  231. package/docs/WebhookEventData.md +28 -18
  232. package/docs/WebhookEventDataType.md +5 -1
  233. package/docs/WebhookEventType.md +6 -0
  234. package/package.json +1 -1
  235. package/dist/model/PaymentPayoutItemDetail.js +0 -298
  236. package/docs/AllocationRecord.md +0 -15
  237. package/docs/AllocationRequest.md +0 -13
  238. package/docs/PaymentPayoutItemDetail.md +0 -22
@@ -0,0 +1,110 @@
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 DeleteDestinationEntry200Response model module.
29
+ * @module model/DeleteDestinationEntry200Response
30
+ */
31
+ var DeleteDestinationEntry200Response = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>DeleteDestinationEntry200Response</code>.
34
+ * @alias module:model/DeleteDestinationEntry200Response
35
+ * @param deleted_destination_entry_id {String} The deleted destination entry ID.
36
+ */
37
+ function DeleteDestinationEntry200Response(deleted_destination_entry_id) {
38
+ _classCallCheck(this, DeleteDestinationEntry200Response);
39
+ DeleteDestinationEntry200Response.initialize(this, deleted_destination_entry_id);
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(DeleteDestinationEntry200Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj, deleted_destination_entry_id) {
50
+ obj['deleted_destination_entry_id'] = deleted_destination_entry_id;
51
+ }
52
+
53
+ /**
54
+ * Constructs a <code>DeleteDestinationEntry200Response</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
56
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
57
+ * @param {module:model/DeleteDestinationEntry200Response} obj Optional instance to populate.
58
+ * @return {module:model/DeleteDestinationEntry200Response} The populated <code>DeleteDestinationEntry200Response</code> instance.
59
+ */
60
+ }, {
61
+ key: "constructFromObject",
62
+ value: function constructFromObject(data, obj) {
63
+ if (data) {
64
+ obj = obj || new DeleteDestinationEntry200Response();
65
+ if (data.hasOwnProperty('deleted_destination_entry_id')) {
66
+ obj['deleted_destination_entry_id'] = _ApiClient["default"].convertToType(data['deleted_destination_entry_id'], 'String');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>DeleteDestinationEntry200Response</code>.
74
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
75
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeleteDestinationEntry200Response</code>.
76
+ */
77
+ }, {
78
+ key: "validateJSON",
79
+ value: function validateJSON(data) {
80
+ // check to make sure all required properties are present in the JSON string
81
+ var _iterator = _createForOfIteratorHelper(DeleteDestinationEntry200Response.RequiredProperties),
82
+ _step;
83
+ try {
84
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
85
+ var property = _step.value;
86
+ if (!data.hasOwnProperty(property)) {
87
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
88
+ }
89
+ }
90
+ // ensure the json data is a string
91
+ } catch (err) {
92
+ _iterator.e(err);
93
+ } finally {
94
+ _iterator.f();
95
+ }
96
+ if (data['deleted_destination_entry_id'] && !(typeof data['deleted_destination_entry_id'] === 'string' || data['deleted_destination_entry_id'] instanceof String)) {
97
+ throw new Error("Expected the field `deleted_destination_entry_id` to be a primitive type in the JSON string but got " + data['deleted_destination_entry_id']);
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ DeleteDestinationEntry200Response.RequiredProperties = ["deleted_destination_entry_id"];
104
+
105
+ /**
106
+ * The deleted destination entry ID.
107
+ * @member {String} deleted_destination_entry_id
108
+ */
109
+ DeleteDestinationEntry200Response.prototype['deleted_destination_entry_id'] = undefined;
110
+ var _default = exports["default"] = DeleteDestinationEntry200Response;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ 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); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class EntryType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var EntryType = exports["default"] = /*#__PURE__*/function () {
31
+ function EntryType() {
32
+ _classCallCheck(this, EntryType);
33
+ /**
34
+ * value: "Address"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Address", "Address");
38
+ /**
39
+ * value: "BankAccount"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "BankAccount", "BankAccount");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(EntryType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>EntryType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/EntryType} The enum <code>EntryType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -0,0 +1,90 @@
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 _WalletAddress = _interopRequireDefault(require("./WalletAddress"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ 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); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * The GetCounterpartyEntry200Response model module.
27
+ * @module model/GetCounterpartyEntry200Response
28
+ */
29
+ var GetCounterpartyEntry200Response = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>GetCounterpartyEntry200Response</code>.
32
+ * @alias module:model/GetCounterpartyEntry200Response
33
+ */
34
+ function GetCounterpartyEntry200Response() {
35
+ _classCallCheck(this, GetCounterpartyEntry200Response);
36
+ GetCounterpartyEntry200Response.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ return _createClass(GetCounterpartyEntry200Response, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>GetCounterpartyEntry200Response</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/GetCounterpartyEntry200Response} obj Optional instance to populate.
53
+ * @return {module:model/GetCounterpartyEntry200Response} The populated <code>GetCounterpartyEntry200Response</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new GetCounterpartyEntry200Response();
60
+ if (data.hasOwnProperty('wallet_address')) {
61
+ obj['wallet_address'] = _WalletAddress["default"].constructFromObject(data['wallet_address']);
62
+ }
63
+ }
64
+ return obj;
65
+ }
66
+
67
+ /**
68
+ * Validates the JSON data with respect to <code>GetCounterpartyEntry200Response</code>.
69
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
70
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetCounterpartyEntry200Response</code>.
71
+ */
72
+ }, {
73
+ key: "validateJSON",
74
+ value: function validateJSON(data) {
75
+ // validate the optional field `wallet_address`
76
+ if (data['wallet_address']) {
77
+ // data not null
78
+ if (!!_WalletAddress["default"].validateJSON) {
79
+ _WalletAddress["default"].validateJSON(data['wallet_address']);
80
+ }
81
+ }
82
+ return true;
83
+ }
84
+ }]);
85
+ }();
86
+ /**
87
+ * @member {module:model/WalletAddress} wallet_address
88
+ */
89
+ GetCounterpartyEntry200Response.prototype['wallet_address'] = undefined;
90
+ var _default = exports["default"] = GetCounterpartyEntry200Response;
@@ -0,0 +1,106 @@
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 _DestinationBankAccountDetail = _interopRequireDefault(require("./DestinationBankAccountDetail"));
9
+ var _WalletAddress = _interopRequireDefault(require("./WalletAddress"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ 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); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ 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); } /**
17
+ * Cobo Wallet as a Service 2.0
18
+ *
19
+ * Contact: help@cobo.com
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The GetDestinationEntry200Response model module.
28
+ * @module model/GetDestinationEntry200Response
29
+ */
30
+ var GetDestinationEntry200Response = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>GetDestinationEntry200Response</code>.
33
+ * @alias module:model/GetDestinationEntry200Response
34
+ */
35
+ function GetDestinationEntry200Response() {
36
+ _classCallCheck(this, GetDestinationEntry200Response);
37
+ GetDestinationEntry200Response.initialize(this);
38
+ }
39
+
40
+ /**
41
+ * Initializes the fields of this object.
42
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
43
+ * Only for internal use.
44
+ */
45
+ return _createClass(GetDestinationEntry200Response, null, [{
46
+ key: "initialize",
47
+ value: function initialize(obj) {}
48
+
49
+ /**
50
+ * Constructs a <code>GetDestinationEntry200Response</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
52
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
53
+ * @param {module:model/GetDestinationEntry200Response} obj Optional instance to populate.
54
+ * @return {module:model/GetDestinationEntry200Response} The populated <code>GetDestinationEntry200Response</code> instance.
55
+ */
56
+ }, {
57
+ key: "constructFromObject",
58
+ value: function constructFromObject(data, obj) {
59
+ if (data) {
60
+ obj = obj || new GetDestinationEntry200Response();
61
+ if (data.hasOwnProperty('wallet_address')) {
62
+ obj['wallet_address'] = _WalletAddress["default"].constructFromObject(data['wallet_address']);
63
+ }
64
+ if (data.hasOwnProperty('bank_account')) {
65
+ obj['bank_account'] = _DestinationBankAccountDetail["default"].constructFromObject(data['bank_account']);
66
+ }
67
+ }
68
+ return obj;
69
+ }
70
+
71
+ /**
72
+ * Validates the JSON data with respect to <code>GetDestinationEntry200Response</code>.
73
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
74
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetDestinationEntry200Response</code>.
75
+ */
76
+ }, {
77
+ key: "validateJSON",
78
+ value: function validateJSON(data) {
79
+ // validate the optional field `wallet_address`
80
+ if (data['wallet_address']) {
81
+ // data not null
82
+ if (!!_WalletAddress["default"].validateJSON) {
83
+ _WalletAddress["default"].validateJSON(data['wallet_address']);
84
+ }
85
+ }
86
+ // validate the optional field `bank_account`
87
+ if (data['bank_account']) {
88
+ // data not null
89
+ if (!!_DestinationBankAccountDetail["default"].validateJSON) {
90
+ _DestinationBankAccountDetail["default"].validateJSON(data['bank_account']);
91
+ }
92
+ }
93
+ return true;
94
+ }
95
+ }]);
96
+ }();
97
+ /**
98
+ * @member {module:model/WalletAddress} wallet_address
99
+ */
100
+ GetDestinationEntry200Response.prototype['wallet_address'] = undefined;
101
+
102
+ /**
103
+ * @member {module:model/DestinationBankAccountDetail} bank_account
104
+ */
105
+ GetDestinationEntry200Response.prototype['bank_account'] = undefined;
106
+ var _default = exports["default"] = GetDestinationEntry200Response;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _Pagination = _interopRequireDefault(require("./Pagination"));
9
- var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
9
+ var _Report = _interopRequireDefault(require("./Report"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
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
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; } } }; }
@@ -27,17 +27,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The ListPayoutItems200Response model module.
31
- * @module model/ListPayoutItems200Response
30
+ * The GetReports200Response model module.
31
+ * @module model/GetReports200Response
32
32
  */
33
- var ListPayoutItems200Response = /*#__PURE__*/function () {
33
+ var GetReports200Response = /*#__PURE__*/function () {
34
34
  /**
35
- * Constructs a new <code>ListPayoutItems200Response</code>.
36
- * @alias module:model/ListPayoutItems200Response
35
+ * Constructs a new <code>GetReports200Response</code>.
36
+ * @alias module:model/GetReports200Response
37
37
  */
38
- function ListPayoutItems200Response() {
39
- _classCallCheck(this, ListPayoutItems200Response);
40
- ListPayoutItems200Response.initialize(this);
38
+ function GetReports200Response() {
39
+ _classCallCheck(this, GetReports200Response);
40
+ GetReports200Response.initialize(this);
41
41
  }
42
42
 
43
43
  /**
@@ -45,24 +45,24 @@ var ListPayoutItems200Response = /*#__PURE__*/function () {
45
45
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
46
  * Only for internal use.
47
47
  */
48
- return _createClass(ListPayoutItems200Response, null, [{
48
+ return _createClass(GetReports200Response, null, [{
49
49
  key: "initialize",
50
50
  value: function initialize(obj) {}
51
51
 
52
52
  /**
53
- * Constructs a <code>ListPayoutItems200Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Constructs a <code>GetReports200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
54
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
55
  * @param {Object} data The plain JavaScript object bearing properties of interest.
56
- * @param {module:model/ListPayoutItems200Response} obj Optional instance to populate.
57
- * @return {module:model/ListPayoutItems200Response} The populated <code>ListPayoutItems200Response</code> instance.
56
+ * @param {module:model/GetReports200Response} obj Optional instance to populate.
57
+ * @return {module:model/GetReports200Response} The populated <code>GetReports200Response</code> instance.
58
58
  */
59
59
  }, {
60
60
  key: "constructFromObject",
61
61
  value: function constructFromObject(data, obj) {
62
62
  if (data) {
63
- obj = obj || new ListPayoutItems200Response();
63
+ obj = obj || new GetReports200Response();
64
64
  if (data.hasOwnProperty('data')) {
65
- obj['data'] = _ApiClient["default"].convertToType(data['data'], [_PaymentPayoutItem["default"]]);
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Report["default"]]);
66
66
  }
67
67
  if (data.hasOwnProperty('pagination')) {
68
68
  obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
@@ -72,9 +72,9 @@ var ListPayoutItems200Response = /*#__PURE__*/function () {
72
72
  }
73
73
 
74
74
  /**
75
- * Validates the JSON data with respect to <code>ListPayoutItems200Response</code>.
75
+ * Validates the JSON data with respect to <code>GetReports200Response</code>.
76
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>ListPayoutItems200Response</code>.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetReports200Response</code>.
78
78
  */
79
79
  }, {
80
80
  key: "validateJSON",
@@ -91,7 +91,7 @@ var ListPayoutItems200Response = /*#__PURE__*/function () {
91
91
  try {
92
92
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
93
  var item = _step.value;
94
- _PaymentPayoutItem["default"].validateJSON(item);
94
+ _Report["default"].validateJSON(item);
95
95
  }
96
96
  } catch (err) {
97
97
  _iterator.e(err);
@@ -112,12 +112,12 @@ var ListPayoutItems200Response = /*#__PURE__*/function () {
112
112
  }]);
113
113
  }();
114
114
  /**
115
- * @member {Array.<module:model/PaymentPayoutItem>} data
115
+ * @member {Array.<module:model/Report>} data
116
116
  */
117
- ListPayoutItems200Response.prototype['data'] = undefined;
117
+ GetReports200Response.prototype['data'] = undefined;
118
118
 
119
119
  /**
120
120
  * @member {module:model/Pagination} pagination
121
121
  */
122
- ListPayoutItems200Response.prototype['pagination'] = undefined;
123
- var _default = exports["default"] = ListPayoutItems200Response;
122
+ GetReports200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = GetReports200Response;
@@ -0,0 +1,151 @@
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 _KyaRiskDetail = _interopRequireDefault(require("./KyaRiskDetail"));
9
+ var _KyaRiskLevel = _interopRequireDefault(require("./KyaRiskLevel"));
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 KyaRiskAssessment model module.
31
+ * @module model/KyaRiskAssessment
32
+ */
33
+ var KyaRiskAssessment = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>KyaRiskAssessment</code>.
36
+ * The risk assessment information for the screened address. Only returned when status is &#39;Screened&#39;.
37
+ * @alias module:model/KyaRiskAssessment
38
+ * @param level {module:model/KyaRiskLevel}
39
+ */
40
+ function KyaRiskAssessment(level) {
41
+ _classCallCheck(this, KyaRiskAssessment);
42
+ KyaRiskAssessment.initialize(this, level);
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(KyaRiskAssessment, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, level) {
53
+ obj['level'] = level;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>KyaRiskAssessment</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/KyaRiskAssessment} obj Optional instance to populate.
61
+ * @return {module:model/KyaRiskAssessment} The populated <code>KyaRiskAssessment</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new KyaRiskAssessment();
68
+ if (data.hasOwnProperty('level')) {
69
+ obj['level'] = _KyaRiskLevel["default"].constructFromObject(data['level']);
70
+ }
71
+ if (data.hasOwnProperty('summary')) {
72
+ obj['summary'] = _ApiClient["default"].convertToType(data['summary'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('details')) {
75
+ obj['details'] = _ApiClient["default"].convertToType(data['details'], [_KyaRiskDetail["default"]]);
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>KyaRiskAssessment</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>KyaRiskAssessment</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // check to make sure all required properties are present in the JSON string
90
+ var _iterator = _createForOfIteratorHelper(KyaRiskAssessment.RequiredProperties),
91
+ _step;
92
+ try {
93
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94
+ var property = _step.value;
95
+ if (!data.hasOwnProperty(property)) {
96
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
97
+ }
98
+ }
99
+ // ensure the json data is a string
100
+ } catch (err) {
101
+ _iterator.e(err);
102
+ } finally {
103
+ _iterator.f();
104
+ }
105
+ if (data['summary'] && !(typeof data['summary'] === 'string' || data['summary'] instanceof String)) {
106
+ throw new Error("Expected the field `summary` to be a primitive type in the JSON string but got " + data['summary']);
107
+ }
108
+ if (data['details']) {
109
+ // data not null
110
+ // ensure the json data is an array
111
+ if (!Array.isArray(data['details'])) {
112
+ throw new Error("Expected the field `details` to be an array in the JSON data but got " + data['details']);
113
+ }
114
+ // validate the optional field `details` (array)
115
+ var _iterator2 = _createForOfIteratorHelper(data['details']),
116
+ _step2;
117
+ try {
118
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
119
+ var item = _step2.value;
120
+ _KyaRiskDetail["default"].validateJSON(item);
121
+ }
122
+ } catch (err) {
123
+ _iterator2.e(err);
124
+ } finally {
125
+ _iterator2.f();
126
+ }
127
+ ;
128
+ }
129
+ return true;
130
+ }
131
+ }]);
132
+ }();
133
+ KyaRiskAssessment.RequiredProperties = ["level"];
134
+
135
+ /**
136
+ * @member {module:model/KyaRiskLevel} level
137
+ */
138
+ KyaRiskAssessment.prototype['level'] = undefined;
139
+
140
+ /**
141
+ * A brief summary of the risk assessment.
142
+ * @member {String} summary
143
+ */
144
+ KyaRiskAssessment.prototype['summary'] = undefined;
145
+
146
+ /**
147
+ * Detailed risk category assessments.
148
+ * @member {Array.<module:model/KyaRiskDetail>} details
149
+ */
150
+ KyaRiskAssessment.prototype['details'] = undefined;
151
+ var _default = exports["default"] = KyaRiskAssessment;