@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.
- package/README.md +88 -16
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +144 -4
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/GraphQLApi.js +85 -0
- package/dist/api/PaymentApi.js +1161 -154
- package/dist/api/StakingsApi.js +2 -2
- package/dist/api/SwapsApi.js +3 -0
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +18 -18
- package/dist/index.js +357 -28
- package/dist/model/AddressRiskLevel.js +71 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/{AllocationRecord.js → AllocationItem.js} +38 -35
- package/dist/model/{AllocationRequest.js → AllocationParam.js} +29 -26
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/BatchAllocation.js +12 -12
- package/dist/model/BatchAllocationDetail.js +15 -17
- package/dist/model/BridgingFee.js +3 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/CommissionFee.js +2 -2
- package/dist/model/ComplianceDispositionUpdateEventData.js +13 -3
- package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +346 -0
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +13 -3
- package/dist/model/ContractCallParams.js +3 -3
- package/dist/model/CounterpartyWalletAddressDetail.js +2 -2
- package/dist/model/CreateBatchAllocationRequest.js +19 -19
- package/dist/model/CreateBulkSendRequest.js +167 -0
- package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +153 -0
- package/dist/model/CreateCounterpartyEntry201Response.js +143 -0
- package/dist/model/CreateCounterpartyEntryRequest.js +141 -0
- package/dist/model/CreateDestinationEntry201Response.js +172 -0
- package/dist/model/CreateDestinationEntryRequest.js +172 -0
- package/dist/model/CreateKyaScreeningsBody.js +129 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +17 -15
- package/dist/model/CreatePayoutRequest.js +35 -28
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateReportRequest.js +156 -0
- package/dist/model/CreateTopUpAddresses.js +139 -0
- package/dist/model/CreateTopUpAddresses201Response.js +107 -0
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/DeleteCounterpartyById200Response.js +110 -0
- package/dist/model/DeleteCounterpartyEntry200Response.js +110 -0
- package/dist/model/DeleteDestinationById200Response.js +110 -0
- package/dist/model/DeleteDestinationEntry200Response.js +110 -0
- package/dist/model/EntryType.js +61 -0
- package/dist/model/GetCounterpartyEntry200Response.js +90 -0
- package/dist/model/GetDestinationEntry200Response.js +106 -0
- package/dist/model/{ListPayoutItems200Response.js → GetReports200Response.js} +22 -22
- package/dist/model/KyaRiskAssessment.js +151 -0
- package/dist/model/KyaRiskDetail.js +126 -0
- package/dist/model/KyaRiskLevel.js +66 -0
- package/dist/model/KyaScreeningRequest.js +154 -0
- package/dist/model/KyaScreeningResult.js +222 -0
- package/dist/model/KyaScreeningResultRiskAssessment.js +171 -0
- package/dist/model/KyaScreeningStatus.js +71 -0
- package/dist/model/KyaScreeningsEventData.js +174 -0
- package/dist/model/LinkDisplayInfo.js +1 -1
- package/dist/model/{ListAllocations200Response.js → ListAllocationItems200Response.js} +22 -22
- package/dist/model/ListBulkSendItems200Response.js +123 -0
- package/dist/model/ListCounterpartyEntries200Response.js +123 -0
- package/dist/model/ListDestinationEntries200Response.js +153 -0
- package/dist/model/ListKyaScreenings200Response.js +145 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MerchantBalance.js +4 -4
- package/dist/model/Order.js +10 -10
- package/dist/model/OrderLinkBusinessInfo.js +22 -16
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +2 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +4 -4
- package/dist/model/PaymentAddressUpdateEventData.js +13 -3
- package/dist/model/PaymentAllocationAmount.js +2 -2
- package/dist/model/PaymentBulkSend.js +182 -0
- package/dist/model/PaymentBulkSendEvent.js +359 -0
- package/dist/model/PaymentBulkSendExecutionMode.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +190 -0
- package/dist/model/{PaymentPayoutItemStatus.js → PaymentBulkSendItemStatus.js} +11 -11
- package/dist/model/PaymentBulkSendItemValidationStatus.js +66 -0
- package/dist/model/PaymentBulkSendStatus.js +81 -0
- package/dist/model/PaymentEstimateFeeRequest.js +13 -0
- package/dist/model/PaymentFeeType.js +15 -0
- package/dist/model/PaymentOrderEventData.js +31 -21
- package/dist/model/PaymentPayout.js +64 -46
- package/dist/model/PaymentPayoutDetail.js +166 -52
- package/dist/model/PaymentPayoutEvent.js +152 -80
- package/dist/model/PaymentPayoutItem.js +9 -166
- package/dist/model/PaymentPayoutParam.js +6 -46
- package/dist/model/PaymentPayoutRecipientInfo.js +126 -0
- package/dist/model/PaymentPayoutStatus.js +9 -4
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +13 -3
- package/dist/model/PaymentTransactionEventData.js +13 -3
- package/dist/model/PspBalance.js +4 -4
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- package/dist/model/Report.js +209 -0
- package/dist/model/ReportExportFormat.js +66 -0
- package/dist/model/ReportStatus.js +61 -0
- package/dist/model/ReportType.js +121 -0
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionExtraType.js +5 -0
- package/dist/model/TransactionWalletConnectInfo.js +146 -0
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/UpdateCounterpartyRequest.js +160 -0
- package/dist/model/UpdateDestinationEntry200Response.js +90 -0
- package/dist/model/UpdateDestinationEntryRequest.js +135 -0
- package/dist/model/UpdateDestinationRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +20 -2
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +121 -28
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/AddressRiskLevel.md +16 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/AllocationItem.md +15 -0
- package/docs/AllocationParam.md +13 -0
- package/docs/AutoSweepApi.md +1 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/BatchAllocation.md +2 -2
- package/docs/BatchAllocationDetail.md +1 -1
- package/docs/BridgingFee.md +2 -2
- package/docs/ChainsEventData.md +5 -1
- package/docs/CommissionFee.md +1 -1
- package/docs/ComplianceApi.md +163 -0
- package/docs/ComplianceDispositionUpdateEventData.md +5 -1
- package/docs/ComplianceKyaScreeningsUpdateEventData.md +64 -0
- package/docs/ComplianceKytScreeningsUpdateEventData.md +5 -1
- package/docs/ContractCallParams.md +2 -2
- package/docs/CounterpartyWalletAddressDetail.md +1 -1
- package/docs/CreateBatchAllocationRequest.md +2 -2
- package/docs/CreateBulkSendRequest.md +12 -0
- package/docs/CreateBulkSendRequestPayoutParamsInner.md +12 -0
- package/docs/CreateCounterpartyEntry201Response.md +10 -0
- package/docs/CreateCounterpartyEntryRequest.md +10 -0
- package/docs/CreateDestinationEntry201Response.md +11 -0
- package/docs/CreateDestinationEntryRequest.md +11 -0
- package/docs/CreateKyaScreeningsBody.md +9 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +11 -11
- package/docs/CreatePayoutRequest.md +4 -4
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateReportRequest.md +13 -0
- package/docs/CreateTopUpAddresses.md +11 -0
- package/docs/CreateTopUpAddresses201Response.md +9 -0
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/DeleteCounterpartyById200Response.md +9 -0
- package/docs/DeleteCounterpartyEntry200Response.md +9 -0
- package/docs/DeleteDestinationById200Response.md +9 -0
- package/docs/DeleteDestinationEntry200Response.md +9 -0
- package/docs/EntryType.md +12 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/GetCounterpartyEntry200Response.md +9 -0
- package/docs/GetDestinationEntry200Response.md +10 -0
- package/docs/{ListAllocations200Response.md → GetReports200Response.md} +2 -2
- package/docs/GraphQLApi.md +61 -0
- package/docs/KyaRiskAssessment.md +11 -0
- package/docs/KyaRiskDetail.md +10 -0
- package/docs/KyaRiskLevel.md +14 -0
- package/docs/KyaScreeningRequest.md +12 -0
- package/docs/KyaScreeningResult.md +17 -0
- package/docs/KyaScreeningResultRiskAssessment.md +11 -0
- package/docs/KyaScreeningStatus.md +16 -0
- package/docs/KyaScreeningsEventData.md +14 -0
- package/docs/LinkDisplayInfo.md +1 -1
- package/docs/{ListPayoutItems200Response.md → ListAllocationItems200Response.md} +2 -2
- package/docs/ListBulkSendItems200Response.md +10 -0
- package/docs/ListCounterpartyEntries200Response.md +10 -0
- package/docs/ListDestinationEntries200Response.md +11 -0
- package/docs/ListKyaScreenings200Response.md +10 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MerchantBalance.md +4 -4
- package/docs/Order.md +8 -8
- package/docs/OrderLinkBusinessInfo.md +11 -11
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +2 -2
- package/docs/PaymentAddressUpdateEventData.md +5 -1
- package/docs/PaymentAllocationAmount.md +1 -1
- package/docs/PaymentApi.md +1296 -198
- package/docs/PaymentBulkSend.md +15 -0
- package/docs/PaymentBulkSendEvent.md +65 -0
- package/docs/PaymentBulkSendExecutionMode.md +12 -0
- package/docs/PaymentBulkSendItem.md +15 -0
- package/docs/{PaymentPayoutItemStatus.md → PaymentBulkSendItemStatus.md} +3 -3
- package/docs/PaymentBulkSendItemValidationStatus.md +14 -0
- package/docs/PaymentBulkSendStatus.md +20 -0
- package/docs/PaymentEstimateFeeRequest.md +1 -0
- package/docs/PaymentFeeType.md +6 -0
- package/docs/PaymentOrderEventData.md +13 -9
- package/docs/PaymentPayout.md +8 -7
- package/docs/PaymentPayoutDetail.md +10 -8
- package/docs/PaymentPayoutEvent.md +15 -9
- package/docs/PaymentPayoutItem.md +2 -13
- package/docs/PaymentPayoutParam.md +1 -4
- package/docs/PaymentPayoutRecipientInfo.md +12 -0
- package/docs/PaymentPayoutStatus.md +4 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +5 -1
- package/docs/PaymentTransactionEventData.md +5 -1
- package/docs/PspBalance.md +4 -4
- package/docs/RefundLinkBusinessInfo.md +1 -1
- package/docs/Report.md +17 -0
- package/docs/ReportExportFormat.md +14 -0
- package/docs/ReportStatus.md +12 -0
- package/docs/ReportType.md +36 -0
- package/docs/StakingsApi.md +1 -1
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/SwapsApi.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionExtraType.md +2 -0
- package/docs/TransactionWalletConnectInfo.md +12 -0
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/TransferParams.md +1 -1
- package/docs/UpdateCounterpartyRequest.md +13 -0
- package/docs/UpdateDestinationEntry200Response.md +9 -0
- package/docs/UpdateDestinationEntryRequest.md +11 -0
- package/docs/UpdateDestinationRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +3 -1
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WalletsApi.md +9 -9
- package/docs/WebhookEventData.md +28 -18
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/dist/model/PaymentPayoutItemDetail.js +0 -298
- package/docs/AllocationRecord.md +0 -15
- package/docs/AllocationRequest.md +0 -13
- 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
|
|
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('
|
|
93
|
-
obj['
|
|
99
|
+
if (data.hasOwnProperty('payout_channel')) {
|
|
100
|
+
obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
|
|
94
101
|
}
|
|
95
|
-
if (data.hasOwnProperty('
|
|
96
|
-
obj['
|
|
102
|
+
if (data.hasOwnProperty('source_account')) {
|
|
103
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
97
104
|
}
|
|
98
|
-
if (data.hasOwnProperty('
|
|
99
|
-
obj['
|
|
105
|
+
if (data.hasOwnProperty('payout_items')) {
|
|
106
|
+
obj['payout_items'] = _ApiClient["default"].convertToType(data['payout_items'], [_PaymentPayoutItem["default"]]);
|
|
100
107
|
}
|
|
101
|
-
if (data.hasOwnProperty('
|
|
102
|
-
obj['
|
|
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('
|
|
117
|
-
obj['
|
|
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
|
-
|
|
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['
|
|
162
|
-
throw new Error("Expected the field `
|
|
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 `
|
|
165
|
-
var _iterator2 = _createForOfIteratorHelper(data['
|
|
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
|
-
|
|
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
|
-
//
|
|
192
|
-
if (data['
|
|
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
|
-
|
|
195
|
-
|
|
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/
|
|
261
|
+
* @member {module:model/PayoutChannel} payout_channel
|
|
224
262
|
*/
|
|
225
|
-
PaymentPayoutEvent.prototype['
|
|
263
|
+
PaymentPayoutEvent.prototype['payout_channel'] = undefined;
|
|
226
264
|
|
|
227
265
|
/**
|
|
228
|
-
*
|
|
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['
|
|
269
|
+
PaymentPayoutEvent.prototype['source_account'] = undefined;
|
|
231
270
|
|
|
232
271
|
/**
|
|
233
|
-
*
|
|
234
|
-
* @member {
|
|
272
|
+
* required
|
|
273
|
+
* @member {Array.<module:model/PaymentPayoutItem>} payout_items
|
|
235
274
|
*/
|
|
236
|
-
PaymentPayoutEvent.prototype['
|
|
275
|
+
PaymentPayoutEvent.prototype['payout_items'] = undefined;
|
|
237
276
|
|
|
238
277
|
/**
|
|
239
|
-
*
|
|
240
|
-
* @member {Number} updated_timestamp
|
|
278
|
+
* @member {module:model/PaymentPayoutRecipientInfo} recipient_info
|
|
241
279
|
*/
|
|
242
|
-
PaymentPayoutEvent.prototype['
|
|
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
|
-
*
|
|
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['
|
|
292
|
+
PaymentPayoutEvent.prototype['actual_payout_amount'] = undefined;
|
|
254
293
|
|
|
255
294
|
/**
|
|
256
|
-
*
|
|
257
|
-
* @member {String} currency
|
|
295
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
258
296
|
*/
|
|
259
|
-
PaymentPayoutEvent.prototype['
|
|
297
|
+
PaymentPayoutEvent.prototype['status'] = undefined;
|
|
260
298
|
|
|
261
299
|
/**
|
|
262
|
-
*
|
|
263
|
-
* @member {String}
|
|
300
|
+
* A note or comment about the payout.
|
|
301
|
+
* @member {String} remark
|
|
264
302
|
*/
|
|
265
|
-
PaymentPayoutEvent.prototype['
|
|
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
|
-
*
|
|
318
|
+
* An array of payout transactions.
|
|
319
|
+
* @member {Array.<module:model/PaymentTransaction>} transactions
|
|
269
320
|
*/
|
|
270
|
-
PaymentPayoutEvent.prototype['
|
|
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/
|
|
341
|
+
* @member {module:model/PayoutChannel} payout_channel
|
|
291
342
|
*/
|
|
292
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
343
|
+
_PaymentPayoutDetail["default"].prototype['payout_channel'] = undefined;
|
|
293
344
|
/**
|
|
294
|
-
*
|
|
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['
|
|
348
|
+
_PaymentPayoutDetail["default"].prototype['source_account'] = undefined;
|
|
297
349
|
/**
|
|
298
|
-
*
|
|
299
|
-
* @member {
|
|
350
|
+
* required
|
|
351
|
+
* @member {Array.<module:model/PaymentPayoutItem>} payout_items
|
|
300
352
|
*/
|
|
301
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
353
|
+
_PaymentPayoutDetail["default"].prototype['payout_items'] = undefined;
|
|
302
354
|
/**
|
|
303
|
-
*
|
|
304
|
-
* @member {Number} updated_timestamp
|
|
355
|
+
* @member {module:model/PaymentPayoutRecipientInfo} recipient_info
|
|
305
356
|
*/
|
|
306
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
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
|
-
*
|
|
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['
|
|
367
|
+
_PaymentPayoutDetail["default"].prototype['actual_payout_amount'] = undefined;
|
|
316
368
|
/**
|
|
317
|
-
*
|
|
318
|
-
* @member {String} currency
|
|
369
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
319
370
|
*/
|
|
320
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
371
|
+
_PaymentPayoutDetail["default"].prototype['status'] = undefined;
|
|
321
372
|
/**
|
|
322
|
-
*
|
|
323
|
-
* @member {String}
|
|
373
|
+
* A note or comment about the payout.
|
|
374
|
+
* @member {String} remark
|
|
324
375
|
*/
|
|
325
|
-
_PaymentPayoutDetail["default"].prototype['
|
|
376
|
+
_PaymentPayoutDetail["default"].prototype['remark'] = undefined;
|
|
326
377
|
/**
|
|
327
|
-
*
|
|
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['
|
|
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
|
|
40
|
-
* @param
|
|
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(
|
|
39
|
+
function PaymentPayoutItem(token_id, amount) {
|
|
46
40
|
_classCallCheck(this, PaymentPayoutItem);
|
|
47
|
-
PaymentPayoutItem.initialize(this,
|
|
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,
|
|
58
|
-
obj['
|
|
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 = ["
|
|
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
|
|
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
|
|
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
|
*/
|