@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
@@ -5,10 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _BankAccount = _interopRequireDefault(require("./BankAccount"));
9
8
  var _PaymentPayoutDetail = _interopRequireDefault(require("./PaymentPayoutDetail"));
10
- var _PaymentPayoutItemDetail = _interopRequireDefault(require("./PaymentPayoutItemDetail"));
9
+ var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
10
+ var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
11
11
  var _PaymentPayoutStatus = _interopRequireDefault(require("./PaymentPayoutStatus"));
12
+ var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
12
13
  var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
13
14
  var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
14
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -40,16 +41,19 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
40
41
  * @alias module:model/PaymentPayoutEvent
41
42
  * @implements module:model/WebhookEventDataType
42
43
  * @implements module:model/PaymentPayoutDetail
43
- * @param data_type {module:model/PaymentPayoutEvent.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
44
+ * @param data_type {module:model/PaymentPayoutEvent.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
44
45
  * @param payout_id {String} The payout ID generated by Cobo.
45
46
  * @param request_id {String} The request ID provided by you when creating the payout.
47
+ * @param payout_channel {module:model/PayoutChannel}
46
48
  * @param status {module:model/PaymentPayoutStatus}
49
+ * @param created_timestamp {Number} The created time of the payout, represented as a UNIX timestamp in seconds.
50
+ * @param updated_timestamp {Number} The updated time of the payout, represented as a UNIX timestamp in seconds.
47
51
  */
48
- function PaymentPayoutEvent(data_type, payout_id, request_id, status) {
52
+ function PaymentPayoutEvent(data_type, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
49
53
  _classCallCheck(this, PaymentPayoutEvent);
50
54
  _WebhookEventDataType["default"].initialize(this, data_type);
51
- _PaymentPayoutDetail["default"].initialize(this, payout_id, request_id, status);
52
- PaymentPayoutEvent.initialize(this, data_type, payout_id, request_id, status);
55
+ _PaymentPayoutDetail["default"].initialize(this, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp);
56
+ PaymentPayoutEvent.initialize(this, data_type, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp);
53
57
  }
54
58
 
55
59
  /**
@@ -59,11 +63,14 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
59
63
  */
60
64
  return _createClass(PaymentPayoutEvent, null, [{
61
65
  key: "initialize",
62
- value: function initialize(obj, data_type, payout_id, request_id, status) {
66
+ value: function initialize(obj, data_type, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
63
67
  obj['data_type'] = data_type;
64
68
  obj['payout_id'] = payout_id;
65
69
  obj['request_id'] = request_id;
70
+ obj['payout_channel'] = payout_channel;
66
71
  obj['status'] = status;
72
+ obj['created_timestamp'] = created_timestamp;
73
+ obj['updated_timestamp'] = updated_timestamp;
67
74
  }
68
75
 
69
76
  /**
@@ -89,32 +96,38 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
89
96
  if (data.hasOwnProperty('request_id')) {
90
97
  obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
91
98
  }
92
- if (data.hasOwnProperty('status')) {
93
- obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
99
+ if (data.hasOwnProperty('payout_channel')) {
100
+ obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
94
101
  }
95
- if (data.hasOwnProperty('payout_item_details')) {
96
- obj['payout_item_details'] = _ApiClient["default"].convertToType(data['payout_item_details'], [_PaymentPayoutItemDetail["default"]]);
102
+ if (data.hasOwnProperty('source_account')) {
103
+ obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
97
104
  }
98
- if (data.hasOwnProperty('created_timestamp')) {
99
- obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
105
+ if (data.hasOwnProperty('payout_items')) {
106
+ obj['payout_items'] = _ApiClient["default"].convertToType(data['payout_items'], [_PaymentPayoutItem["default"]]);
100
107
  }
101
- if (data.hasOwnProperty('updated_timestamp')) {
102
- obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
108
+ if (data.hasOwnProperty('recipient_info')) {
109
+ obj['recipient_info'] = _PaymentPayoutRecipientInfo["default"].constructFromObject(data['recipient_info']);
103
110
  }
104
111
  if (data.hasOwnProperty('initiator')) {
105
112
  obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
106
113
  }
107
- if (data.hasOwnProperty('payout_channel')) {
108
- obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
109
- }
110
- if (data.hasOwnProperty('currency')) {
111
- obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
112
- }
113
114
  if (data.hasOwnProperty('actual_payout_amount')) {
114
115
  obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
115
116
  }
116
- if (data.hasOwnProperty('bank_account')) {
117
- obj['bank_account'] = _BankAccount["default"].constructFromObject(data['bank_account']);
117
+ if (data.hasOwnProperty('status')) {
118
+ obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
119
+ }
120
+ if (data.hasOwnProperty('remark')) {
121
+ obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
122
+ }
123
+ if (data.hasOwnProperty('created_timestamp')) {
124
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
125
+ }
126
+ if (data.hasOwnProperty('updated_timestamp')) {
127
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
128
+ }
129
+ if (data.hasOwnProperty('transactions')) {
130
+ obj['transactions'] = _ApiClient["default"].convertToType(data['transactions'], [_PaymentTransaction["default"]]);
118
131
  }
119
132
  }
120
133
  return obj;
@@ -155,19 +168,23 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
155
168
  if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
156
169
  throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
157
170
  }
158
- if (data['payout_item_details']) {
171
+ // ensure the json data is a string
172
+ if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
173
+ throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
174
+ }
175
+ if (data['payout_items']) {
159
176
  // data not null
160
177
  // ensure the json data is an array
161
- if (!Array.isArray(data['payout_item_details'])) {
162
- throw new Error("Expected the field `payout_item_details` to be an array in the JSON data but got " + data['payout_item_details']);
178
+ if (!Array.isArray(data['payout_items'])) {
179
+ throw new Error("Expected the field `payout_items` to be an array in the JSON data but got " + data['payout_items']);
163
180
  }
164
- // validate the optional field `payout_item_details` (array)
165
- var _iterator2 = _createForOfIteratorHelper(data['payout_item_details']),
181
+ // validate the optional field `payout_items` (array)
182
+ var _iterator2 = _createForOfIteratorHelper(data['payout_items']),
166
183
  _step2;
167
184
  try {
168
185
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
169
186
  var item = _step2.value;
170
- _PaymentPayoutItemDetail["default"].validateJSON(item);
187
+ _PaymentPayoutItem["default"].validateJSON(item);
171
188
  }
172
189
  } catch (err) {
173
190
  _iterator2.e(err);
@@ -176,33 +193,54 @@ var PaymentPayoutEvent = /*#__PURE__*/function () {
176
193
  }
177
194
  ;
178
195
  }
196
+ // validate the optional field `recipient_info`
197
+ if (data['recipient_info']) {
198
+ // data not null
199
+ if (!!_PaymentPayoutRecipientInfo["default"].validateJSON) {
200
+ _PaymentPayoutRecipientInfo["default"].validateJSON(data['recipient_info']);
201
+ }
202
+ }
179
203
  // ensure the json data is a string
180
204
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
181
205
  throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
182
206
  }
183
207
  // ensure the json data is a string
184
- if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
185
- throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
186
- }
187
- // ensure the json data is a string
188
208
  if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
189
209
  throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
190
210
  }
191
- // validate the optional field `bank_account`
192
- if (data['bank_account']) {
211
+ // ensure the json data is a string
212
+ if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
213
+ throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
214
+ }
215
+ if (data['transactions']) {
193
216
  // data not null
194
- if (!!_BankAccount["default"].validateJSON) {
195
- _BankAccount["default"].validateJSON(data['bank_account']);
217
+ // ensure the json data is an array
218
+ if (!Array.isArray(data['transactions'])) {
219
+ throw new Error("Expected the field `transactions` to be an array in the JSON data but got " + data['transactions']);
196
220
  }
221
+ // validate the optional field `transactions` (array)
222
+ var _iterator3 = _createForOfIteratorHelper(data['transactions']),
223
+ _step3;
224
+ try {
225
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
226
+ var _item = _step3.value;
227
+ _PaymentTransaction["default"].validateJSON(_item);
228
+ }
229
+ } catch (err) {
230
+ _iterator3.e(err);
231
+ } finally {
232
+ _iterator3.f();
233
+ }
234
+ ;
197
235
  }
198
236
  return true;
199
237
  }
200
238
  }]);
