@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,8 +5,8 @@ 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 _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
9
+ var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
10
10
  var _PaymentPayoutStatus = _interopRequireDefault(require("./PaymentPayoutStatus"));
11
11
  var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -40,10 +40,12 @@ var PaymentPayout = /*#__PURE__*/function () {
40
40
  * @param request_id {String} The request ID provided by you when creating the payout.
41
41
  * @param payout_channel {module:model/PayoutChannel}
42
42
  * @param status {module:model/PaymentPayoutStatus}
43
+ * @param created_timestamp {Number} The created time of the payout, represented as a UNIX timestamp in seconds.
44
+ * @param updated_timestamp {Number} The updated time of the payout, represented as a UNIX timestamp in seconds.
43
45
  */
44
- function PaymentPayout(payout_id, request_id, payout_channel, status) {
46
+ function PaymentPayout(payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
45
47
  _classCallCheck(this, PaymentPayout);
46
- PaymentPayout.initialize(this, payout_id, request_id, payout_channel, status);
48
+ PaymentPayout.initialize(this, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp);
47
49
  }
48
50
 
49
51
  /**
@@ -53,11 +55,13 @@ var PaymentPayout = /*#__PURE__*/function () {
53
55
  */
54
56
  return _createClass(PaymentPayout, null, [{
55
57
  key: "initialize",
56
- value: function initialize(obj, payout_id, request_id, payout_channel, status) {
58
+ value: function initialize(obj, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
57
59
  obj['payout_id'] = payout_id;
58
60
  obj['request_id'] = request_id;
59
61
  obj['payout_channel'] = payout_channel;
60
62
  obj['status'] = status;
63
+ obj['created_timestamp'] = created_timestamp;
64
+ obj['updated_timestamp'] = updated_timestamp;
61
65
  }
62
66
 
63
67
  /**
@@ -81,30 +85,33 @@ var PaymentPayout = /*#__PURE__*/function () {
81
85
  if (data.hasOwnProperty('payout_channel')) {
82
86
  obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
83
87
  }
88
+ if (data.hasOwnProperty('source_account')) {
89
+ obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
90
+ }
84
91
  if (data.hasOwnProperty('payout_items')) {
85
92
  obj['payout_items'] = _ApiClient["default"].convertToType(data['payout_items'], [_PaymentPayoutItem["default"]]);
86
93
  }
94
+ if (data.hasOwnProperty('recipient_info')) {
95
+ obj['recipient_info'] = _PaymentPayoutRecipientInfo["default"].constructFromObject(data['recipient_info']);
96
+ }
97
+ if (data.hasOwnProperty('initiator')) {
98
+ obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('actual_payout_amount')) {
101
+ obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
102
+ }
87
103
  if (data.hasOwnProperty('status')) {
88
104
  obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
89
105
  }
106
+ if (data.hasOwnProperty('remark')) {
107
+ obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
108
+ }
90
109
  if (data.hasOwnProperty('created_timestamp')) {
91
110
  obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
92
111
  }
93
112
  if (data.hasOwnProperty('updated_timestamp')) {
94
113
  obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
95
114
  }
96
- if (data.hasOwnProperty('initiator')) {
97
- obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
98
- }
99
- if (data.hasOwnProperty('currency')) {
100
- obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
101
- }
102
- if (data.hasOwnProperty('actual_payout_amount')) {
103
- obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
104
- }
105
- if (data.hasOwnProperty('bank_account')) {
106
- obj['bank_account'] = _BankAccount["default"].constructFromObject(data['bank_account']);
107
- }
108
115
  }
109
116
  return obj;
110
117
  }
@@ -140,6 +147,10 @@ var PaymentPayout = /*#__PURE__*/function () {
140
147
  if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
141
148
  throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
142
149
  }
150
+ // ensure the json data is a string
151
+ if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
152
+ throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
153
+ }
143
154
  if (data['payout_items']) {
144
155
  // data not null
145
156
  // ensure the json data is an array
@@ -161,30 +172,30 @@ var PaymentPayout = /*#__PURE__*/function () {
161
172
  }
162
173
  ;
163
174
  }
175
+ // validate the optional field `recipient_info`
176
+ if (data['recipient_info']) {
177
+ // data not null
178
+ if (!!_PaymentPayoutRecipientInfo["default"].validateJSON) {
179
+ _PaymentPayoutRecipientInfo["default"].validateJSON(data['recipient_info']);
180
+ }
181
+ }
164
182
  // ensure the json data is a string
165
183
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
166
184
  throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
167
185
  }
168
186
  // ensure the json data is a string
169
- if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
170
- throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
171
- }
172
- // ensure the json data is a string
173
187
  if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
174
188
  throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
175
189
  }
176
- // validate the optional field `bank_account`
177
- if (data['bank_account']) {
178
- // data not null
179
- if (!!_BankAccount["default"].validateJSON) {
180
- _BankAccount["default"].validateJSON(data['bank_account']);
181
- }
190
+ // ensure the json data is a string
191
+ if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
192
+ throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
182
193
  }
183
194
  return true;
184
195
  }
185
196
  }]);
