@cobo/cobo-waas2 1.29.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 +24 -9
- package/dist/ApiClient.js +1 -1
- package/dist/api/ComplianceApi.js +2 -2
- package/dist/api/GraphQLApi.js +85 -0
- package/dist/api/PaymentApi.js +218 -86
- package/dist/api/SwapsApi.js +3 -0
- package/dist/api/WalletsApi.js +18 -18
- package/dist/index.js +112 -28
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/{AllocationRecord.js → AllocationItem.js} +42 -42
- package/dist/model/{AllocationRequest.js → AllocationParam.js} +33 -33
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BatchAllocation.js +11 -11
- package/dist/model/BatchAllocationDetail.js +15 -17
- package/dist/model/BridgingFee.js +3 -3
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallParams.js +1 -1
- package/dist/model/CreateBatchAllocationRequest.js +17 -17
- package/dist/model/CreateBulkSendRequest.js +167 -0
- package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +153 -0
- package/dist/model/CreateKyaScreeningsBody.js +3 -3
- package/dist/model/CreatePaymentOrderRequest.js +7 -5
- package/dist/model/CreatePayoutRequest.js +33 -26
- package/dist/model/CreateTopUpAddresses.js +139 -0
- package/dist/model/CreateTopUpAddresses201Response.js +107 -0
- package/dist/model/{ListAllocations200Response.js → ListAllocationItems200Response.js} +22 -22
- package/dist/model/{ListPayoutItems200Response.js → ListBulkSendItems200Response.js} +22 -22
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/OrderLinkBusinessInfo.js +10 -4
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- 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 +8 -3
- package/dist/model/PaymentPayout.js +64 -46
- package/dist/model/PaymentPayoutDetail.js +166 -52
- package/dist/model/PaymentPayoutEvent.js +149 -82
- package/dist/model/PaymentPayoutItem.js +9 -167
- package/dist/model/PaymentPayoutParam.js +6 -47
- package/dist/model/PaymentPayoutRecipientInfo.js +126 -0
- package/dist/model/PaymentPayoutStatus.js +9 -4
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -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 +8 -3
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +76 -17
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationItem.md +15 -0
- package/docs/AllocationParam.md +13 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BatchAllocation.md +1 -1
- package/docs/BatchAllocationDetail.md +1 -1
- package/docs/BridgingFee.md +2 -2
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +1 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKyaScreeningsUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallParams.md +1 -1
- package/docs/CreateBatchAllocationRequest.md +1 -1
- package/docs/CreateBulkSendRequest.md +12 -0
- package/docs/CreateBulkSendRequestPayoutParamsInner.md +12 -0
- package/docs/CreateKyaScreeningsBody.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreatePayoutRequest.md +3 -3
- package/docs/CreateTopUpAddresses.md +11 -0
- package/docs/CreateTopUpAddresses201Response.md +9 -0
- package/docs/GraphQLApi.md +61 -0
- package/docs/{ListAllocations200Response.md → ListAllocationItems200Response.md} +2 -2
- package/docs/{ListPayoutItems200Response.md → ListBulkSendItems200Response.md} +2 -2
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/OrderLinkBusinessInfo.md +3 -3
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +231 -76
- 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 +3 -1
- package/docs/PaymentPayout.md +8 -7
- package/docs/PaymentPayoutDetail.md +10 -8
- package/docs/PaymentPayoutEvent.md +13 -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 +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapsApi.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionExtraType.md +2 -0
- package/docs/TransactionWalletConnectInfo.md +12 -0
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +9 -9
- package/docs/WebhookEventData.md +15 -8
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/dist/model/PaymentPayoutItemDetail.js +0 -299
- package/docs/AllocationRecord.md +0 -15
- package/docs/AllocationRequest.md +0 -13
- package/docs/PaymentPayoutItemDetail.md +0 -22
|
@@ -0,0 +1,359 @@
|
|
|
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 _PaymentBulkSend = _interopRequireDefault(require("./PaymentBulkSend"));
|
|
9
|
+
var _PaymentBulkSendExecutionMode = _interopRequireDefault(require("./PaymentBulkSendExecutionMode"));
|
|
10
|
+
var _PaymentBulkSendStatus = _interopRequireDefault(require("./PaymentBulkSendStatus"));
|
|
11
|
+
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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
|
+
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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
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); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The PaymentBulkSendEvent model module.
|
|
33
|
+
* @module model/PaymentBulkSendEvent
|
|
34
|
+
*/
|
|
35
|
+
var PaymentBulkSendEvent = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>PaymentBulkSendEvent</code>.
|
|
38
|
+
* @alias module:model/PaymentBulkSendEvent
|
|
39
|
+
* @implements module:model/WebhookEventDataType
|
|
40
|
+
* @implements module:model/PaymentBulkSend
|
|
41
|
+
* @param data_type {module:model/PaymentBulkSendEvent.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.
|
|
42
|
+
* @param bulk_send_id {String} The bulk send ID.
|
|
43
|
+
* @param source_account {String} The source account from which the bulk send 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\"`.
|
|
44
|
+
* @param execution_mode {module:model/PaymentBulkSendExecutionMode}
|
|
45
|
+
* @param status {module:model/PaymentBulkSendStatus}
|
|
46
|
+
* @param created_timestamp {Number} The created time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
47
|
+
* @param updated_timestamp {Number} The updated time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
48
|
+
*/
|
|
49
|
+
function PaymentBulkSendEvent(data_type, bulk_send_id, source_account, execution_mode, status, created_timestamp, updated_timestamp) {
|
|
50
|
+
_classCallCheck(this, PaymentBulkSendEvent);
|
|
51
|
+
_WebhookEventDataType["default"].initialize(this, data_type);
|
|
52
|
+
_PaymentBulkSend["default"].initialize(this, bulk_send_id, source_account, execution_mode, status, created_timestamp, updated_timestamp);
|
|
53
|
+
PaymentBulkSendEvent.initialize(this, data_type, bulk_send_id, source_account, execution_mode, status, created_timestamp, updated_timestamp);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the fields of this object.
|
|
58
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
59
|
+
* Only for internal use.
|
|
60
|
+
*/
|
|
61
|
+
return _createClass(PaymentBulkSendEvent, null, [{
|
|
62
|
+
key: "initialize",
|
|
63
|
+
value: function initialize(obj, data_type, bulk_send_id, source_account, execution_mode, status, created_timestamp, updated_timestamp) {
|
|
64
|
+
obj['data_type'] = data_type;
|
|
65
|
+
obj['bulk_send_id'] = bulk_send_id;
|
|
66
|
+
obj['source_account'] = source_account;
|
|
67
|
+
obj['execution_mode'] = execution_mode;
|
|
68
|
+
obj['status'] = status;
|
|
69
|
+
obj['created_timestamp'] = created_timestamp;
|
|
70
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Constructs a <code>PaymentBulkSendEvent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
75
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @param {module:model/PaymentBulkSendEvent} obj Optional instance to populate.
|
|
78
|
+
* @return {module:model/PaymentBulkSendEvent} The populated <code>PaymentBulkSendEvent</code> instance.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "constructFromObject",
|
|
82
|
+
value: function constructFromObject(data, obj) {
|
|
83
|
+
if (data) {
|
|
84
|
+
obj = obj || new PaymentBulkSendEvent();
|
|
85
|
+
_WebhookEventDataType["default"].constructFromObject(data, obj);
|
|
86
|
+
_PaymentBulkSend["default"].constructFromObject(data, obj);
|
|
87
|
+
if (data.hasOwnProperty('data_type')) {
|
|
88
|
+
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('bulk_send_id')) {
|
|
91
|
+
obj['bulk_send_id'] = _ApiClient["default"].convertToType(data['bulk_send_id'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('source_account')) {
|
|
94
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('description')) {
|
|
97
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('execution_mode')) {
|
|
100
|
+
obj['execution_mode'] = _PaymentBulkSendExecutionMode["default"].constructFromObject(data['execution_mode']);
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('status')) {
|
|
103
|
+
obj['status'] = _PaymentBulkSendStatus["default"].constructFromObject(data['status']);
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
106
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
109
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return obj;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Validates the JSON data with respect to <code>PaymentBulkSendEvent</code>.
|
|
117
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
118
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentBulkSendEvent</code>.
|
|
119
|
+
*/
|
|
120
|
+
}, {
|
|
121
|
+
key: "validateJSON",
|
|
122
|
+
value: function validateJSON(data) {
|
|
123
|
+
// check to make sure all required properties are present in the JSON string
|
|
124
|
+
var _iterator = _createForOfIteratorHelper(PaymentBulkSendEvent.RequiredProperties),
|
|
125
|
+
_step;
|
|
126
|
+
try {
|
|
127
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
128
|
+
var property = _step.value;
|
|
129
|
+
if (!data.hasOwnProperty(property)) {
|
|
130
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
} catch (err) {
|
|
135
|
+
_iterator.e(err);
|
|
136
|
+
} finally {
|
|
137
|
+
_iterator.f();
|
|
138
|
+
}
|
|
139
|
+
if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
if (data['bulk_send_id'] && !(typeof data['bulk_send_id'] === 'string' || data['bulk_send_id'] instanceof String)) {
|
|
144
|
+
throw new Error("Expected the field `bulk_send_id` to be a primitive type in the JSON string but got " + data['bulk_send_id']);
|
|
145
|
+
}
|
|
146
|
+
// ensure the json data is a string
|
|
147
|
+
if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
148
|
+
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
149
|
+
}
|
|
150
|
+
// ensure the json data is a string
|
|
151
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
152
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
153
|
+
}
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
}]);
|
|
157
|
+
}();
|
|
158
|
+
PaymentBulkSendEvent.RequiredProperties = ["data_type", "bulk_send_id", "source_account", "execution_mode", "status", "created_timestamp", "updated_timestamp"];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 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.
|
|
162
|
+
* @member {module:model/PaymentBulkSendEvent.DataTypeEnum} data_type
|
|
163
|
+
*/
|
|
164
|
+
PaymentBulkSendEvent.prototype['data_type'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The bulk send ID.
|
|
168
|
+
* @member {String} bulk_send_id
|
|
169
|
+
*/
|
|
170
|
+
PaymentBulkSendEvent.prototype['bulk_send_id'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The source account from which the bulk send 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\"`.
|
|
174
|
+
* @member {String} source_account
|
|
175
|
+
*/
|
|
176
|
+
PaymentBulkSendEvent.prototype['source_account'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The description for the entire bulk send batch.
|
|
180
|
+
* @member {String} description
|
|
181
|
+
*/
|
|
182
|
+
PaymentBulkSendEvent.prototype['description'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @member {module:model/PaymentBulkSendExecutionMode} execution_mode
|
|
186
|
+
*/
|
|
187
|
+
PaymentBulkSendEvent.prototype['execution_mode'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @member {module:model/PaymentBulkSendStatus} status
|
|
191
|
+
*/
|
|
192
|
+
PaymentBulkSendEvent.prototype['status'] = undefined;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The created time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
196
|
+
* @member {Number} created_timestamp
|
|
197
|
+
*/
|
|
198
|
+
PaymentBulkSendEvent.prototype['created_timestamp'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The updated time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
202
|
+
* @member {Number} updated_timestamp
|
|
203
|
+
*/
|
|
204
|
+
PaymentBulkSendEvent.prototype['updated_timestamp'] = undefined;
|
|
205
|
+
|
|
206
|
+
// Implement WebhookEventDataType interface:
|
|
207
|
+
/**
|
|
208
|
+
* 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.
|
|
209
|
+
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
210
|
+
*/
|
|
211
|
+
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
212
|
+
// Implement PaymentBulkSend interface:
|
|
213
|
+
/**
|
|
214
|
+
* The bulk send ID.
|
|
215
|
+
* @member {String} bulk_send_id
|
|
216
|
+
*/
|
|
217
|
+
_PaymentBulkSend["default"].prototype['bulk_send_id'] = undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The source account from which the bulk send 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\"`.
|
|
220
|
+
* @member {String} source_account
|
|
221
|
+
*/
|
|
222
|
+
_PaymentBulkSend["default"].prototype['source_account'] = undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The description for the entire bulk send batch.
|
|
225
|
+
* @member {String} description
|
|
226
|
+
*/
|
|
227
|
+
_PaymentBulkSend["default"].prototype['description'] = undefined;
|
|
228
|
+
/**
|
|
229
|
+
* @member {module:model/PaymentBulkSendExecutionMode} execution_mode
|
|
230
|
+
*/
|
|
231
|
+
_PaymentBulkSend["default"].prototype['execution_mode'] = undefined;
|
|
232
|
+
/**
|
|
233
|
+
* @member {module:model/PaymentBulkSendStatus} status
|
|
234
|
+
*/
|
|
235
|
+
_PaymentBulkSend["default"].prototype['status'] = undefined;
|
|
236
|
+
/**
|
|
237
|
+
* The created time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
238
|
+
* @member {Number} created_timestamp
|
|
239
|
+
*/
|
|
240
|
+
_PaymentBulkSend["default"].prototype['created_timestamp'] = undefined;
|
|
241
|
+
/**
|
|
242
|
+
* The updated time of the bulk send, represented as a UNIX timestamp in seconds.
|
|
243
|
+
* @member {Number} updated_timestamp
|
|
244
|
+
*/
|
|
245
|
+
_PaymentBulkSend["default"].prototype['updated_timestamp'] = undefined;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Allowed values for the <code>data_type</code> property.
|
|
249
|
+
* @enum {String}
|
|
250
|
+
* @readonly
|
|
251
|
+
*/
|
|
252
|
+
PaymentBulkSendEvent['DataTypeEnum'] = {
|
|
253
|
+
/**
|
|
254
|
+
* value: "Transaction"
|
|
255
|
+
* @const
|
|
256
|
+
*/
|
|
257
|
+
"Transaction": "Transaction",
|
|
258
|
+
/**
|
|
259
|
+
* value: "TSSRequest"
|
|
260
|
+
* @const
|
|
261
|
+
*/
|
|
262
|
+
"TSSRequest": "TSSRequest",
|
|
263
|
+
/**
|
|
264
|
+
* value: "Addresses"
|
|
265
|
+
* @const
|
|
266
|
+
*/
|
|
267
|
+
"Addresses": "Addresses",
|
|
268
|
+
/**
|
|
269
|
+
* value: "WalletInfo"
|
|
270
|
+
* @const
|
|
271
|
+
*/
|
|
272
|
+
"WalletInfo": "WalletInfo",
|
|
273
|
+
/**
|
|
274
|
+
* value: "MPCVault"
|
|
275
|
+
* @const
|
|
276
|
+
*/
|
|
277
|
+
"MPCVault": "MPCVault",
|
|
278
|
+
/**
|
|
279
|
+
* value: "Chains"
|
|
280
|
+
* @const
|
|
281
|
+
*/
|
|
282
|
+
"Chains": "Chains",
|
|
283
|
+
/**
|
|
284
|
+
* value: "Tokens"
|
|
285
|
+
* @const
|
|
286
|
+
*/
|
|
287
|
+
"Tokens": "Tokens",
|
|
288
|
+
/**
|
|
289
|
+
* value: "TokenListing"
|
|
290
|
+
* @const
|
|
291
|
+
*/
|
|
292
|
+
"TokenListing": "TokenListing",
|
|
293
|
+
/**
|
|
294
|
+
* value: "PaymentOrder"
|
|
295
|
+
* @const
|
|
296
|
+
*/
|
|
297
|
+
"PaymentOrder": "PaymentOrder",
|
|
298
|
+
/**
|
|
299
|
+
* value: "PaymentRefund"
|
|
300
|
+
* @const
|
|
301
|
+
*/
|
|
302
|
+
"PaymentRefund": "PaymentRefund",
|
|
303
|
+
/**
|
|
304
|
+
* value: "PaymentSettlement"
|
|
305
|
+
* @const
|
|
306
|
+
*/
|
|
307
|
+
"PaymentSettlement": "PaymentSettlement",
|
|
308
|
+
/**
|
|
309
|
+
* value: "PaymentTransaction"
|
|
310
|
+
* @const
|
|
311
|
+
*/
|
|
312
|
+
"PaymentTransaction": "PaymentTransaction",
|
|
313
|
+
/**
|
|
314
|
+
* value: "PaymentAddressUpdate"
|
|
315
|
+
* @const
|
|
316
|
+
*/
|
|
317
|
+
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
318
|
+
/**
|
|
319
|
+
* value: "PaymentPayout"
|
|
320
|
+
* @const
|
|
321
|
+
*/
|
|
322
|
+
"PaymentPayout": "PaymentPayout",
|
|
323
|
+
/**
|
|
324
|
+
* value: "PaymentBulkSend"
|
|
325
|
+
* @const
|
|
326
|
+
*/
|
|
327
|
+
"PaymentBulkSend": "PaymentBulkSend",
|
|
328
|
+
/**
|
|
329
|
+
* value: "BalanceUpdateInfo"
|
|
330
|
+
* @const
|
|
331
|
+
*/
|
|
332
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
333
|
+
/**
|
|
334
|
+
* value: "SuspendedToken"
|
|
335
|
+
* @const
|
|
336
|
+
*/
|
|
337
|
+
"SuspendedToken": "SuspendedToken",
|
|
338
|
+
/**
|
|
339
|
+
* value: "ComplianceDisposition"
|
|
340
|
+
* @const
|
|
341
|
+
*/
|
|
342
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
343
|
+
/**
|
|
344
|
+
* value: "ComplianceKytScreenings"
|
|
345
|
+
* @const
|
|
346
|
+
*/
|
|
347
|
+
"ComplianceKytScreenings": "ComplianceKytScreenings",
|
|
348
|
+
/**
|
|
349
|
+
* value: "ComplianceKyaScreenings"
|
|
350
|
+
* @const
|
|
351
|
+
*/
|
|
352
|
+
"ComplianceKyaScreenings": "ComplianceKyaScreenings",
|
|
353
|
+
/**
|
|
354
|
+
* value: "unknown_default_open_api"
|
|
355
|
+
* @const
|
|
356
|
+
*/
|
|
357
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
358
|
+
};
|
|
359
|
+
var _default = exports["default"] = PaymentBulkSendEvent;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class PaymentBulkSendExecutionMode.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var PaymentBulkSendExecutionMode = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function PaymentBulkSendExecutionMode() {
|
|
32
|
+
_classCallCheck(this, PaymentBulkSendExecutionMode);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Strict"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Strict", "Strict");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Partial"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Partial", "Partial");
|
|
43
|
+
/**
|
|
44
|
+
* value: "unknown_default_open_api"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
48
|
+
}
|
|
49
|
+
return _createClass(PaymentBulkSendExecutionMode, null, [{
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value:
|
|
52
|
+
/**
|
|
53
|
+
* Returns a <code>PaymentBulkSendExecutionMode</code> enum value from a Javascript object name.
|
|
54
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
55
|
+
* @return {module:model/PaymentBulkSendExecutionMode} The enum <code>PaymentBulkSendExecutionMode</code> value.
|
|
56
|
+
*/
|
|
57
|
+
function constructFromObject(object) {
|
|
58
|
+
return object;
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
}();
|
|
@@ -0,0 +1,190 @@
|
|
|
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 _PaymentBulkSendItemStatus = _interopRequireDefault(require("./PaymentBulkSendItemStatus"));
|
|
9
|
+
var _PaymentBulkSendItemValidationStatus = _interopRequireDefault(require("./PaymentBulkSendItemValidationStatus"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; } } }; }
|
|
13
|
+
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; } }
|
|
14
|
+
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; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The PaymentBulkSendItem model module.
|
|
31
|
+
* @module model/PaymentBulkSendItem
|
|
32
|
+
*/
|
|
33
|
+
var PaymentBulkSendItem = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>PaymentBulkSendItem</code>.
|
|
36
|
+
* @alias module:model/PaymentBulkSendItem
|
|
37
|
+
* @param bulk_send_item_id {String} The payout item ID.
|
|
38
|
+
* @param token_id {String} The token ID of the payout item.
|
|
39
|
+
* @param receiving_address {String} The receiving address of the payout item.
|
|
40
|
+
* @param amount {String} The amount of the payout item.
|
|
41
|
+
* @param status {module:model/PaymentBulkSendItemStatus}
|
|
42
|
+
* @param validation_status {module:model/PaymentBulkSendItemValidationStatus}
|
|
43
|
+
*/
|
|
44
|
+
function PaymentBulkSendItem(bulk_send_item_id, token_id, receiving_address, amount, status, validation_status) {
|
|
45
|
+
_classCallCheck(this, PaymentBulkSendItem);
|
|
46
|
+
PaymentBulkSendItem.initialize(this, bulk_send_item_id, token_id, receiving_address, amount, status, validation_status);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(PaymentBulkSendItem, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, bulk_send_item_id, token_id, receiving_address, amount, status, validation_status) {
|
|
57
|
+
obj['bulk_send_item_id'] = bulk_send_item_id;
|
|
58
|
+
obj['token_id'] = token_id;
|
|
59
|
+
obj['receiving_address'] = receiving_address;
|
|
60
|
+
obj['amount'] = amount;
|
|
61
|
+
obj['status'] = status;
|
|
62
|
+
obj['validation_status'] = validation_status;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>PaymentBulkSendItem</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/PaymentBulkSendItem} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/PaymentBulkSendItem} The populated <code>PaymentBulkSendItem</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new PaymentBulkSendItem();
|
|
77
|
+
if (data.hasOwnProperty('bulk_send_item_id')) {
|
|
78
|
+
obj['bulk_send_item_id'] = _ApiClient["default"].convertToType(data['bulk_send_item_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('token_id')) {
|
|
81
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('receiving_address')) {
|
|
84
|
+
obj['receiving_address'] = _ApiClient["default"].convertToType(data['receiving_address'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('amount')) {
|
|
87
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('description')) {
|
|
90
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('status')) {
|
|
93
|
+
obj['status'] = _PaymentBulkSendItemStatus["default"].constructFromObject(data['status']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('validation_status')) {
|
|
96
|
+
obj['validation_status'] = _PaymentBulkSendItemValidationStatus["default"].constructFromObject(data['validation_status']);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return obj;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Validates the JSON data with respect to <code>PaymentBulkSendItem</code>.
|
|
104
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
105
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentBulkSendItem</code>.
|
|
106
|
+
*/
|
|
107
|
+
}, {
|
|
108
|
+
key: "validateJSON",
|
|
109
|
+
value: function validateJSON(data) {
|
|
110
|
+
// check to make sure all required properties are present in the JSON string
|
|
111
|
+
var _iterator = _createForOfIteratorHelper(PaymentBulkSendItem.RequiredProperties),
|
|
112
|
+
_step;
|
|
113
|
+
try {
|
|
114
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
115
|
+
var property = _step.value;
|
|
116
|
+
if (!data.hasOwnProperty(property)) {
|
|
117
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
} catch (err) {
|
|
122
|
+
_iterator.e(err);
|
|
123
|
+
} finally {
|
|
124
|
+
_iterator.f();
|
|
125
|
+
}
|
|
126
|
+
if (data['bulk_send_item_id'] && !(typeof data['bulk_send_item_id'] === 'string' || data['bulk_send_item_id'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `bulk_send_item_id` to be a primitive type in the JSON string but got " + data['bulk_send_item_id']);
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['receiving_address'] && !(typeof data['receiving_address'] === 'string' || data['receiving_address'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `receiving_address` to be a primitive type in the JSON string but got " + data['receiving_address']);
|
|
136
|
+
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
144
|
+
}
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}]);
|
|
148
|
+
}();
|
|
149
|
+
PaymentBulkSendItem.RequiredProperties = ["bulk_send_item_id", "token_id", "receiving_address", "amount", "status", "validation_status"];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The payout item ID.
|
|
153
|
+
* @member {String} bulk_send_item_id
|
|
154
|
+
*/
|
|
155
|
+
PaymentBulkSendItem.prototype['bulk_send_item_id'] = undefined;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The token ID of the payout item.
|
|
159
|
+
* @member {String} token_id
|
|
160
|
+
*/
|
|
161
|
+
PaymentBulkSendItem.prototype['token_id'] = undefined;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The receiving address of the payout item.
|
|
165
|
+
* @member {String} receiving_address
|
|
166
|
+
*/
|
|
167
|
+
PaymentBulkSendItem.prototype['receiving_address'] = undefined;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The amount of the payout item.
|
|
171
|
+
* @member {String} amount
|
|
172
|
+
*/
|
|
173
|
+
PaymentBulkSendItem.prototype['amount'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The note of the payout item.
|
|
177
|
+
* @member {String} description
|
|
178
|
+
*/
|
|
179
|
+
PaymentBulkSendItem.prototype['description'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @member {module:model/PaymentBulkSendItemStatus} status
|
|
183
|
+
*/
|
|
184
|
+
PaymentBulkSendItem.prototype['status'] = undefined;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @member {module:model/PaymentBulkSendItemValidationStatus} validation_status
|
|
188
|
+
*/
|
|
189
|
+
PaymentBulkSendItem.prototype['validation_status'] = undefined;
|
|
190
|
+
var _default = exports["default"] = PaymentBulkSendItem;
|