201
239
  }();
202
- PaymentPayoutEvent.RequiredProperties = ["data_type", "payout_id", "request_id", "status"];
240
+ PaymentPayoutEvent.RequiredProperties = ["data_type", "payout_id", "request_id", "payout_channel", "status", "created_timestamp", "updated_timestamp"];
203
241
 
204
242
  /**
205
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
243
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
206
244
  * @member {module:model/PaymentPayoutEvent.DataTypeEnum} data_type
207
245
  */
208
246
  PaymentPayoutEvent.prototype['data_type'] = undefined;
@@ -220,26 +258,26 @@ PaymentPayoutEvent.prototype['payout_id'] = undefined;
220
258
  PaymentPayoutEvent.prototype['request_id'] = undefined;
221
259
 
222
260
  /**
223
- * @member {module:model/PaymentPayoutStatus} status
261
+ * @member {module:model/PayoutChannel} payout_channel
224
262
  */
225
- PaymentPayoutEvent.prototype['status'] = undefined;
263
+ PaymentPayoutEvent.prototype['payout_channel'] = undefined;
226
264
 
227
265
  /**
228
- * @member {Array.<module:model/PaymentPayoutItemDetail>} payout_item_details
266
+ * 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\"`.
267
+ * @member {String} source_account
229
268
  */
