@flexprice/sdk 1.0.16 → 1.0.26
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 +281 -200
- package/package.json +29 -41
- package/LICENSE +0 -663
- package/dist/ApiClient.js +0 -653
- package/dist/api/AuthApi.js +0 -100
- package/dist/api/CustomersApi.js +0 -376
- package/dist/api/EntitlementsApi.js +0 -267
- package/dist/api/EnvironmentsApi.js +0 -184
- package/dist/api/EventsApi.js +0 -238
- package/dist/api/FeaturesApi.js +0 -263
- package/dist/api/IntegrationsApi.js +0 -169
- package/dist/api/InvoicesApi.js +0 -419
- package/dist/api/PaymentsApi.js +0 -272
- package/dist/api/PlansApi.js +0 -226
- package/dist/api/PricesApi.js +0 -228
- package/dist/api/SecretsApi.js +0 -137
- package/dist/api/SubscriptionsApi.js +0 -353
- package/dist/api/TasksApi.js +0 -232
- package/dist/api/TenantsApi.js +0 -162
- package/dist/api/UsersApi.js +0 -61
- package/dist/api/WalletsApi.js +0 -392
- package/dist/index.js +0 -1102
- package/dist/model/DtoAddress.js +0 -132
- package/dist/model/DtoAggregatedEntitlement.js +0 -106
- package/dist/model/DtoAggregatedFeature.js +0 -109
- package/dist/model/DtoAuthResponse.js +0 -96
- package/dist/model/DtoBillingPeriodInfo.js +0 -97
- package/dist/model/DtoBulkIngestEventRequest.js +0 -91
- package/dist/model/DtoCreateAPIKeyRequest.js +0 -117
- package/dist/model/DtoCreateAPIKeyResponse.js +0 -86
- package/dist/model/DtoCreateCustomerRequest.js +0 -188
- package/dist/model/DtoCreateEntitlementRequest.js +0 -150
- package/dist/model/DtoCreateEnvironmentRequest.js +0 -96
- package/dist/model/DtoCreateFeatureRequest.js +0 -177
- package/dist/model/DtoCreateIntegrationRequest.js +0 -105
- package/dist/model/DtoCreateInvoiceLineItemRequest.js +0 -206
- package/dist/model/DtoCreateInvoiceRequest.js +0 -289
- package/dist/model/DtoCreateMeterRequest.js +0 -144
- package/dist/model/DtoCreatePaymentRequest.js +0 -172
- package/dist/model/DtoCreatePlanEntitlementRequest.js +0 -150
- package/dist/model/DtoCreatePlanPriceRequest.js +0 -279
- package/dist/model/DtoCreatePlanRequest.js +0 -148
- package/dist/model/DtoCreatePriceRequest.js +0 -279
- package/dist/model/DtoCreatePriceTier.js +0 -102
- package/dist/model/DtoCreateSubscriptionRequest.js +0 -223
- package/dist/model/DtoCreateTaskRequest.js +0 -137
- package/dist/model/DtoCreateTenantRequest.js +0 -96
- package/dist/model/DtoCreateWalletRequest.js +0 -205
- package/dist/model/DtoCustomerEntitlementsResponse.js +0 -93
- package/dist/model/DtoCustomerInvoiceSummary.js +0 -148
- package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +0 -105
- package/dist/model/DtoCustomerResponse.js +0 -283
- package/dist/model/DtoCustomerUsageSummaryResponse.js +0 -121
- package/dist/model/DtoEntitlementResponse.js +0 -259
- package/dist/model/DtoEntitlementSource.js +0 -144
- package/dist/model/DtoEnvironmentResponse.js +0 -120
- package/dist/model/DtoEvent.js +0 -154
- package/dist/model/DtoFeatureResponse.js +0 -258
- package/dist/model/DtoFeatureUsageSummary.js +0 -135
- package/dist/model/DtoGetEventsRequest.js +0 -193
- package/dist/model/DtoGetEventsResponse.js +0 -129
- package/dist/model/DtoGetPreviewInvoiceRequest.js +0 -106
- package/dist/model/DtoGetUsageAnalyticsRequest.js +0 -156
- package/dist/model/DtoGetUsageAnalyticsResponse.js +0 -101
- package/dist/model/DtoGetUsageByMeterRequest.js +0 -149
- package/dist/model/DtoGetUsageBySubscriptionRequest.js +0 -114
- package/dist/model/DtoGetUsageBySubscriptionResponse.js +0 -137
- package/dist/model/DtoGetUsageRequest.js +0 -173
- package/dist/model/DtoGetUsageResponse.js +0 -110
- package/dist/model/DtoIngestEventRequest.js +0 -156
- package/dist/model/DtoInvoiceLineItemResponse.js +0 -326
- package/dist/model/DtoInvoiceResponse.js +0 -450
- package/dist/model/DtoLinkedIntegrationsResponse.js +0 -72
- package/dist/model/DtoListCustomersResponse.js +0 -95
- package/dist/model/DtoListEntitlementsResponse.js +0 -95
- package/dist/model/DtoListEnvironmentsResponse.js +0 -105
- package/dist/model/DtoListFeaturesResponse.js +0 -95
- package/dist/model/DtoListInvoicesResponse.js +0 -95
- package/dist/model/DtoListPaymentsResponse.js +0 -95
- package/dist/model/DtoListPlansResponse.js +0 -95
- package/dist/model/DtoListPricesResponse.js +0 -95
- package/dist/model/DtoListSecretsResponse.js +0 -95
- package/dist/model/DtoListSubscriptionPausesResponse.js +0 -89
- package/dist/model/DtoListSubscriptionsResponse.js +0 -95
- package/dist/model/DtoListTasksResponse.js +0 -95
- package/dist/model/DtoListWalletTransactionsResponse.js +0 -95
- package/dist/model/DtoLoginRequest.js +0 -108
- package/dist/model/DtoMeterResponse.js +0 -188
- package/dist/model/DtoPauseSubscriptionRequest.js +0 -141
- package/dist/model/DtoPaymentAttemptResponse.js +0 -174
- package/dist/model/DtoPaymentResponse.js +0 -314
- package/dist/model/DtoPlanResponse.js +0 -231
- package/dist/model/DtoPriceResponse.js +0 -373
- package/dist/model/DtoResumeSubscriptionRequest.js +0 -97
- package/dist/model/DtoSecretResponse.js +0 -183
- package/dist/model/DtoSignUpRequest.js +0 -118
- package/dist/model/DtoSubscriptionPauseResponse.js +0 -283
- package/dist/model/DtoSubscriptionResponse.js +0 -489
- package/dist/model/DtoSubscriptionUsageByMetersResponse.js +0 -148
- package/dist/model/DtoTaskResponse.js +0 -294
- package/dist/model/DtoTenantBillingDetails.js +0 -110
- package/dist/model/DtoTenantBillingUsage.js +0 -95
- package/dist/model/DtoTenantResponse.js +0 -134
- package/dist/model/DtoTopUpWalletRequest.js +0 -148
- package/dist/model/DtoUpdateCustomerRequest.js +0 -178
- package/dist/model/DtoUpdateEntitlementRequest.js +0 -105
- package/dist/model/DtoUpdateEnvironmentRequest.js +0 -84
- package/dist/model/DtoUpdateFeatureRequest.js +0 -139
- package/dist/model/DtoUpdatePaymentRequest.js +0 -82
- package/dist/model/DtoUpdatePaymentStatusRequest.js +0 -87
- package/dist/model/DtoUpdatePlanEntitlementRequest.js +0 -163
- package/dist/model/DtoUpdatePlanPriceRequest.js +0 -292
- package/dist/model/DtoUpdatePlanRequest.js +0 -138
- package/dist/model/DtoUpdatePriceRequest.js +0 -94
- package/dist/model/DtoUpdateTaskStatusRequest.js +0 -79
- package/dist/model/DtoUpdateTenantRequest.js +0 -86
- package/dist/model/DtoUpdateWalletRequest.js +0 -133
- package/dist/model/DtoUsageAnalyticItem.js +0 -190
- package/dist/model/DtoUsageAnalyticPoint.js +0 -88
- package/dist/model/DtoUsageResult.js +0 -80
- package/dist/model/DtoUserResponse.js +0 -98
- package/dist/model/DtoWalletBalanceResponse.js +0 -336
- package/dist/model/DtoWalletResponse.js +0 -235
- package/dist/model/DtoWalletTransactionResponse.js +0 -221
- package/dist/model/ErrorsErrorDetail.js +0 -94
- package/dist/model/ErrorsErrorResponse.js +0 -82
- package/dist/model/GithubComFlexpriceFlexpriceInternalTypesValue.js +0 -112
- package/dist/model/MeterAggregation.js +0 -82
- package/dist/model/MeterFilter.js +0 -86
- package/dist/model/PriceJSONBTransformQuantity.js +0 -82
- package/dist/model/PricePrice.js +0 -359
- package/dist/model/PricePriceTier.js +0 -87
- package/dist/model/PriceTransformQuantity.js +0 -82
- package/dist/model/SubscriptionSubscriptionLineItem.js +0 -338
- package/dist/model/SubscriptionSubscriptionPause.js +0 -283
- package/dist/model/TypesAggregationType.js +0 -53
- package/dist/model/TypesAutoTopupTrigger.js +0 -41
- package/dist/model/TypesBillingCadence.js +0 -41
- package/dist/model/TypesBillingCycle.js +0 -41
- package/dist/model/TypesBillingModel.js +0 -47
- package/dist/model/TypesBillingPeriod.js +0 -65
- package/dist/model/TypesBillingTier.js +0 -41
- package/dist/model/TypesCustomerFilter.js +0 -230
- package/dist/model/TypesDataType.js +0 -53
- package/dist/model/TypesEntityType.js +0 -47
- package/dist/model/TypesFeatureFilter.js +0 -243
- package/dist/model/TypesFeatureType.js +0 -47
- package/dist/model/TypesFileType.js +0 -41
- package/dist/model/TypesFilterCondition.js +0 -104
- package/dist/model/TypesFilterOperatorType.js +0 -77
- package/dist/model/TypesInvoiceBillingReason.js +0 -53
- package/dist/model/TypesInvoiceCadence.js +0 -41
- package/dist/model/TypesInvoiceStatus.js +0 -47
- package/dist/model/TypesInvoiceType.js +0 -47
- package/dist/model/TypesPaginationResponse.js +0 -84
- package/dist/model/TypesPauseMode.js +0 -47
- package/dist/model/TypesPauseStatus.js +0 -59
- package/dist/model/TypesPaymentDestinationType.js +0 -35
- package/dist/model/TypesPaymentMethodType.js +0 -53
- package/dist/model/TypesPaymentStatus.js +0 -65
- package/dist/model/TypesPriceType.js +0 -41
- package/dist/model/TypesResetUsage.js +0 -41
- package/dist/model/TypesResumeMode.js +0 -47
- package/dist/model/TypesSecretProvider.js +0 -47
- package/dist/model/TypesSecretType.js +0 -47
- package/dist/model/TypesSortCondition.js +0 -81
- package/dist/model/TypesSortDirection.js +0 -41
- package/dist/model/TypesStatus.js +0 -47
- package/dist/model/TypesSubscriptionStatus.js +0 -77
- package/dist/model/TypesTaskStatus.js +0 -53
- package/dist/model/TypesTaskType.js +0 -41
- package/dist/model/TypesTransactionReason.js +0 -77
- package/dist/model/TypesTransactionStatus.js +0 -47
- package/dist/model/TypesTransactionType.js +0 -41
- package/dist/model/TypesWalletConfig.js +0 -74
- package/dist/model/TypesWalletConfigPriceType.js +0 -47
- package/dist/model/TypesWalletStatus.js +0 -47
- package/dist/model/TypesWalletTxReferenceType.js +0 -47
- package/dist/model/TypesWalletType.js +0 -41
- package/dist/model/TypesWindowSize.js +0 -47
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
import MeterAggregation from './MeterAggregation';
|
|
16
|
-
import MeterFilter from './MeterFilter';
|
|
17
|
-
import TypesResetUsage from './TypesResetUsage';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The DtoMeterResponse model module.
|
|
21
|
-
* @module model/DtoMeterResponse
|
|
22
|
-
* @version 1.0
|
|
23
|
-
*/
|
|
24
|
-
class DtoMeterResponse {
|
|
25
|
-
/**
|
|
26
|
-
* Constructs a new <code>DtoMeterResponse</code>.
|
|
27
|
-
* @alias module:model/DtoMeterResponse
|
|
28
|
-
*/
|
|
29
|
-
constructor() {
|
|
30
|
-
DtoMeterResponse.initialize(this);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Initializes the fields of this object.
|
|
35
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
36
|
-
* Only for internal use.
|
|
37
|
-
*/
|
|
38
|
-
static initialize(obj) {}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Constructs a <code>DtoMeterResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
42
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
43
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
44
|
-
* @param {module:model/DtoMeterResponse} obj Optional instance to populate.
|
|
45
|
-
* @return {module:model/DtoMeterResponse} The populated <code>DtoMeterResponse</code> instance.
|
|
46
|
-
*/
|
|
47
|
-
static constructFromObject(data, obj) {
|
|
48
|
-
if (data) {
|
|
49
|
-
obj = obj || new DtoMeterResponse();
|
|
50
|
-
if (data.hasOwnProperty('aggregation')) {
|
|
51
|
-
obj['aggregation'] = MeterAggregation.constructFromObject(data['aggregation']);
|
|
52
|
-
}
|
|
53
|
-
if (data.hasOwnProperty('created_at')) {
|
|
54
|
-
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
|
|
55
|
-
}
|
|
56
|
-
if (data.hasOwnProperty('event_name')) {
|
|
57
|
-
obj['event_name'] = ApiClient.convertToType(data['event_name'], 'String');
|
|
58
|
-
}
|
|
59
|
-
if (data.hasOwnProperty('filters')) {
|
|
60
|
-
obj['filters'] = ApiClient.convertToType(data['filters'], [MeterFilter]);
|
|
61
|
-
}
|
|
62
|
-
if (data.hasOwnProperty('id')) {
|
|
63
|
-
obj['id'] = ApiClient.convertToType(data['id'], 'String');
|
|
64
|
-
}
|
|
65
|
-
if (data.hasOwnProperty('name')) {
|
|
66
|
-
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
|
67
|
-
}
|
|
68
|
-
if (data.hasOwnProperty('reset_usage')) {
|
|
69
|
-
obj['reset_usage'] = TypesResetUsage.constructFromObject(data['reset_usage']);
|
|
70
|
-
}
|
|
71
|
-
if (data.hasOwnProperty('status')) {
|
|
72
|
-
obj['status'] = ApiClient.convertToType(data['status'], 'String');
|
|
73
|
-
}
|
|
74
|
-
if (data.hasOwnProperty('tenant_id')) {
|
|
75
|
-
obj['tenant_id'] = ApiClient.convertToType(data['tenant_id'], 'String');
|
|
76
|
-
}
|
|
77
|
-
if (data.hasOwnProperty('updated_at')) {
|
|
78
|
-
obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return obj;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Validates the JSON data with respect to <code>DtoMeterResponse</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>DtoMeterResponse</code>.
|
|
88
|
-
*/
|
|
89
|
-
static validateJSON(data) {
|
|
90
|
-
// validate the optional field `aggregation`
|
|
91
|
-
if (data['aggregation']) {
|
|
92
|
-
// data not null
|
|
93
|
-
MeterAggregation.validateJSON(data['aggregation']);
|
|
94
|
-
}
|
|
95
|
-
// ensure the json data is a string
|
|
96
|
-
if (data['created_at'] && !(typeof data['created_at'] === 'string' || data['created_at'] instanceof String)) {
|
|
97
|
-
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
98
|
-
}
|
|
99
|
-
// ensure the json data is a string
|
|
100
|
-
if (data['event_name'] && !(typeof data['event_name'] === 'string' || data['event_name'] instanceof String)) {
|
|
101
|
-
throw new Error("Expected the field `event_name` to be a primitive type in the JSON string but got " + data['event_name']);
|
|
102
|
-
}
|
|
103
|
-
if (data['filters']) {
|
|
104
|
-
// data not null
|
|
105
|
-
// ensure the json data is an array
|
|
106
|
-
if (!Array.isArray(data['filters'])) {
|
|
107
|
-
throw new Error("Expected the field `filters` to be an array in the JSON data but got " + data['filters']);
|
|
108
|
-
}
|
|
109
|
-
// validate the optional field `filters` (array)
|
|
110
|
-
for (const item of data['filters']) {
|
|
111
|
-
MeterFilter.validateJSON(item);
|
|
112
|
-
}
|
|
113
|
-
;
|
|
114
|
-
}
|
|
115
|
-
// ensure the json data is a string
|
|
116
|
-
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
117
|
-
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
118
|
-
}
|
|
119
|
-
// ensure the json data is a string
|
|
120
|
-
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
121
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
122
|
-
}
|
|
123
|
-
// ensure the json data is a string
|
|
124
|
-
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
125
|
-
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
126
|
-
}
|
|
127
|
-
// ensure the json data is a string
|
|
128
|
-
if (data['tenant_id'] && !(typeof data['tenant_id'] === 'string' || data['tenant_id'] instanceof String)) {
|
|
129
|
-
throw new Error("Expected the field `tenant_id` to be a primitive type in the JSON string but got " + data['tenant_id']);
|
|
130
|
-
}
|
|
131
|
-
// ensure the json data is a string
|
|
132
|
-
if (data['updated_at'] && !(typeof data['updated_at'] === 'string' || data['updated_at'] instanceof String)) {
|
|
133
|
-
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @member {module:model/MeterAggregation} aggregation
|
|
141
|
-
*/
|
|
142
|
-
DtoMeterResponse.prototype['aggregation'] = undefined;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @member {String} created_at
|
|
146
|
-
*/
|
|
147
|
-
DtoMeterResponse.prototype['created_at'] = undefined;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @member {String} event_name
|
|
151
|
-
*/
|
|
152
|
-
DtoMeterResponse.prototype['event_name'] = undefined;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @member {Array.<module:model/MeterFilter>} filters
|
|
156
|
-
*/
|
|
157
|
-
DtoMeterResponse.prototype['filters'] = undefined;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* @member {String} id
|
|
161
|
-
*/
|
|
162
|
-
DtoMeterResponse.prototype['id'] = undefined;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @member {String} name
|
|
166
|
-
*/
|
|
167
|
-
DtoMeterResponse.prototype['name'] = undefined;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @member {module:model/TypesResetUsage} reset_usage
|
|
171
|
-
*/
|
|
172
|
-
DtoMeterResponse.prototype['reset_usage'] = undefined;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @member {String} status
|
|
176
|
-
*/
|
|
177
|
-
DtoMeterResponse.prototype['status'] = undefined;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* @member {String} tenant_id
|
|
181
|
-
*/
|
|
182
|
-
DtoMeterResponse.prototype['tenant_id'] = undefined;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @member {String} updated_at
|
|
186
|
-
*/
|
|
187
|
-
DtoMeterResponse.prototype['updated_at'] = undefined;
|
|
188
|
-
export default DtoMeterResponse;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
import TypesPauseMode from './TypesPauseMode';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The DtoPauseSubscriptionRequest model module.
|
|
19
|
-
* @module model/DtoPauseSubscriptionRequest
|
|
20
|
-
* @version 1.0
|
|
21
|
-
*/
|
|
22
|
-
class DtoPauseSubscriptionRequest {
|
|
23
|
-
/**
|
|
24
|
-
* Constructs a new <code>DtoPauseSubscriptionRequest</code>.
|
|
25
|
-
* @alias module:model/DtoPauseSubscriptionRequest
|
|
26
|
-
* @param pauseMode {module:model/TypesPauseMode}
|
|
27
|
-
*/
|
|
28
|
-
constructor(pauseMode) {
|
|
29
|
-
DtoPauseSubscriptionRequest.initialize(this, pauseMode);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Initializes the fields of this object.
|
|
34
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
35
|
-
* Only for internal use.
|
|
36
|
-
*/
|
|
37
|
-
static initialize(obj, pauseMode) {
|
|
38
|
-
obj['pause_mode'] = pauseMode;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Constructs a <code>DtoPauseSubscriptionRequest</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/DtoPauseSubscriptionRequest} obj Optional instance to populate.
|
|
46
|
-
* @return {module:model/DtoPauseSubscriptionRequest} The populated <code>DtoPauseSubscriptionRequest</code> instance.
|
|
47
|
-
*/
|
|
48
|
-
static constructFromObject(data, obj) {
|
|
49
|
-
if (data) {
|
|
50
|
-
obj = obj || new DtoPauseSubscriptionRequest();
|
|
51
|
-
if (data.hasOwnProperty('dry_run')) {
|
|
52
|
-
obj['dry_run'] = ApiClient.convertToType(data['dry_run'], 'Boolean');
|
|
53
|
-
}
|
|
54
|
-
if (data.hasOwnProperty('metadata')) {
|
|
55
|
-
obj['metadata'] = ApiClient.convertToType(data['metadata'], {
|
|
56
|
-
'String': 'String'
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
if (data.hasOwnProperty('pause_days')) {
|
|
60
|
-
obj['pause_days'] = ApiClient.convertToType(data['pause_days'], 'Number');
|
|
61
|
-
}
|
|
62
|
-
if (data.hasOwnProperty('pause_end')) {
|
|
63
|
-
obj['pause_end'] = ApiClient.convertToType(data['pause_end'], 'String');
|
|
64
|
-
}
|
|
65
|
-
if (data.hasOwnProperty('pause_mode')) {
|
|
66
|
-
obj['pause_mode'] = TypesPauseMode.constructFromObject(data['pause_mode']);
|
|
67
|
-
}
|
|
68
|
-
if (data.hasOwnProperty('pause_start')) {
|
|
69
|
-
obj['pause_start'] = ApiClient.convertToType(data['pause_start'], 'String');
|
|
70
|
-
}
|
|
71
|
-
if (data.hasOwnProperty('reason')) {
|
|
72
|
-
obj['reason'] = ApiClient.convertToType(data['reason'], 'String');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Validates the JSON data with respect to <code>DtoPauseSubscriptionRequest</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>DtoPauseSubscriptionRequest</code>.
|
|
82
|
-
*/
|
|
83
|
-
static validateJSON(data) {
|
|
84
|
-
// check to make sure all required properties are present in the JSON string
|
|
85
|
-
for (const property of DtoPauseSubscriptionRequest.RequiredProperties) {
|
|
86
|
-
if (!data.hasOwnProperty(property)) {
|
|
87
|
-
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// ensure the json data is a string
|
|
91
|
-
if (data['pause_end'] && !(typeof data['pause_end'] === 'string' || data['pause_end'] instanceof String)) {
|
|
92
|
-
throw new Error("Expected the field `pause_end` to be a primitive type in the JSON string but got " + data['pause_end']);
|
|
93
|
-
}
|
|
94
|
-
// ensure the json data is a string
|
|
95
|
-
if (data['pause_start'] && !(typeof data['pause_start'] === 'string' || data['pause_start'] instanceof String)) {
|
|
96
|
-
throw new Error("Expected the field `pause_start` to be a primitive type in the JSON string but got " + data['pause_start']);
|
|
97
|
-
}
|
|
98
|
-
// ensure the json data is a string
|
|
99
|
-
if (data['reason'] && !(typeof data['reason'] === 'string' || data['reason'] instanceof String)) {
|
|
100
|
-
throw new Error("Expected the field `reason` to be a primitive type in the JSON string but got " + data['reason']);
|
|
101
|
-
}
|
|
102
|
-
return true;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
DtoPauseSubscriptionRequest.RequiredProperties = ["pause_mode"];
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @member {Boolean} dry_run
|
|
109
|
-
*/
|
|
110
|
-
DtoPauseSubscriptionRequest.prototype['dry_run'] = undefined;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @member {Object.<String, String>} metadata
|
|
114
|
-
*/
|
|
115
|
-
DtoPauseSubscriptionRequest.prototype['metadata'] = undefined;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* @member {Number} pause_days
|
|
119
|
-
*/
|
|
120
|
-
DtoPauseSubscriptionRequest.prototype['pause_days'] = undefined;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @member {String} pause_end
|
|
124
|
-
*/
|
|
125
|
-
DtoPauseSubscriptionRequest.prototype['pause_end'] = undefined;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @member {module:model/TypesPauseMode} pause_mode
|
|
129
|
-
*/
|
|
130
|
-
DtoPauseSubscriptionRequest.prototype['pause_mode'] = undefined;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @member {String} pause_start
|
|
134
|
-
*/
|
|
135
|
-
DtoPauseSubscriptionRequest.prototype['pause_start'] = undefined;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* @member {String} reason
|
|
139
|
-
*/
|
|
140
|
-
DtoPauseSubscriptionRequest.prototype['reason'] = undefined;
|
|
141
|
-
export default DtoPauseSubscriptionRequest;
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FlexPrice API
|
|
3
|
-
* FlexPrice API Service
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import ApiClient from '../ApiClient';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The DtoPaymentAttemptResponse model module.
|
|
18
|
-
* @module model/DtoPaymentAttemptResponse
|
|
19
|
-
* @version 1.0
|
|
20
|
-
*/
|
|
21
|
-
class DtoPaymentAttemptResponse {
|
|
22
|
-
/**
|
|
23
|
-
* Constructs a new <code>DtoPaymentAttemptResponse</code>.
|
|
24
|
-
* @alias module:model/DtoPaymentAttemptResponse
|
|
25
|
-
*/
|
|
26
|
-
constructor() {
|
|
27
|
-
DtoPaymentAttemptResponse.initialize(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the fields of this object.
|
|
32
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
33
|
-
* Only for internal use.
|
|
34
|
-
*/
|
|
35
|
-
static initialize(obj) {}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Constructs a <code>DtoPaymentAttemptResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
39
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
40
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
41
|
-
* @param {module:model/DtoPaymentAttemptResponse} obj Optional instance to populate.
|
|
42
|
-
* @return {module:model/DtoPaymentAttemptResponse} The populated <code>DtoPaymentAttemptResponse</code> instance.
|
|
43
|
-
*/
|
|
44
|
-
static constructFromObject(data, obj) {
|
|
45
|
-
if (data) {
|
|
46
|
-
obj = obj || new DtoPaymentAttemptResponse();
|
|
47
|
-
if (data.hasOwnProperty('attempt_number')) {
|
|
48
|
-
obj['attempt_number'] = ApiClient.convertToType(data['attempt_number'], 'Number');
|
|
49
|
-
}
|
|
50
|
-
if (data.hasOwnProperty('created_at')) {
|
|
51
|
-
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
|
|
52
|
-
}
|
|
53
|
-
if (data.hasOwnProperty('created_by')) {
|
|
54
|
-
obj['created_by'] = ApiClient.convertToType(data['created_by'], 'String');
|
|
55
|
-
}
|
|
56
|
-
if (data.hasOwnProperty('error_message')) {
|
|
57
|
-
obj['error_message'] = ApiClient.convertToType(data['error_message'], 'String');
|
|
58
|
-
}
|
|
59
|
-
if (data.hasOwnProperty('id')) {
|
|
60
|
-
obj['id'] = ApiClient.convertToType(data['id'], 'String');
|
|
61
|
-
}
|
|
62
|
-
if (data.hasOwnProperty('metadata')) {
|
|
63
|
-
obj['metadata'] = ApiClient.convertToType(data['metadata'], {
|
|
64
|
-
'String': 'String'
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
if (data.hasOwnProperty('payment_id')) {
|
|
68
|
-
obj['payment_id'] = ApiClient.convertToType(data['payment_id'], 'String');
|
|
69
|
-
}
|
|
70
|
-
if (data.hasOwnProperty('tenant_id')) {
|
|
71
|
-
obj['tenant_id'] = ApiClient.convertToType(data['tenant_id'], 'String');
|
|
72
|
-
}
|
|
73
|
-
if (data.hasOwnProperty('updated_at')) {
|
|
74
|
-
obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
|
|
75
|
-
}
|
|
76
|
-
if (data.hasOwnProperty('updated_by')) {
|
|
77
|
-
obj['updated_by'] = ApiClient.convertToType(data['updated_by'], 'String');
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return obj;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Validates the JSON data with respect to <code>DtoPaymentAttemptResponse</code>.
|
|
85
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DtoPaymentAttemptResponse</code>.
|
|
87
|
-
*/
|
|
88
|
-
static validateJSON(data) {
|
|
89
|
-
// ensure the json data is a string
|
|
90
|
-
if (data['created_at'] && !(typeof data['created_at'] === 'string' || data['created_at'] instanceof String)) {
|
|
91
|
-
throw new Error("Expected the field `created_at` to be a primitive type in the JSON string but got " + data['created_at']);
|
|
92
|
-
}
|
|
93
|
-
// ensure the json data is a string
|
|
94
|
-
if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) {
|
|
95
|
-
throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']);
|
|
96
|
-
}
|
|
97
|
-
// ensure the json data is a string
|
|
98
|
-
if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
|
|
99
|
-
throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
|
|
100
|
-
}
|
|
101
|
-
// ensure the json data is a string
|
|
102
|
-
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
103
|
-
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
104
|
-
}
|
|
105
|
-
// ensure the json data is a string
|
|
106
|
-
if (data['payment_id'] && !(typeof data['payment_id'] === 'string' || data['payment_id'] instanceof String)) {
|
|
107
|
-
throw new Error("Expected the field `payment_id` to be a primitive type in the JSON string but got " + data['payment_id']);
|
|
108
|
-
}
|
|
109
|
-
// ensure the json data is a string
|
|
110
|
-
if (data['tenant_id'] && !(typeof data['tenant_id'] === 'string' || data['tenant_id'] instanceof String)) {
|
|
111
|
-
throw new Error("Expected the field `tenant_id` to be a primitive type in the JSON string but got " + data['tenant_id']);
|
|
112
|
-
}
|
|
113
|
-
// ensure the json data is a string
|
|
114
|
-
if (data['updated_at'] && !(typeof data['updated_at'] === 'string' || data['updated_at'] instanceof String)) {
|
|
115
|
-
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
116
|
-
}
|
|
117
|
-
// ensure the json data is a string
|
|
118
|
-
if (data['updated_by'] && !(typeof data['updated_by'] === 'string' || data['updated_by'] instanceof String)) {
|
|
119
|
-
throw new Error("Expected the field `updated_by` to be a primitive type in the JSON string but got " + data['updated_by']);
|
|
120
|
-
}
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @member {Number} attempt_number
|
|
127
|
-
*/
|
|
128
|
-
DtoPaymentAttemptResponse.prototype['attempt_number'] = undefined;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @member {String} created_at
|
|
132
|
-
*/
|
|
133
|
-
DtoPaymentAttemptResponse.prototype['created_at'] = undefined;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @member {String} created_by
|
|
137
|
-
*/
|
|
138
|
-
DtoPaymentAttemptResponse.prototype['created_by'] = undefined;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @member {String} error_message
|
|
142
|
-
*/
|
|
143
|
-
DtoPaymentAttemptResponse.prototype['error_message'] = undefined;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* @member {String} id
|
|
147
|
-
*/
|
|
148
|
-
DtoPaymentAttemptResponse.prototype['id'] = undefined;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* @member {Object.<String, String>} metadata
|
|
152
|
-
*/
|
|
153
|
-
DtoPaymentAttemptResponse.prototype['metadata'] = undefined;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @member {String} payment_id
|
|
157
|
-
*/
|
|
158
|
-
DtoPaymentAttemptResponse.prototype['payment_id'] = undefined;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* @member {String} tenant_id
|
|
162
|
-
*/
|
|
163
|
-
DtoPaymentAttemptResponse.prototype['tenant_id'] = undefined;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @member {String} updated_at
|
|
167
|
-
*/
|
|
168
|
-
DtoPaymentAttemptResponse.prototype['updated_at'] = undefined;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @member {String} updated_by
|
|
172
|
-
*/
|
|
173
|
-
DtoPaymentAttemptResponse.prototype['updated_by'] = undefined;
|
|
174
|
-
export default DtoPaymentAttemptResponse;
|