@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,129 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _KyaScreeningRequest = _interopRequireDefault(require("./KyaScreeningRequest"));
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 CreateKyaScreeningsBody model module.
30
+ * @module model/CreateKyaScreeningsBody
31
+ */
32
+ var CreateKyaScreeningsBody = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>CreateKyaScreeningsBody</code>.
35
+ * Information about address screening requests.
36
+ * @alias module:model/CreateKyaScreeningsBody
37
+ * @param screenings {Array.<module:model/KyaScreeningRequest>} List of address screening requests. Maximum 50 addresses per call.
38
+ */
39
+ function CreateKyaScreeningsBody(screenings) {
40
+ _classCallCheck(this, CreateKyaScreeningsBody);
41
+ CreateKyaScreeningsBody.initialize(this, screenings);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ return _createClass(CreateKyaScreeningsBody, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, screenings) {
52
+ obj['screenings'] = screenings;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>CreateKyaScreeningsBody</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/CreateKyaScreeningsBody} obj Optional instance to populate.
60
+ * @return {module:model/CreateKyaScreeningsBody} The populated <code>CreateKyaScreeningsBody</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new CreateKyaScreeningsBody();
67
+ if (data.hasOwnProperty('screenings')) {
68
+ obj['screenings'] = _ApiClient["default"].convertToType(data['screenings'], [_KyaScreeningRequest["default"]]);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>CreateKyaScreeningsBody</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>CreateKyaScreeningsBody</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ // check to make sure all required properties are present in the JSON string
83
+ var _iterator = _createForOfIteratorHelper(CreateKyaScreeningsBody.RequiredProperties),
84
+ _step;
85
+ try {
86
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
87
+ var property = _step.value;
88
+ if (!data.hasOwnProperty(property)) {
89
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
90
+ }
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
97
+ if (data['screenings']) {
98
+ // data not null
99
+ // ensure the json data is an array
100
+ if (!Array.isArray(data['screenings'])) {
101
+ throw new Error("Expected the field `screenings` to be an array in the JSON data but got " + data['screenings']);
102
+ }
103
+ // validate the optional field `screenings` (array)
104
+ var _iterator2 = _createForOfIteratorHelper(data['screenings']),
105
+ _step2;
106
+ try {
107
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
108
+ var item = _step2.value;
109
+ _KyaScreeningRequest["default"].validateJSON(item);
110
+ }
111
+ } catch (err) {
112
+ _iterator2.e(err);
113
+ } finally {
114
+ _iterator2.f();
115
+ }
116
+ ;
117
+ }
118
+ return true;
119
+ }
120
+ }]);
121
+ }();
122
+ CreateKyaScreeningsBody.RequiredProperties = ["screenings"];
123
+
124
+ /**
125
+ * List of address screening requests. Maximum 50 addresses per call.
126
+ * @member {Array.<module:model/KyaScreeningRequest>} screenings
127
+ */
128
+ CreateKyaScreeningsBody.prototype['screenings'] = undefined;
129
+ var _default = exports["default"] = CreateKyaScreeningsBody;
@@ -133,7 +133,7 @@ CreateMerchantRequest.prototype['name'] = undefined;
133
133
  CreateMerchantRequest.prototype['wallet_id'] = undefined;
134
134
 
135
135
  /**
136
- * The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
136
+ * The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances).
137
137
  * @member {String} developer_fee_rate
138
138
  */
139
139
  CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
@@ -34,11 +34,12 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
34
34
  * @alias module:model/CreatePaymentOrderRequest
35
35
  * @param merchant_id {String} The merchant ID.
36
36
  * @param psp_order_code {String} A unique reference code assigned by the developer to identify this order in their system.
37
- * @param fee_amount {String} The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge. For example, if order_amount is \"100.00\" and fee_amount is \"2.00\", the customer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant and \"2.00\" settled to the developer. Values must be greater than 0 and contain two decimal places.
37
+ * @param fee_amount {String} The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.
38
+ * @param payable_currency {String} The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
38
39
  */
