@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
|
@@ -0,0 +1,129 @@
|
|
|
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 _KyaScreeningRequest = _interopRequireDefault(require("./KyaScreeningRequest"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
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); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The CreateKyaScreeningsBody model module.
|
|
30
|
+
* @module model/CreateKyaScreeningsBody
|
|
31
|
+
*/
|
|
32
|
+
var CreateKyaScreeningsBody = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreateKyaScreeningsBody</code>.
|
|
35
|
+
* Information about address screening requests.
|
|
36
|
+
* @alias module:model/CreateKyaScreeningsBody
|
|
37
|
+
* @param screenings {Array.<module:model/KyaScreeningRequest>} List of address screening requests. Maximum 50 addresses per call.
|
|
38
|
+
*/
|
|
39
|
+
function CreateKyaScreeningsBody(screenings) {
|
|
40
|
+
_classCallCheck(this, CreateKyaScreeningsBody);
|
|
41
|
+
CreateKyaScreeningsBody.initialize(this, screenings);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(CreateKyaScreeningsBody, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, screenings) {
|
|
52
|
+
obj['screenings'] = screenings;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>CreateKyaScreeningsBody</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/CreateKyaScreeningsBody} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/CreateKyaScreeningsBody} The populated <code>CreateKyaScreeningsBody</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new CreateKyaScreeningsBody();
|
|
67
|
+
if (data.hasOwnProperty('screenings')) {
|
|
68
|
+
obj['screenings'] = _ApiClient["default"].convertToType(data['screenings'], [_KyaScreeningRequest["default"]]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>CreateKyaScreeningsBody</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateKyaScreeningsBody</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
// check to make sure all required properties are present in the JSON string
|
|
83
|
+
var _iterator = _createForOfIteratorHelper(CreateKyaScreeningsBody.RequiredProperties),
|
|
84
|
+
_step;
|
|
85
|
+
try {
|
|
86
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
87
|
+
var property = _step.value;
|
|
88
|
+
if (!data.hasOwnProperty(property)) {
|
|
89
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
if (data['screenings']) {
|
|
98
|
+
// data not null
|
|
99
|
+
// ensure the json data is an array
|
|
100
|
+
if (!Array.isArray(data['screenings'])) {
|
|
101
|
+
throw new Error("Expected the field `screenings` to be an array in the JSON data but got " + data['screenings']);
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `screenings` (array)
|
|
104
|
+
var _iterator2 = _createForOfIteratorHelper(data['screenings']),
|
|
105
|
+
_step2;
|
|
106
|
+
try {
|
|
107
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
108
|
+
var item = _step2.value;
|
|
109
|
+
_KyaScreeningRequest["default"].validateJSON(item);
|
|
110
|
+
}
|
|
111
|
+
} catch (err) {
|
|
112
|
+
_iterator2.e(err);
|
|
113
|
+
} finally {
|
|
114
|
+
_iterator2.f();
|
|
115
|
+
}
|
|
116
|
+
;
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}]);
|
|
121
|
+
}();
|
|
122
|
+
CreateKyaScreeningsBody.RequiredProperties = ["screenings"];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* List of address screening requests. Maximum 50 addresses per call.
|
|
126
|
+
* @member {Array.<module:model/KyaScreeningRequest>} screenings
|
|
127
|
+
*/
|
|
128
|
+
CreateKyaScreeningsBody.prototype['screenings'] = undefined;
|
|
129
|
+
var _default = exports["default"] = CreateKyaScreeningsBody;
|
|
@@ -133,7 +133,7 @@ CreateMerchantRequest.prototype['name'] = undefined;
|
|
|
133
133
|
CreateMerchantRequest.prototype['wallet_id'] = undefined;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [
|
|
136
|
+
* The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
137
137
|
* @member {String} developer_fee_rate
|
|
138
138
|
*/
|
|
139
139
|
CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
|
|
@@ -34,11 +34,12 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
34
34
|
* @alias module:model/CreatePaymentOrderRequest
|
|
35
35
|
* @param merchant_id {String} The merchant ID.
|
|
36
36
|
* @param psp_order_code {String} A unique reference code assigned by the developer to identify this order in their system.
|
|
37
|
-
* @param fee_amount {String} The developer fee for the order
|
|
37
|
+
* @param fee_amount {String} The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.
|
|
38
|
+
* @param payable_currency {String} The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
38
39
|
*/
|
|
39
|
-
function CreatePaymentOrderRequest(merchant_id, psp_order_code, fee_amount) {
|
|
40
|
+
function CreatePaymentOrderRequest(merchant_id, psp_order_code, fee_amount, payable_currency) {
|
|
40
41
|
_classCallCheck(this, CreatePaymentOrderRequest);
|
|
41
|
-
CreatePaymentOrderRequest.initialize(this, merchant_id, psp_order_code, fee_amount);
|
|
42
|
+
CreatePaymentOrderRequest.initialize(this, merchant_id, psp_order_code, fee_amount, payable_currency);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|
|
@@ -48,10 +49,11 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
48
49
|
*/
|
|
49
50
|
return _createClass(CreatePaymentOrderRequest, null, [{
|
|
50
51
|
key: "initialize",
|
|
51
|
-
value: function initialize(obj, merchant_id, psp_order_code, fee_amount) {
|
|
52
|
+
value: function initialize(obj, merchant_id, psp_order_code, fee_amount, payable_currency) {
|
|
52
53
|
obj['merchant_id'] = merchant_id;
|
|
53
54
|
obj['psp_order_code'] = psp_order_code;
|
|
54
55
|
obj['fee_amount'] = fee_amount;
|
|
56
|
+
obj['payable_currency'] = payable_currency;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
/**
|
|
@@ -194,7 +196,7 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
194
196
|
}
|
|
195
197
|
}]);
|
|
196
198
|
}();
|
|
197
|
-
CreatePaymentOrderRequest.RequiredProperties = ["merchant_id", "psp_order_code", "fee_amount"];
|
|
199
|
+
CreatePaymentOrderRequest.RequiredProperties = ["merchant_id", "psp_order_code", "fee_amount", "payable_currency"];
|
|
198
200
|
|
|
199
201
|
/**
|
|
200
202
|
* The merchant ID.
|
|
@@ -215,19 +217,19 @@ CreatePaymentOrderRequest.prototype['merchant_order_code'] = undefined;
|
|
|
215
217
|
CreatePaymentOrderRequest.prototype['psp_order_code'] = undefined;
|
|
216
218
|
|
|
217
219
|
/**
|
|
218
|
-
* The
|
|
220
|
+
* The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com/developers/v2/guides/overview/supported-chains-and-tokens).
|
|
219
221
|
* @member {String} pricing_currency
|
|
220
222
|
*/
|
|
221
223
|
CreatePaymentOrderRequest.prototype['pricing_currency'] = undefined;
|
|
222
224
|
|
|
223
225
|
/**
|
|
224
|
-
* The base amount of the order
|
|
226
|
+
* The base amount of the order, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
|
|
225
227
|
* @member {String} pricing_amount
|
|
226
228
|
*/
|
|
227
229
|
CreatePaymentOrderRequest.prototype['pricing_amount'] = undefined;
|
|
228
230
|
|
|
229
231
|
/**
|
|
230
|
-
* The developer fee for the order
|
|
232
|
+
* The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.
|
|
231
233
|
* @member {String} fee_amount
|
|
232
234
|
*/
|
|
233
235
|
CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
|
|
@@ -239,7 +241,7 @@ CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
|
|
|
239
241
|
CreatePaymentOrderRequest.prototype['payable_currency'] = undefined;
|
|
240
242
|
|
|
241
243
|
/**
|
|
242
|
-
* The
|
|
244
|
+
* The total amount the payer needs to pay, denominated in the specified `payable_currency`. If this field is left blank, the system will automatically calculate the amount at order creation using the following formula: (`pricing_amount` + `fee_amount`) / current exchange rate. Values must be greater than 0 and contain two decimal places.
|
|
243
245
|
* @member {String} payable_amount
|
|
244
246
|
*/
|
|
245
247
|
CreatePaymentOrderRequest.prototype['payable_amount'] = undefined;
|
|
@@ -251,38 +253,38 @@ CreatePaymentOrderRequest.prototype['payable_amount'] = undefined;
|
|
|
251
253
|
CreatePaymentOrderRequest.prototype['expired_in'] = undefined;
|
|
252
254
|
|
|
253
255
|
/**
|
|
254
|
-
*
|
|
256
|
+
* The allowed amount deviation, with precision up to 1 decimal place. For example, if `payable_amount` is `100.00` and `amount_tolerance` is `0.50`: - Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5) - Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5)
|
|
255
257
|
* @member {String} amount_tolerance
|
|
256
258
|
*/
|
|
257
259
|
CreatePaymentOrderRequest.prototype['amount_tolerance'] = undefined;
|
|
258
260
|
|
|
259
261
|
/**
|
|
260
|
-
*
|
|
262
|
+
* This field has been deprecated. Please use `pricing_currency` instead.
|
|
261
263
|
* @member {String} currency
|
|
262
264
|
* @default ''
|
|
263
265
|
*/
|
|
264
266
|
CreatePaymentOrderRequest.prototype['currency'] = '';
|
|
265
267
|
|
|
266
268
|
/**
|
|
267
|
-
*
|
|
269
|
+
* This field has been deprecated. Please use `pricing_amount` instead.
|
|
268
270
|
* @member {String} order_amount
|
|
269
271
|
*/
|
|
270
272
|
CreatePaymentOrderRequest.prototype['order_amount'] = undefined;
|
|
271
273
|
|
|
272
274
|
/**
|
|
273
|
-
*
|
|
275
|
+
* This field has been deprecated. Please use `payable_currency` instead.
|
|
274
276
|
* @member {String} token_id
|
|
275
277
|
*/
|
|
276
278
|
CreatePaymentOrderRequest.prototype['token_id'] = undefined;
|
|
277
279
|
|
|
278
280
|
/**
|
|
279
|
-
*
|
|
281
|
+
* This field has been deprecated.
|
|
280
282
|
* @member {Boolean} use_dedicated_address
|
|
281
283
|
*/
|
|
282
284
|
CreatePaymentOrderRequest.prototype['use_dedicated_address'] = undefined;
|
|
283
285
|
|
|
284
286
|
/**
|
|
285
|
-
*
|
|
287
|
+
* This field has been deprecated.
|
|
286
288
|
* @member {String} custom_exchange_rate
|
|
287
289
|
*/
|
|
288
290
|
CreatePaymentOrderRequest.prototype['custom_exchange_rate'] = undefined;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _PaymentPayoutParam = _interopRequireDefault(require("./PaymentPayoutParam"));
|
|
9
|
+
var _PaymentPayoutRecipientInfo = _interopRequireDefault(require("./PaymentPayoutRecipientInfo"));
|
|
9
10
|
var _PayoutChannel = _interopRequireDefault(require("./PayoutChannel"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
12
|
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); }
|
|
@@ -34,13 +35,15 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
34
35
|
/**
|
|
35
36
|
* Constructs a new <code>CreatePayoutRequest</code>.
|
|
36
37
|
* @alias module:model/CreatePayoutRequest
|
|
37
|
-
* @param request_id {String} The request ID that is used to track a
|
|
38
|
+
* @param request_id {String} The request ID that is used to track a payout request. The request ID is provided by you and must be unique.
|
|
39
|
+
* @param source_account {String} 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\"`.
|
|
38
40
|
* @param payout_channel {module:model/PayoutChannel}
|
|
39
41
|
* @param payout_params {Array.<module:model/PaymentPayoutParam>}
|
|
42
|
+
* @param recipient_info {module:model/PaymentPayoutRecipientInfo}
|
|
40
43
|
*/
|
|
41
|
-
function CreatePayoutRequest(request_id, payout_channel, payout_params) {
|
|
44
|
+
function CreatePayoutRequest(request_id, source_account, payout_channel, payout_params, recipient_info) {
|
|
42
45
|
_classCallCheck(this, CreatePayoutRequest);
|
|
43
|
-
CreatePayoutRequest.initialize(this, request_id, payout_channel, payout_params);
|
|
46
|
+
CreatePayoutRequest.initialize(this, request_id, source_account, payout_channel, payout_params, recipient_info);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
@@ -50,10 +53,12 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
50
53
|
*/
|
|
51
54
|
return _createClass(CreatePayoutRequest, null, [{
|
|
52
55
|
key: "initialize",
|
|
53
|
-
value: function initialize(obj, request_id, payout_channel, payout_params) {
|
|
56
|
+
value: function initialize(obj, request_id, source_account, payout_channel, payout_params, recipient_info) {
|
|
54
57
|
obj['request_id'] = request_id;
|
|
58
|
+
obj['source_account'] = source_account;
|
|
55
59
|
obj['payout_channel'] = payout_channel;
|
|
56
60
|
obj['payout_params'] = payout_params;
|
|
61
|
+
obj['recipient_info'] = recipient_info;
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
/**
|
|
@@ -71,17 +76,17 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
71
76
|
if (data.hasOwnProperty('request_id')) {
|
|
72
77
|
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
73
78
|
}
|
|
79
|
+
if (data.hasOwnProperty('source_account')) {
|
|
80
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
81
|
+
}
|
|
74
82
|
if (data.hasOwnProperty('payout_channel')) {
|
|
75
83
|
obj['payout_channel'] = _PayoutChannel["default"].constructFromObject(data['payout_channel']);
|
|
76
84
|
}
|
|
77
85
|
if (data.hasOwnProperty('payout_params')) {
|
|
78
86
|
obj['payout_params'] = _ApiClient["default"].convertToType(data['payout_params'], [_PaymentPayoutParam["default"]]);
|
|
79
87
|
}
|
|
80
|
-
if (data.hasOwnProperty('
|
|
81
|
-
obj['
|
|
82
|
-
}
|
|
83
|
-
if (data.hasOwnProperty('currency')) {
|
|
84
|
-
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
88
|
+
if (data.hasOwnProperty('recipient_info')) {
|
|
89
|
+
obj['recipient_info'] = _PaymentPayoutRecipientInfo["default"].constructFromObject(data['recipient_info']);
|
|
85
90
|
}
|
|
86
91
|
if (data.hasOwnProperty('remark')) {
|
|
87
92
|
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
@@ -117,6 +122,10 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
117
122
|
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
118
123
|
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
119
124
|
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
128
|
+
}
|
|
120
129
|
if (data['payout_params']) {
|
|
121
130
|
// data not null
|
|
122
131
|
// ensure the json data is an array
|
|
@@ -138,13 +147,12 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
138
147
|
}
|
|
139
148
|
;
|
|
140
149
|
}
|
|
141
|
-
//
|
|
142
|
-
if (data['
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
150
|
+
// validate the optional field `recipient_info`
|
|
151
|
+
if (data['recipient_info']) {
|
|
152
|
+
// data not null
|
|
153
|
+
if (!!_PaymentPayoutRecipientInfo["default"].validateJSON) {
|
|
154
|
+
_PaymentPayoutRecipientInfo["default"].validateJSON(data['recipient_info']);
|
|
155
|
+
}
|
|
148
156
|
}
|
|
149
157
|
// ensure the json data is a string
|
|
150
158
|
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
@@ -154,14 +162,20 @@ var CreatePayoutRequest = /*#__PURE__*/function () {
|
|
|
154
162
|
}
|
|
155
163
|
}]);
|
|
156
164
|
}();
|
|
157
|
-
CreatePayoutRequest.RequiredProperties = ["request_id", "payout_channel", "payout_params"];
|
|
165
|
+
CreatePayoutRequest.RequiredProperties = ["request_id", "source_account", "payout_channel", "payout_params", "recipient_info"];
|
|
158
166
|
|
|
159
167
|
/**
|
|
160
|
-
* The request ID that is used to track a
|
|
168
|
+
* The request ID that is used to track a payout request. The request ID is provided by you and must be unique.
|
|
161
169
|
* @member {String} request_id
|
|
162
170
|
*/
|
|
163
171
|
CreatePayoutRequest.prototype['request_id'] = undefined;
|
|
164
172
|
|
|
173
|
+
/**
|
|
174
|
+
* 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\"`.
|
|
175
|
+
* @member {String} source_account
|
|
176
|
+
*/
|
|
177
|
+
CreatePayoutRequest.prototype['source_account'] = undefined;
|
|
178
|
+
|
|
165
179
|
/**
|
|
166
180
|
* @member {module:model/PayoutChannel} payout_channel
|
|
167
181
|
*/
|
|
@@ -173,19 +187,12 @@ CreatePayoutRequest.prototype['payout_channel'] = undefined;
|
|
|
173
187
|
CreatePayoutRequest.prototype['payout_params'] = undefined;
|
|
174
188
|
|
|
175
189
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @member {String} bank_account_id
|
|
178
|
-
*/
|
|
179
|
-
CreatePayoutRequest.prototype['bank_account_id'] = undefined;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The fiat currency for the create payouts.
|
|
183
|
-
* @member {String} currency
|
|
190
|
+
* @member {module:model/PaymentPayoutRecipientInfo} recipient_info
|
|
184
191
|
*/
|
|
185
|
-
CreatePayoutRequest.prototype['
|
|
192
|
+
CreatePayoutRequest.prototype['recipient_info'] = undefined;
|
|
186
193
|
|
|
187
194
|
/**
|
|
188
|
-
*
|
|
195
|
+
* An optional note or comment about the payout for your internal reference.
|
|
189
196
|
* @member {String} remark
|
|
190
197
|
*/
|
|
191
198
|
CreatePayoutRequest.prototype['remark'] = undefined;
|
|
@@ -206,13 +206,13 @@ CreateRefundRequest.prototype['refund_type'] = undefined;
|
|
|
206
206
|
CreateRefundRequest.prototype['order_id'] = undefined;
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* Whether to charge developer fee to the merchant. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [
|
|
209
|
+
* Whether to charge developer fee to the merchant. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). - `true`: The fee amount (specified in `merchant_fee_amount`) will be deducted from the merchant's balance and added to the developer's balance - `false`: The merchant is not charged any developer fee When enabled, ensure both `merchant_fee_amount` and `merchant_fee_token_id` are properly specified.
|
|
210
210
|
* @member {Boolean} charge_merchant_fee
|
|
211
211
|
*/
|
|
212
212
|
CreateRefundRequest.prototype['charge_merchant_fee'] = undefined;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [
|
|
215
|
+
* The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. This field is only valid when `refund_type` is `Merchant`. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). This field is required when `charge_merchant_fee` is `true`. Must be: - A positive integer with up to two decimal places. - Less than the refund amount
|
|
216
216
|
* @member {String} merchant_fee_amount
|
|
217
217
|
*/
|
|
218
218
|
CreateRefundRequest.prototype['merchant_fee_amount'] = undefined;
|
|
@@ -0,0 +1,156 @@
|
|
|
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 _ReportExportFormat = _interopRequireDefault(require("./ReportExportFormat"));
|
|
9
|
+
var _ReportType = _interopRequireDefault(require("./ReportType"));
|
|
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 CreateReportRequest model module.
|
|
31
|
+
* @module model/CreateReportRequest
|
|
32
|
+
*/
|
|
33
|
+
var CreateReportRequest = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>CreateReportRequest</code>.
|
|
36
|
+
* @alias module:model/CreateReportRequest
|
|
37
|
+
* @param start_time {Number} The start time of the report. Unix timestamp measured in seconds.
|
|
38
|
+
* @param end_time {Number} The end time of the report. Unix timestamp measured in seconds.
|
|
39
|
+
* @param report_export_format {module:model/ReportExportFormat}
|
|
40
|
+
* @param report_types {Array.<module:model/ReportType>}
|
|
41
|
+
*/
|
|
42
|
+
function CreateReportRequest(start_time, end_time, report_export_format, report_types) {
|
|
43
|
+
_classCallCheck(this, CreateReportRequest);
|
|
44
|
+
CreateReportRequest.initialize(this, start_time, end_time, report_export_format, report_types);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(CreateReportRequest, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, start_time, end_time, report_export_format, report_types) {
|
|
55
|
+
obj['start_time'] = start_time;
|
|
56
|
+
obj['end_time'] = end_time;
|
|
57
|
+
obj['report_export_format'] = report_export_format;
|
|
58
|
+
obj['report_types'] = report_types;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>CreateReportRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/CreateReportRequest} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/CreateReportRequest} The populated <code>CreateReportRequest</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new CreateReportRequest();
|
|
73
|
+
if (data.hasOwnProperty('start_time')) {
|
|
74
|
+
obj['start_time'] = _ApiClient["default"].convertToType(data['start_time'], 'Number');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('end_time')) {
|
|
77
|
+
obj['end_time'] = _ApiClient["default"].convertToType(data['end_time'], 'Number');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('report_export_format')) {
|
|
80
|
+
obj['report_export_format'] = _ReportExportFormat["default"].constructFromObject(data['report_export_format']);
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('report_types')) {
|
|
83
|
+
obj['report_types'] = _ApiClient["default"].convertToType(data['report_types'], [_ReportType["default"]]);
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('token_ids')) {
|
|
86
|
+
obj['token_ids'] = _ApiClient["default"].convertToType(data['token_ids'], ['String']);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Validates the JSON data with respect to <code>CreateReportRequest</code>.
|
|
94
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
95
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateReportRequest</code>.
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "validateJSON",
|
|
99
|
+
value: function validateJSON(data) {
|
|
100
|
+
// check to make sure all required properties are present in the JSON string
|
|
101
|
+
var _iterator = _createForOfIteratorHelper(CreateReportRequest.RequiredProperties),
|
|
102
|
+
_step;
|
|
103
|
+
try {
|
|
104
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
105
|
+
var property = _step.value;
|
|
106
|
+
if (!data.hasOwnProperty(property)) {
|
|
107
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is an array
|
|
111
|
+
} catch (err) {
|
|
112
|
+
_iterator.e(err);
|
|
113
|
+
} finally {
|
|
114
|
+
_iterator.f();
|
|
115
|
+
}
|
|
116
|
+
if (!Array.isArray(data['report_types'])) {
|
|
117
|
+
throw new Error("Expected the field `report_types` to be an array in the JSON data but got " + data['report_types']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is an array
|
|
120
|
+
if (!Array.isArray(data['token_ids'])) {
|
|
121
|
+
throw new Error("Expected the field `token_ids` to be an array in the JSON data but got " + data['token_ids']);
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}]);
|
|
126
|
+
}();
|
|
127
|
+
CreateReportRequest.RequiredProperties = ["start_time", "end_time", "report_export_format", "report_types"];
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The start time of the report. Unix timestamp measured in seconds.
|
|
131
|
+
* @member {Number} start_time
|
|
132
|
+
*/
|
|
133
|
+
CreateReportRequest.prototype['start_time'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The end time of the report. Unix timestamp measured in seconds.
|
|
137
|
+
* @member {Number} end_time
|
|
138
|
+
*/
|
|
139
|
+
CreateReportRequest.prototype['end_time'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/ReportExportFormat} report_export_format
|
|
143
|
+
*/
|
|
144
|
+
CreateReportRequest.prototype['report_export_format'] = undefined;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @member {Array.<module:model/ReportType>} report_types
|
|
148
|
+
*/
|
|
149
|
+
CreateReportRequest.prototype['report_types'] = undefined;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Optional filter to include only items related to specified token IDs in the report.
|
|
153
|
+
* @member {Array.<String>} token_ids
|
|
154
|
+
*/
|
|
155
|
+
CreateReportRequest.prototype['token_ids'] = undefined;
|
|
156
|
+
var _default = exports["default"] = CreateReportRequest;
|