186
197
  }();
187
- PaymentPayout.RequiredProperties = ["payout_id", "request_id", "payout_channel", "status"];
198
+ PaymentPayout.RequiredProperties = ["payout_id", "request_id", "payout_channel", "status", "created_timestamp", "updated_timestamp"];
188
199
 
189
200
  /**
190
201
  * The payout ID generated by Cobo.
@@ -204,47 +215,54 @@ PaymentPayout.prototype['request_id'] = undefined;
204
215
  PaymentPayout.prototype['payout_channel'] = undefined;
205
216
 
206
217
  /**
218
+ * 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\"`.
219
+ * @member {String} source_account
220
+ */
221
+ PaymentPayout.prototype['source_account'] = undefined;
222
+
223
+ /**
224
+ * required
207
225
  * @member {Array.<module:model/PaymentPayoutItem>} payout_items
208
226
  */
209
227
  PaymentPayout.prototype['payout_items'] = undefined;
210
228
 
211
229
  /**
212
- * @member {module:model/PaymentPayoutStatus} status
230
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
213
231
  */
214
- PaymentPayout.prototype['status'] = undefined;
232
+ PaymentPayout.prototype['recipient_info'] = undefined;
215
233
 
216
234
  /**
217
- * The created time of the payout, represented as a UNIX timestamp in seconds.
218
- * @member {Number} created_timestamp
235
+ * The initiator of this payout, usually the user's API key.
236
+ * @member {String} initiator
219
237
  */
220
- PaymentPayout.prototype['created_timestamp'] = undefined;
238
+ PaymentPayout.prototype['initiator'] = undefined;
221
239
 
222
240
  /**
223
- * The updated time of the payout, represented as a UNIX timestamp in seconds.
224
- * @member {Number} updated_timestamp
241
+ * - 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.)
242
+ * @member {String} actual_payout_amount
225
243
  */
226
- PaymentPayout.prototype['updated_timestamp'] = undefined;
244
+ PaymentPayout.prototype['actual_payout_amount'] = undefined;
227
245
 
228
246
  /**
229
- * The initiator of this payout, usually the user's API key.
230
- * @member {String} initiator
247
+ * @member {module:model/PaymentPayoutStatus} status
231
248
  */
232
- PaymentPayout.prototype['initiator'] = undefined;
249
+ PaymentPayout.prototype['status'] = undefined;
233
250
 
234
251
  /**
235
- * The fiat currency for the payout.
236
- * @member {String} currency
252
+ * A note or comment about the payout.
253
+ * @member {String} remark
237
254
  */
238
- PaymentPayout.prototype['currency'] = undefined;
255
+ PaymentPayout.prototype['remark'] = undefined;
239
256
 