230
- PaymentPayoutEvent.prototype['payout_item_details'] = undefined;
269
+ PaymentPayoutEvent.prototype['source_account'] = undefined;
231
270
 
232
271
  /**
233
- * The created time of the payout, represented as a UNIX timestamp in seconds.
234
- * @member {Number} created_timestamp
272
+ * required
273
+ * @member {Array.<module:model/PaymentPayoutItem>} payout_items
235
274
  */
236
- PaymentPayoutEvent.prototype['created_timestamp'] = undefined;
275
+ PaymentPayoutEvent.prototype['payout_items'] = undefined;
237
276
 
238
277
  /**
239
- * The updated time of the payout, represented as a UNIX timestamp in seconds.
240
- * @member {Number} updated_timestamp
278
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
241
279
  */
242
- PaymentPayoutEvent.prototype['updated_timestamp'] = undefined;
280
+ PaymentPayoutEvent.prototype['recipient_info'] = undefined;
243
281
 
244
282
  /**
245
283
  * The initiator of this payout, usually the user's API key.
@@ -248,30 +286,43 @@ PaymentPayoutEvent.prototype['updated_timestamp'] = undefined;
248
286
  PaymentPayoutEvent.prototype['initiator'] = undefined;
249
287
 
250
288
  /**
251
- * @member {module:model/PayoutChannel} payout_channel
289
+ * - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.)
290
+ * @member {String} actual_payout_amount
252
291
  */
253
- PaymentPayoutEvent.prototype['payout_channel'] = undefined;
292
+ PaymentPayoutEvent.prototype['actual_payout_amount'] = undefined;
254
293
 
255
294
  /**
256
- * The fiat currency for the payout.
257
- * @member {String} currency
295
+ * @member {module:model/PaymentPayoutStatus} status
258
296
  */
259
- PaymentPayoutEvent.prototype['currency'] = undefined;
297
+ PaymentPayoutEvent.prototype['status'] = undefined;
260
298
 
261
299
  /**
262
- * The actual amount of this payout.
263
- * @member {String} actual_payout_amount
300
+ * A note or comment about the payout.
301
+ * @member {String} remark
264
302
  */
265
- PaymentPayoutEvent.prototype['actual_payout_amount'] = undefined;
303
+ PaymentPayoutEvent.prototype['remark'] = undefined;
304
+
305
+ /**
306
+ * The created time of the payout, represented as a UNIX timestamp in seconds.
307
+ * @member {Number} created_timestamp
308
+ */
309
+ PaymentPayoutEvent.prototype['created_timestamp'] = undefined;
310
+
311
+ /**
312
+ * The updated time of the payout, represented as a UNIX timestamp in seconds.
313
+ * @member {Number} updated_timestamp
314
+ */
315
+ PaymentPayoutEvent.prototype['updated_timestamp'] = undefined;
266
316
 
