@cobo/cobo-waas2 1.16.0 → 1.18.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 (214) hide show
  1. package/README.md +46 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +27 -33
  4. package/dist/api/AppWorkflowsApi.js +22 -22
  5. package/dist/api/FeeStationApi.js +2 -2
  6. package/dist/api/OAuthApi.js +93 -6
  7. package/dist/api/OrganizationsApi.js +79 -0
  8. package/dist/api/PaymentApi.js +265 -55
  9. package/dist/api/TransactionsApi.js +2 -2
  10. package/dist/api/WalletsApi.js +11 -8
  11. package/dist/index.js +252 -14
  12. package/dist/model/Account.js +174 -0
  13. package/dist/model/AcquiringType.js +61 -0
  14. package/dist/model/AddressTransferDestination.js +2 -2
  15. package/dist/model/AddressesEventData.js +8 -3
  16. package/dist/model/AppWorkflow.js +7 -7
  17. package/dist/model/AppWorkflowField.js +5 -5
  18. package/dist/model/AppWorkflowPolicy.js +1 -1
  19. package/dist/model/ApprovalEntry.js +1 -1
  20. package/dist/model/ApprovalRequest.js +5 -3
  21. package/dist/model/ApprovalRequestDetail.js +2 -1
  22. package/dist/model/ApprovalUser.js +4 -4
  23. package/dist/model/BalanceUpdateInfo.js +170 -0
  24. package/dist/model/BalanceUpdateInfoEventData.js +297 -0
  25. package/dist/model/BankAccount.js +2 -2
  26. package/dist/model/ChainInfo.js +1 -1
  27. package/dist/model/ChainsEventData.js +8 -3
  28. package/dist/model/CreateApprovalRequest201Response.js +2 -1
  29. package/dist/model/CreateMerchantRequest.js +13 -0
  30. package/dist/model/CreatePaymentOrderRequest.js +14 -5
  31. package/dist/model/CreateRefundRequest.js +41 -8
  32. package/dist/model/CreateSettlement.js +28 -12
  33. package/dist/model/CreateSettlementRequestRequest.js +27 -0
  34. package/dist/model/CryptoAddress.js +171 -0
  35. package/dist/model/CustodialTransferDestination.js +137 -0
  36. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  37. package/dist/model/EstimateFeeParams.js +1 -1
  38. package/dist/model/EstimatedFILFee.js +170 -0
  39. package/dist/model/EstimatedFILFeeSlow.js +186 -0
  40. package/dist/model/EstimatedFee.js +68 -12
  41. package/dist/model/EstimatedSOLFee.js +170 -0
  42. package/dist/model/EstimatedSOLFeeSlow.js +184 -0
  43. package/dist/model/ExchangePermissionToken201Response.js +122 -0
  44. package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
  45. package/dist/model/FILBase.js +88 -0
  46. package/dist/model/FILPrice.js +114 -0
  47. package/dist/model/FeeType.js +10 -0
  48. package/dist/model/GetExchangeRate200Response.js +2 -2
  49. package/dist/model/GraphQLError.js +135 -0
  50. package/dist/model/GraphQLErrorLocationsInner.js +92 -0
  51. package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
  52. package/dist/model/GraphQLResponse.js +119 -0
  53. package/dist/model/ListTopUpPayers200Response.js +123 -0
  54. package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
  55. package/dist/model/MPCVaultEventData.js +8 -3
  56. package/dist/model/Merchant.js +15 -2
  57. package/dist/model/Order.js +16 -7
  58. package/dist/model/PayerAccount.js +189 -0
  59. package/dist/model/PaymentOrderEventData.js +33 -15
  60. package/dist/model/PaymentRefundEventData.js +66 -11
  61. package/dist/model/PaymentSettlementEvent.js +14 -9
  62. package/dist/model/PayoutChannel.js +61 -0
  63. package/dist/model/PolicyAction.js +1 -1
  64. package/dist/model/PolicyActionContent.js +6 -4
  65. package/dist/model/PolicyCondition.js +5 -5
  66. package/dist/model/RefreshPermissionTokenRequest.js +110 -0
  67. package/dist/model/Refund.js +39 -4
  68. package/dist/model/RefundStatus.js +5 -0
  69. package/dist/model/RequestApproval.js +9 -9
  70. package/dist/model/RevokeApprovalRequest201Response.js +2 -1
  71. package/dist/model/RevokeApprovalRequestRequest.js +2 -2
  72. package/dist/model/SOLBase.js +101 -0
  73. package/dist/model/SOLComputeUnit.js +101 -0
  74. package/dist/model/Settlement.js +3 -3
  75. package/dist/model/SettlementDetail.js +24 -6
  76. package/dist/model/SettlementInfo.js +11 -2
  77. package/dist/model/SupportedToken.js +222 -0
  78. package/dist/model/SwapActivityDetail.js +30 -0
  79. package/dist/model/SwapActivitySigners.js +110 -0
  80. package/dist/model/SwapQuote.js +17 -4
  81. package/dist/model/SwapSingingStatus.js +71 -0
  82. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  83. package/dist/model/TokenListingEventData.js +8 -3
  84. package/dist/model/TokensEventData.js +8 -3
  85. package/dist/model/TopUpAddress.js +230 -0
  86. package/dist/model/TransactionCoboCategory.js +20 -0
  87. package/dist/model/TransactionDestination.js +14 -38
  88. package/dist/model/TransactionDestinationType.js +5 -0
  89. package/dist/model/TransactionEvmCalldataInfo.js +1 -1
  90. package/dist/model/TransactionFILFee.js +229 -0
  91. package/dist/model/TransactionFee.js +107 -9
  92. package/dist/model/TransactionRequestFILFee.js +186 -0
  93. package/dist/model/TransactionRequestFee.js +89 -9
  94. package/dist/model/TransactionRequestSOLFee.js +168 -0
  95. package/dist/model/TransactionSOLFee.js +229 -0
  96. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  97. package/dist/model/TransactionTransferToWalletDestination.js +2 -2
  98. package/dist/model/TransactionWebhookEventData.js +8 -3
  99. package/dist/model/TransferDestination.js +44 -16
  100. package/dist/model/TransferDestinationType.js +5 -0
  101. package/dist/model/UpdateMerchantByIdRequest.js +13 -0
  102. package/dist/model/UpdateRefundByIdRequest.js +110 -0
  103. package/dist/model/UpdateTopUpAddress.js +141 -0
  104. package/dist/model/WalletInfoEventData.js +8 -3
  105. package/dist/model/WebhookEvent.js +2 -2
  106. package/dist/model/WebhookEventData.js +83 -13
  107. package/dist/model/WebhookEventDataType.js +7 -2
  108. package/dist/model/WebhookEventLog.js +2 -2
  109. package/dist/model/WebhookEventType.js +15 -0
  110. package/docs/Account.md +14 -0
  111. package/docs/AcquiringType.md +12 -0
  112. package/docs/AddressTransferDestination.md +2 -2
  113. package/docs/AddressesEventData.md +3 -1
  114. package/docs/AppWorkflow.md +3 -3
  115. package/docs/AppWorkflowField.md +2 -2
  116. package/docs/AppWorkflowsApi.md +12 -12
  117. package/docs/ApprovalRequest.md +2 -2
  118. package/docs/ApprovalRequestDetail.md +1 -1
  119. package/docs/ApprovalUser.md +2 -2
  120. package/docs/BalanceUpdateInfo.md +13 -0
  121. package/docs/BalanceUpdateInfoEventData.md +47 -0
  122. package/docs/BankAccount.md +2 -2
  123. package/docs/ChainInfo.md +1 -1
  124. package/docs/ChainsEventData.md +3 -1
  125. package/docs/CreateApprovalRequest201Response.md +1 -1
  126. package/docs/CreateMerchantRequest.md +1 -0
  127. package/docs/CreatePaymentOrderRequest.md +2 -1
  128. package/docs/CreateRefundRequest.md +5 -2
  129. package/docs/CreateSettlement.md +7 -6
  130. package/docs/CreateSettlementRequestRequest.md +3 -0
  131. package/docs/CryptoAddress.md +14 -0
  132. package/docs/CustodialTransferDestination.md +11 -0
  133. package/docs/EstimateContractCallFeeParams.md +1 -1
  134. package/docs/EstimateFeeParams.md +1 -1
  135. package/docs/EstimatedFILFee.md +13 -0
  136. package/docs/EstimatedFILFeeSlow.md +12 -0
  137. package/docs/EstimatedFee.md +3 -3
  138. package/docs/EstimatedSOLFee.md +13 -0
  139. package/docs/EstimatedSOLFeeSlow.md +12 -0
  140. package/docs/ExchangePermissionToken201Response.md +12 -0
  141. package/docs/ExchangePermissionTokenRequest.md +9 -0
  142. package/docs/FILBase.md +9 -0
  143. package/docs/FILPrice.md +11 -0
  144. package/docs/FeeStationApi.md +1 -1
  145. package/docs/FeeType.md +4 -0
  146. package/docs/GetExchangeRate200Response.md +1 -1
  147. package/docs/GraphQLError.md +11 -0
  148. package/docs/GraphQLErrorLocationsInner.md +10 -0
  149. package/docs/GraphQLRequest.md +11 -0
  150. package/docs/GraphQLResponse.md +10 -0
  151. package/docs/ListTopUpPayers200Response.md +10 -0
  152. package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
  153. package/docs/MPCVaultEventData.md +3 -1
  154. package/docs/Merchant.md +3 -2
  155. package/docs/OAuthApi.md +102 -0
  156. package/docs/Order.md +6 -5
  157. package/docs/OrganizationsApi.md +55 -0
  158. package/docs/PayerAccount.md +14 -0
  159. package/docs/PaymentApi.md +247 -29
  160. package/docs/PaymentOrderEventData.md +9 -6
  161. package/docs/PaymentRefundEventData.md +10 -5
  162. package/docs/PaymentSettlementEvent.md +6 -4
  163. package/docs/PayoutChannel.md +12 -0
  164. package/docs/PolicyActionContent.md +4 -4
  165. package/docs/PolicyCondition.md +2 -2
  166. package/docs/RefreshPermissionTokenRequest.md +9 -0
  167. package/docs/Refund.md +7 -4
  168. package/docs/RefundStatus.md +2 -0
  169. package/docs/RequestApproval.md +4 -4
  170. package/docs/RevokeApprovalRequest201Response.md +1 -1
  171. package/docs/RevokeApprovalRequestRequest.md +1 -1
  172. package/docs/SOLBase.md +10 -0
  173. package/docs/SOLComputeUnit.md +10 -0
  174. package/docs/Settlement.md +3 -3
  175. package/docs/SettlementDetail.md +8 -6
  176. package/docs/SettlementInfo.md +3 -2
  177. package/docs/SupportedToken.md +17 -0
  178. package/docs/SwapActivityDetail.md +1 -0
  179. package/docs/SwapActivitySigners.md +11 -0
  180. package/docs/SwapQuote.md +3 -2
  181. package/docs/SwapSingingStatus.md +16 -0
  182. package/docs/TSSRequestWebhookEventData.md +3 -1
  183. package/docs/TokenListingEventData.md +3 -1
  184. package/docs/TokensEventData.md +3 -1
  185. package/docs/TopUpAddress.md +18 -0
  186. package/docs/TransactionCoboCategory.md +8 -0
  187. package/docs/TransactionDestination.md +2 -2
  188. package/docs/TransactionDestinationType.md +2 -0
  189. package/docs/TransactionEvmCalldataInfo.md +1 -1
  190. package/docs/TransactionFILFee.md +16 -0
  191. package/docs/TransactionFee.md +8 -1
  192. package/docs/TransactionRequestFILFee.md +13 -0
  193. package/docs/TransactionRequestFee.md +5 -1
  194. package/docs/TransactionRequestSOLFee.md +12 -0
  195. package/docs/TransactionSOLFee.md +16 -0
  196. package/docs/TransactionTransferToAddressDestination.md +2 -2
  197. package/docs/TransactionTransferToWalletDestination.md +1 -1
  198. package/docs/TransactionWebhookEventData.md +3 -1
  199. package/docs/TransactionsApi.md +1 -1
  200. package/docs/TransferDestination.md +3 -3
  201. package/docs/TransferDestinationType.md +2 -0
  202. package/docs/UpdateMerchantByIdRequest.md +1 -0
  203. package/docs/UpdateRefundByIdRequest.md +9 -0
  204. package/docs/UpdateTopUpAddress.md +11 -0
  205. package/docs/WalletInfoEventData.md +3 -1
  206. package/docs/WalletsApi.md +6 -4
  207. package/docs/WebhookEvent.md +1 -1
  208. package/docs/WebhookEventData.md +14 -5
  209. package/docs/WebhookEventDataType.md +3 -1
  210. package/docs/WebhookEventLog.md +1 -1
  211. package/docs/WebhookEventType.md +6 -0
  212. package/package.json +1 -1
  213. package/docs/CreateBankAccountRequest.md +0 -9
  214. package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