39
- function CreatePaymentOrderRequest(merchant_id, psp_order_code, fee_amount) {
40
+ function CreatePaymentOrderRequest(merchant_id, psp_order_code, fee_amount, payable_currency) {
40
41
  _classCallCheck(this, CreatePaymentOrderRequest);
41
- CreatePaymentOrderRequest.initialize(this, merchant_id, psp_order_code, fee_amount);
42
+ CreatePaymentOrderRequest.initialize(this, merchant_id, psp_order_code, fee_amount, payable_currency);
42
43
  }
43
44
 
44
45
  /**
@@ -48,10 +49,11 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
48
49
  */
49
50
  return _createClass(CreatePaymentOrderRequest, null, [{
50
51
  key: "initialize",
51
- value: function initialize(obj, merchant_id, psp_order_code, fee_amount) {
52
+ value: function initialize(obj, merchant_id, psp_order_code, fee_amount, payable_currency) {
52
53
  obj['merchant_id'] = merchant_id;
53
54
  obj['psp_order_code'] = psp_order_code;
54
55
  obj['fee_amount'] = fee_amount;
56
+ obj['payable_currency'] = payable_currency;
55
57
  }
56
58
 
57
59
  /**
@@ -194,7 +196,7 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
194
196
  }
195
197
  }]);
196
198
  }();
197
- CreatePaymentOrderRequest.RequiredProperties = ["merchant_id", "psp_order_code", "fee_amount"];
199
+ CreatePaymentOrderRequest.RequiredProperties = ["merchant_id", "psp_order_code", "fee_amount", "payable_currency"];
198
200
 
199
201
  /**
200
202
  * The merchant ID.
@@ -215,19 +217,19 @@ CreatePaymentOrderRequest.prototype['merchant_order_code'] = undefined;
215
217
  CreatePaymentOrderRequest.prototype['psp_order_code'] = undefined;
216
218
 
217
219
  /**
218
- * The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
220
+ * The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com/developers/v2/guides/overview/supported-chains-and-tokens).
219
221
  * @member {String} pricing_currency
220
222
  */
221
223
  CreatePaymentOrderRequest.prototype['pricing_currency'] = undefined;
222
224
 
223
225
  /**
224
- * The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
226
+ * The base amount of the order, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
225
227
  * @member {String} pricing_amount
226
228
  */
227
229
  CreatePaymentOrderRequest.prototype['pricing_amount'] = undefined;
228
230
 
229
231
  /**
230
- * The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge. For example, if order_amount is \"100.00\" and fee_amount is \"2.00\", the customer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant and \"2.00\" settled to the developer. Values must be greater than 0 and contain two decimal places.
232
+ * The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.
231
233
  * @member {String} fee_amount
232
234
  */
233
235
  CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
@@ -239,7 +241,7 @@ CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
239
241
  CreatePaymentOrderRequest.prototype['payable_currency'] = undefined;
240
242
 
241
243
  /**
242
- * The actual payable amount of the order in the cryptocurrency.
244
+ * The total amount the payer needs to pay, denominated in the specified `payable_currency`. If this field is left blank, the system will automatically calculate the amount at order creation using the following formula: (`pricing_amount` + `fee_amount`) / current exchange rate. Values must be greater than 0 and contain two decimal places.
243
245
  * @member {String} payable_amount
244
246
  */
245
247
  CreatePaymentOrderRequest.prototype['payable_amount'] = undefined;
@@ -251,38 +253,38 @@ CreatePaymentOrderRequest.prototype['payable_amount'] = undefined;
251
253
  CreatePaymentOrderRequest.prototype['expired_in'] = undefined;
252
254
 
253
255
  /**
254
- * Allowed amount deviation, precision to 1 decimal place.
256
+ * The allowed amount deviation, with precision up to 1 decimal place. For example, if `payable_amount` is `100.00` and `amount_tolerance` is `0.50`: - Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5) - Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5)
255
257
  * @member {String} amount_tolerance
256
258
  */
257
259
  CreatePaymentOrderRequest.prototype['amount_tolerance'] = undefined;
258
260
 
259
261
  /**
260
- * The fiat currency of the order.
262
+ * This field has been deprecated. Please use `pricing_currency` instead.
261
263
  * @member {String} currency
262
264
  * @default ''
263
265
  */
264
266
  CreatePaymentOrderRequest.prototype['currency'] = '';
265
267
 
266
268
  /**
267
- * The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
269
+ * This field has been deprecated. Please use `pricing_amount` instead.
268
270
  * @member {String} order_amount
269
271
  */
270
272
  CreatePaymentOrderRequest.prototype['order_amount'] = undefined;
271
273
 
272
274
  /**
273
- * The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
275
+ * This field has been deprecated. Please use `payable_currency` instead.
274
276
  * @member {String} token_id
275
277
  */
276
278
  CreatePaymentOrderRequest.prototype['token_id'] = undefined;
277
279
 
278
280
  /**
279
- * Indicates whether to allocate a dedicated address for this order. If false, a shared address from the address pool will be used.
281
+ * This field has been deprecated.
280
282
  * @member {Boolean} use_dedicated_address
281
283
  */
282
284
  CreatePaymentOrderRequest.prototype['use_dedicated_address'] = undefined;
283
285
 
284
286
  /**
285
- * A custom exchange rate specified by the merchant. - Only effective when `currency` is `\"USD\"`. - Expressed as the amount of USD per 1 unit of the specified cryptocurrency. - If not provided, the system will use the default internal rate. Example: If the cryptocurrency is USDT and `custom_exchange_rate` = `\"0.99\"`, it means 1 USDT = 0.99 USD.
287
+ * This field has been deprecated.
286
288
  * @member {String} custom_exchange_rate
287
289
  */
288
290
  CreatePaymentOrderRequest.prototype['custom_exchange_rate'] = undefined;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _PaymentPayoutParam = _interopRequireDefault(require("./PaymentPayoutParam"));
9
+ var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
9
10
  var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
12
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -34,13 +35,15 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
34
35
  /**
35
36
  * Constructs a new <code>CreatePayoutRequest</code>.
36
37
  * @alias module:model/CreatePayoutRequest
37
- * @param request_id {String} The request ID that is used to track a settlement request. The request ID is provided by you and must be unique.
38
+ * @param request_id {String} The request ID that is used to track a payout request. The request ID is provided by you and must be unique.
39
+ * @param source_account {String} The source account from which the payout will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
38
40
  * @param payout_channel {module:model/PayoutChannel}
39
41
  * @param payout_params {Array.<module:model/PaymentPayoutParam>}
42
+ * @param recipient_info {module:model/PaymentPayoutRecipientInfo}
40
43
  */
41
- function CreatePayoutRequest(request_id, payout_channel, payout_params) {
44
+ function CreatePayoutRequest(request_id, source_account, payout_channel, payout_params, recipient_info) {
42
45
  _classCallCheck(this, CreatePayoutRequest);
43
- CreatePayoutRequest.initialize(this, request_id, payout_channel, payout_params);
46
+ CreatePayoutRequest.initialize(this, request_id, source_account, payout_channel, payout_params, recipient_info);
44
47
  }
45
48
 
46
49
  /**
@@ -50,10 +53,12 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
50
53
  */
51
54
  return _createClass(CreatePayoutRequest, null, [{
52
55
  key: "initialize",
53
- value: function initialize(obj, request_id, payout_channel, payout_params) {
56
+ value: function initialize(obj, request_id, source_account, payout_channel, payout_params, recipient_info) {
54
57
  obj['request_id'] = request_id;
58
+ obj['source_account'] = source_account;
55
59
  obj['payout_channel'] = payout_channel;
56
60
  obj['payout_params'] = payout_params;
61
+ obj['recipient_info'] = recipient_info;
57
62
  }
58
63
 
59
64
  /**
@@ -71,17 +76,17 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
71
76
  if (data.hasOwnProperty('request_id')) {
72
77
  obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
73
78
  }
79
+ if (data.hasOwnProperty('source_account')) {
80
+ obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
81
+ }
74
82
  if (data.hasOwnProperty('payout_channel')) {
75
83
  obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
76
84
  }
77
85
  if (data.hasOwnProperty('payout_params')) {
78
86
  obj['payout_params'] = _ApiClient["default"].convertToType(data['payout_params'], [_PaymentPayoutParam["default"]]);
79
87
  }
80
- if (data.hasOwnProperty('bank_account_id')) {
81
- obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
82
- }
83
- if (data.hasOwnProperty('currency')) {
84
- obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
88
+ if (data.hasOwnProperty('recipient_info')) {
89
+ obj['recipient_info'] = _PaymentPayoutRecipientInfo["default"].constructFromObject(data['recipient_info']);
85
90
  }
86
91
  if (data.hasOwnProperty('remark')) {
87
92
  obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
@@ -117,6 +122,10 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
117
122
  if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
118
123
  throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
119
124
  }
125
+ // ensure the json data is a string
126
+ if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
127
+ throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
128
+ }
120
129
  if (data['payout_params']) {
121
130
  // data not null
122
131
  // ensure the json data is an array
@@ -138,13 +147,12 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
138
147
  }
139
148
  ;
140
149
  }
141
- // ensure the json data is a string
142
- if (data['bank_account_id'] && !(typeof data['bank_account_id'] === 'string' || data['bank_account_id'] instanceof String)) {
143
- throw new Error("Expected the field `bank_account_id` to be a primitive type in the JSON string but got " + data['bank_account_id']);
144
- }
145
- // ensure the json data is a string
146
- if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
147
- throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
150
+ // validate the optional field `recipient_info`
151
+ if (data['recipient_info']) {
152
+ // data not null
153
+ if (!!_PaymentPayoutRecipientInfo["default"].validateJSON) {
154
+ _PaymentPayoutRecipientInfo["default"].validateJSON(data['recipient_info']);
155
+ }
148
156
  }
149
157
  // ensure the json data is a string
150
158
  if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
@@ -154,14 +162,20 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
154
162
  }
155
163
  }]);
156
164
  }();
157
- CreatePayoutRequest.RequiredProperties = ["request_id", "payout_channel", "payout_params"];
165
+ CreatePayoutRequest.RequiredProperties = ["request_id", "source_account", "payout_channel", "payout_params", "recipient_info"];
158
166
 
159
167
  /**
160
- * The request ID that is used to track a settlement request. The request ID is provided by you and must be unique.
168
+ * The request ID that is used to track a payout request. The request ID is provided by you and must be unique.
161
169
  * @member {String} request_id
162
170
  */
163
171
  CreatePayoutRequest.prototype['request_id'] = undefined;
164
172
 
173
+ /**
174
+ * The source account from which the payout will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
175
+ * @member {String} source_account
176
+ */
177
+ CreatePayoutRequest.prototype['source_account'] = undefined;
178
+
165
179
  /**
166
180
  * @member {module:model/PayoutChannel} payout_channel
167
181
  */
@@ -173,19 +187,12 @@ CreatePayoutRequest.prototype['payout_channel'] = undefined;
173
187
  CreatePayoutRequest.prototype['payout_params'] = undefined;
174
188
 
175
189
  /**
176
- * Only used in OffRamp payout channel. The ID of the bank account where the settled funds will be deposited.
177
- * @member {String} bank_account_id
178
- */
179
- CreatePayoutRequest.prototype['bank_account_id'] = undefined;
180
-
181
- /**
182
- * The fiat currency for the create payouts.
183
- * @member {String} currency
190
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
184
191
  */
185
- CreatePayoutRequest.prototype['currency'] = undefined;
192
+ CreatePayoutRequest.prototype['recipient_info'] = undefined;
186
193
 
187
194
  /**
188
- * The remark for the create payouts.
195
+ * An optional note or comment about the payout for your internal reference.
189
196
  * @member {String} remark
190
197
  */
191
198
  CreatePayoutRequest.prototype['remark'] = undefined;
@@ -206,13 +206,13 @@ CreateRefundRequest.prototype['refund_type'] = undefined;
206
206
  CreateRefundRequest.prototype['order_id'] = undefined;
207
207
 
208
208
  /**
209
- * Whether to charge developer fee to the merchant. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances). - `true`: The fee amount (specified in `merchant_fee_amount`) will be deducted from the merchant's balance and added to the developer's balance - `false`: The merchant is not charged any developer fee When enabled, ensure both `merchant_fee_amount` and `merchant_fee_token_id` are properly specified.
209
+ * Whether to charge developer fee to the merchant. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). - `true`: The fee amount (specified in `merchant_fee_amount`) will be deducted from the merchant's balance and added to the developer's balance - `false`: The merchant is not charged any developer fee When enabled, ensure both `merchant_fee_amount` and `merchant_fee_token_id` are properly specified.
210
210
  * @member {Boolean} charge_merchant_fee
211
211
  */
212
212
  CreateRefundRequest.prototype['charge_merchant_fee'] = undefined;
213
213
 
214
214
  /**
215
- * The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances). This field is required when `charge_merchant_fee` is `true`. Must be: - A positive integer with up to two decimal places. - Less than the refund amount
215
+ * The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). This field is required when `charge_merchant_fee` is `true`. Must be: - A positive integer with up to two decimal places. - Less than the refund amount
216
216
  * @member {String} merchant_fee_amount
217
217
  */
218
218
  CreateRefundRequest.prototype['merchant_fee_amount'] = undefined;
@@ -0,0 +1,156 @@
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 _ReportExportFormat = _interopRequireDefault(require("./ReportExportFormat"));
9
+ var _ReportType = _interopRequireDefault(require("./ReportType"));
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 CreateReportRequest model module.
31
+ * @module model/CreateReportRequest
32
+ */
33
+ var CreateReportRequest = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>CreateReportRequest</code>.
36
+ * @alias module:model/CreateReportRequest
37
+ * @param start_time {Number} The start time of the report. Unix timestamp measured in seconds.
38
+ * @param end_time {Number} The end time of the report. Unix timestamp measured in seconds.
39
+ * @param report_export_format {module:model/ReportExportFormat}
40
+ * @param report_types {Array.<module:model/ReportType>}
41
+ */
42
+ function CreateReportRequest(start_time, end_time, report_export_format, report_types) {
43
+ _classCallCheck(this, CreateReportRequest);
44
+ CreateReportRequest.initialize(this, start_time, end_time, report_export_format, report_types);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(CreateReportRequest, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, start_time, end_time, report_export_format, report_types) {
55
+ obj['start_time'] = start_time;
56
+ obj['end_time'] = end_time;
57
+ obj['report_export_format'] = report_export_format;
58
+ obj['report_types'] = report_types;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>CreateReportRequest</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/CreateReportRequest} obj Optional instance to populate.
66
+ * @return {module:model/CreateReportRequest} The populated <code>CreateReportRequest</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new CreateReportRequest();
73
+ if (data.hasOwnProperty('start_time')) {
74
+ obj['start_time'] = _ApiClient["default"].convertToType(data['start_time'], 'Number');
75
+ }
76
+ if (data.hasOwnProperty('end_time')) {
77
+ obj['end_time'] = _ApiClient["default"].convertToType(data['end_time'], 'Number');
78
+ }
79
+ if (data.hasOwnProperty('report_export_format')) {
80
+ obj['report_export_format'] = _ReportExportFormat["default"].constructFromObject(data['report_export_format']);
81
+ }
82
+ if (data.hasOwnProperty('report_types')) {
83
+ obj['report_types'] = _ApiClient["default"].convertToType(data['report_types'], [_ReportType["default"]]);
84
+ }
85
+ if (data.hasOwnProperty('token_ids')) {
86
+ obj['token_ids'] = _ApiClient["default"].convertToType(data['token_ids'], ['String']);
87
+ }
88
+ }
89
+ return obj;
90
+ }
91
+
92
+ /**
93
+ * Validates the JSON data with respect to <code>CreateReportRequest</code>.
94
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
95
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateReportRequest</code>.
96
+ */
97
+ }, {
98
+ key: "validateJSON",
99
+ value: function validateJSON(data) {
100
+ // check to make sure all required properties are present in the JSON string
101
+ var _iterator = _createForOfIteratorHelper(CreateReportRequest.RequiredProperties),
102
+ _step;
103
+ try {
104
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
105
+ var property = _step.value;
106
+ if (!data.hasOwnProperty(property)) {
107
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
108
+ }
109
+ }
110
+ // ensure the json data is an array
111
+ } catch (err) {
112
+ _iterator.e(err);
113
+ } finally {
114
+ _iterator.f();
115
+ }
116
+ if (!Array.isArray(data['report_types'])) {
117
+ throw new Error("Expected the field `report_types` to be an array in the JSON data but got " + data['report_types']);
118
+ }
119
+ // ensure the json data is an array
120
+ if (!Array.isArray(data['token_ids'])) {
121
+ throw new Error("Expected the field `token_ids` to be an array in the JSON data but got " + data['token_ids']);
122
+ }
123
+ return true;
124
+ }
125
+ }]);
126
+ }();
127
+ CreateReportRequest.RequiredProperties = ["start_time", "end_time", "report_export_format", "report_types"];
128
+
129
+ /**
130
+ * The start time of the report. Unix timestamp measured in seconds.
131
+ * @member {Number} start_time
132
+ */
133
+ CreateReportRequest.prototype['start_time'] = undefined;
134
+
135
+ /**
136
+ * The end time of the report. Unix timestamp measured in seconds.
137
+ * @member {Number} end_time
138
+ */
139
+ CreateReportRequest.prototype['end_time'] = undefined;
140
+
141
+ /**
142
+ * @member {module:model/ReportExportFormat} report_export_format
143
+ */
144
+ CreateReportRequest.prototype['report_export_format'] = undefined;
145
+
146
+ /**
147
+ * @member {Array.<module:model/ReportType>} report_types
148
+ */
149
+ CreateReportRequest.prototype['report_types'] = undefined;
150
+
151
+ /**
152
+ * Optional filter to include only items related to specified token IDs in the report.
153
+ * @member {Array.<String>} token_ids
154
+ */
155
+ CreateReportRequest.prototype['token_ids'] = undefined;
156
+ var _default = exports["default"] = CreateReportRequest;