240
257
  /**
241
- * The actual amount of this payout.
242
- * @member {String} actual_payout_amount
258
+ * The created time of the payout, represented as a UNIX timestamp in seconds.
259
+ * @member {Number} created_timestamp
243
260
  */
244
- PaymentPayout.prototype['actual_payout_amount'] = undefined;
261
+ PaymentPayout.prototype['created_timestamp'] = undefined;
245
262
 
246
263
  /**
247
- * @member {module:model/BankAccount} bank_account
264
+ * The updated time of the payout, represented as a UNIX timestamp in seconds.
265
+ * @member {Number} updated_timestamp
248
266
  */
249
- PaymentPayout.prototype['bank_account'] = undefined;
267
+ PaymentPayout.prototype['updated_timestamp'] = undefined;
250
268
  var _default = exports["default"] = PaymentPayout;
@@ -5,9 +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
- var _PaymentPayoutItemDetail = _interopRequireDefault(require("./PaymentPayoutItemDetail"));
8
+ var _PaymentPayout = _interopRequireDefault(require("./PaymentPayout"));
9
+ var _PaymentPayoutItem = _interopRequireDefault(require("./PaymentPayoutItem"));
10
+ var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
10
11
  var _PaymentPayoutStatus = _interopRequireDefault(require("./PaymentPayoutStatus"));
12
+ var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
11
13
  var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
12
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
15
  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); }
@@ -36,13 +38,18 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
36
38
  /**
37
39
  * Constructs a new <code>PaymentPayoutDetail</code>.
38
40
  * @alias module:model/PaymentPayoutDetail
41
+ * @implements module:model/PaymentPayout
39
42
  * @param payout_id {String} The payout ID generated by Cobo.
40
43
  * @param request_id {String} The request ID provided by you when creating the payout.
44
+ * @param payout_channel {module:model/PayoutChannel}
41
45
  * @param status {module:model/PaymentPayoutStatus}
46
+ * @param created_timestamp {Number} The created time of the payout, represented as a UNIX timestamp in seconds.
47
+ * @param updated_timestamp {Number} The updated time of the payout, represented as a UNIX timestamp in seconds.
42
48
  */
