@flexprice/sdk 1.0.13 → 1.0.15
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/LICENSE +663 -0
- package/dist/ApiClient.js +455 -505
- package/dist/api/AuthApi.js +56 -72
- package/dist/api/CustomersApi.js +273 -301
- package/dist/api/EntitlementsApi.js +200 -224
- package/dist/api/EnvironmentsApi.js +129 -149
- package/dist/api/EventsApi.js +151 -173
- package/dist/api/FeaturesApi.js +167 -189
- package/dist/api/IntegrationsApi.js +121 -141
- package/dist/api/InvoicesApi.js +352 -377
- package/dist/api/PaymentsApi.js +202 -226
- package/dist/api/PlansApi.js +165 -187
- package/dist/api/PricesApi.js +166 -188
- package/dist/api/SecretsApi.js +88 -106
- package/dist/api/SubscriptionsApi.js +277 -307
- package/dist/api/TasksApi.js +168 -190
- package/dist/api/TenantsApi.js +114 -134
- package/dist/api/UsersApi.js +22 -36
- package/dist/api/WalletsApi.js +330 -322
- package/dist/index.js +1029 -1167
- package/dist/model/DtoAddress.js +67 -84
- package/dist/model/DtoAggregatedEntitlement.js +48 -65
- package/dist/model/DtoAggregatedFeature.js +60 -89
- package/dist/model/DtoAuthResponse.js +49 -66
- package/dist/model/DtoBillingPeriodInfo.js +49 -66
- package/dist/model/DtoBulkIngestEventRequest.js +49 -88
- package/dist/model/DtoCreateAPIKeyRequest.js +59 -89
- package/dist/model/DtoCreateAPIKeyResponse.js +44 -61
- package/dist/model/DtoCreateCustomerRequest.js +95 -125
- package/dist/model/DtoCreateEntitlementRequest.js +72 -102
- package/dist/model/DtoCreateEnvironmentRequest.js +49 -79
- package/dist/model/DtoCreateFeatureRequest.js +96 -112
- package/dist/model/DtoCreateIntegrationRequest.js +52 -82
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +102 -132
- package/dist/model/DtoCreateInvoiceRequest.js +152 -179
- package/dist/model/DtoCreateMeterRequest.js +78 -117
- package/dist/model/DtoCreatePaymentRequest.js +84 -114
- package/dist/model/DtoCreatePlanEntitlementRequest.js +72 -102
- package/dist/model/DtoCreatePlanPriceRequest.js +141 -180
- package/dist/model/DtoCreatePlanRequest.js +83 -131
- package/dist/model/DtoCreatePriceRequest.js +141 -180
- package/dist/model/DtoCreatePriceTier.js +51 -81
- package/dist/model/DtoCreateSubscriptionRequest.js +115 -136
- package/dist/model/DtoCreateTaskRequest.js +68 -98
- package/dist/model/DtoCreateTenantRequest.js +50 -80
- package/dist/model/DtoCreateWalletRequest.js +110 -121
- package/dist/model/DtoCustomerEntitlementsResponse.js +49 -78
- package/dist/model/DtoCustomerInvoiceSummary.js +66 -83
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +56 -85
- package/dist/model/DtoCustomerResponse.js +135 -152
- package/dist/model/DtoCustomerUsageSummaryResponse.js +67 -96
- package/dist/model/DtoEntitlementResponse.js +127 -144
- package/dist/model/DtoEntitlementSource.js +69 -86
- package/dist/model/DtoEnvironmentResponse.js +61 -78
- package/dist/model/DtoEvent.js +83 -88
- package/dist/model/DtoFeatureResponse.js +129 -146
- package/dist/model/DtoFeatureUsageSummary.js +66 -95
- package/dist/model/DtoGetEventsRequest.js +106 -108
- package/dist/model/DtoGetEventsResponse.js +65 -94
- package/dist/model/DtoGetPreviewInvoiceRequest.js +55 -85
- package/dist/model/DtoGetUsageByMeterRequest.js +75 -105
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +57 -87
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +72 -101
- package/dist/model/DtoGetUsageRequest.js +86 -116
- package/dist/model/DtoGetUsageResponse.js +56 -85
- package/dist/model/DtoIngestEventRequest.js +78 -108
- package/dist/model/DtoInvoiceLineItemResponse.js +161 -178
- package/dist/model/DtoInvoiceResponse.js +250 -279
- package/dist/model/DtoLinkedIntegrationsResponse.js +35 -52
- package/dist/model/DtoListCustomersResponse.js +51 -80
- package/dist/model/DtoListEntitlementsResponse.js +51 -80
- package/dist/model/DtoListEnvironmentsResponse.js +52 -81
- package/dist/model/DtoListFeaturesResponse.js +51 -80
- package/dist/model/DtoListInvoicesResponse.js +51 -80
- package/dist/model/DtoListPaymentsResponse.js +51 -80
- package/dist/model/DtoListPlansResponse.js +51 -80
- package/dist/model/DtoListPricesResponse.js +51 -80
- package/dist/model/DtoListSecretsResponse.js +51 -80
- package/dist/model/DtoListSubscriptionPausesResponse.js +46 -75
- package/dist/model/DtoListSubscriptionsResponse.js +51 -80
- package/dist/model/DtoListTasksResponse.js +51 -80
- package/dist/model/DtoListWalletTransactionsResponse.js +51 -80
- package/dist/model/DtoLoginRequest.js +56 -86
- package/dist/model/DtoMeterResponse.js +99 -128
- package/dist/model/DtoPauseSubscriptionRequest.js +69 -99
- package/dist/model/DtoPaymentAttemptResponse.js +86 -103
- package/dist/model/DtoPaymentResponse.js +164 -181
- package/dist/model/DtoPlanResponse.js +124 -162
- package/dist/model/DtoPriceResponse.js +182 -221
- package/dist/model/DtoResumeSubscriptionRequest.js +46 -76
- package/dist/model/DtoSecretResponse.js +91 -108
- package/dist/model/DtoSignUpRequest.js +61 -91
- package/dist/model/DtoSubscriptionPauseResponse.js +135 -152
- package/dist/model/DtoSubscriptionResponse.js +270 -299
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +73 -90
- package/dist/model/DtoTaskResponse.js +141 -158
- package/dist/model/DtoTenantBillingDetails.js +57 -74
- package/dist/model/DtoTenantBillingUsage.js +51 -80
- package/dist/model/DtoTenantResponse.js +69 -86
- package/dist/model/DtoTopUpWalletRequest.js +89 -126
- package/dist/model/DtoUpdateCustomerRequest.js +89 -106
- package/dist/model/DtoUpdateEntitlementRequest.js +48 -65
- package/dist/model/DtoUpdateEnvironmentRequest.js +42 -59
- package/dist/model/DtoUpdateFeatureRequest.js +80 -76
- package/dist/model/DtoUpdatePaymentRequest.js +40 -57
- package/dist/model/DtoUpdatePaymentStatusRequest.js +41 -71
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +78 -108
- package/dist/model/DtoUpdatePlanPriceRequest.js +147 -186
- package/dist/model/DtoUpdatePlanRequest.js +77 -115
- package/dist/model/DtoUpdatePriceRequest.js +47 -64
- package/dist/model/DtoUpdateTaskStatusRequest.js +38 -68
- package/dist/model/DtoUpdateTenantRequest.js +49 -54
- package/dist/model/DtoUpdateWalletRequest.js +65 -82
- package/dist/model/DtoUsageResult.js +38 -55
- package/dist/model/DtoUserResponse.js +51 -68
- package/dist/model/DtoWalletBalanceResponse.js +159 -176
- package/dist/model/DtoWalletResponse.js +120 -137
- package/dist/model/DtoWalletTransactionResponse.js +111 -128
- package/dist/model/ErrorsErrorDetail.js +47 -64
- package/dist/model/ErrorsErrorResponse.js +40 -57
- package/dist/model/MeterAggregation.js +39 -56
- package/dist/model/MeterFilter.js +42 -59
- package/dist/model/PriceJSONBTransformQuantity.js +38 -55
- package/dist/model/PricePrice.js +173 -212
- package/dist/model/PricePriceTier.js +38 -55
- package/dist/model/PriceTransformQuantity.js +38 -55
- package/dist/model/SubscriptionSubscriptionLineItem.js +165 -182
- package/dist/model/SubscriptionSubscriptionPause.js +135 -152
- package/dist/model/TypesAggregationType.js +36 -51
- package/dist/model/TypesAutoTopupTrigger.js +24 -41
- package/dist/model/TypesBillingCadence.js +24 -41
- package/dist/model/TypesBillingCycle.js +41 -0
- package/dist/model/TypesBillingModel.js +30 -46
- package/dist/model/TypesBillingPeriod.js +48 -61
- package/dist/model/TypesBillingTier.js +24 -41
- package/dist/model/TypesEntityType.js +30 -46
- package/dist/model/TypesFeatureType.js +30 -46
- package/dist/model/TypesFileType.js +24 -41
- package/dist/model/TypesInvoiceBillingReason.js +36 -51
- package/dist/model/TypesInvoiceCadence.js +24 -41
- package/dist/model/TypesInvoiceStatus.js +30 -46
- package/dist/model/TypesInvoiceType.js +30 -46
- package/dist/model/TypesPaginationResponse.js +38 -55
- package/dist/model/TypesPauseMode.js +30 -46
- package/dist/model/TypesPauseStatus.js +42 -56
- package/dist/model/TypesPaymentDestinationType.js +18 -36
- package/dist/model/TypesPaymentMethodType.js +36 -51
- package/dist/model/TypesPaymentStatus.js +48 -61
- package/dist/model/TypesPriceType.js +24 -41
- package/dist/model/TypesResetUsage.js +24 -41
- package/dist/model/TypesResumeMode.js +30 -46
- package/dist/model/TypesSecretProvider.js +30 -46
- package/dist/model/TypesSecretType.js +30 -46
- package/dist/model/TypesStatus.js +30 -46
- package/dist/model/TypesSubscriptionStatus.js +60 -71
- package/dist/model/TypesTaskStatus.js +36 -51
- package/dist/model/TypesTaskType.js +24 -41
- package/dist/model/TypesTransactionReason.js +60 -71
- package/dist/model/TypesTransactionStatus.js +30 -46
- package/dist/model/TypesTransactionType.js +24 -41
- package/dist/model/TypesWalletConfig.js +36 -53
- package/dist/model/TypesWalletConfigPriceType.js +30 -46
- package/dist/model/TypesWalletStatus.js +30 -46
- package/dist/model/TypesWalletTxReferenceType.js +30 -51
- package/dist/model/TypesWalletType.js +24 -41
- package/dist/model/TypesWindowSize.js +30 -46
- package/package.json +1 -1
- package/dist/api/MetersApi.js +0 -288
- package/dist/model/DtoListMetersResponse.js +0 -124
- package/dist/model/DtoUpdateMeterRequest.js +0 -110
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _PricePrice = _interopRequireDefault(require("./PricePrice"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
-
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); } }
|
|
13
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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); } /**
|
|
1
|
+
/**
|
|
16
2
|
* FlexPrice API
|
|
17
3
|
* FlexPrice API Service
|
|
18
4
|
*
|
|
@@ -24,18 +10,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
24
10
|
* Do not edit the class manually.
|
|
25
11
|
*
|
|
26
12
|
*/
|
|
13
|
+
|
|
14
|
+
import ApiClient from '../ApiClient';
|
|
15
|
+
import PricePrice from './PricePrice';
|
|
16
|
+
|
|
27
17
|
/**
|
|
28
18
|
* The DtoSubscriptionUsageByMetersResponse model module.
|
|
29
19
|
* @module model/DtoSubscriptionUsageByMetersResponse
|
|
30
20
|
* @version 1.0
|
|
31
21
|
*/
|
|
32
|
-
|
|
22
|
+
class DtoSubscriptionUsageByMetersResponse {
|
|
33
23
|
/**
|
|
34
24
|
* Constructs a new <code>DtoSubscriptionUsageByMetersResponse</code>.
|
|
35
25
|
* @alias module:model/DtoSubscriptionUsageByMetersResponse
|
|
36
26
|
*/
|
|
37
|
-
|
|
38
|
-
_classCallCheck(this, DtoSubscriptionUsageByMetersResponse);
|
|
27
|
+
constructor() {
|
|
39
28
|
DtoSubscriptionUsageByMetersResponse.initialize(this);
|
|
40
29
|
}
|
|
41
30
|
|
|
@@ -44,85 +33,79 @@ var DtoSubscriptionUsageByMetersResponse = /*#__PURE__*/function () {
|
|
|
44
33
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
34
|
* Only for internal use.
|
|
46
35
|
*/
|
|
47
|
-
|
|
48
|
-
key: "initialize",
|
|
49
|
-
value: function initialize(obj) {}
|
|
36
|
+
static initialize(obj) {}
|
|
50
37
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (data) {
|
|
62
|
-
obj =
|
|
63
|
-
if (data.hasOwnProperty('amount')) {
|
|
64
|
-
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'Number');
|
|
65
|
-
}
|
|
66
|
-
if (data.hasOwnProperty('currency')) {
|
|
67
|
-
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
68
|
-
}
|
|
69
|
-
if (data.hasOwnProperty('display_amount')) {
|
|
70
|
-
obj['display_amount'] = _ApiClient["default"].convertToType(data['display_amount'], 'String');
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty('filter_values')) {
|
|
73
|
-
obj['filter_values'] = _ApiClient["default"].convertToType(data['filter_values'], {
|
|
74
|
-
'String': ['String']
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (data.hasOwnProperty('meter_display_name')) {
|
|
78
|
-
obj['meter_display_name'] = _ApiClient["default"].convertToType(data['meter_display_name'], 'String');
|
|
79
|
-
}
|
|
80
|
-
if (data.hasOwnProperty('meter_id')) {
|
|
81
|
-
obj['meter_id'] = _ApiClient["default"].convertToType(data['meter_id'], 'String');
|
|
82
|
-
}
|
|
83
|
-
if (data.hasOwnProperty('price')) {
|
|
84
|
-
obj['price'] = _PricePrice["default"].constructFromObject(data['price']);
|
|
85
|
-
}
|
|
86
|
-
if (data.hasOwnProperty('quantity')) {
|
|
87
|
-
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
|
88
|
-
}
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a <code>DtoSubscriptionUsageByMetersResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
40
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
41
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
42
|
+
* @param {module:model/DtoSubscriptionUsageByMetersResponse} obj Optional instance to populate.
|
|
43
|
+
* @return {module:model/DtoSubscriptionUsageByMetersResponse} The populated <code>DtoSubscriptionUsageByMetersResponse</code> instance.
|
|
44
|
+
*/
|
|
45
|
+
static constructFromObject(data, obj) {
|
|
46
|
+
if (data) {
|
|
47
|
+
obj = obj || new DtoSubscriptionUsageByMetersResponse();
|
|
48
|
+
if (data.hasOwnProperty('amount')) {
|
|
49
|
+
obj['amount'] = ApiClient.convertToType(data['amount'], 'Number');
|
|
89
50
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
96
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoSubscriptionUsageByMetersResponse</code>.
|
|
97
|
-
*/
|
|
98
|
-
}, {
|
|
99
|
-
key: "validateJSON",
|
|
100
|
-
value: function validateJSON(data) {
|
|
101
|
-
// ensure the json data is a string
|
|
102
|
-
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
103
|
-
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
51
|
+
if (data.hasOwnProperty('currency')) {
|
|
52
|
+
obj['currency'] = ApiClient.convertToType(data['currency'], 'String');
|
|
53
|
+
}
|
|
54
|
+
if (data.hasOwnProperty('display_amount')) {
|
|
55
|
+
obj['display_amount'] = ApiClient.convertToType(data['display_amount'], 'String');
|
|
104
56
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
57
|
+
if (data.hasOwnProperty('filter_values')) {
|
|
58
|
+
obj['filter_values'] = ApiClient.convertToType(data['filter_values'], {
|
|
59
|
+
'String': ['String']
|
|
60
|
+
});
|
|
108
61
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
throw new Error("Expected the field `meter_display_name` to be a primitive type in the JSON string but got " + data['meter_display_name']);
|
|
62
|
+
if (data.hasOwnProperty('meter_display_name')) {
|
|
63
|
+
obj['meter_display_name'] = ApiClient.convertToType(data['meter_display_name'], 'String');
|
|
112
64
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
throw new Error("Expected the field `meter_id` to be a primitive type in the JSON string but got " + data['meter_id']);
|
|
65
|
+
if (data.hasOwnProperty('meter_id')) {
|
|
66
|
+
obj['meter_id'] = ApiClient.convertToType(data['meter_id'], 'String');
|
|
116
67
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
68
|
+
if (data.hasOwnProperty('price')) {
|
|
69
|
+
obj['price'] = PricePrice.constructFromObject(data['price']);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('quantity')) {
|
|
72
|
+
obj['quantity'] = ApiClient.convertToType(data['quantity'], 'Number');
|
|
121
73
|
}
|
|
122
|
-
return true;
|
|
123
74
|
}
|
|
124
|
-
|
|
125
|
-
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>DtoSubscriptionUsageByMetersResponse</code>.
|
|
80
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
81
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoSubscriptionUsageByMetersResponse</code>.
|
|
82
|
+
*/
|
|
83
|
+
static validateJSON(data) {
|
|
84
|
+
// ensure the json data is a string
|
|
85
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
86
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
87
|
+
}
|
|
88
|
+
// ensure the json data is a string
|
|
89
|
+
if (data['display_amount'] && !(typeof data['display_amount'] === 'string' || data['display_amount'] instanceof String)) {
|
|
90
|
+
throw new Error("Expected the field `display_amount` to be a primitive type in the JSON string but got " + data['display_amount']);
|
|
91
|
+
}
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['meter_display_name'] && !(typeof data['meter_display_name'] === 'string' || data['meter_display_name'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `meter_display_name` to be a primitive type in the JSON string but got " + data['meter_display_name']);
|
|
95
|
+
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data['meter_id'] && !(typeof data['meter_id'] === 'string' || data['meter_id'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `meter_id` to be a primitive type in the JSON string but got " + data['meter_id']);
|
|
99
|
+
}
|
|
100
|
+
// validate the optional field `price`
|
|
101
|
+
if (data['price']) {
|
|
102
|
+
// data not null
|
|
103
|
+
PricePrice.validateJSON(data['price']);
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
126
109
|
/**
|
|
127
110
|
* @member {Number} amount
|
|
128
111
|
*/
|
|
@@ -162,4 +145,4 @@ DtoSubscriptionUsageByMetersResponse.prototype['price'] = undefined;
|
|
|
162
145
|
* @member {Number} quantity
|
|
163
146
|
*/
|
|
164
147
|
DtoSubscriptionUsageByMetersResponse.prototype['quantity'] = undefined;
|
|
165
|
-
|
|
148
|
+
export default DtoSubscriptionUsageByMetersResponse;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _TypesEntityType = _interopRequireDefault(require("./TypesEntityType"));
|
|
9
|
-
var _TypesFileType = _interopRequireDefault(require("./TypesFileType"));
|
|
10
|
-
var _TypesTaskStatus = _interopRequireDefault(require("./TypesTaskStatus"));
|
|
11
|
-
var _TypesTaskType = _interopRequireDefault(require("./TypesTaskType"));
|
|
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 _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); } /**
|
|
1
|
+
/**
|
|
19
2
|
* FlexPrice API
|
|
20
3
|
* FlexPrice API Service
|
|
21
4
|
*
|
|
@@ -27,18 +10,24 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
10
|
* Do not edit the class manually.
|
|
28
11
|
*
|
|
29
12
|
*/
|
|
13
|
+
|
|
14
|
+
import ApiClient from '../ApiClient';
|
|
15
|
+
import TypesEntityType from './TypesEntityType';
|
|
16
|
+
import TypesFileType from './TypesFileType';
|
|
17
|
+
import TypesTaskStatus from './TypesTaskStatus';
|
|
18
|
+
import TypesTaskType from './TypesTaskType';
|
|
19
|
+
|
|
30
20
|
/**
|
|
31
21
|
* The DtoTaskResponse model module.
|
|
32
22
|
* @module model/DtoTaskResponse
|
|
33
23
|
* @version 1.0
|
|
34
24
|
*/
|
|
35
|
-
|
|
25
|
+
class DtoTaskResponse {
|
|
36
26
|
/**
|
|
37
27
|
* Constructs a new <code>DtoTaskResponse</code>.
|
|
38
28
|
* @alias module:model/DtoTaskResponse
|
|
39
29
|
*/
|
|
40
|
-
|
|
41
|
-
_classCallCheck(this, DtoTaskResponse);
|
|
30
|
+
constructor() {
|
|
42
31
|
DtoTaskResponse.initialize(this);
|
|
43
32
|
}
|
|
44
33
|
|
|
@@ -47,158 +36,152 @@ var DtoTaskResponse = /*#__PURE__*/function () {
|
|
|
47
36
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
37
|
* Only for internal use.
|
|
49
38
|
*/
|
|
50
|
-
|
|
51
|
-
key: "initialize",
|
|
52
|
-
value: function initialize(obj) {}
|
|
39
|
+
static initialize(obj) {}
|
|
53
40
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (data) {
|
|
65
|
-
obj =
|
|
66
|
-
if (data.hasOwnProperty('completed_at')) {
|
|
67
|
-
obj['completed_at'] = _ApiClient["default"].convertToType(data['completed_at'], 'String');
|
|
68
|
-
}
|
|
69
|
-
if (data.hasOwnProperty('created_at')) {
|
|
70
|
-
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'String');
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty('created_by')) {
|
|
73
|
-
obj['created_by'] = _ApiClient["default"].convertToType(data['created_by'], 'String');
|
|
74
|
-
}
|
|
75
|
-
if (data.hasOwnProperty('entity_type')) {
|
|
76
|
-
obj['entity_type'] = _TypesEntityType["default"].constructFromObject(data['entity_type']);
|
|
77
|
-
}
|
|
78
|
-
if (data.hasOwnProperty('error_summary')) {
|
|
79
|
-
obj['error_summary'] = _ApiClient["default"].convertToType(data['error_summary'], 'String');
|
|
80
|
-
}
|
|
81
|
-
if (data.hasOwnProperty('failed_at')) {
|
|
82
|
-
obj['failed_at'] = _ApiClient["default"].convertToType(data['failed_at'], 'String');
|
|
83
|
-
}
|
|
84
|
-
if (data.hasOwnProperty('failed_records')) {
|
|
85
|
-
obj['failed_records'] = _ApiClient["default"].convertToType(data['failed_records'], 'Number');
|
|
86
|
-
}
|
|
87
|
-
if (data.hasOwnProperty('file_name')) {
|
|
88
|
-
obj['file_name'] = _ApiClient["default"].convertToType(data['file_name'], 'String');
|
|
89
|
-
}
|
|
90
|
-
if (data.hasOwnProperty('file_type')) {
|
|
91
|
-
obj['file_type'] = _TypesFileType["default"].constructFromObject(data['file_type']);
|
|
92
|
-
}
|
|
93
|
-
if (data.hasOwnProperty('file_url')) {
|
|
94
|
-
obj['file_url'] = _ApiClient["default"].convertToType(data['file_url'], 'String');
|
|
95
|
-
}
|
|
96
|
-
if (data.hasOwnProperty('id')) {
|
|
97
|
-
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
|
|
98
|
-
}
|
|
99
|
-
if (data.hasOwnProperty('metadata')) {
|
|
100
|
-
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
|
|
101
|
-
'String': Object
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
if (data.hasOwnProperty('processed_records')) {
|
|
105
|
-
obj['processed_records'] = _ApiClient["default"].convertToType(data['processed_records'], 'Number');
|
|
106
|
-
}
|
|
107
|
-
if (data.hasOwnProperty('started_at')) {
|
|
108
|
-
obj['started_at'] = _ApiClient["default"].convertToType(data['started_at'], 'String');
|
|
109
|
-
}
|
|
110
|
-
if (data.hasOwnProperty('status')) {
|
|
111
|
-
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
112
|
-
}
|
|
113
|
-
if (data.hasOwnProperty('successful_records')) {
|
|
114
|
-
obj['successful_records'] = _ApiClient["default"].convertToType(data['successful_records'], 'Number');
|
|
115
|
-
}
|
|
116
|
-
if (data.hasOwnProperty('task_status')) {
|
|
117
|
-
obj['task_status'] = _TypesTaskStatus["default"].constructFromObject(data['task_status']);
|
|
118
|
-
}
|
|
119
|
-
if (data.hasOwnProperty('task_type')) {
|
|
120
|
-
obj['task_type'] = _TypesTaskType["default"].constructFromObject(data['task_type']);
|
|
121
|
-
}
|
|
122
|
-
if (data.hasOwnProperty('tenant_id')) {
|
|
123
|
-
obj['tenant_id'] = _ApiClient["default"].convertToType(data['tenant_id'], 'String');
|
|
124
|
-
}
|
|
125
|
-
if (data.hasOwnProperty('total_records')) {
|
|
126
|
-
obj['total_records'] = _ApiClient["default"].convertToType(data['total_records'], 'Number');
|
|
127
|
-
}
|
|
128
|
-
if (data.hasOwnProperty('updated_at')) {
|
|
129
|
-
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'String');
|
|
130
|
-
}
|
|
131
|
-
if (data.hasOwnProperty('updated_by')) {
|
|
132
|
-
obj['updated_by'] = _ApiClient["default"].convertToType(data['updated_by'], 'String');
|
|
133
|
-
}
|
|
41
|
+
/**
|
|
42
|
+
* Constructs a <code>DtoTaskResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
43
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
44
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
45
|
+
* @param {module:model/DtoTaskResponse} obj Optional instance to populate.
|
|
46
|
+
* @return {module:model/DtoTaskResponse} The populated <code>DtoTaskResponse</code> instance.
|
|
47
|
+
*/
|
|
48
|
+
static constructFromObject(data, obj) {
|
|
49
|
+
if (data) {
|
|
50
|
+
obj = obj || new DtoTaskResponse();
|
|
51
|
+
if (data.hasOwnProperty('completed_at')) {
|
|
52
|
+
obj['completed_at'] = ApiClient.convertToType(data['completed_at'], 'String');
|
|
134
53
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
141
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoTaskResponse</code>.
|
|
142
|
-
*/
|
|
143
|
-
}, {
|
|
144
|
-
key: "validateJSON",
|
|
145
|
-
value: function validateJSON(data) {
|
|
146
|
-
// ensure the json data is a string
|
|
147
|
-
if (data['completed_at'] && !(typeof data['completed_at'] === 'string' || data['completed_at'] instanceof String)) {
|
|
148
|
-
throw new Error("Expected the field `completed_at` to be a primitive type in the JSON string but got " + data['completed_at']);
|
|
54
|
+
if (data.hasOwnProperty('created_at')) {
|
|
55
|
+
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
|
|
56
|
+
}
|
|
57
|
+
if (data.hasOwnProperty('created_by')) {
|
|
58
|
+
obj['created_by'] = ApiClient.convertToType(data['created_by'], 'String');
|
|
149
59
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
60
|
+
if (data.hasOwnProperty('entity_type')) {
|
|
61
|
+
obj['entity_type'] = TypesEntityType.constructFromObject(data['entity_type']);
|
|
153
62
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']);
|
|
63
|
+
if (data.hasOwnProperty('error_summary')) {
|
|
64
|
+
obj['error_summary'] = ApiClient.convertToType(data['error_summary'], 'String');
|
|
157
65
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
throw new Error("Expected the field `error_summary` to be a primitive type in the JSON string but got " + data['error_summary']);
|
|
66
|
+
if (data.hasOwnProperty('failed_at')) {
|
|
67
|
+
obj['failed_at'] = ApiClient.convertToType(data['failed_at'], 'String');
|
|
161
68
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
throw new Error("Expected the field `failed_at` to be a primitive type in the JSON string but got " + data['failed_at']);
|
|
69
|
+
if (data.hasOwnProperty('failed_records')) {
|
|
70
|
+
obj['failed_records'] = ApiClient.convertToType(data['failed_records'], 'Number');
|
|
165
71
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
throw new Error("Expected the field `file_name` to be a primitive type in the JSON string but got " + data['file_name']);
|
|
72
|
+
if (data.hasOwnProperty('file_name')) {
|
|
73
|
+
obj['file_name'] = ApiClient.convertToType(data['file_name'], 'String');
|
|
169
74
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
throw new Error("Expected the field `file_url` to be a primitive type in the JSON string but got " + data['file_url']);
|
|
75
|
+
if (data.hasOwnProperty('file_type')) {
|
|
76
|
+
obj['file_type'] = TypesFileType.constructFromObject(data['file_type']);
|
|
173
77
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
78
|
+
if (data.hasOwnProperty('file_url')) {
|
|
79
|
+
obj['file_url'] = ApiClient.convertToType(data['file_url'], 'String');
|
|
177
80
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
throw new Error("Expected the field `started_at` to be a primitive type in the JSON string but got " + data['started_at']);
|
|
81
|
+
if (data.hasOwnProperty('id')) {
|
|
82
|
+
obj['id'] = ApiClient.convertToType(data['id'], 'String');
|
|
181
83
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
84
|
+
if (data.hasOwnProperty('metadata')) {
|
|
85
|
+
obj['metadata'] = ApiClient.convertToType(data['metadata'], {
|
|
86
|
+
'String': Object
|
|
87
|
+
});
|
|
185
88
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
throw new Error("Expected the field `tenant_id` to be a primitive type in the JSON string but got " + data['tenant_id']);
|
|
89
|
+
if (data.hasOwnProperty('processed_records')) {
|
|
90
|
+
obj['processed_records'] = ApiClient.convertToType(data['processed_records'], 'Number');
|
|
189
91
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
92
|
+
if (data.hasOwnProperty('started_at')) {
|
|
93
|
+
obj['started_at'] = ApiClient.convertToType(data['started_at'], 'String');
|
|
193
94
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
95
|
+
if (data.hasOwnProperty('status')) {
|
|
96
|
+
obj['status'] = ApiClient.convertToType(data['status'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('successful_records')) {
|
|
99
|
+
obj['successful_records'] = ApiClient.convertToType(data['successful_records'], 'Number');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('task_status')) {
|
|
102
|
+
obj['task_status'] = TypesTaskStatus.constructFromObject(data['task_status']);
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('task_type')) {
|
|
105
|
+
obj['task_type'] = TypesTaskType.constructFromObject(data['task_type']);
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('tenant_id')) {
|
|
108
|
+
obj['tenant_id'] = ApiClient.convertToType(data['tenant_id'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('total_records')) {
|
|
111
|
+
obj['total_records'] = ApiClient.convertToType(data['total_records'], 'Number');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('updated_at')) {
|
|
114
|
+
obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('updated_by')) {
|
|
117
|
+
obj['updated_by'] = ApiClient.convertToType(data['updated_by'], 'String');
|
|
197
118
|
}
|
|
198
|
-
return true;
|
|
199
119
|
}
|
|
200
|
-
|
|
201
|
-
}
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Validates the JSON data with respect to <code>DtoTaskResponse</code>.
|
|
125
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
126
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoTaskResponse</code>.
|
|
127
|
+
*/
|
|
128
|
+
static validateJSON(data) {
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['completed_at'] && !(typeof data['completed_at'] === 'string' || data['completed_at'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `completed_at` to be a primitive type in the JSON string but got " + data['completed_at']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['created_at'] && !(typeof data['created_at'] === 'string' || data['created_at'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
136
|
+
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']);
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
if (data['error_summary'] && !(typeof data['error_summary'] === 'string' || data['error_summary'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `error_summary` to be a primitive type in the JSON string but got " + data['error_summary']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['failed_at'] && !(typeof data['failed_at'] === 'string' || data['failed_at'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `failed_at` to be a primitive type in the JSON string but got " + data['failed_at']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['file_name'] && !(typeof data['file_name'] === 'string' || data['file_name'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `file_name` to be a primitive type in the JSON string but got " + data['file_name']);
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
if (data['file_url'] && !(typeof data['file_url'] === 'string' || data['file_url'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `file_url` to be a primitive type in the JSON string but got " + data['file_url']);
|
|
156
|
+
}
|
|
157
|
+
// ensure the json data is a string
|
|
158
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
160
|
+
}
|
|
161
|
+
// ensure the json data is a string
|
|
162
|
+
if (data['started_at'] && !(typeof data['started_at'] === 'string' || data['started_at'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `started_at` to be a primitive type in the JSON string but got " + data['started_at']);
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
168
|
+
}
|
|
169
|
+
// ensure the json data is a string
|
|
170
|
+
if (data['tenant_id'] && !(typeof data['tenant_id'] === 'string' || data['tenant_id'] instanceof String)) {
|
|
171
|
+
throw new Error("Expected the field `tenant_id` to be a primitive type in the JSON string but got " + data['tenant_id']);
|
|
172
|
+
}
|
|
173
|
+
// ensure the json data is a string
|
|
174
|
+
if (data['updated_at'] && !(typeof data['updated_at'] === 'string' || data['updated_at'] instanceof String)) {
|
|
175
|
+
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
176
|
+
}
|
|
177
|
+
// ensure the json data is a string
|
|
178
|
+
if (data['updated_by'] && !(typeof data['updated_by'] === 'string' || data['updated_by'] instanceof String)) {
|
|
179
|
+
throw new Error("Expected the field `updated_by` to be a primitive type in the JSON string but got " + data['updated_by']);
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
202
185
|
/**
|
|
203
186
|
* @member {String} completed_at
|
|
204
187
|
*/
|
|
@@ -308,4 +291,4 @@ DtoTaskResponse.prototype['updated_at'] = undefined;
|
|
|
308
291
|
* @member {String} updated_by
|
|
309
292
|
*/
|
|
310
293
|
DtoTaskResponse.prototype['updated_by'] = undefined;
|
|
311
|
-
|
|
294
|
+
export default DtoTaskResponse;
|