@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,244 @@
|
|
|
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 _TypesBillingCadence = _interopRequireDefault(require("./TypesBillingCadence"));
|
|
9
|
+
var _TypesBillingPeriod = _interopRequireDefault(require("./TypesBillingPeriod"));
|
|
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
|
+
* FlexPrice API
|
|
21
|
+
* FlexPrice API Service
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 1.0
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The DtoCreateSubscriptionRequest model module.
|
|
33
|
+
* @module model/DtoCreateSubscriptionRequest
|
|
34
|
+
* @version 1.0
|
|
35
|
+
*/
|
|
36
|
+
var DtoCreateSubscriptionRequest = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>DtoCreateSubscriptionRequest</code>.
|
|
39
|
+
* @alias module:model/DtoCreateSubscriptionRequest
|
|
40
|
+
* @param billingCadence {module:model/TypesBillingCadence}
|
|
41
|
+
* @param billingPeriod {module:model/TypesBillingPeriod}
|
|
42
|
+
* @param billingPeriodCount {Number}
|
|
43
|
+
* @param currency {String}
|
|
44
|
+
* @param customerId {String}
|
|
45
|
+
* @param planId {String}
|
|
46
|
+
* @param startDate {String}
|
|
47
|
+
*/
|
|
48
|
+
function DtoCreateSubscriptionRequest(billingCadence, billingPeriod, billingPeriodCount, currency, customerId, planId, startDate) {
|
|
49
|
+
_classCallCheck(this, DtoCreateSubscriptionRequest);
|
|
50
|
+
DtoCreateSubscriptionRequest.initialize(this, billingCadence, billingPeriod, billingPeriodCount, currency, customerId, planId, startDate);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Initializes the fields of this object.
|
|
55
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
56
|
+
* Only for internal use.
|
|
57
|
+
*/
|
|
58
|
+
return _createClass(DtoCreateSubscriptionRequest, null, [{
|
|
59
|
+
key: "initialize",
|
|
60
|
+
value: function initialize(obj, billingCadence, billingPeriod, billingPeriodCount, currency, customerId, planId, startDate) {
|
|
61
|
+
obj['billing_cadence'] = billingCadence;
|
|
62
|
+
obj['billing_period'] = billingPeriod;
|
|
63
|
+
obj['billing_period_count'] = billingPeriodCount;
|
|
64
|
+
obj['currency'] = currency;
|
|
65
|
+
obj['customer_id'] = customerId;
|
|
66
|
+
obj['plan_id'] = planId;
|
|
67
|
+
obj['start_date'] = startDate;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Constructs a <code>DtoCreateSubscriptionRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
72
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
73
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
+
* @param {module:model/DtoCreateSubscriptionRequest} obj Optional instance to populate.
|
|
75
|
+
* @return {module:model/DtoCreateSubscriptionRequest} The populated <code>DtoCreateSubscriptionRequest</code> instance.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "constructFromObject",
|
|
79
|
+
value: function constructFromObject(data, obj) {
|
|
80
|
+
if (data) {
|
|
81
|
+
obj = obj || new DtoCreateSubscriptionRequest();
|
|
82
|
+
if (data.hasOwnProperty('billing_cadence')) {
|
|
83
|
+
obj['billing_cadence'] = _TypesBillingCadence["default"].constructFromObject(data['billing_cadence']);
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('billing_period')) {
|
|
86
|
+
obj['billing_period'] = _TypesBillingPeriod["default"].constructFromObject(data['billing_period']);
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('billing_period_count')) {
|
|
89
|
+
obj['billing_period_count'] = _ApiClient["default"].convertToType(data['billing_period_count'], 'Number');
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('currency')) {
|
|
92
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('customer_id')) {
|
|
95
|
+
obj['customer_id'] = _ApiClient["default"].convertToType(data['customer_id'], 'String');
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('end_date')) {
|
|
98
|
+
obj['end_date'] = _ApiClient["default"].convertToType(data['end_date'], 'String');
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('lookup_key')) {
|
|
101
|
+
obj['lookup_key'] = _ApiClient["default"].convertToType(data['lookup_key'], 'String');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('metadata')) {
|
|
104
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
|
|
105
|
+
'String': 'String'
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('plan_id')) {
|
|
109
|
+
obj['plan_id'] = _ApiClient["default"].convertToType(data['plan_id'], 'String');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('start_date')) {
|
|
112
|
+
obj['start_date'] = _ApiClient["default"].convertToType(data['start_date'], 'String');
|
|
113
|
+
}
|
|
114
|
+
if (data.hasOwnProperty('trial_end')) {
|
|
115
|
+
obj['trial_end'] = _ApiClient["default"].convertToType(data['trial_end'], 'String');
|
|
116
|
+
}
|
|
117
|
+
if (data.hasOwnProperty('trial_start')) {
|
|
118
|
+
obj['trial_start'] = _ApiClient["default"].convertToType(data['trial_start'], 'String');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return obj;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Validates the JSON data with respect to <code>DtoCreateSubscriptionRequest</code>.
|
|
126
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
127
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoCreateSubscriptionRequest</code>.
|
|
128
|
+
*/
|
|
129
|
+
}, {
|
|
130
|
+
key: "validateJSON",
|
|
131
|
+
value: function validateJSON(data) {
|
|
132
|
+
// check to make sure all required properties are present in the JSON string
|
|
133
|
+
var _iterator = _createForOfIteratorHelper(DtoCreateSubscriptionRequest.RequiredProperties),
|
|
134
|
+
_step;
|
|
135
|
+
try {
|
|
136
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
137
|
+
var property = _step.value;
|
|
138
|
+
if (!data.hasOwnProperty(property)) {
|
|
139
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
} catch (err) {
|
|
144
|
+
_iterator.e(err);
|
|
145
|
+
} finally {
|
|
146
|
+
_iterator.f();
|
|
147
|
+
}
|
|
148
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['customer_id'] && !(typeof data['customer_id'] === 'string' || data['customer_id'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `customer_id` to be a primitive type in the JSON string but got " + data['customer_id']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['end_date'] && !(typeof data['end_date'] === 'string' || data['end_date'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `end_date` to be a primitive type in the JSON string but got " + data['end_date']);
|
|
158
|
+
}
|
|
159
|
+
// ensure the json data is a string
|
|
160
|
+
if (data['lookup_key'] && !(typeof data['lookup_key'] === 'string' || data['lookup_key'] instanceof String)) {
|
|
161
|
+
throw new Error("Expected the field `lookup_key` to be a primitive type in the JSON string but got " + data['lookup_key']);
|
|
162
|
+
}
|
|
163
|
+
// ensure the json data is a string
|
|
164
|
+
if (data['plan_id'] && !(typeof data['plan_id'] === 'string' || data['plan_id'] instanceof String)) {
|
|
165
|
+
throw new Error("Expected the field `plan_id` to be a primitive type in the JSON string but got " + data['plan_id']);
|
|
166
|
+
}
|
|
167
|
+
// ensure the json data is a string
|
|
168
|
+
if (data['start_date'] && !(typeof data['start_date'] === 'string' || data['start_date'] instanceof String)) {
|
|
169
|
+
throw new Error("Expected the field `start_date` to be a primitive type in the JSON string but got " + data['start_date']);
|
|
170
|
+
}
|
|
171
|
+
// ensure the json data is a string
|
|
172
|
+
if (data['trial_end'] && !(typeof data['trial_end'] === 'string' || data['trial_end'] instanceof String)) {
|
|
173
|
+
throw new Error("Expected the field `trial_end` to be a primitive type in the JSON string but got " + data['trial_end']);
|
|
174
|
+
}
|
|
175
|
+
// ensure the json data is a string
|
|
176
|
+
if (data['trial_start'] && !(typeof data['trial_start'] === 'string' || data['trial_start'] instanceof String)) {
|
|
177
|
+
throw new Error("Expected the field `trial_start` to be a primitive type in the JSON string but got " + data['trial_start']);
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
}]);
|
|
182
|
+
}();
|
|
183
|
+
DtoCreateSubscriptionRequest.RequiredProperties = ["billing_cadence", "billing_period", "billing_period_count", "currency", "customer_id", "plan_id", "start_date"];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @member {module:model/TypesBillingCadence} billing_cadence
|
|
187
|
+
*/
|
|
188
|
+
DtoCreateSubscriptionRequest.prototype['billing_cadence'] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @member {module:model/TypesBillingPeriod} billing_period
|
|
192
|
+
*/
|
|
193
|
+
DtoCreateSubscriptionRequest.prototype['billing_period'] = undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @member {Number} billing_period_count
|
|
197
|
+
*/
|
|
198
|
+
DtoCreateSubscriptionRequest.prototype['billing_period_count'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @member {String} currency
|
|
202
|
+
*/
|
|
203
|
+
DtoCreateSubscriptionRequest.prototype['currency'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @member {String} customer_id
|
|
207
|
+
*/
|
|
208
|
+
DtoCreateSubscriptionRequest.prototype['customer_id'] = undefined;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @member {String} end_date
|
|
212
|
+
*/
|
|
213
|
+
DtoCreateSubscriptionRequest.prototype['end_date'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @member {String} lookup_key
|
|
217
|
+
*/
|
|
218
|
+
DtoCreateSubscriptionRequest.prototype['lookup_key'] = undefined;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @member {Object.<String, String>} metadata
|
|
222
|
+
*/
|
|
223
|
+
DtoCreateSubscriptionRequest.prototype['metadata'] = undefined;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @member {String} plan_id
|
|
227
|
+
*/
|
|
228
|
+
DtoCreateSubscriptionRequest.prototype['plan_id'] = undefined;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @member {String} start_date
|
|
232
|
+
*/
|
|
233
|
+
DtoCreateSubscriptionRequest.prototype['start_date'] = undefined;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @member {String} trial_end
|
|
237
|
+
*/
|
|
238
|
+
DtoCreateSubscriptionRequest.prototype['trial_end'] = undefined;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @member {String} trial_start
|
|
242
|
+
*/
|
|
243
|
+
DtoCreateSubscriptionRequest.prototype['trial_start'] = undefined;
|
|
244
|
+
var _default = exports["default"] = DtoCreateSubscriptionRequest;
|
|
@@ -0,0 +1,167 @@
|
|
|
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 _TypesEntityType = _interopRequireDefault(require("./TypesEntityType"));
|
|
9
|
+
var _TypesFileType = _interopRequireDefault(require("./TypesFileType"));
|
|
10
|
+
var _TypesTaskType = _interopRequireDefault(require("./TypesTaskType"));
|
|
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 DtoCreateTaskRequest model module.
|
|
34
|
+
* @module model/DtoCreateTaskRequest
|
|
35
|
+
* @version 1.0
|
|
36
|
+
*/
|
|
37
|
+
var DtoCreateTaskRequest = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>DtoCreateTaskRequest</code>.
|
|
40
|
+
* @alias module:model/DtoCreateTaskRequest
|
|
41
|
+
* @param entityType {module:model/TypesEntityType}
|
|
42
|
+
* @param fileType {module:model/TypesFileType}
|
|
43
|
+
* @param fileUrl {String}
|
|
44
|
+
* @param taskType {module:model/TypesTaskType}
|
|
45
|
+
*/
|
|
46
|
+
function DtoCreateTaskRequest(entityType, fileType, fileUrl, taskType) {
|
|
47
|
+
_classCallCheck(this, DtoCreateTaskRequest);
|
|
48
|
+
DtoCreateTaskRequest.initialize(this, entityType, fileType, fileUrl, taskType);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(DtoCreateTaskRequest, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, entityType, fileType, fileUrl, taskType) {
|
|
59
|
+
obj['entity_type'] = entityType;
|
|
60
|
+
obj['file_type'] = fileType;
|
|
61
|
+
obj['file_url'] = fileUrl;
|
|
62
|
+
obj['task_type'] = taskType;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>DtoCreateTaskRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/DtoCreateTaskRequest} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/DtoCreateTaskRequest} The populated <code>DtoCreateTaskRequest</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new DtoCreateTaskRequest();
|
|
77
|
+
if (data.hasOwnProperty('entity_type')) {
|
|
78
|
+
obj['entity_type'] = _TypesEntityType["default"].constructFromObject(data['entity_type']);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('file_name')) {
|
|
81
|
+
obj['file_name'] = _ApiClient["default"].convertToType(data['file_name'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('file_type')) {
|
|
84
|
+
obj['file_type'] = _TypesFileType["default"].constructFromObject(data['file_type']);
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('file_url')) {
|
|
87
|
+
obj['file_url'] = _ApiClient["default"].convertToType(data['file_url'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('metadata')) {
|
|
90
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
|
|
91
|
+
'String': Object
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('task_type')) {
|
|
95
|
+
obj['task_type'] = _TypesTaskType["default"].constructFromObject(data['task_type']);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return obj;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Validates the JSON data with respect to <code>DtoCreateTaskRequest</code>.
|
|
103
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
104
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoCreateTaskRequest</code>.
|
|
105
|
+
*/
|
|
106
|
+
}, {
|
|
107
|
+
key: "validateJSON",
|
|
108
|
+
value: function validateJSON(data) {
|
|
109
|
+
// check to make sure all required properties are present in the JSON string
|
|
110
|
+
var _iterator = _createForOfIteratorHelper(DtoCreateTaskRequest.RequiredProperties),
|
|
111
|
+
_step;
|
|
112
|
+
try {
|
|
113
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
114
|
+
var property = _step.value;
|
|
115
|
+
if (!data.hasOwnProperty(property)) {
|
|
116
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
} catch (err) {
|
|
121
|
+
_iterator.e(err);
|
|
122
|
+
} finally {
|
|
123
|
+
_iterator.f();
|
|
124
|
+
}
|
|
125
|
+
if (data['file_name'] && !(typeof data['file_name'] === 'string' || data['file_name'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `file_name` to be a primitive type in the JSON string but got " + data['file_name']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['file_url'] && !(typeof data['file_url'] === 'string' || data['file_url'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `file_url` to be a primitive type in the JSON string but got " + data['file_url']);
|
|
131
|
+
}
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
}]);
|
|
135
|
+
}();
|
|
136
|
+
DtoCreateTaskRequest.RequiredProperties = ["entity_type", "file_type", "file_url", "task_type"];
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @member {module:model/TypesEntityType} entity_type
|
|
140
|
+
*/
|
|
141
|
+
DtoCreateTaskRequest.prototype['entity_type'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @member {String} file_name
|
|
145
|
+
*/
|
|
146
|
+
DtoCreateTaskRequest.prototype['file_name'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @member {module:model/TypesFileType} file_type
|
|
150
|
+
*/
|
|
151
|
+
DtoCreateTaskRequest.prototype['file_type'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @member {String} file_url
|
|
155
|
+
*/
|
|
156
|
+
DtoCreateTaskRequest.prototype['file_url'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @member {Object.<String, Object>} metadata
|
|
160
|
+
*/
|
|
161
|
+
DtoCreateTaskRequest.prototype['metadata'] = undefined;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @member {module:model/TypesTaskType} task_type
|
|
165
|
+
*/
|
|
166
|
+
DtoCreateTaskRequest.prototype['task_type'] = undefined;
|
|
167
|
+
var _default = exports["default"] = DtoCreateTaskRequest;
|
|
@@ -0,0 +1,126 @@
|
|
|
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 _DtoTenantBillingDetails = _interopRequireDefault(require("./DtoTenantBillingDetails"));
|
|
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
|
+
* FlexPrice API
|
|
20
|
+
* FlexPrice API Service
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document: 1.0
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The DtoCreateTenantRequest model module.
|
|
32
|
+
* @module model/DtoCreateTenantRequest
|
|
33
|
+
* @version 1.0
|
|
34
|
+
*/
|
|
35
|
+
var DtoCreateTenantRequest = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>DtoCreateTenantRequest</code>.
|
|
38
|
+
* @alias module:model/DtoCreateTenantRequest
|
|
39
|
+
* @param name {String}
|
|
40
|
+
*/
|
|
41
|
+
function DtoCreateTenantRequest(name) {
|
|
42
|
+
_classCallCheck(this, DtoCreateTenantRequest);
|
|
43
|
+
DtoCreateTenantRequest.initialize(this, name);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(DtoCreateTenantRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, name) {
|
|
54
|
+
obj['name'] = name;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>DtoCreateTenantRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/DtoCreateTenantRequest} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/DtoCreateTenantRequest} The populated <code>DtoCreateTenantRequest</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new DtoCreateTenantRequest();
|
|
69
|
+
if (data.hasOwnProperty('billing_details')) {
|
|
70
|
+
obj['billing_details'] = _DtoTenantBillingDetails["default"].constructFromObject(data['billing_details']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('name')) {
|
|
73
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>DtoCreateTenantRequest</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoCreateTenantRequest</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// check to make sure all required properties are present in the JSON string
|
|
88
|
+
var _iterator = _createForOfIteratorHelper(DtoCreateTenantRequest.RequiredProperties),
|
|
89
|
+
_step;
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var property = _step.value;
|
|
93
|
+
if (!data.hasOwnProperty(property)) {
|
|
94
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// validate the optional field `billing_details`
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['billing_details']) {
|
|
104
|
+
// data not null
|
|
105
|
+
_DtoTenantBillingDetails["default"].validateJSON(data['billing_details']);
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}]);
|
|
114
|
+
}();
|
|
115
|
+
DtoCreateTenantRequest.RequiredProperties = ["name"];
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @member {module:model/DtoTenantBillingDetails} billing_details
|
|
119
|
+
*/
|
|
120
|
+
DtoCreateTenantRequest.prototype['billing_details'] = undefined;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @member {String} name
|
|
124
|
+
*/
|
|
125
|
+
DtoCreateTenantRequest.prototype['name'] = undefined;
|
|
126
|
+
var _default = exports["default"] = DtoCreateTenantRequest;
|