@@ -0,0 +1,297 @@
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 _Balance = _interopRequireDefault(require("./Balance"));
9
+ var _BalanceUpdateInfo = _interopRequireDefault(require("./BalanceUpdateInfo"));
10
+ var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
14
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
21
+ * Cobo Wallet as a Service 2.0
22
+ *
23
+ * Contact: help@cobo.com
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The BalanceUpdateInfoEventData model module.
32
+ * @module model/BalanceUpdateInfoEventData
33
+ */
34
+ var BalanceUpdateInfoEventData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>BalanceUpdateInfoEventData</code>.
37
+ * @alias module:model/BalanceUpdateInfoEventData
38
+ * @implements module:model/WebhookEventDataType
39
+ * @implements module:model/BalanceUpdateInfo
40
+ * @param data_type {module:model/BalanceUpdateInfoEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
41
+ * @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
42
+ * @param address {String} The wallet address.
43
+ * @param wallet_uuid {String} The wallet ID.
44
+ * @param updated_timestamp {Number} The time when the balance updated, in Unix timestamp format, measured in milliseconds.
45
+ * @param balance {module:model/Balance}
46
+ */
47
+ function BalanceUpdateInfoEventData(data_type, token_id, address, wallet_uuid, updated_timestamp, balance) {
48
+ _classCallCheck(this, BalanceUpdateInfoEventData);
49
+ _WebhookEventDataType["default"].initialize(this, data_type);
50
+ _BalanceUpdateInfo["default"].initialize(this, token_id, address, wallet_uuid, updated_timestamp, balance);
51
+ BalanceUpdateInfoEventData.initialize(this, data_type, token_id, address, wallet_uuid, updated_timestamp, balance);
52
+ }
53
+
54
+ /**
55
+ * Initializes the fields of this object.
56
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
57
+ * Only for internal use.
58
+ */
59
+ return _createClass(BalanceUpdateInfoEventData, null, [{
60
+ key: "initialize",
61
+ value: function initialize(obj, data_type, token_id, address, wallet_uuid, updated_timestamp, balance) {
62
+ obj['data_type'] = data_type;
63
+ obj['token_id'] = token_id;
64
+ obj['address'] = address;
65
+ obj['wallet_uuid'] = wallet_uuid;
66
+ obj['updated_timestamp'] = updated_timestamp;
67
+ obj['balance'] = balance;
68
+ }
69
+
70
+ /**
71
+ * Constructs a <code>BalanceUpdateInfoEventData</code> from a plain JavaScript object, optionally creating a new instance.
72
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
73
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
74
+ * @param {module:model/BalanceUpdateInfoEventData} obj Optional instance to populate.
75
+ * @return {module:model/BalanceUpdateInfoEventData} The populated <code>BalanceUpdateInfoEventData</code> instance.
76
+ */
77
+ }, {
78
+ key: "constructFromObject",
79
+ value: function constructFromObject(data, obj) {
80
+ if (data) {
81
+ obj = obj || new BalanceUpdateInfoEventData();
82
+ _WebhookEventDataType["default"].constructFromObject(data, obj);
83
+ _BalanceUpdateInfo["default"].constructFromObject(data, obj);
84
+ if (data.hasOwnProperty('data_type')) {
85
+ obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('token_id')) {
88
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('address')) {
91
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('wallet_uuid')) {
94
+ obj['wallet_uuid'] = _ApiClient["default"].convertToType(data['wallet_uuid'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('updated_timestamp')) {
97
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
98
+ }
99
+ if (data.hasOwnProperty('balance')) {
100
+ obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
101
+ }
102
+ }
103
+ return obj;
104
+ }
105
+
106
+ /**
107
+ * Validates the JSON data with respect to <code>BalanceUpdateInfoEventData</code>.
108
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
109
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BalanceUpdateInfoEventData</code>.
110
+ */
111
+ }, {
112
+ key: "validateJSON",
113
+ value: function validateJSON(data) {
114
+ // check to make sure all required properties are present in the JSON string
115
+ var _iterator = _createForOfIteratorHelper(BalanceUpdateInfoEventData.RequiredProperties),
116
+ _step;
117
+ try {
118
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
119
+ var property = _step.value;
120
+ if (!data.hasOwnProperty(property)) {
121
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
122
+ }
123
+ }
124
+ // ensure the json data is a string
125
+ } catch (err) {
126
+ _iterator.e(err);
127
+ } finally {
128
+ _iterator.f();
129
+ }
130
+ if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
131
+ throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
132
+ }
133
+ // ensure the json data is a string
134
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
135
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
136
+ }
137
+ // ensure the json data is a string
138
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
139
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['wallet_uuid'] && !(typeof data['wallet_uuid'] === 'string' || data['wallet_uuid'] instanceof String)) {
143
+ throw new Error("Expected the field `wallet_uuid` to be a primitive type in the JSON string but got " + data['wallet_uuid']);
144
+ }
145
+ // validate the optional field `balance`
146
+ if (data['balance']) {
147
+ // data not null
148
+ if (!!_Balance["default"].validateJSON) {
149
+ _Balance["default"].validateJSON(data['balance']);
150
+ }
151
+ }
152
+ return true;
153
+ }
154
+ }]);
155
+ }();
156
+ BalanceUpdateInfoEventData.RequiredProperties = ["data_type", "token_id", "address", "wallet_uuid", "updated_timestamp", "balance"];
157
+
158
+ /**
159
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
160
+ * @member {module:model/BalanceUpdateInfoEventData.DataTypeEnum} data_type
161
+ */
162
+ BalanceUpdateInfoEventData.prototype['data_type'] = undefined;
163
+
164
+ /**
165
+ * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
166
+ * @member {String} token_id
167
+ */
168
+ BalanceUpdateInfoEventData.prototype['token_id'] = undefined;
169
+
170
+ /**
171
+ * The wallet address.
172
+ * @member {String} address
173
+ */
174
+ BalanceUpdateInfoEventData.prototype['address'] = undefined;
175
+
176
+ /**
177
+ * The wallet ID.
178
+ * @member {String} wallet_uuid
179
+ */
180
+ BalanceUpdateInfoEventData.prototype['wallet_uuid'] = undefined;
181
+
182
+ /**
183
+ * The time when the balance updated, in Unix timestamp format, measured in milliseconds.
184
+ * @member {Number} updated_timestamp
185
+ */
186
+ BalanceUpdateInfoEventData.prototype['updated_timestamp'] = undefined;
187
+
188
+ /**
189
+ * @member {module:model/Balance} balance
190
+ */
191
+ BalanceUpdateInfoEventData.prototype['balance'] = undefined;
192
+
193
+ // Implement WebhookEventDataType interface:
194
+ /**
195
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
196
+ * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
197
+ */
198
+ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
199
+ // Implement BalanceUpdateInfo interface:
200
+ /**
201
+ * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
202
+ * @member {String} token_id
203
+ */
204
+ _BalanceUpdateInfo["default"].prototype['token_id'] = undefined;
205
+ /**
206
+ * The wallet address.
207
+ * @member {String} address
208
+ */
209
+ _BalanceUpdateInfo["default"].prototype['address'] = undefined;
210
+ /**
211
+ * The wallet ID.
212
+ * @member {String} wallet_uuid
213
+ */
214
+ _BalanceUpdateInfo["default"].prototype['wallet_uuid'] = undefined;
215
+ /**
216
+ * The time when the balance updated, in Unix timestamp format, measured in milliseconds.
217
+ * @member {Number} updated_timestamp
218
+ */
219
+ _BalanceUpdateInfo["default"].prototype['updated_timestamp'] = undefined;
220
+ /**
221
+ * @member {module:model/Balance} balance
222
+ */
223
+ _BalanceUpdateInfo["default"].prototype['balance'] = undefined;
224
+
225
+ /**
226
+ * Allowed values for the <code>data_type</code> property.
227
+ * @enum {String}
228
+ * @readonly
229
+ */
230
+ BalanceUpdateInfoEventData['DataTypeEnum'] = {
231
+ /**
232
+ * value: "Transaction"
233
+ * @const
234
+ */
235
+ "Transaction": "Transaction",
236
+ /**
237
+ * value: "TSSRequest"
238
+ * @const
239
+ */
240
+ "TSSRequest": "TSSRequest",
241
+ /**
242
+ * value: "Addresses"
243
+ * @const
244
+ */
245
+ "Addresses": "Addresses",
246
+ /**
247
+ * value: "WalletInfo"
248
+ * @const
249
+ */
250
+ "WalletInfo": "WalletInfo",
251
+ /**
252
+ * value: "MPCVault"
253
+ * @const
254
+ */
255
+ "MPCVault": "MPCVault",
256
+ /**
257
+ * value: "Chains"
258
+ * @const
259
+ */
260
+ "Chains": "Chains",
261
+ /**
262
+ * value: "Tokens"
263
+ * @const
264
+ */
265
+ "Tokens": "Tokens",
266
+ /**
267
+ * value: "TokenListing"
268
+ * @const
269
+ */
270
+ "TokenListing": "TokenListing",
271
+ /**
272
+ * value: "BalanceUpdateInfo"
273
+ * @const
274
+ */
275
+ "BalanceUpdateInfo": "BalanceUpdateInfo",
276
+ /**
277
+ * value: "PaymentOrder"
278
+ * @const
279
+ */
280
+ "PaymentOrder": "PaymentOrder",
281
+ /**
282
+ * value: "PaymentRefund"
283
+ * @const
284
+ */
285
+ "PaymentRefund": "PaymentRefund",
286
+ /**
287
+ * value: "PaymentSettlement"
288
+ * @const
289
+ */
290
+ "PaymentSettlement": "PaymentSettlement",
291
+ /**
292
+ * value: "unknown_default_open_api"
293
+ * @const
294
+ */
295
+ "unknown_default_open_api": "unknown_default_open_api"
296
+ };
297
+ var _default = exports["default"] = BalanceUpdateInfoEventData;
@@ -128,13 +128,13 @@ BankAccount.prototype['bank_account_id'] = undefined;
128
128
  BankAccount.prototype['info'] = undefined;