267
317
  /**
268
- * @member {module:model/BankAccount} bank_account
318
+ * An array of payout transactions.
319
+ * @member {Array.<module:model/PaymentTransaction>} transactions
269
320
  */
270
- PaymentPayoutEvent.prototype['bank_account'] = undefined;
321
+ PaymentPayoutEvent.prototype['transactions'] = undefined;
271
322
 
272
323
  // Implement WebhookEventDataType interface:
273
324
  /**
274
- * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
325
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `PaymentPayout`: The payment payout event data. - `PaymentBulkSend`: The payment bulk send event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
275
326
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
276
327
  */
277
328
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -287,46 +338,57 @@ _PaymentPayoutDetail["default"].prototype['payout_id'] = undefined;
287
338
  */
288
339
  _PaymentPayoutDetail["default"].prototype['request_id'] = undefined;
289
340
  /**
290
- * @member {module:model/PaymentPayoutStatus} status
341
+ * @member {module:model/PayoutChannel} payout_channel
291
342
  */
292
- _PaymentPayoutDetail["default"].prototype['status'] = undefined;
343
+ _PaymentPayoutDetail["default"].prototype['payout_channel'] = undefined;
293
344
  /**
294
- * @member {Array.<module:model/PaymentPayoutItemDetail>} payout_item_details
345
+ * 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\"`.
346
+ * @member {String} source_account
295
347
  */
296
- _PaymentPayoutDetail["default"].prototype['payout_item_details'] = undefined;
348
+ _PaymentPayoutDetail["default"].prototype['source_account'] = undefined;
297
349
  /**
298
- * The created time of the payout, represented as a UNIX timestamp in seconds.
299
- * @member {Number} created_timestamp
350
+ * required
351
+ * @member {Array.<module:model/PaymentPayoutItem>} payout_items
300
352
  */
301
- _PaymentPayoutDetail["default"].prototype['created_timestamp'] = undefined;
353
+ _PaymentPayoutDetail["default"].prototype['payout_items'] = undefined;
302
354
  /**
303
- * The updated time of the payout, represented as a UNIX timestamp in seconds.
304
- * @member {Number} updated_timestamp
355
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
305
356
  */
306
- _PaymentPayoutDetail["default"].prototype['updated_timestamp'] = undefined;
357
+ _PaymentPayoutDetail["default"].prototype['recipient_info'] = undefined;
307
358
  /**
308
359
  * The initiator of this payout, usually the user's API key.
309
360
  * @member {String} initiator
310
361
  */
311
362
  _PaymentPayoutDetail["default"].prototype['initiator'] = undefined;
312
363
  /**
313
- * @member {module:model/PayoutChannel} payout_channel
364
+ * - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.)
365
+ * @member {String} actual_payout_amount
314
366
  */
315
- _PaymentPayoutDetail["default"].prototype['payout_channel'] = undefined;
367
+ _PaymentPayoutDetail["default"].prototype['actual_payout_amount'] = undefined;
316
368
  /**
317
- * The fiat currency for the payout.
318
- * @member {String} currency
369
+ * @member {module:model/PaymentPayoutStatus} status
319
370
  */
320
- _PaymentPayoutDetail["default"].prototype['currency'] = undefined;
371
+ _PaymentPayoutDetail["default"].prototype['status'] = undefined;
321
372
  /**
322
- * The actual amount of this payout.
323
- * @member {String} actual_payout_amount
373
+ * A note or comment about the payout.
374
+ * @member {String} remark
324
375
  */
325
- _PaymentPayoutDetail["default"].prototype['actual_payout_amount'] = undefined;
376
+ _PaymentPayoutDetail["default"].prototype['remark'] = undefined;
326
377
  /**
327
- * @member {module:model/BankAccount} bank_account
378
+ * The created time of the payout, represented as a UNIX timestamp in seconds.
379
+ * @member {Number} created_timestamp
328
380
  */