43
- function PaymentPayoutDetail(payout_id, request_id, status) {
49
+ function PaymentPayoutDetail(payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
44
50
  _classCallCheck(this, PaymentPayoutDetail);
45
- PaymentPayoutDetail.initialize(this, payout_id, request_id, status);
51
+ _PaymentPayout["default"].initialize(this, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp);
52
+ PaymentPayoutDetail.initialize(this, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp);
46
53
  }
47
54
 
48
55
  /**
@@ -52,10 +59,13 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
52
59
  */
53
60
  return _createClass(PaymentPayoutDetail, null, [{
54
61
  key: "initialize",
55
- value: function initialize(obj, payout_id, request_id, status) {
62
+ value: function initialize(obj, payout_id, request_id, payout_channel, status, created_timestamp, updated_timestamp) {
56
63
  obj['payout_id'] = payout_id;
57
64
  obj['request_id'] = request_id;
65
+ obj['payout_channel'] = payout_channel;
58
66
  obj['status'] = status;
67
+ obj['created_timestamp'] = created_timestamp;
68
+ obj['updated_timestamp'] = updated_timestamp;
59
69
  }
60
70
 
61
71
  /**
@@ -70,38 +80,45 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
70
80
  value: function constructFromObject(data, obj) {
71
81
  if (data) {
72
82
  obj = obj || new PaymentPayoutDetail();
83
+ _PaymentPayout["default"].constructFromObject(data, obj);
73
84
  if (data.hasOwnProperty('payout_id')) {
74
85
  obj['payout_id'] = _ApiClient["default"].convertToType(data['payout_id'], 'String');
75
86
  }
76
87
  if (data.hasOwnProperty('request_id')) {
77
88
  obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
78
89
  }
79
- if (data.hasOwnProperty('status')) {
80
- obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
90
+ if (data.hasOwnProperty('payout_channel')) {
91
+ obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
81
92
  }
82
- if (data.hasOwnProperty('payout_item_details')) {
83
- obj['payout_item_details'] = _ApiClient["default"].convertToType(data['payout_item_details'], [_PaymentPayoutItemDetail["default"]]);
93
+ if (data.hasOwnProperty('source_account')) {
94
+ obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
84
95
  }
85
- if (data.hasOwnProperty('created_timestamp')) {
86
- obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
96
+ if (data.hasOwnProperty('payout_items')) {
97
+ obj['payout_items'] = _ApiClient["default"].convertToType(data['payout_items'], [_PaymentPayoutItem["default"]]);
87
98
  }
88
- if (data.hasOwnProperty('updated_timestamp')) {
89
- obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
99
+ if (data.hasOwnProperty('recipient_info')) {
100
+ obj['recipient_info'] = _PaymentPayoutRecipientInfo["default"].constructFromObject(data['recipient_info']);
90
101
  }
91
102
  if (data.hasOwnProperty('initiator')) {
92
103
  obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
93
104
  }
94
- if (data.hasOwnProperty('payout_channel')) {
95
- obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
96
- }
97
- if (data.hasOwnProperty('currency')) {
98
- obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
99
- }
100
105
  if (data.hasOwnProperty('actual_payout_amount')) {
101
106
  obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
102
107
  }
103
- if (data.hasOwnProperty('bank_account')) {
104
- obj['bank_account'] = _BankAccount["default"].constructFromObject(data['bank_account']);
108
+ if (data.hasOwnProperty('status')) {
109
+ obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
110
+ }
111
+ if (data.hasOwnProperty('remark')) {
112
+ obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('created_timestamp')) {
115
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
116
+ }
117
+ if (data.hasOwnProperty('updated_timestamp')) {
118
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
119
+ }
120
+ if (data.hasOwnProperty('transactions')) {
121
+ obj['transactions'] = _ApiClient["default"].convertToType(data['transactions'], [_PaymentTransaction["default"]]);
105
122
  }
106
123
  }
107
124
  return obj;
@@ -138,19 +155,23 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
138
155
  if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
139
156
  throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
140
157
  }
141
- if (data['payout_item_details']) {
158
+ // ensure the json data is a string
159
+ if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
160
+ throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
161
+ }
162
+ if (data['payout_items']) {
142
163
  // data not null
143
164
  // ensure the json data is an array
144
- if (!Array.isArray(data['payout_item_details'])) {
145
- throw new Error("Expected the field `payout_item_details` to be an array in the JSON data but got " + data['payout_item_details']);
165
+ if (!Array.isArray(data['payout_items'])) {
166
+ throw new Error("Expected the field `payout_items` to be an array in the JSON data but got " + data['payout_items']);
146
167
  }
147
- // validate the optional field `payout_item_details` (array)
148
- var _iterator2 = _createForOfIteratorHelper(data['payout_item_details']),
168
+ // validate the optional field `payout_items` (array)
169
+ var _iterator2 = _createForOfIteratorHelper(data['payout_items']),
149
170
  _step2;
150
171
  try {
151
172
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
152
173
  var item = _step2.value;
153
- _PaymentPayoutItemDetail["default"].validateJSON(item);
174
+ _PaymentPayoutItem["default"].validateJSON(item);
154
175
  }
155
176
  } catch (err) {
156
177
  _iterator2.e(err);
@@ -159,30 +180,51 @@ var PaymentPayoutDetail = /*#__PURE__*/function () {
159
180
  }
160
181
  ;
161
182
  }
183
+ // validate the optional field `recipient_info`
184
+ if (data['recipient_info']) {
185
+ // data not null
186
+ if (!!_PaymentPayoutRecipientInfo["default"].validateJSON) {
187
+ _PaymentPayoutRecipientInfo["default"].validateJSON(data['recipient_info']);
188
+ }
189
+ }
162
190
  // ensure the json data is a string
163
191
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
164
192
  throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
165
193
  }
166
194
  // ensure the json data is a string
167
- if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
168
- throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
169
- }
170
- // ensure the json data is a string
171
195
  if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
172
196
  throw new Error("Expected the field `actual_payout_amount` to be a primitive type in the JSON string but got " + data['actual_payout_amount']);
173
197
  }
174
- // validate the optional field `bank_account`
175
- if (data['bank_account']) {
198
+ // ensure the json data is a string
199
+ if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
200
+ throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
201
+ }
202
+ if (data['transactions']) {
176
203
  // data not null
177
- if (!!_BankAccount["default"].validateJSON) {
178
- _BankAccount["default"].validateJSON(data['bank_account']);
204
+ // ensure the json data is an array
205
+ if (!Array.isArray(data['transactions'])) {
206
+ throw new Error("Expected the field `transactions` to be an array in the JSON data but got " + data['transactions']);
207
+ }
208
+ // validate the optional field `transactions` (array)
209
+ var _iterator3 = _createForOfIteratorHelper(data['transactions']),
210
+ _step3;
211
+ try {
212
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
213
+ var _item = _step3.value;
214
+ _PaymentTransaction["default"].validateJSON(_item);
215
+ }
216
+ } catch (err) {
217
+ _iterator3.e(err);
218
+ } finally {
219
+ _iterator3.f();
179
220
  }
221
+ ;
180
222
  }
181
223
  return true;
182
224
  }
