@flexprice/sdk 0.0.1
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 +380 -0
- package/dist/ApiClient.js +703 -0
- package/dist/api/AuthApi.js +116 -0
- package/dist/api/CustomersApi.js +373 -0
- package/dist/api/EntitlementsApi.js +291 -0
- package/dist/api/EnvironmentsApi.js +204 -0
- package/dist/api/EventsApi.js +237 -0
- package/dist/api/FeaturesApi.js +252 -0
- package/dist/api/IntegrationsApi.js +189 -0
- package/dist/api/InvoicesApi.js +444 -0
- package/dist/api/MetersApi.js +287 -0
- package/dist/api/PaymentsApi.js +296 -0
- package/dist/api/PlansApi.js +248 -0
- package/dist/api/PricesApi.js +250 -0
- package/dist/api/SecretsApi.js +155 -0
- package/dist/api/SubscriptionsApi.js +383 -0
- package/dist/api/TasksApi.js +254 -0
- package/dist/api/TenantsApi.js +182 -0
- package/dist/api/UsersApi.js +75 -0
- package/dist/api/WalletsApi.js +384 -0
- package/dist/index.js +1154 -0
- package/dist/model/DtoAddress.js +149 -0
- package/dist/model/DtoAggregatedEntitlement.js +123 -0
- package/dist/model/DtoAggregatedFeature.js +138 -0
- package/dist/model/DtoAuthResponse.js +113 -0
- package/dist/model/DtoBillingPeriodInfo.js +114 -0
- package/dist/model/DtoBulkIngestEventRequest.js +130 -0
- package/dist/model/DtoCreateAPIKeyRequest.js +147 -0
- package/dist/model/DtoCreateAPIKeyResponse.js +103 -0
- package/dist/model/DtoCreateCustomerRequest.js +218 -0
- package/dist/model/DtoCreateEntitlementRequest.js +180 -0
- package/dist/model/DtoCreateEnvironmentRequest.js +126 -0
- package/dist/model/DtoCreateFeatureRequest.js +193 -0
- package/dist/model/DtoCreateIntegrationRequest.js +135 -0
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +238 -0
- package/dist/model/DtoCreateInvoiceRequest.js +316 -0
- package/dist/model/DtoCreateMeterRequest.js +183 -0
- package/dist/model/DtoCreatePaymentRequest.js +202 -0
- package/dist/model/DtoCreatePlanEntitlementRequest.js +180 -0
- package/dist/model/DtoCreatePlanPriceRequest.js +318 -0
- package/dist/model/DtoCreatePlanRequest.js +196 -0
- package/dist/model/DtoCreatePriceRequest.js +318 -0
- package/dist/model/DtoCreatePriceTier.js +132 -0
- package/dist/model/DtoCreateSubscriptionRequest.js +244 -0
- package/dist/model/DtoCreateTaskRequest.js +167 -0
- package/dist/model/DtoCreateTenantRequest.js +126 -0
- package/dist/model/DtoCreateWalletRequest.js +216 -0
- package/dist/model/DtoCustomerEntitlementsResponse.js +122 -0
- package/dist/model/DtoCustomerInvoiceSummary.js +165 -0
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +134 -0
- package/dist/model/DtoCustomerResponse.js +300 -0
- package/dist/model/DtoCustomerUsageSummaryResponse.js +150 -0
- package/dist/model/DtoEntitlementResponse.js +276 -0
- package/dist/model/DtoEntitlementSource.js +161 -0
- package/dist/model/DtoEnvironmentResponse.js +137 -0
- package/dist/model/DtoEvent.js +159 -0
- package/dist/model/DtoFeatureResponse.js +275 -0
- package/dist/model/DtoFeatureUsageSummary.js +164 -0
- package/dist/model/DtoGetEventsResponse.js +142 -0
- package/dist/model/DtoGetPreviewInvoiceRequest.js +136 -0
- package/dist/model/DtoGetUsageByMeterRequest.js +179 -0
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +144 -0
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +166 -0
- package/dist/model/DtoGetUsageRequest.js +203 -0
- package/dist/model/DtoGetUsageResponse.js +139 -0
- package/dist/model/DtoIngestEventRequest.js +186 -0
- package/dist/model/DtoInvoiceLineItemResponse.js +343 -0
- package/dist/model/DtoInvoiceResponse.js +479 -0
- package/dist/model/DtoLinkedIntegrationsResponse.js +89 -0
- package/dist/model/DtoListCustomersResponse.js +124 -0
- package/dist/model/DtoListEntitlementsResponse.js +124 -0
- package/dist/model/DtoListEnvironmentsResponse.js +134 -0
- package/dist/model/DtoListFeaturesResponse.js +124 -0
- package/dist/model/DtoListInvoicesResponse.js +124 -0
- package/dist/model/DtoListPaymentsResponse.js +124 -0
- package/dist/model/DtoListPlansResponse.js +124 -0
- package/dist/model/DtoListPricesResponse.js +124 -0
- package/dist/model/DtoListSecretsResponse.js +124 -0
- package/dist/model/DtoListSubscriptionPausesResponse.js +118 -0
- package/dist/model/DtoListSubscriptionsResponse.js +124 -0
- package/dist/model/DtoListTasksResponse.js +124 -0
- package/dist/model/DtoListWalletTransactionsResponse.js +124 -0
- package/dist/model/DtoLoginRequest.js +138 -0
- package/dist/model/DtoMeterResponse.js +217 -0
- package/dist/model/DtoPauseSubscriptionRequest.js +171 -0
- package/dist/model/DtoPaymentAttemptResponse.js +191 -0
- package/dist/model/DtoPaymentResponse.js +331 -0
- package/dist/model/DtoPlanResponse.js +269 -0
- package/dist/model/DtoPriceResponse.js +412 -0
- package/dist/model/DtoResumeSubscriptionRequest.js +127 -0
- package/dist/model/DtoSecretResponse.js +200 -0
- package/dist/model/DtoSignUpRequest.js +148 -0
- package/dist/model/DtoSubscriptionPauseResponse.js +300 -0
- package/dist/model/DtoSubscriptionResponse.js +518 -0
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +165 -0
- package/dist/model/DtoTaskResponse.js +311 -0
- package/dist/model/DtoTenantBillingDetails.js +127 -0
- package/dist/model/DtoTenantBillingUsage.js +124 -0
- package/dist/model/DtoTenantResponse.js +151 -0
- package/dist/model/DtoTopUpWalletRequest.js +185 -0
- package/dist/model/DtoUpdateCustomerRequest.js +195 -0
- package/dist/model/DtoUpdateEntitlementRequest.js +122 -0
- package/dist/model/DtoUpdateEnvironmentRequest.js +101 -0
- package/dist/model/DtoUpdateFeatureRequest.js +135 -0
- package/dist/model/DtoUpdateMeterRequest.js +110 -0
- package/dist/model/DtoUpdatePaymentRequest.js +99 -0
- package/dist/model/DtoUpdatePaymentStatusRequest.js +117 -0
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +193 -0
- package/dist/model/DtoUpdatePlanPriceRequest.js +331 -0
- package/dist/model/DtoUpdatePlanRequest.js +176 -0
- package/dist/model/DtoUpdatePriceRequest.js +111 -0
- package/dist/model/DtoUpdateTaskStatusRequest.js +109 -0
- package/dist/model/DtoUpdateTenantRequest.js +91 -0
- package/dist/model/DtoUpdateWalletRequest.js +150 -0
- package/dist/model/DtoUsageResult.js +97 -0
- package/dist/model/DtoUserResponse.js +115 -0
- package/dist/model/DtoWalletBalanceResponse.js +353 -0
- package/dist/model/DtoWalletResponse.js +252 -0
- package/dist/model/DtoWalletTransactionResponse.js +238 -0
- package/dist/model/ErrorsErrorDetail.js +111 -0
- package/dist/model/ErrorsErrorResponse.js +99 -0
- package/dist/model/MeterAggregation.js +99 -0
- package/dist/model/MeterFilter.js +103 -0
- package/dist/model/PriceJSONBTransformQuantity.js +99 -0
- package/dist/model/PricePrice.js +398 -0
- package/dist/model/PricePriceTier.js +104 -0
- package/dist/model/PriceTransformQuantity.js +99 -0
- package/dist/model/SubscriptionSubscriptionLineItem.js +355 -0
- package/dist/model/SubscriptionSubscriptionPause.js +300 -0
- package/dist/model/TypesAggregationType.js +68 -0
- package/dist/model/TypesAutoTopupTrigger.js +58 -0
- package/dist/model/TypesBillingCadence.js +58 -0
- package/dist/model/TypesBillingModel.js +63 -0
- package/dist/model/TypesBillingPeriod.js +78 -0
- package/dist/model/TypesBillingTier.js +58 -0
- package/dist/model/TypesEntityType.js +63 -0
- package/dist/model/TypesFeatureType.js +63 -0
- package/dist/model/TypesFileType.js +58 -0
- package/dist/model/TypesInvoiceBillingReason.js +68 -0
- package/dist/model/TypesInvoiceCadence.js +58 -0
- package/dist/model/TypesInvoiceStatus.js +63 -0
- package/dist/model/TypesInvoiceType.js +63 -0
- package/dist/model/TypesPaginationResponse.js +101 -0
- package/dist/model/TypesPauseMode.js +63 -0
- package/dist/model/TypesPauseStatus.js +73 -0
- package/dist/model/TypesPaymentDestinationType.js +53 -0
- package/dist/model/TypesPaymentMethodType.js +68 -0
- package/dist/model/TypesPaymentStatus.js +78 -0
- package/dist/model/TypesPriceType.js +58 -0
- package/dist/model/TypesResetUsage.js +58 -0
- package/dist/model/TypesResumeMode.js +63 -0
- package/dist/model/TypesSecretProvider.js +63 -0
- package/dist/model/TypesSecretType.js +63 -0
- package/dist/model/TypesStatus.js +63 -0
- package/dist/model/TypesSubscriptionStatus.js +88 -0
- package/dist/model/TypesTaskStatus.js +68 -0
- package/dist/model/TypesTaskType.js +58 -0
- package/dist/model/TypesTransactionReason.js +88 -0
- package/dist/model/TypesTransactionStatus.js +63 -0
- package/dist/model/TypesTransactionType.js +58 -0
- package/dist/model/TypesWalletConfig.js +91 -0
- package/dist/model/TypesWalletConfigPriceType.js +63 -0
- package/dist/model/TypesWalletStatus.js +63 -0
- package/dist/model/TypesWalletTxReferenceType.js +68 -0
- package/dist/model/TypesWalletType.js +58 -0
- package/dist/model/TypesWindowSize.js +63 -0
- package/package.json +54 -0
|
@@ -0,0 +1,300 @@
|
|
|
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 _TypesStatus = _interopRequireDefault(require("./TypesStatus"));
|
|
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); } /**
|
|
16
|
+
* FlexPrice API
|
|
17
|
+
* FlexPrice API Service
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document: 1.0
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The DtoCustomerResponse model module.
|
|
29
|
+
* @module model/DtoCustomerResponse
|
|
30
|
+
* @version 1.0
|
|
31
|
+
*/
|
|
32
|
+
var DtoCustomerResponse = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>DtoCustomerResponse</code>.
|
|
35
|
+
* @alias module:model/DtoCustomerResponse
|
|
36
|
+
*/
|
|
37
|
+
function DtoCustomerResponse() {
|
|
38
|
+
_classCallCheck(this, DtoCustomerResponse);
|
|
39
|
+
DtoCustomerResponse.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(DtoCustomerResponse, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>DtoCustomerResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/DtoCustomerResponse} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/DtoCustomerResponse} The populated <code>DtoCustomerResponse</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new DtoCustomerResponse();
|
|
63
|
+
if (data.hasOwnProperty('address_city')) {
|
|
64
|
+
obj['address_city'] = _ApiClient["default"].convertToType(data['address_city'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('address_country')) {
|
|
67
|
+
obj['address_country'] = _ApiClient["default"].convertToType(data['address_country'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('address_line1')) {
|
|
70
|
+
obj['address_line1'] = _ApiClient["default"].convertToType(data['address_line1'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('address_line2')) {
|
|
73
|
+
obj['address_line2'] = _ApiClient["default"].convertToType(data['address_line2'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('address_postal_code')) {
|
|
76
|
+
obj['address_postal_code'] = _ApiClient["default"].convertToType(data['address_postal_code'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('address_state')) {
|
|
79
|
+
obj['address_state'] = _ApiClient["default"].convertToType(data['address_state'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('created_at')) {
|
|
82
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('created_by')) {
|
|
85
|
+
obj['created_by'] = _ApiClient["default"].convertToType(data['created_by'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('email')) {
|
|
88
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('environment_id')) {
|
|
91
|
+
obj['environment_id'] = _ApiClient["default"].convertToType(data['environment_id'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('external_id')) {
|
|
94
|
+
obj['external_id'] = _ApiClient["default"].convertToType(data['external_id'], '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': 'String'
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('name')) {
|
|
105
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('status')) {
|
|
108
|
+
obj['status'] = _TypesStatus["default"].constructFromObject(data['status']);
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('tenant_id')) {
|
|
111
|
+
obj['tenant_id'] = _ApiClient["default"].convertToType(data['tenant_id'], 'String');
|
|
112
|
+
}
|
|
113
|
+
if (data.hasOwnProperty('updated_at')) {
|
|
114
|
+
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'String');
|
|
115
|
+
}
|
|
116
|
+
if (data.hasOwnProperty('updated_by')) {
|
|
117
|
+
obj['updated_by'] = _ApiClient["default"].convertToType(data['updated_by'], 'String');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Validates the JSON data with respect to <code>DtoCustomerResponse</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>DtoCustomerResponse</code>.
|
|
127
|
+
*/
|
|
128
|
+
}, {
|
|
129
|
+
key: "validateJSON",
|
|
130
|
+
value: function validateJSON(data) {
|
|
131
|
+
// ensure the json data is a string
|
|
132
|
+
if (data['address_city'] && !(typeof data['address_city'] === 'string' || data['address_city'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `address_city` to be a primitive type in the JSON string but got " + data['address_city']);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data['address_country'] && !(typeof data['address_country'] === 'string' || data['address_country'] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `address_country` to be a primitive type in the JSON string but got " + data['address_country']);
|
|
138
|
+
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['address_line1'] && !(typeof data['address_line1'] === 'string' || data['address_line1'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `address_line1` to be a primitive type in the JSON string but got " + data['address_line1']);
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
if (data['address_line2'] && !(typeof data['address_line2'] === 'string' || data['address_line2'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `address_line2` to be a primitive type in the JSON string but got " + data['address_line2']);
|
|
146
|
+
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['address_postal_code'] && !(typeof data['address_postal_code'] === 'string' || data['address_postal_code'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `address_postal_code` to be a primitive type in the JSON string but got " + data['address_postal_code']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['address_state'] && !(typeof data['address_state'] === 'string' || data['address_state'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `address_state` to be a primitive type in the JSON string but got " + data['address_state']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['created_at'] && !(typeof data['created_at'] === 'string' || data['created_at'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
158
|
+
}
|
|
159
|
+
// ensure the json data is a string
|
|
160
|
+
if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) {
|
|
161
|
+
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']);
|
|
162
|
+
}
|
|
163
|
+
// ensure the json data is a string
|
|
164
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
165
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
166
|
+
}
|
|
167
|
+
// ensure the json data is a string
|
|
168
|
+
if (data['environment_id'] && !(typeof data['environment_id'] === 'string' || data['environment_id'] instanceof String)) {
|
|
169
|
+
throw new Error("Expected the field `environment_id` to be a primitive type in the JSON string but got " + data['environment_id']);
|
|
170
|
+
}
|
|
171
|
+
// ensure the json data is a string
|
|
172
|
+
if (data['external_id'] && !(typeof data['external_id'] === 'string' || data['external_id'] instanceof String)) {
|
|
173
|
+
throw new Error("Expected the field `external_id` to be a primitive type in the JSON string but got " + data['external_id']);
|
|
174
|
+
}
|
|
175
|
+
// ensure the json data is a string
|
|
176
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
177
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
178
|
+
}
|
|
179
|
+
// ensure the json data is a string
|
|
180
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
181
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
182
|
+
}
|
|
183
|
+
// ensure the json data is a string
|
|
184
|
+
if (data['tenant_id'] && !(typeof data['tenant_id'] === 'string' || data['tenant_id'] instanceof String)) {
|
|
185
|
+
throw new Error("Expected the field `tenant_id` to be a primitive type in the JSON string but got " + data['tenant_id']);
|
|
186
|
+
}
|
|
187
|
+
// ensure the json data is a string
|
|
188
|
+
if (data['updated_at'] && !(typeof data['updated_at'] === 'string' || data['updated_at'] instanceof String)) {
|
|
189
|
+
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
190
|
+
}
|
|
191
|
+
// ensure the json data is a string
|
|
192
|
+
if (data['updated_by'] && !(typeof data['updated_by'] === 'string' || data['updated_by'] instanceof String)) {
|
|
193
|
+
throw new Error("Expected the field `updated_by` to be a primitive type in the JSON string but got " + data['updated_by']);
|
|
194
|
+
}
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
}]);
|
|
198
|
+
}();
|
|
199
|
+
/**
|
|
200
|
+
* AddressCity is the city of the customer's address
|
|
201
|
+
* @member {String} address_city
|
|
202
|
+
*/
|
|
203
|
+
DtoCustomerResponse.prototype['address_city'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
|
|
207
|
+
* @member {String} address_country
|
|
208
|
+
*/
|
|
209
|
+
DtoCustomerResponse.prototype['address_country'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* AddressLine1 is the first line of the customer's address
|
|
213
|
+
* @member {String} address_line1
|
|
214
|
+
*/
|
|
215
|
+
DtoCustomerResponse.prototype['address_line1'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* AddressLine2 is the second line of the customer's address
|
|
219
|
+
* @member {String} address_line2
|
|
220
|
+
*/
|
|
221
|
+
DtoCustomerResponse.prototype['address_line2'] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* AddressPostalCode is the postal code of the customer's address
|
|
225
|
+
* @member {String} address_postal_code
|
|
226
|
+
*/
|
|
227
|
+
DtoCustomerResponse.prototype['address_postal_code'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* AddressState is the state of the customer's address
|
|
231
|
+
* @member {String} address_state
|
|
232
|
+
*/
|
|
233
|
+
DtoCustomerResponse.prototype['address_state'] = undefined;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @member {String} created_at
|
|
237
|
+
*/
|
|
238
|
+
DtoCustomerResponse.prototype['created_at'] = undefined;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @member {String} created_by
|
|
242
|
+
*/
|
|
243
|
+
DtoCustomerResponse.prototype['created_by'] = undefined;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Email is the email of the customer
|
|
247
|
+
* @member {String} email
|
|
248
|
+
*/
|
|
249
|
+
DtoCustomerResponse.prototype['email'] = undefined;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* EnvironmentID is the environment identifier for the customer
|
|
253
|
+
* @member {String} environment_id
|
|
254
|
+
*/
|
|
255
|
+
DtoCustomerResponse.prototype['environment_id'] = undefined;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* ExternalID is the external identifier for the customer
|
|
259
|
+
* @member {String} external_id
|
|
260
|
+
*/
|
|
261
|
+
DtoCustomerResponse.prototype['external_id'] = undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* ID is the unique identifier for the customer
|
|
265
|
+
* @member {String} id
|
|
266
|
+
*/
|
|
267
|
+
DtoCustomerResponse.prototype['id'] = undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Metadata
|
|
271
|
+
* @member {Object.<String, String>} metadata
|
|
272
|
+
*/
|
|
273
|
+
DtoCustomerResponse.prototype['metadata'] = undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Name is the name of the customer
|
|
277
|
+
* @member {String} name
|
|
278
|
+
*/
|
|
279
|
+
DtoCustomerResponse.prototype['name'] = undefined;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @member {module:model/TypesStatus} status
|
|
283
|
+
*/
|
|
284
|
+
DtoCustomerResponse.prototype['status'] = undefined;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* @member {String} tenant_id
|
|
288
|
+
*/
|
|
289
|
+
DtoCustomerResponse.prototype['tenant_id'] = undefined;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @member {String} updated_at
|
|
293
|
+
*/
|
|
294
|
+
DtoCustomerResponse.prototype['updated_at'] = undefined;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @member {String} updated_by
|
|
298
|
+
*/
|
|
299
|
+
DtoCustomerResponse.prototype['updated_by'] = undefined;
|
|
300
|
+
var _default = exports["default"] = DtoCustomerResponse;
|
|
@@ -0,0 +1,150 @@
|
|
|
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 _DtoBillingPeriodInfo = _interopRequireDefault(require("./DtoBillingPeriodInfo"));
|
|
9
|
+
var _DtoFeatureUsageSummary = _interopRequireDefault(require("./DtoFeatureUsageSummary"));
|
|
10
|
+
var _TypesPaginationResponse = _interopRequireDefault(require("./TypesPaginationResponse"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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); }
|
|
13
|
+
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; } } }; }
|
|
14
|
+
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; } }
|
|
15
|
+
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; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /**
|
|
21
|
+
* FlexPrice API
|
|
22
|
+
* FlexPrice API Service
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document: 1.0
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The DtoCustomerUsageSummaryResponse model module.
|
|
34
|
+
* @module model/DtoCustomerUsageSummaryResponse
|
|
35
|
+
* @version 1.0
|
|
36
|
+
*/
|
|
37
|
+
var DtoCustomerUsageSummaryResponse = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>DtoCustomerUsageSummaryResponse</code>.
|
|
40
|
+
* @alias module:model/DtoCustomerUsageSummaryResponse
|
|
41
|
+
*/
|
|
42
|
+
function DtoCustomerUsageSummaryResponse() {
|
|
43
|
+
_classCallCheck(this, DtoCustomerUsageSummaryResponse);
|
|
44
|
+
DtoCustomerUsageSummaryResponse.initialize(this);
|
|
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(DtoCustomerUsageSummaryResponse, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj) {}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>DtoCustomerUsageSummaryResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/DtoCustomerUsageSummaryResponse} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/DtoCustomerUsageSummaryResponse} The populated <code>DtoCustomerUsageSummaryResponse</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new DtoCustomerUsageSummaryResponse();
|
|
68
|
+
if (data.hasOwnProperty('customer_id')) {
|
|
69
|
+
obj['customer_id'] = _ApiClient["default"].convertToType(data['customer_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('features')) {
|
|
72
|
+
obj['features'] = _ApiClient["default"].convertToType(data['features'], [_DtoFeatureUsageSummary["default"]]);
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('pagination')) {
|
|
75
|
+
obj['pagination'] = _TypesPaginationResponse["default"].constructFromObject(data['pagination']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('period')) {
|
|
78
|
+
obj['period'] = _DtoBillingPeriodInfo["default"].constructFromObject(data['period']);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validates the JSON data with respect to <code>DtoCustomerUsageSummaryResponse</code>.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoCustomerUsageSummaryResponse</code>.
|
|
88
|
+
*/
|
|
89
|
+
}, {
|
|
90
|
+
key: "validateJSON",
|
|
91
|
+
value: function validateJSON(data) {
|
|
92
|
+
// ensure the json data is a string
|
|
93
|
+
if (data['customer_id'] && !(typeof data['customer_id'] === 'string' || data['customer_id'] instanceof String)) {
|
|
94
|
+
throw new Error("Expected the field `customer_id` to be a primitive type in the JSON string but got " + data['customer_id']);
|
|
95
|
+
}
|
|
96
|
+
if (data['features']) {
|
|
97
|
+
// data not null
|
|
98
|
+
// ensure the json data is an array
|
|
99
|
+
if (!Array.isArray(data['features'])) {
|
|
100
|
+
throw new Error("Expected the field `features` to be an array in the JSON data but got " + data['features']);
|
|
101
|
+
}
|
|
102
|
+
// validate the optional field `features` (array)
|
|
103
|
+
var _iterator = _createForOfIteratorHelper(data['features']),
|
|
104
|
+
_step;
|
|
105
|
+
try {
|
|
106
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
107
|
+
var item = _step.value;
|
|
108
|
+
_DtoFeatureUsageSummary["default"].validateJSON(item);
|
|
109
|
+
}
|
|
110
|
+
} catch (err) {
|
|
111
|
+
_iterator.e(err);
|
|
112
|
+
} finally {
|
|
113
|
+
_iterator.f();
|
|
114
|
+
}
|
|
115
|
+
;
|
|
116
|
+
}
|
|
117
|
+
// validate the optional field `pagination`
|
|
118
|
+
if (data['pagination']) {
|
|
119
|
+
// data not null
|
|
120
|
+
_TypesPaginationResponse["default"].validateJSON(data['pagination']);
|
|
121
|
+
}
|
|
122
|
+
// validate the optional field `period`
|
|
123
|
+
if (data['period']) {
|
|
124
|
+
// data not null
|
|
125
|
+
_DtoBillingPeriodInfo["default"].validateJSON(data['period']);
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}]);
|
|
130
|
+
}();
|
|
131
|
+
/**
|
|
132
|
+
* @member {String} customer_id
|
|
133
|
+
*/
|
|
134
|
+
DtoCustomerUsageSummaryResponse.prototype['customer_id'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {Array.<module:model/DtoFeatureUsageSummary>} features
|
|
138
|
+
*/
|
|
139
|
+
DtoCustomerUsageSummaryResponse.prototype['features'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/TypesPaginationResponse} pagination
|
|
143
|
+
*/
|
|
144
|
+
DtoCustomerUsageSummaryResponse.prototype['pagination'] = undefined;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @member {module:model/DtoBillingPeriodInfo} period
|
|
148
|
+
*/
|
|
149
|
+
DtoCustomerUsageSummaryResponse.prototype['period'] = undefined;
|
|
150
|
+
var _default = exports["default"] = DtoCustomerUsageSummaryResponse;
|