129
129
 
130
130
  /**
131
- * The created time of the bank account, represented as a UNIX timestamp in seconds.
131
+ * The creation time of the bank account, represented as a UNIX timestamp in seconds.
132
132
  * @member {Number} created_timestamp
133
133
  */
134
134
  BankAccount.prototype['created_timestamp'] = undefined;
135
135
 
136
136
  /**
137
- * The updated time of the bank account, represented as a UNIX timestamp in seconds.
137
+ * The last update time of the bank account, represented as a UNIX timestamp in seconds.
138
138
  * @member {Number} updated_timestamp
139
139
  */
140
140
  BankAccount.prototype['updated_timestamp'] = undefined;
@@ -183,7 +183,7 @@ ChainInfo.prototype['require_memo'] = undefined;
183
183
  ChainInfo.prototype['confirming_threshold'] = undefined;
184
184
 
185
185
  /**
186
- * The number of confirmations required for a coinbase transaction to be mature, such as 100 for BTC.
186
+ * The number of confirmations required before a coinbase transaction is considered mature and can be spent, for example, 100 confirmations for BTC.
187
187
  * @member {Number} coinbase_maturity
188
188
  */
189
189
  ChainInfo.prototype['coinbase_maturity'] = undefined;
@@ -37,7 +37,7 @@ var ChainsEventData = /*#__PURE__*/function () {
37
37
  * Constructs a new <code>ChainsEventData</code>.
38
38
  * @alias module:model/ChainsEventData
39
39
  * @implements module:model/WebhookEventDataType
40
- * @param data_type {module:model/ChainsEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
40
+ * @param data_type {module:model/ChainsEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
41
41
  * @param chains {Array.<module:model/ChainInfo>} The enabled chains.
42
42
  */
43
43
  function ChainsEventData(data_type, chains) {
@@ -146,7 +146,7 @@ var ChainsEventData = /*#__PURE__*/function () {
146
146
  ChainsEventData.RequiredProperties = ["data_type", "chains"];
147
147
 
148
148
  /**
149
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
149
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
150
150
  * @member {module:model/ChainsEventData.DataTypeEnum} data_type
151
151
  */
152
152
  ChainsEventData.prototype['data_type'] = undefined;
@@ -169,7 +169,7 @@ ChainsEventData.prototype['wallet_subtypes'] = undefined;
169
169
 
170
170
  // Implement WebhookEventDataType interface:
171
171
  /**
172
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
172
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data.
173
173
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
174
174
  */
175
175
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -220,6 +220,11 @@ ChainsEventData['DataTypeEnum'] = {
220
220
  * @const
221
221
  */
222
222
  "TokenListing": "TokenListing",
223
+ /**
224
+ * value: "BalanceUpdateInfo"
225
+ * @const
226
+ */
227
+ "BalanceUpdateInfo": "BalanceUpdateInfo",
223
228
  /**
224
229
  * value: "PaymentOrder"
225
230
  * @const
@@ -32,7 +32,7 @@ var CreateApprovalRequest201Response = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>CreateApprovalRequest201Response</code>.
34
34
  * @alias module:model/CreateApprovalRequest201Response
35
- * @param approval_id {String}
35
+ * @param approval_id {String} The system-generated unique ID of the approval request. You can use this ID to query the approval request status or revoke the request.
36
36
  */
37
37
  function CreateApprovalRequest201Response(approval_id) {
38
38
  _classCallCheck(this, CreateApprovalRequest201Response);
@@ -103,6 +103,7 @@ var CreateApprovalRequest201Response = /*#__PURE__*/function () {
103
103
  CreateApprovalRequest201Response.RequiredProperties = ["approval_id"];
104
104
 
105
105
  /**
106
+ * The system-generated unique ID of the approval request. You can use this ID to query the approval request status or revoke the request.
106
107
  * @member {String} approval_id
107
108
  */
108
109
  CreateApprovalRequest201Response.prototype['approval_id'] = undefined;
@@ -70,6 +70,9 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
70
70
  if (data.hasOwnProperty('wallet_id')) {
71
71
  obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
72
72
  }
73
+ if (data.hasOwnProperty('developer_fee_rate')) {
74
+ obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
75
+ }
73
76
  }
74
77
  return obj;
75
78
  }
@@ -105,6 +108,10 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
105
108
  if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
106
109
  throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
107
110
  }
111
+ // ensure the json data is a string
112
+ if (data['developer_fee_rate'] && !(typeof data['developer_fee_rate'] === 'string' || data['developer_fee_rate'] instanceof String)) {
113
+ throw new Error("Expected the field `developer_fee_rate` to be a primitive type in the JSON string but got " + data['developer_fee_rate']);
114
+ }
108
115
  return true;
109
116
  }
110
117
  }]);
@@ -122,4 +129,10 @@ CreateMerchantRequest.prototype['name'] = undefined;
122
129
  * @member {String} wallet_id
123
130
  */
124
131
  CreateMerchantRequest.prototype['wallet_id'] = undefined;
132
+
133
+ /**
134
+ * The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions.
135
+ * @member {String} developer_fee_rate
136
+ */
137
+ CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
125
138
  var _default = exports["default"] = CreateMerchantRequest;
@@ -91,8 +91,11 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
91
91
  if (data.hasOwnProperty('psp_order_code')) {
92
92
  obj['psp_order_code'] = _ApiClient["default"].convertToType(data['psp_order_code'], 'String');
93
93
  }
94
- if (data.hasOwnProperty('expired_at')) {
95
- obj['expired_at'] = _ApiClient["default"].convertToType(data['expired_at'], 'Number');
94
+ if (data.hasOwnProperty('expired_in')) {
95
+ obj['expired_in'] = _ApiClient["default"].convertToType(data['expired_in'], 'Number');
96
+ }
97
+ if (data.hasOwnProperty('use_dedicated_address')) {
98
+ obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
96
99
  }
97
100
  }
98
101
  return obj;
@@ -199,8 +202,14 @@ CreatePaymentOrderRequest.prototype['merchant_order_code'] = undefined;
199
202
  CreatePaymentOrderRequest.prototype['psp_order_code'] = undefined;
200
203
 
201
204
  /**
202
- * The expiration time of the pay-in order, represented as a UNIX timestamp in seconds. After this time: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event.
203
- * @member {Number} expired_at
205
+ * The number of seconds after which the pay-in order will expire. After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event.
206
+ * @member {Number} expired_in
207
+ */
208
+ CreatePaymentOrderRequest.prototype['expired_in'] = undefined;
209
+
210
+ /**
211
+ * Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used.
212
+ * @member {Boolean} use_dedicated_address
204
213
  */
205
- CreatePaymentOrderRequest.prototype['expired_at'] = undefined;
214
+ CreatePaymentOrderRequest.prototype['use_dedicated_address'] = undefined;
206
215
  var _default = exports["default"] = CreatePaymentOrderRequest;
@@ -34,14 +34,13 @@ var CreateRefundRequest = /*#__PURE__*/function () {
34
34
  * Constructs a new <code>CreateRefundRequest</code>.
35
35
  * @alias module:model/CreateRefundRequest
36
36
  * @param request_id {String} The request ID that is used to track a refund request. The request ID is provided by you and must be unique.
37
- * @param payable_amount {String} The amount to refund in cryptocurrency.
38
- * @param to_address {String} The address where the refunded cryptocurrency will be sent.
37
+ * @param payable_amount {String} The amount to refund in cryptocurrency. The amount must be a positive integer with up to two decimal places.
39
38
  * @param token_id {String} The ID of the cryptocurrency used for refund. 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`
40
39
  * @param refund_type {module:model/RefundType}
41
40
  */
42
- function CreateRefundRequest(request_id, payable_amount, to_address, token_id, refund_type) {
41
+ function CreateRefundRequest(request_id, payable_amount, token_id, refund_type) {
43
42
  _classCallCheck(this, CreateRefundRequest);
44
- CreateRefundRequest.initialize(this, request_id, payable_amount, to_address, token_id, refund_type);
43
+ CreateRefundRequest.initialize(this, request_id, payable_amount, token_id, refund_type);
45
44
  }
46
45
 
47
46
  /**
@@ -51,10 +50,9 @@ var CreateRefundRequest = /*#__PURE__*/function () {
51
50
  */
52
51
  return _createClass(CreateRefundRequest, null, [{
53
52
  key: "initialize",
54
- value: function initialize(obj, request_id, payable_amount, to_address, token_id, refund_type) {
53
+ value: function initialize(obj, request_id, payable_amount, token_id, refund_type) {
55
54
  obj['request_id'] = request_id;
56
55
  obj['payable_amount'] = payable_amount;
57
- obj['to_address'] = to_address;
58
56
  obj['token_id'] = token_id;
59
57
  obj['refund_type'] = refund_type;
60
58
  }
@@ -92,6 +90,15 @@ var CreateRefundRequest = /*#__PURE__*/function () {
92
90
  if (data.hasOwnProperty('order_id')) {
93
91
  obj['order_id'] = _ApiClient["default"].convertToType(data['order_id'], 'String');
94
92
  }
93
+ if (data.hasOwnProperty('charge_merchant_fee')) {
94
+ obj['charge_merchant_fee'] = _ApiClient["default"].convertToType(data['charge_merchant_fee'], 'Boolean');
95
+ }
96
+ if (data.hasOwnProperty('merchant_fee_amount')) {
97
+ obj['merchant_fee_amount'] = _ApiClient["default"].convertToType(data['merchant_fee_amount'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('merchant_fee_token_id')) {
100
+ obj['merchant_fee_token_id'] = _ApiClient["default"].convertToType(data['merchant_fee_token_id'], 'String');
101
+ }
95
102
  }
96
103
  return obj;
97
104
  }
@@ -143,11 +150,19 @@ var CreateRefundRequest = /*#__PURE__*/function () {
143
150
  if (data['order_id'] && !(typeof data['order_id'] === 'string' || data['order_id'] instanceof String)) {
144
151
  throw new Error("Expected the field `order_id` to be a primitive type in the JSON string but got " + data['order_id']);
145
152
  }
153
+ // ensure the json data is a string
154
+ if (data['merchant_fee_amount'] && !(typeof data['merchant_fee_amount'] === 'string' || data['merchant_fee_amount'] instanceof String)) {
155
+ throw new Error("Expected the field `merchant_fee_amount` to be a primitive type in the JSON string but got " + data['merchant_fee_amount']);
156
+ }
157
+ // ensure the json data is a string
158
+ if (data['merchant_fee_token_id'] && !(typeof data['merchant_fee_token_id'] === 'string' || data['merchant_fee_token_id'] instanceof String)) {
159
+ throw new Error("Expected the field `merchant_fee_token_id` to be a primitive type in the JSON string but got " + data['merchant_fee_token_id']);
160
+ }
146
161
  return true;
147
162
  }
148
163
  }]);
149
164
  }();
150
- CreateRefundRequest.RequiredProperties = ["request_id", "payable_amount", "to_address", "token_id", "refund_type"];
165
+ CreateRefundRequest.RequiredProperties = ["request_id", "payable_amount", "token_id", "refund_type"];
151
166
 
152
167
  /**
153
168
  * The request ID that is used to track a refund request. The request ID is provided by you and must be unique.
@@ -162,7 +177,7 @@ CreateRefundRequest.prototype['request_id'] = undefined;
162
177
  CreateRefundRequest.prototype['merchant_id'] = undefined;
163
178
 
164
179
  /**
165
- * The amount to refund in cryptocurrency.
180
+ * The amount to refund in cryptocurrency. The amount must be a positive integer with up to two decimal places.
166
181
  * @member {String} payable_amount
167
182
  */
168
183
  CreateRefundRequest.prototype['payable_amount'] = undefined;
@@ -189,4 +204,22 @@ CreateRefundRequest.prototype['refund_type'] = undefined;
189
204
  * @member {String} order_id
190
205
  */
191
206
  CreateRefundRequest.prototype['order_id'] = undefined;
207
+
208
+ /**
209
+ * Whether to charge developer fee to the merchant. - `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
+ * @member {Boolean} charge_merchant_fee
211
+ */
212
+ CreateRefundRequest.prototype['charge_merchant_fee'] = undefined;
213
+
214
+ /**
215
+ * The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. Required when `charge_merchant_fee` is `true`. Must be: - A positive integer with up to two decimal places. - Less than the refund amount
216
+ * @member {String} merchant_fee_amount
217
+ */
218
+ CreateRefundRequest.prototype['merchant_fee_amount'] = undefined;
219
+
220
+ /**
221
+ * The ID of the cryptocurrency used for the developer fee. It must be the same as `token_id`. 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`
222
+ * @member {String} merchant_fee_token_id
223
+ */
224
+ CreateRefundRequest.prototype['merchant_fee_token_id'] = undefined;
192
225
  var _default = exports["default"] = CreateRefundRequest;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _SettlementType = _interopRequireDefault(require("./SettlementType"));
9
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
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); }
11
10
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -72,8 +71,11 @@ var CreateSettlement = /*#__PURE__*/function () {
72
71
  if (data.hasOwnProperty('bank_account_id')) {
73
72
  obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
74
73
  }
75
- if (data.hasOwnProperty('settlement_type')) {
76
- obj['settlement_type'] = _SettlementType["default"].constructFromObject(data['settlement_type']);
74
+ if (data.hasOwnProperty('crypto_address_id')) {
75
+ obj['crypto_address_id'] = _ApiClient["default"].convertToType(data['crypto_address_id'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('order_ids')) {
78
+ obj['order_ids'] = _ApiClient["default"].convertToType(data['order_ids'], ['String']);
77
79
  }
78
80
  }
79
81
  return obj;
@@ -107,43 +109,57 @@ var CreateSettlement = /*#__PURE__*/function () {
107
109
  if (data['bank_account_id'] && !(typeof data['bank_account_id'] === 'string' || data['bank_account_id'] instanceof String)) {
108
110
  throw new Error("Expected the field `bank_account_id` to be a primitive type in the JSON string but got " + data['bank_account_id']);
109
111
  }
112
+ // ensure the json data is a string
113
+ if (data['crypto_address_id'] && !(typeof data['crypto_address_id'] === 'string' || data['crypto_address_id'] instanceof String)) {
114
+ throw new Error("Expected the field `crypto_address_id` to be a primitive type in the JSON string but got " + data['crypto_address_id']);
115
+ }
116
+ // ensure the json data is an array
117
+ if (!Array.isArray(data['order_ids'])) {
118
+ throw new Error("Expected the field `order_ids` to be an array in the JSON data but got " + data['order_ids']);
119
+ }
110
120
  return true;
111
121
  }
112
122
  }]);