183
225
  }]);
184
226
  }();
185
- PaymentPayoutDetail.RequiredProperties = ["payout_id", "request_id", "status"];
227
+ PaymentPayoutDetail.RequiredProperties = ["payout_id", "request_id", "payout_channel", "status", "created_timestamp", "updated_timestamp"];
186
228
 
187
229
  /**
188
230
  * The payout ID generated by Cobo.
@@ -196,15 +238,50 @@ PaymentPayoutDetail.prototype['payout_id'] = undefined;
196
238
  */
197
239
  PaymentPayoutDetail.prototype['request_id'] = undefined;
198
240
 
241
+ /**
242
+ * @member {module:model/PayoutChannel} payout_channel
243
+ */
244
+ PaymentPayoutDetail.prototype['payout_channel'] = undefined;
245
+
246
+ /**
247
+ * 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\"`.
248
+ * @member {String} source_account
249
+ */
250
+ PaymentPayoutDetail.prototype['source_account'] = undefined;
251
+
252
+ /**
253
+ * required
254
+ * @member {Array.<module:model/PaymentPayoutItem>} payout_items
255
+ */
256
+ PaymentPayoutDetail.prototype['payout_items'] = undefined;
257
+
258
+ /**
259
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
260
+ */
261
+ PaymentPayoutDetail.prototype['recipient_info'] = undefined;
262
+
263
+ /**
264
+ * The initiator of this payout, usually the user's API key.
265
+ * @member {String} initiator
266
+ */
267
+ PaymentPayoutDetail.prototype['initiator'] = undefined;
268
+
269
+ /**
270
+ * - 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.)
271
+ * @member {String} actual_payout_amount
272
+ */
273
+ PaymentPayoutDetail.prototype['actual_payout_amount'] = undefined;
274
+
199
275
  /**
200
276
  * @member {module:model/PaymentPayoutStatus} status
201
277
  */
202
278
  PaymentPayoutDetail.prototype['status'] = undefined;
203
279
 
204
280
  /**
205
- * @member {Array.<module:model/PaymentPayoutItemDetail>} payout_item_details
281
+ * A note or comment about the payout.
282
+ * @member {String} remark
206
283
  */