329
- _PaymentPayoutDetail["default"].prototype['bank_account'] = undefined;
381
+ _PaymentPayoutDetail["default"].prototype['created_timestamp'] = undefined;
382
+ /**
383
+ * The updated time of the payout, represented as a UNIX timestamp in seconds.
384
+ * @member {Number} updated_timestamp
385
+ */
386
+ _PaymentPayoutDetail["default"].prototype['updated_timestamp'] = undefined;
387
+ /**
388
+ * An array of payout transactions.
389
+ * @member {Array.<module:model/PaymentTransaction>} transactions
390
+ */
391
+ _PaymentPayoutDetail["default"].prototype['transactions'] = undefined;
330
392
 
331
393
  /**
332
394
  * Allowed values for the <code>data_type</code> property.
@@ -404,6 +466,11 @@ PaymentPayoutEvent['DataTypeEnum'] = {
404
466
  * @const
405
467
  */
406
468
  "PaymentPayout": "PaymentPayout",
469
+ /**
470
+ * value: "PaymentBulkSend"
471
+ * @const
472
+ */
473
+ "PaymentBulkSend": "PaymentBulkSend",
407
474
  /**
408
475
  * value: "BalanceUpdateInfo"
409
476
  * @const
@@ -424,6 +491,11 @@ PaymentPayoutEvent['DataTypeEnum'] = {
424
491
  * @const
425
492
  */
426
493
  "ComplianceKytScreenings": "ComplianceKytScreenings",