113
123
  }();
114
124
  /**
115
- * The merchant ID.
125
+ * The merchant ID. Specify this field when `settlement_type` is set to `Merchant`.
116
126
  * @member {String} merchant_id
117
127
  */
118
128
  CreateSettlement.prototype['merchant_id'] = undefined;
119
129
 
120
130
  /**
121
- * The ID of the cryptocurrency you want to settle. 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`
131
+ * The ID of the cryptocurrency you want to settle. Specify this field when `payout_channel` is set to `Crypto`. 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`
122
132
  * @member {String} token_id
123
133
  */
124
134
  CreateSettlement.prototype['token_id'] = undefined;
125
135
 
126
136
  /**
127
- * The fiat currency for settling the cryptocurrency. Currently, only `USD` is supported.
137
+ * The fiat currency for settling the cryptocurrency. Currently, only `USD` is supported. Specify this field when `payout_channel` is set to `OffRamp`.
128
138
  * @member {String} currency
129
- * @default 'USD'
130
139
  */
131
- CreateSettlement.prototype['currency'] = 'USD';
140
+ CreateSettlement.prototype['currency'] = undefined;
132
141
 
133
142
  /**
134
- * The settlement amount. - If `token_id` is specified, this represents the settlement amount in the specified cryptocurrency. - If `token_id` is not specified, this represents the settlement amount in the specified fiat currency.
143
+ * The settlement amount. - If `payout_channel` is set to `Crypto`, this represents the settlement amount in the specified cryptocurrency. - If `payout_channel` is set to `OffRamp`, this represents the settlement amount in the specified fiat currency.
135
144
  * @member {String} amount
136
145
  */
