@cobo/cobo-waas2 1.26.0 → 1.28.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 +96 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +1847 -294
- package/dist/api/StakingsApi.js +44 -2
- package/dist/api/SwapsApi.js +2 -2
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +14 -14
- package/dist/index.js +420 -7
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AllocationRecord.js +193 -0
- package/dist/model/AllocationRequest.js +167 -0
- package/dist/model/BabylonCreateStakingExpansion.js +157 -0
- package/dist/model/BabylonStakeExtra.js +26 -0
- package/dist/model/BabylonStakingRegistration.js +1 -1
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BankAccountStatus.js +66 -0
- package/dist/model/BatchAllocation.js +190 -0
- package/dist/model/BatchAllocationDetail.js +188 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallDestination.js +72 -10
- package/dist/model/ContractCallDestinationType.js +10 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/Counterparty.js +195 -0
- package/dist/model/CounterpartyDetail.js +228 -0
- package/dist/model/CounterpartyType.js +61 -0
- package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCounterpartyRequest.js +193 -0
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateDestinationBankAccount.js +257 -0
- package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
- package/dist/model/CreateDestinationRequest.js +235 -0
- package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +115 -68
- package/dist/model/CreatePayoutRequest.js +192 -0
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +14 -1
- package/dist/model/CreateSettlementRequestRequest.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +12 -0
- package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/DeleteCounterparty200Response.js +110 -0
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
- package/dist/model/DeleteDestination200Response.js +110 -0
- package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
- package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
- package/dist/model/Destination.js +208 -0
- package/dist/model/DestinationBankAccount.js +301 -0
- package/dist/model/DestinationBankAccountDetail.js +394 -0
- package/dist/model/DestinationDetail.js +272 -0
- package/dist/model/DestinationType.js +61 -0
- package/dist/model/DestinationWalletAddressDetail.js +205 -0
- package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ExchangeRate.js +140 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/IntermediaryBankInfo.js +140 -0
- package/dist/model/Link.js +4 -4
- package/dist/model/LinkDisplayInfo.js +15 -2
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.js +123 -0
- package/dist/model/ListCounterparties200Response.js +123 -0
- package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
- package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
- package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
- package/dist/model/ListDestinations200Response.js +123 -0
- package/dist/model/ListPayoutItems200Response.js +123 -0
- package/dist/model/ListPayouts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MerchantBalance.js +28 -2
- package/dist/model/Order.js +135 -102
- package/dist/model/OrderLinkBusinessInfo.js +151 -87
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentAllocationAmount.js +125 -0
- package/dist/model/PaymentOrderEventData.js +198 -145
- package/dist/model/PaymentPayout.js +250 -0
- package/dist/model/PaymentPayoutDetail.js +248 -0
- package/dist/model/PaymentPayoutEvent.js +433 -0
- package/dist/model/PaymentPayoutItem.js +298 -0
- package/dist/model/PaymentPayoutItemDetail.js +298 -0
- package/dist/model/PaymentPayoutItemStatus.js +76 -0
- package/dist/model/PaymentPayoutParam.js +165 -0
- package/dist/model/PaymentPayoutStatus.js +81 -0
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentSourceType.js +61 -0
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +10 -5
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +6 -6
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/Stakings.js +33 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +1 -1
- package/dist/model/SwapActivityDetail.js +2 -2
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionDestination.js +38 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionTronContractDestination.js +150 -0
- package/dist/model/TransactionWebhookEventData.js +10 -5
- package/dist/model/TronContractCallDestination.js +150 -0
- package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
- package/dist/model/UpdateDestinationBankAccount.js +257 -0
- package/dist/model/UpdateDestinationByIdRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +107 -43
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationRecord.md +15 -0
- package/docs/AllocationRequest.md +13 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BabylonCreateStakingExpansion.md +12 -0
- package/docs/BabylonStakeExtra.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BankAccountStatus.md +14 -0
- package/docs/BatchAllocation.md +14 -0
- package/docs/BatchAllocationDetail.md +14 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallDestination.md +3 -2
- package/docs/ContractCallDestinationType.md +4 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/Counterparty.md +16 -0
- package/docs/CounterpartyDetail.md +17 -0
- package/docs/CounterpartyType.md +12 -0
- package/docs/CounterpartyWalletAddressDetail.md +15 -0
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCounterpartyRequest.md +14 -0
- package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateDestinationBankAccount.md +19 -0
- package/docs/CreateDestinationBankAccountRequest.md +20 -0
- package/docs/CreateDestinationRequest.md +16 -0
- package/docs/CreateDestinationWalletAddressRequest.md +11 -0
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +15 -11
- package/docs/CreatePayoutRequest.md +14 -0
- package/docs/CreateRefundRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +2 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteCounterparty200Response.md +9 -0
- package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
- package/docs/DeleteDestination200Response.md +9 -0
- package/docs/DeleteDestinationBankAccount200Response.md +9 -0
- package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
- package/docs/Destination.md +17 -0
- package/docs/DestinationBankAccount.md +23 -0
- package/docs/DestinationBankAccountDetail.md +30 -0
- package/docs/DestinationDetail.md +19 -0
- package/docs/DestinationType.md +12 -0
- package/docs/DestinationWalletAddressDetail.md +16 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EnableDestinationWhitelistRequest.md +9 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeRate.md +11 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/IntermediaryBankInfo.md +11 -0
- package/docs/Link.md +2 -2
- package/docs/LinkDisplayInfo.md +3 -2
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.md +10 -0
- package/docs/ListCounterparties200Response.md +10 -0
- package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
- package/docs/ListDestinationBankAccounts200Response.md +10 -0
- package/docs/ListDestinationWalletAddresses200Response.md +10 -0
- package/docs/ListDestinations200Response.md +10 -0
- package/docs/ListPayoutItems200Response.md +10 -0
- package/docs/ListPayouts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MerchantBalance.md +4 -2
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +16 -13
- package/docs/OrderLinkBusinessInfo.md +11 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentAllocationAmount.md +10 -0
- package/docs/PaymentApi.md +2153 -395
- package/docs/PaymentOrderEventData.md +19 -14
- package/docs/PaymentPayout.md +19 -0
- package/docs/PaymentPayoutDetail.md +19 -0
- package/docs/PaymentPayoutEvent.md +65 -0
- package/docs/PaymentPayoutItem.md +22 -0
- package/docs/PaymentPayoutItemDetail.md +22 -0
- package/docs/PaymentPayoutItemStatus.md +18 -0
- package/docs/PaymentPayoutParam.md +13 -0
- package/docs/PaymentPayoutStatus.md +20 -0
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentSourceType.md +12 -0
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +4 -2
- package/docs/PspBalance.md +4 -2
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +4 -4
- package/docs/SettlementDetail.md +1 -0
- package/docs/Stakings.md +2 -1
- package/docs/StakingsApi.md +54 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +1 -1
- package/docs/SwapActivityDetail.md +1 -1
- package/docs/SwapsApi.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/Transaction.md +1 -1
- package/docs/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionTronContractDestination.md +12 -0
- package/docs/TransactionWebhookEventData.md +4 -2
- package/docs/TransactionsApi.md +3 -3
- package/docs/TronContractCallDestination.md +12 -0
- package/docs/UpdateCounterpartyByIdRequest.md +13 -0
- package/docs/UpdateDestinationBankAccount.md +19 -0
- package/docs/UpdateDestinationByIdRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +12 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +22 -14
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _BankAccount = _interopRequireDefault(require("./BankAccount"));
|
|
9
|
+
var _PaymentPayoutDetail = _interopRequireDefault(require("./PaymentPayoutDetail"));
|
|
10
|
+
var _PaymentPayoutItemDetail = _interopRequireDefault(require("./PaymentPayoutItemDetail"));
|
|
11
|
+
var _PaymentPayoutStatus = _interopRequireDefault(require("./PaymentPayoutStatus"));
|
|
12
|
+
var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
|
|
13
|
+
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
16
|
+
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; } } }; }
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
21
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
24
|
+
* Cobo Wallet as a Service 2.0
|
|
25
|
+
*
|
|
26
|
+
* Contact: help@cobo.com
|
|
27
|
+
*
|
|
28
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
29
|
+
* https://openapi-generator.tech
|
|
30
|
+
* Do not edit the class manually.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* The PaymentPayoutEvent model module.
|
|
35
|
+
* @module model/PaymentPayoutEvent
|
|
36
|
+
*/
|
|
37
|
+
var PaymentPayoutEvent = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>PaymentPayoutEvent</code>.
|
|
40
|
+
* @alias module:model/PaymentPayoutEvent
|
|
41
|
+
* @implements module:model/WebhookEventDataType
|
|
42
|
+
* @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 payout_id {String} The payout ID generated by Cobo.
|
|
45
|
+
* @param request_id {String} The request ID provided by you when creating the payout.
|
|
46
|
+
* @param status {module:model/PaymentPayoutStatus}
|
|
47
|
+
*/
|
|
48
|
+
function PaymentPayoutEvent(data_type, payout_id, request_id, status) {
|
|
49
|
+
_classCallCheck(this, PaymentPayoutEvent);
|
|
50
|
+
_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);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Initializes the fields of this object.
|
|
57
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
58
|
+
* Only for internal use.
|
|
59
|
+
*/
|
|
60
|
+
return _createClass(PaymentPayoutEvent, null, [{
|
|
61
|
+
key: "initialize",
|
|
62
|
+
value: function initialize(obj, data_type, payout_id, request_id, status) {
|
|
63
|
+
obj['data_type'] = data_type;
|
|
64
|
+
obj['payout_id'] = payout_id;
|
|
65
|
+
obj['request_id'] = request_id;
|
|
66
|
+
obj['status'] = status;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Constructs a <code>PaymentPayoutEvent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
71
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @param {module:model/PaymentPayoutEvent} obj Optional instance to populate.
|
|
74
|
+
* @return {module:model/PaymentPayoutEvent} The populated <code>PaymentPayoutEvent</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "constructFromObject",
|
|
78
|
+
value: function constructFromObject(data, obj) {
|
|
79
|
+
if (data) {
|
|
80
|
+
obj = obj || new PaymentPayoutEvent();
|
|
81
|
+
_WebhookEventDataType["default"].constructFromObject(data, obj);
|
|
82
|
+
_PaymentPayoutDetail["default"].constructFromObject(data, obj);
|
|
83
|
+
if (data.hasOwnProperty('data_type')) {
|
|
84
|
+
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('payout_id')) {
|
|
87
|
+
obj['payout_id'] = _ApiClient["default"].convertToType(data['payout_id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('request_id')) {
|
|
90
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('status')) {
|
|
93
|
+
obj['status'] = _PaymentPayoutStatus["default"].constructFromObject(data['status']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('payout_item_details')) {
|
|
96
|
+
obj['payout_item_details'] = _ApiClient["default"].convertToType(data['payout_item_details'], [_PaymentPayoutItemDetail["default"]]);
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
99
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
102
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('initiator')) {
|
|
105
|
+
obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
|
|
106
|
+
}
|
|
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
|
+
if (data.hasOwnProperty('actual_payout_amount')) {
|
|
114
|
+
obj['actual_payout_amount'] = _ApiClient["default"].convertToType(data['actual_payout_amount'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('bank_account')) {
|
|
117
|
+
obj['bank_account'] = _BankAccount["default"].constructFromObject(data['bank_account']);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Validates the JSON data with respect to <code>PaymentPayoutEvent</code>.
|
|
125
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
126
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentPayoutEvent</code>.
|
|
127
|
+
*/
|
|
128
|
+
}, {
|
|
129
|
+
key: "validateJSON",
|
|
130
|
+
value: function validateJSON(data) {
|
|
131
|
+
// check to make sure all required properties are present in the JSON string
|
|
132
|
+
var _iterator = _createForOfIteratorHelper(PaymentPayoutEvent.RequiredProperties),
|
|
133
|
+
_step;
|
|
134
|
+
try {
|
|
135
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
136
|
+
var property = _step.value;
|
|
137
|
+
if (!data.hasOwnProperty(property)) {
|
|
138
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
} catch (err) {
|
|
143
|
+
_iterator.e(err);
|
|
144
|
+
} finally {
|
|
145
|
+
_iterator.f();
|
|
146
|
+
}
|
|
147
|
+
if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
|
|
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
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
156
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
157
|
+
}
|
|
158
|
+
if (data['payout_item_details']) {
|
|
159
|
+
// data not null
|
|
160
|
+
// ensure the json data is an array
|
|
161
|
+
if (!Array.isArray(data['payout_item_details'])) {
|
|
162
|
+
throw new Error("Expected the field `payout_item_details` to be an array in the JSON data but got " + data['payout_item_details']);
|
|
163
|
+
}
|
|
164
|
+
// validate the optional field `payout_item_details` (array)
|
|
165
|
+
var _iterator2 = _createForOfIteratorHelper(data['payout_item_details']),
|
|
166
|
+
_step2;
|
|
167
|
+
try {
|
|
168
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
169
|
+
var item = _step2.value;
|
|
170
|
+
_PaymentPayoutItemDetail["default"].validateJSON(item);
|
|
171
|
+
}
|
|
172
|
+
} catch (err) {
|
|
173
|
+
_iterator2.e(err);
|
|
174
|
+
} finally {
|
|
175
|
+
_iterator2.f();
|
|
176
|
+
}
|
|
177
|
+
;
|
|
178
|
+
}
|
|
179
|
+
// ensure the json data is a string
|
|
180
|
+
if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
|
|
181
|
+
throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
|
|
182
|
+
}
|
|
183
|
+
// 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
|
+
if (data['actual_payout_amount'] && !(typeof data['actual_payout_amount'] === 'string' || data['actual_payout_amount'] instanceof String)) {
|
|
189
|
+
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
|
+
}
|
|
191
|
+
// validate the optional field `bank_account`
|
|
192
|
+
if (data['bank_account']) {
|
|
193
|
+
// data not null
|
|
194
|
+
if (!!_BankAccount["default"].validateJSON) {
|
|
195
|
+
_BankAccount["default"].validateJSON(data['bank_account']);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
}]);
|
|
201
|
+
}();
|
|
202
|
+
PaymentPayoutEvent.RequiredProperties = ["data_type", "payout_id", "request_id", "status"];
|
|
203
|
+
|
|
204
|
+
/**
|
|
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.
|
|
206
|
+
* @member {module:model/PaymentPayoutEvent.DataTypeEnum} data_type
|
|
207
|
+
*/
|
|
208
|
+
PaymentPayoutEvent.prototype['data_type'] = undefined;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The payout ID generated by Cobo.
|
|
212
|
+
* @member {String} payout_id
|
|
213
|
+
*/
|
|
214
|
+
PaymentPayoutEvent.prototype['payout_id'] = undefined;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The request ID provided by you when creating the payout.
|
|
218
|
+
* @member {String} request_id
|
|
219
|
+
*/
|
|
220
|
+
PaymentPayoutEvent.prototype['request_id'] = undefined;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
224
|
+
*/
|
|
225
|
+
PaymentPayoutEvent.prototype['status'] = undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* @member {Array.<module:model/PaymentPayoutItemDetail>} payout_item_details
|
|
229
|
+
*/
|
|
230
|
+
PaymentPayoutEvent.prototype['payout_item_details'] = undefined;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
234
|
+
* @member {Number} created_timestamp
|
|
235
|
+
*/
|
|
236
|
+
PaymentPayoutEvent.prototype['created_timestamp'] = undefined;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* The updated time of the payout, represented as a UNIX timestamp in seconds.
|
|
240
|
+
* @member {Number} updated_timestamp
|
|
241
|
+
*/
|
|
242
|
+
PaymentPayoutEvent.prototype['updated_timestamp'] = undefined;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The initiator of this payout, usually the user's API key.
|
|
246
|
+
* @member {String} initiator
|
|
247
|
+
*/
|
|
248
|
+
PaymentPayoutEvent.prototype['initiator'] = undefined;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @member {module:model/PayoutChannel} payout_channel
|
|
252
|
+
*/
|
|
253
|
+
PaymentPayoutEvent.prototype['payout_channel'] = undefined;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The fiat currency for the payout.
|
|
257
|
+
* @member {String} currency
|
|
258
|
+
*/
|
|
259
|
+
PaymentPayoutEvent.prototype['currency'] = undefined;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The actual amount of this payout.
|
|
263
|
+
* @member {String} actual_payout_amount
|
|
264
|
+
*/
|
|
265
|
+
PaymentPayoutEvent.prototype['actual_payout_amount'] = undefined;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @member {module:model/BankAccount} bank_account
|
|
269
|
+
*/
|
|
270
|
+
PaymentPayoutEvent.prototype['bank_account'] = undefined;
|
|
271
|
+
|
|
272
|
+
// Implement WebhookEventDataType interface:
|
|
273
|
+
/**
|
|
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.
|
|
275
|
+
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
276
|
+
*/
|
|
277
|
+
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
278
|
+
// Implement PaymentPayoutDetail interface:
|
|
279
|
+
/**
|
|
280
|
+
* The payout ID generated by Cobo.
|
|
281
|
+
* @member {String} payout_id
|
|
282
|
+
*/
|
|
283
|
+
_PaymentPayoutDetail["default"].prototype['payout_id'] = undefined;
|
|
284
|
+
/**
|
|
285
|
+
* The request ID provided by you when creating the payout.
|
|
286
|
+
* @member {String} request_id
|
|
287
|
+
*/
|
|
288
|
+
_PaymentPayoutDetail["default"].prototype['request_id'] = undefined;
|
|
289
|
+
/**
|
|
290
|
+
* @member {module:model/PaymentPayoutStatus} status
|
|
291
|
+
*/
|
|
292
|
+
_PaymentPayoutDetail["default"].prototype['status'] = undefined;
|
|
293
|
+
/**
|
|
294
|
+
* @member {Array.<module:model/PaymentPayoutItemDetail>} payout_item_details
|
|
295
|
+
*/
|
|
296
|
+
_PaymentPayoutDetail["default"].prototype['payout_item_details'] = undefined;
|
|
297
|
+
/**
|
|
298
|
+
* The created time of the payout, represented as a UNIX timestamp in seconds.
|
|
299
|
+
* @member {Number} created_timestamp
|
|
300
|
+
*/
|
|
301
|
+
_PaymentPayoutDetail["default"].prototype['created_timestamp'] = undefined;
|
|
302
|
+
/**
|
|
303
|
+
* The updated time of the payout, represented as a UNIX timestamp in seconds.
|
|
304
|
+
* @member {Number} updated_timestamp
|
|
305
|
+
*/
|
|
306
|
+
_PaymentPayoutDetail["default"].prototype['updated_timestamp'] = undefined;
|
|
307
|
+
/**
|
|
308
|
+
* The initiator of this payout, usually the user's API key.
|
|
309
|
+
* @member {String} initiator
|
|
310
|
+
*/
|
|
311
|
+
_PaymentPayoutDetail["default"].prototype['initiator'] = undefined;
|
|
312
|
+
/**
|
|
313
|
+
* @member {module:model/PayoutChannel} payout_channel
|
|
314
|
+
*/
|
|
315
|
+
_PaymentPayoutDetail["default"].prototype['payout_channel'] = undefined;
|
|
316
|
+
/**
|
|
317
|
+
* The fiat currency for the payout.
|
|
318
|
+
* @member {String} currency
|
|
319
|
+
*/
|
|
320
|
+
_PaymentPayoutDetail["default"].prototype['currency'] = undefined;
|
|
321
|
+
/**
|
|
322
|
+
* The actual amount of this payout.
|
|
323
|
+
* @member {String} actual_payout_amount
|
|
324
|
+
*/
|
|
325
|
+
_PaymentPayoutDetail["default"].prototype['actual_payout_amount'] = undefined;
|
|
326
|
+
/**
|
|
327
|
+
* @member {module:model/BankAccount} bank_account
|
|
328
|
+
*/
|
|
329
|
+
_PaymentPayoutDetail["default"].prototype['bank_account'] = undefined;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Allowed values for the <code>data_type</code> property.
|
|
333
|
+
* @enum {String}
|
|
334
|
+
* @readonly
|
|
335
|
+
*/
|
|
336
|
+
PaymentPayoutEvent['DataTypeEnum'] = {
|
|
337
|
+
/**
|
|
338
|
+
* value: "Transaction"
|
|
339
|
+
* @const
|
|
340
|
+
*/
|
|
341
|
+
"Transaction": "Transaction",
|
|
342
|
+
/**
|
|
343
|
+
* value: "TSSRequest"
|
|
344
|
+
* @const
|
|
345
|
+
*/
|
|
346
|
+
"TSSRequest": "TSSRequest",
|
|
347
|
+
/**
|
|
348
|
+
* value: "Addresses"
|
|
349
|
+
* @const
|
|
350
|
+
*/
|
|
351
|
+
"Addresses": "Addresses",
|
|
352
|
+
/**
|
|
353
|
+
* value: "WalletInfo"
|
|
354
|
+
* @const
|
|
355
|
+
*/
|
|
356
|
+
"WalletInfo": "WalletInfo",
|
|
357
|
+
/**
|
|
358
|
+
* value: "MPCVault"
|
|
359
|
+
* @const
|
|
360
|
+
*/
|
|
361
|
+
"MPCVault": "MPCVault",
|
|
362
|
+
/**
|
|
363
|
+
* value: "Chains"
|
|
364
|
+
* @const
|
|
365
|
+
*/
|
|
366
|
+
"Chains": "Chains",
|
|
367
|
+
/**
|
|
368
|
+
* value: "Tokens"
|
|
369
|
+
* @const
|
|
370
|
+
*/
|
|
371
|
+
"Tokens": "Tokens",
|
|
372
|
+
/**
|
|
373
|
+
* value: "TokenListing"
|
|
374
|
+
* @const
|
|
375
|
+
*/
|
|
376
|
+
"TokenListing": "TokenListing",
|
|
377
|
+
/**
|
|
378
|
+
* value: "PaymentOrder"
|
|
379
|
+
* @const
|
|
380
|
+
*/
|
|
381
|
+
"PaymentOrder": "PaymentOrder",
|
|
382
|
+
/**
|
|
383
|
+
* value: "PaymentRefund"
|
|
384
|
+
* @const
|
|
385
|
+
*/
|
|
386
|
+
"PaymentRefund": "PaymentRefund",
|
|
387
|
+
/**
|
|
388
|
+
* value: "PaymentSettlement"
|
|
389
|
+
* @const
|
|
390
|
+
*/
|
|
391
|
+
"PaymentSettlement": "PaymentSettlement",
|
|
392
|
+
/**
|
|
393
|
+
* value: "PaymentTransaction"
|
|
394
|
+
* @const
|
|
395
|
+
*/
|
|
396
|
+
"PaymentTransaction": "PaymentTransaction",
|
|
397
|
+
/**
|
|
398
|
+
* value: "PaymentAddressUpdate"
|
|
399
|
+
* @const
|
|
400
|
+
*/
|
|
401
|
+
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
402
|
+
/**
|
|
403
|
+
* value: "PaymentPayout"
|
|
404
|
+
* @const
|
|
405
|
+
*/
|
|
406
|
+
"PaymentPayout": "PaymentPayout",
|
|
407
|
+
/**
|
|
408
|
+
* value: "BalanceUpdateInfo"
|
|
409
|
+
* @const
|
|
410
|
+
*/
|
|
411
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
412
|
+
/**
|
|
413
|
+
* value: "SuspendedToken"
|
|
414
|
+
* @const
|
|
415
|
+
*/
|
|
416
|
+
"SuspendedToken": "SuspendedToken",
|
|
417
|
+
/**
|
|
418
|
+
* value: "ComplianceDisposition"
|
|
419
|
+
* @const
|
|
420
|
+
*/
|
|
421
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
422
|
+
/**
|
|
423
|
+
* value: "ComplianceKytScreenings"
|
|
424
|
+
* @const
|
|
425
|
+
*/
|
|
426
|
+
"ComplianceKytScreenings": "ComplianceKytScreenings",
|
|
427
|
+
/**
|
|
428
|
+
* value: "unknown_default_open_api"
|
|
429
|
+
* @const
|
|
430
|
+
*/
|
|
431
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
432
|
+
};
|
|
433
|
+
var _default = exports["default"] = PaymentPayoutEvent;
|