494
+ /**
495
+ * value: "ComplianceKyaScreenings"
496
+ * @const
497
+ */
498
+ "ComplianceKyaScreenings": "ComplianceKyaScreenings",
427
499
  /**
428
500
  * value: "unknown_default_open_api"
429
501
  * @const
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _BridgingFee = _interopRequireDefault(require("./BridgingFee"));
9
- var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
10
- var _PaymentPayoutItemStatus = _interopRequireDefault(require("./PaymentPayoutItemStatus"));
11
- var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
12
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
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); }
14
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; } } }; }
@@ -36,15 +33,12 @@ var PaymentPayoutItem = /*#__PURE__*/function () {
36
33
  /**
37
34
  * Constructs a new <code>PaymentPayoutItem</code>.
38
35
  * @alias module:model/PaymentPayoutItem
39
- * @param payout_item_id {String} The payout item ID generated by Cobo.
40
- * @param payout_id {String} The payout ID generated by Cobo.
41
- * @param amount {String} The payout item token_id amount.
42
- * @param status {module:model/PaymentPayoutItemStatus}
43
- * @param source_account {String}
36
+ * @param token_id {String} The token ID of the payout item.
37
+ * @param amount {String} The amount of the payout item.
44
38
  */
45
- function PaymentPayoutItem(payout_item_id, payout_id, amount, status, source_account) {
39
+ function PaymentPayoutItem(token_id, amount) {
46
40
  _classCallCheck(this, PaymentPayoutItem);
47
- PaymentPayoutItem.initialize(this, payout_item_id, payout_id, amount, status, source_account);
41
+ PaymentPayoutItem.initialize(this, token_id, amount);
48
42
  }
49
43
 
50
44
  /**
@@ -54,12 +48,9 @@ var PaymentPayoutItem = /*#__PURE__*/function () {
54
48
  */
55
49
  return _createClass(PaymentPayoutItem, null, [{
56
50
  key: "initialize",
57
- value: function initialize(obj, payout_item_id, payout_id, amount, status, source_account) {
58
- obj['payout_item_id'] = payout_item_id;
59
- obj['payout_id'] = payout_id;
51
+ value: function initialize(obj, token_id, amount) {
52
+ obj['token_id'] = token_id;
60
53
  obj['amount'] = amount;
61
- obj['status'] = status;
62
- obj['source_account'] = source_account;
63
54
  }
64
55
 
65
56
  /**
@@ -74,45 +65,12 @@ var PaymentPayoutItem = /*#__PURE__*/function () {
74
65
  value: function constructFromObject(data, obj) {
75
66
  if (data) {
76
67
  obj = obj || new PaymentPayoutItem();
77
- if (data.hasOwnProperty('payout_item_id')) {
78
- obj['payout_item_id'] = _ApiClient["default"].convertToType(data['payout_item_id'], 'String');
79
- }
80
- if (data.hasOwnProperty('payout_id')) {
81
- obj['payout_id'] = _ApiClient["default"].convertToType(data['payout_id'], 'String');
82
- }
83
68
  if (data.hasOwnProperty('token_id')) {
84
69
  obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
85
70
  }
86
- if (data.hasOwnProperty('chain_id')) {
87
- obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
88
- }
89
71
  if (data.hasOwnProperty('amount')) {
90
72
  obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
91
73
  }
92
- if (data.hasOwnProperty('status')) {
93
- obj['status'] = _PaymentPayoutItemStatus["default"].constructFromObject(data['status']);
94
- }
95
- if (data.hasOwnProperty('source_account')) {
96
- obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
97
- }
98
- if (data.hasOwnProperty('transactions')) {
99
- obj['transactions'] = _ApiClient["default"].convertToType(data['transactions'], [_PaymentTransaction["default"]]);
100
- }
101
- if (data.hasOwnProperty('created_timestamp')) {
102
- obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
103
- }
104
- if (data.hasOwnProperty('updated_timestamp')) {
105
- obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
106
- }
107
- if (data.hasOwnProperty('crypto_address_id')) {
108
- obj['crypto_address_id'] = _ApiClient["default"].convertToType(data['crypto_address_id'], 'String');
109
- }
110
- if (data.hasOwnProperty('crypto_address')) {
111
- obj['crypto_address'] = _ApiClient["default"].convertToType(data['crypto_address'], 'String');
112
- }
113
- if (data.hasOwnProperty('commission_fee')) {
114
- obj['commission_fee'] = _CommissionFee["default"].constructFromObject(data['commission_fee']);
115
- }
116
74
  if (data.hasOwnProperty('bridging_fee')) {
117
75
  obj['bridging_fee'] = _BridgingFee["default"].constructFromObject(data['bridging_fee']);
118
76
  }
@@ -144,65 +102,13 @@ var PaymentPayoutItem = /*#__PURE__*/function () {
144
102
  } finally {
145
103
  _iterator.f();
146
104
  }
147
- if (data['payout_item_id'] && !(typeof data['payout_item_id'] === 'string' || data['payout_item_id'] instanceof String)) {
148
- throw new Error("Expected the field `payout_item_id` to be a primitive type in the JSON string but got " + data['payout_item_id']);
149
- }
150
- // ensure the json data is a string
151
- if (data['payout_id'] && !(typeof data['payout_id'] === 'string' || data['payout_id'] instanceof String)) {
152
- throw new Error("Expected the field `payout_id` to be a primitive type in the JSON string but got " + data['payout_id']);
153
- }
154
- // ensure the json data is a string
155
105
  if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
156
106
  throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
157
107
  }
158
108
  // ensure the json data is a string
159
- if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
160
- throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
161
- }
162
- // ensure the json data is a string
163
109
  if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
164
110
  throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
165
111
  }
166
- // ensure the json data is a string
167
- if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
168
- throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
169
- }
170
- if (data['transactions']) {
171
- // data not null
172
- // ensure the json data is an array
173
- if (!Array.isArray(data['transactions'])) {
174
- throw new Error("Expected the field `transactions` to be an array in the JSON data but got " + data['transactions']);
175
- }
176
- // validate the optional field `transactions` (array)
177
- var _iterator2 = _createForOfIteratorHelper(data['transactions']),
178
- _step2;
179
- try {
180
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
181
- var item = _step2.value;
182
- _PaymentTransaction["default"].validateJSON(item);
183
- }
184
- } catch (err) {
185
- _iterator2.e(err);
186
- } finally {
187
- _iterator2.f();
188
- }
189
- ;
190
- }
191
- // ensure the json data is a string
192
- if (data['crypto_address_id'] && !(typeof data['crypto_address_id'] === 'string' || data['crypto_address_id'] instanceof String)) {
193
- throw new Error("Expected the field `crypto_address_id` to be a primitive type in the JSON string but got " + data['crypto_address_id']);
194
- }
195
- // ensure the json data is a string
196
- if (data['crypto_address'] && !(typeof data['crypto_address'] === 'string' || data['crypto_address'] instanceof String)) {
197
- throw new Error("Expected the field `crypto_address` to be a primitive type in the JSON string but got " + data['crypto_address']);
198
- }
199
- // validate the optional field `commission_fee`
200
- if (data['commission_fee']) {
201
- // data not null
202
- if (!!_CommissionFee["default"].validateJSON) {
203
- _CommissionFee["default"].validateJSON(data['commission_fee']);
204
- }
205
- }
206
112
  // validate the optional field `bridging_fee`
207
113
  if (data['bridging_fee']) {
208
114
  // data not null
@@ -214,83 +120,20 @@ var PaymentPayoutItem = /*#__PURE__*/function () {
214
120
  }
215
121
  }]);
216
122
  }();
217
- PaymentPayoutItem.RequiredProperties = ["payout_item_id", "payout_id", "amount", "status", "source_account"];
218
-
219
- /**
220
- * The payout item ID generated by Cobo.
221
- * @member {String} payout_item_id
222
- */
223
- PaymentPayoutItem.prototype['payout_item_id'] = undefined;
224
-
225
- /**
226
- * The payout ID generated by Cobo.
227
- * @member {String} payout_id
228
- */
229
- PaymentPayoutItem.prototype['payout_id'] = undefined;
123
+ PaymentPayoutItem.RequiredProperties = ["token_id", "amount"];
230
124
 
231
125
  /**
232
- * The token id of the payout item.
126
+ * The token ID of the payout item.
233
127
  * @member {String} token_id
234
128
  */
235
129
  PaymentPayoutItem.prototype['token_id'] = undefined;
236
130
 
237
131
  /**
238
- * The ID of the blockchain network on which the payout item occurred.
239
- * @member {String} chain_id
240
- */
241
- PaymentPayoutItem.prototype['chain_id'] = undefined;
242
-
243
- /**
244
- * The payout item token_id amount.
132
+ * The amount of the payout item.
245
133
  * @member {String} amount
246
134
  */
247
135
  PaymentPayoutItem.prototype['amount'] = undefined;
248
136
 
249
- /**
250
- * @member {module:model/PaymentPayoutItemStatus} status
251
- */
252
- PaymentPayoutItem.prototype['status'] = undefined;
253
-
254
- /**
255
- * @member {String} source_account
256
- */
257
- PaymentPayoutItem.prototype['source_account'] = undefined;
258
-
259
- /**
260
- * An array of transactions associated with this payout item request. Each transaction represents a separate blockchain operation related to the payout item process.
261
- * @member {Array.<module:model/PaymentTransaction>} transactions
262
- */
263
- PaymentPayoutItem.prototype['transactions'] = undefined;
264
-
265
- /**
266
- * The created time of the payout item, represented as a UNIX timestamp in seconds.
267
- * @member {Number} created_timestamp
268
- */
269
- PaymentPayoutItem.prototype['created_timestamp'] = undefined;
270
-
271
- /**
272
- * The updated time of the payout item, represented as a UNIX timestamp in seconds.
273
- * @member {Number} updated_timestamp
274
- */
275
- PaymentPayoutItem.prototype['updated_timestamp'] = undefined;
276
-
277
- /**
278
- * Unique identifier for the pre-approved crypto address, used to reference the address securely in requests.
279
- * @member {String} crypto_address_id
280
- */
281
- PaymentPayoutItem.prototype['crypto_address_id'] = undefined;
282
-
283
- /**
284
- * The actual blockchain address to which funds were transferred.
285
- * @member {String} crypto_address
286
- */
287
- PaymentPayoutItem.prototype['crypto_address'] = undefined;
288
-
289
- /**
290
- * @member {module:model/CommissionFee} commission_fee
291
- */
292
- PaymentPayoutItem.prototype['commission_fee'] = undefined;
293
-
294
137
  /**
295
138
  * @member {module:model/BridgingFee} bridging_fee
296
139
  */