137
146
  CreateSettlement.prototype['amount'] = undefined;
138
147
 
139
148
  /**
140
- * The ID of the bank account where the settled funds will be deposited.
149
+ * The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts.
141
150
  * @member {String} bank_account_id
142
151
  */
143
152
  CreateSettlement.prototype['bank_account_id'] = undefined;
144
153
 
145
154
  /**
146
- * @member {module:model/SettlementType} settlement_type
155
+ * The ID of the crypto address used for crypto withdrawal. Specify this field when `payout_channel` is set to `Crypto`. Call [List all crypto addresses](/v2/api-references/payments/list-all-crypto-addresses) to retrieve registered crypto addresses.
156
+ * @member {String} crypto_address_id
157
+ */
158
+ CreateSettlement.prototype['crypto_address_id'] = undefined;
159
+
160
+ /**
161
+ * A list of order IDs to be included in this settlement. If provided, the settlement request will settle the merchant funds received from the specified orders, and the `amount` field will be ignored. This field is only applicable when `settlement_type` is set to `Merchant`.
162
+ * @member {Array.<String>} order_ids
147
163
  */
148
- CreateSettlement.prototype['settlement_type'] = undefined;
164
+ CreateSettlement.prototype['order_ids'] = undefined;
149
165
  var _default = exports["default"] = CreateSettlement;