207
- PaymentPayoutDetail.prototype['payout_item_details'] = undefined;
284
+ PaymentPayoutDetail.prototype['remark'] = undefined;
208
285
 
209
286
  /**
210
287
  * The created time of the payout, represented as a UNIX timestamp in seconds.
@@ -219,30 +296,67 @@ PaymentPayoutDetail.prototype['created_timestamp'] = undefined;
219
296
  PaymentPayoutDetail.prototype['updated_timestamp'] = undefined;
220
297
 
221
298
  /**
222
- * The initiator of this payout, usually the user's API key.
223
- * @member {String} initiator
299
+ * An array of payout transactions.
300
+ * @member {Array.<module:model/PaymentTransaction>} transactions
224
301
  */
225
- PaymentPayoutDetail.prototype['initiator'] = undefined;
302
+ PaymentPayoutDetail.prototype['transactions'] = undefined;
226
303
 
304
+ // Implement PaymentPayout interface:
305
+ /**
306
+ * The payout ID generated by Cobo.
307
+ * @member {String} payout_id
308
+ */
309
+ _PaymentPayout["default"].prototype['payout_id'] = undefined;
310
+ /**
311
+ * The request ID provided by you when creating the payout.
312
+ * @member {String} request_id
313
+ */
314
+ _PaymentPayout["default"].prototype['request_id'] = undefined;
227
315
  /**
228
316
  * @member {module:model/PayoutChannel} payout_channel
229
317
  */
230
- PaymentPayoutDetail.prototype['payout_channel'] = undefined;
231
-
318
+ _PaymentPayout["default"].prototype['payout_channel'] = undefined;
232
319
  /**
233
- * The fiat currency for the payout.
234
- * @member {String} currency
320
+ * 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\"`.
321
+ * @member {String} source_account
235
322
  */
236
- PaymentPayoutDetail.prototype['currency'] = undefined;
237
-
323
+ _PaymentPayout["default"].prototype['source_account'] = undefined;
324
+ /**
325
+ * required
326
+ * @member {Array.<module:model/PaymentPayoutItem>} payout_items
327
+ */
328
+ _PaymentPayout["default"].prototype['payout_items'] = undefined;
329
+ /**
330
+ * @member {module:model/PaymentPayoutRecipientInfo} recipient_info
331
+ */
332
+ _PaymentPayout["default"].prototype['recipient_info'] = undefined;
333
+ /**
334
+ * The initiator of this payout, usually the user's API key.
335
+ * @member {String} initiator
336
+ */
337
+ _PaymentPayout["default"].prototype['initiator'] = undefined;
238
338
  /**
239
- * The actual amount of this payout.
339
+ * - 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.)
240
340
  * @member {String} actual_payout_amount
241
341
  */
242
- PaymentPayoutDetail.prototype['actual_payout_amount'] = undefined;
243
-
342
+ _PaymentPayout["default"].prototype['actual_payout_amount'] = undefined;
343
+ /**
344
+ * @member {module:model/PaymentPayoutStatus} status
345
+ */
346
+ _PaymentPayout["default"].prototype['status'] = undefined;
347
+ /**
348
+ * A note or comment about the payout.
349
+ * @member {String} remark
350
+ */
351
+ _PaymentPayout["default"].prototype['remark'] = undefined;
244
352
  /**
245
- * @member {module:model/BankAccount} bank_account
353
+ * The created time of the payout, represented as a UNIX timestamp in seconds.
354
+ * @member {Number} created_timestamp
355
+ */
356
+ _PaymentPayout["default"].prototype['created_timestamp'] = undefined;
357
+ /**
358
+ * The updated time of the payout, represented as a UNIX timestamp in seconds.
359
+ * @member {Number} updated_timestamp
246
360
  */
247
- PaymentPayoutDetail.prototype['bank_account'] = undefined;
361
+ _PaymentPayout["default"].prototype['updated_timestamp'] = undefined;
248
362
  var _default = exports["default"] = PaymentPayoutDetail;