@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,291 @@
|
|
|
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 _DtoCreateEntitlementRequest = _interopRequireDefault(require("../model/DtoCreateEntitlementRequest"));
|
|
9
|
+
var _DtoEntitlementResponse = _interopRequireDefault(require("../model/DtoEntitlementResponse"));
|
|
10
|
+
var _DtoListEntitlementsResponse = _interopRequireDefault(require("../model/DtoListEntitlementsResponse"));
|
|
11
|
+
var _DtoPlanResponse = _interopRequireDefault(require("../model/DtoPlanResponse"));
|
|
12
|
+
var _DtoUpdateEntitlementRequest = _interopRequireDefault(require("../model/DtoUpdateEntitlementRequest"));
|
|
13
|
+
var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
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); }
|
|
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
|
+
* Entitlements service.
|
|
34
|
+
* @module api/EntitlementsApi
|
|
35
|
+
* @version 1.0
|
|
36
|
+
*/
|
|
37
|
+
var EntitlementsApi = exports["default"] = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new EntitlementsApi.
|
|
40
|
+
* @alias module:api/EntitlementsApi
|
|
41
|
+
* @class
|
|
42
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
43
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
44
|
+
*/
|
|
45
|
+
function EntitlementsApi(apiClient) {
|
|
46
|
+
_classCallCheck(this, EntitlementsApi);
|
|
47
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Callback function to receive the result of the entitlementsGet operation.
|
|
52
|
+
* @callback module:api/EntitlementsApi~entitlementsGetCallback
|
|
53
|
+
* @param {String} error Error message, if any.
|
|
54
|
+
* @param {module:model/DtoListEntitlementsResponse} data The data returned by the service call.
|
|
55
|
+
* @param {String} response The complete HTTP response.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Get entitlements
|
|
60
|
+
* Get entitlements with the specified filter
|
|
61
|
+
* @param {Object} opts Optional parameters
|
|
62
|
+
* @param {String} [endTime]
|
|
63
|
+
* @param {String} [expand]
|
|
64
|
+
* @param {Array.<String>} [featureIds]
|
|
65
|
+
* @param {module:model/String} [featureType]
|
|
66
|
+
* @param {Boolean} [isEnabled]
|
|
67
|
+
* @param {Number} [limit]
|
|
68
|
+
* @param {Number} [offset]
|
|
69
|
+
* @param {module:model/String} [order]
|
|
70
|
+
* @param {Array.<String>} [planIds] Specific filters for entitlements
|
|
71
|
+
* @param {String} [sort]
|
|
72
|
+
* @param {String} [startTime]
|
|
73
|
+
* @param {module:model/String} [status]
|
|
74
|
+
* @param {module:api/EntitlementsApi~entitlementsGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
75
|
+
* data is of type: {@link module:model/DtoListEntitlementsResponse}
|
|
76
|
+
*/
|
|
77
|
+
return _createClass(EntitlementsApi, [{
|
|
78
|
+
key: "entitlementsGet",
|
|
79
|
+
value: function entitlementsGet(opts, callback) {
|
|
80
|
+
opts = opts || {};
|
|
81
|
+
var postBody = null;
|
|
82
|
+
var pathParams = {};
|
|
83
|
+
var queryParams = {
|
|
84
|
+
'end_time': opts['endTime'],
|
|
85
|
+
'expand': opts['expand'],
|
|
86
|
+
'feature_ids': this.apiClient.buildCollectionParam(opts['featureIds'], 'csv'),
|
|
87
|
+
'feature_type': opts['featureType'],
|
|
88
|
+
'is_enabled': opts['isEnabled'],
|
|
89
|
+
'limit': opts['limit'],
|
|
90
|
+
'offset': opts['offset'],
|
|
91
|
+
'order': opts['order'],
|
|
92
|
+
'plan_ids': this.apiClient.buildCollectionParam(opts['planIds'], 'csv'),
|
|
93
|
+
'sort': opts['sort'],
|
|
94
|
+
'start_time': opts['startTime'],
|
|
95
|
+
'status': opts['status']
|
|
96
|
+
};
|
|
97
|
+
var headerParams = {};
|
|
98
|
+
var formParams = {};
|
|
99
|
+
var authNames = ['ApiKeyAuth'];
|
|
100
|
+
var contentTypes = [];
|
|
101
|
+
var accepts = ['application/json'];
|
|
102
|
+
var returnType = _DtoListEntitlementsResponse["default"];
|
|
103
|
+
return this.apiClient.callApi('/entitlements', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Callback function to receive the result of the entitlementsIdDelete operation.
|
|
108
|
+
* @callback module:api/EntitlementsApi~entitlementsIdDeleteCallback
|
|
109
|
+
* @param {String} error Error message, if any.
|
|
110
|
+
* @param {Object.<String, {String: Object}>} data The data returned by the service call.
|
|
111
|
+
* @param {String} response The complete HTTP response.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Delete an entitlement
|
|
116
|
+
* Delete an entitlement
|
|
117
|
+
* @param {String} id Entitlement ID
|
|
118
|
+
* @param {module:api/EntitlementsApi~entitlementsIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
|
|
119
|
+
* data is of type: {@link Object.<String, {String: Object}>}
|
|
120
|
+
*/
|
|
121
|
+
}, {
|
|
122
|
+
key: "entitlementsIdDelete",
|
|
123
|
+
value: function entitlementsIdDelete(id, callback) {
|
|
124
|
+
var postBody = null;
|
|
125
|
+
// verify the required parameter 'id' is set
|
|
126
|
+
if (id === undefined || id === null) {
|
|
127
|
+
throw new Error("Missing the required parameter 'id' when calling entitlementsIdDelete");
|
|
128
|
+
}
|
|
129
|
+
var pathParams = {
|
|
130
|
+
'id': id
|
|
131
|
+
};
|
|
132
|
+
var queryParams = {};
|
|
133
|
+
var headerParams = {};
|
|
134
|
+
var formParams = {};
|
|
135
|
+
var authNames = ['ApiKeyAuth'];
|
|
136
|
+
var contentTypes = [];
|
|
137
|
+
var accepts = ['application/json'];
|
|
138
|
+
var returnType = {
|
|
139
|
+
'String': Object
|
|
140
|
+
};
|
|
141
|
+
return this.apiClient.callApi('/entitlements/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Callback function to receive the result of the entitlementsIdGet operation.
|
|
146
|
+
* @callback module:api/EntitlementsApi~entitlementsIdGetCallback
|
|
147
|
+
* @param {String} error Error message, if any.
|
|
148
|
+
* @param {module:model/DtoEntitlementResponse} data The data returned by the service call.
|
|
149
|
+
* @param {String} response The complete HTTP response.
|
|
150
|
+
*/
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get an entitlement by ID
|
|
154
|
+
* Get an entitlement by ID
|
|
155
|
+
* @param {String} id Entitlement ID
|
|
156
|
+
* @param {module:api/EntitlementsApi~entitlementsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
157
|
+
* data is of type: {@link module:model/DtoEntitlementResponse}
|
|
158
|
+
*/
|
|
159
|
+
}, {
|
|
160
|
+
key: "entitlementsIdGet",
|
|
161
|
+
value: function entitlementsIdGet(id, callback) {
|
|
162
|
+
var postBody = null;
|
|
163
|
+
// verify the required parameter 'id' is set
|
|
164
|
+
if (id === undefined || id === null) {
|
|
165
|
+
throw new Error("Missing the required parameter 'id' when calling entitlementsIdGet");
|
|
166
|
+
}
|
|
167
|
+
var pathParams = {
|
|
168
|
+
'id': id
|
|
169
|
+
};
|
|
170
|
+
var queryParams = {};
|
|
171
|
+
var headerParams = {};
|
|
172
|
+
var formParams = {};
|
|
173
|
+
var authNames = ['ApiKeyAuth'];
|
|
174
|
+
var contentTypes = [];
|
|
175
|
+
var accepts = ['application/json'];
|
|
176
|
+
var returnType = _DtoEntitlementResponse["default"];
|
|
177
|
+
return this.apiClient.callApi('/entitlements/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Callback function to receive the result of the entitlementsIdPut operation.
|
|
182
|
+
* @callback module:api/EntitlementsApi~entitlementsIdPutCallback
|
|
183
|
+
* @param {String} error Error message, if any.
|
|
184
|
+
* @param {module:model/DtoEntitlementResponse} data The data returned by the service call.
|
|
185
|
+
* @param {String} response The complete HTTP response.
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Update an entitlement
|
|
190
|
+
* Update an entitlement with the specified configuration
|
|
191
|
+
* @param {String} id Entitlement ID
|
|
192
|
+
* @param {module:model/DtoUpdateEntitlementRequest} entitlement Entitlement configuration
|
|
193
|
+
* @param {module:api/EntitlementsApi~entitlementsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
|
|
194
|
+
* data is of type: {@link module:model/DtoEntitlementResponse}
|
|
195
|
+
*/
|
|
196
|
+
}, {
|
|
197
|
+
key: "entitlementsIdPut",
|
|
198
|
+
value: function entitlementsIdPut(id, entitlement, callback) {
|
|
199
|
+
var postBody = entitlement;
|
|
200
|
+
// verify the required parameter 'id' is set
|
|
201
|
+
if (id === undefined || id === null) {
|
|
202
|
+
throw new Error("Missing the required parameter 'id' when calling entitlementsIdPut");
|
|
203
|
+
}
|
|
204
|
+
// verify the required parameter 'entitlement' is set
|
|
205
|
+
if (entitlement === undefined || entitlement === null) {
|
|
206
|
+
throw new Error("Missing the required parameter 'entitlement' when calling entitlementsIdPut");
|
|
207
|
+
}
|
|
208
|
+
var pathParams = {
|
|
209
|
+
'id': id
|
|
210
|
+
};
|
|
211
|
+
var queryParams = {};
|
|
212
|
+
var headerParams = {};
|
|
213
|
+
var formParams = {};
|
|
214
|
+
var authNames = ['ApiKeyAuth'];
|
|
215
|
+
var contentTypes = ['application/json'];
|
|
216
|
+
var accepts = ['application/json'];
|
|
217
|
+
var returnType = _DtoEntitlementResponse["default"];
|
|
218
|
+
return this.apiClient.callApi('/entitlements/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Callback function to receive the result of the entitlementsPost operation.
|
|
223
|
+
* @callback module:api/EntitlementsApi~entitlementsPostCallback
|
|
224
|
+
* @param {String} error Error message, if any.
|
|
225
|
+
* @param {module:model/DtoEntitlementResponse} data The data returned by the service call.
|
|
226
|
+
* @param {String} response The complete HTTP response.
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Create a new entitlement
|
|
231
|
+
* Create a new entitlement with the specified configuration
|
|
232
|
+
* @param {module:model/DtoCreateEntitlementRequest} entitlement Entitlement configuration
|
|
233
|
+
* @param {module:api/EntitlementsApi~entitlementsPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
234
|
+
* data is of type: {@link module:model/DtoEntitlementResponse}
|
|
235
|
+
*/
|
|
236
|
+
}, {
|
|
237
|
+
key: "entitlementsPost",
|
|
238
|
+
value: function entitlementsPost(entitlement, callback) {
|
|
239
|
+
var postBody = entitlement;
|
|
240
|
+
// verify the required parameter 'entitlement' is set
|
|
241
|
+
if (entitlement === undefined || entitlement === null) {
|
|
242
|
+
throw new Error("Missing the required parameter 'entitlement' when calling entitlementsPost");
|
|
243
|
+
}
|
|
244
|
+
var pathParams = {};
|
|
245
|
+
var queryParams = {};
|
|
246
|
+
var headerParams = {};
|
|
247
|
+
var formParams = {};
|
|
248
|
+
var authNames = ['ApiKeyAuth'];
|
|
249
|
+
var contentTypes = ['application/json'];
|
|
250
|
+
var accepts = ['application/json'];
|
|
251
|
+
var returnType = _DtoEntitlementResponse["default"];
|
|
252
|
+
return this.apiClient.callApi('/entitlements', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Callback function to receive the result of the plansIdEntitlementsGet operation.
|
|
257
|
+
* @callback module:api/EntitlementsApi~plansIdEntitlementsGetCallback
|
|
258
|
+
* @param {String} error Error message, if any.
|
|
259
|
+
* @param {module:model/DtoPlanResponse} data The data returned by the service call.
|
|
260
|
+
* @param {String} response The complete HTTP response.
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Get plan entitlements
|
|
265
|
+
* Get all entitlements for a plan
|
|
266
|
+
* @param {String} id Plan ID
|
|
267
|
+
* @param {module:api/EntitlementsApi~plansIdEntitlementsGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
268
|
+
* data is of type: {@link module:model/DtoPlanResponse}
|
|
269
|
+
*/
|
|
270
|
+
}, {
|
|
271
|
+
key: "plansIdEntitlementsGet",
|
|
272
|
+
value: function plansIdEntitlementsGet(id, callback) {
|
|
273
|
+
var postBody = null;
|
|
274
|
+
// verify the required parameter 'id' is set
|
|
275
|
+
if (id === undefined || id === null) {
|
|
276
|
+
throw new Error("Missing the required parameter 'id' when calling plansIdEntitlementsGet");
|
|
277
|
+
}
|
|
278
|
+
var pathParams = {
|
|
279
|
+
'id': id
|
|
280
|
+
};
|
|
281
|
+
var queryParams = {};
|
|
282
|
+
var headerParams = {};
|
|
283
|
+
var formParams = {};
|
|
284
|
+
var authNames = ['ApiKeyAuth'];
|
|
285
|
+
var contentTypes = [];
|
|
286
|
+
var accepts = ['application/json'];
|
|
287
|
+
var returnType = _DtoPlanResponse["default"];
|
|
288
|
+
return this.apiClient.callApi('/plans/{id}/entitlements', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
289
|
+
}
|
|
290
|
+
}]);
|
|
291
|
+
}();
|
|
@@ -0,0 +1,204 @@
|
|
|
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 _DtoCreateEnvironmentRequest = _interopRequireDefault(require("../model/DtoCreateEnvironmentRequest"));
|
|
9
|
+
var _DtoEnvironmentResponse = _interopRequireDefault(require("../model/DtoEnvironmentResponse"));
|
|
10
|
+
var _DtoListEnvironmentsResponse = _interopRequireDefault(require("../model/DtoListEnvironmentsResponse"));
|
|
11
|
+
var _DtoUpdateEnvironmentRequest = _interopRequireDefault(require("../model/DtoUpdateEnvironmentRequest"));
|
|
12
|
+
var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
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
|
+
* Environments service.
|
|
33
|
+
* @module api/EnvironmentsApi
|
|
34
|
+
* @version 1.0
|
|
35
|
+
*/
|
|
36
|
+
var EnvironmentsApi = exports["default"] = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new EnvironmentsApi.
|
|
39
|
+
* @alias module:api/EnvironmentsApi
|
|
40
|
+
* @class
|
|
41
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
42
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
43
|
+
*/
|
|
44
|
+
function EnvironmentsApi(apiClient) {
|
|
45
|
+
_classCallCheck(this, EnvironmentsApi);
|
|
46
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Callback function to receive the result of the environmentsGet operation.
|
|
51
|
+
* @callback module:api/EnvironmentsApi~environmentsGetCallback
|
|
52
|
+
* @param {String} error Error message, if any.
|
|
53
|
+
* @param {module:model/DtoListEnvironmentsResponse} data The data returned by the service call.
|
|
54
|
+
* @param {String} response The complete HTTP response.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get environments
|
|
59
|
+
* Get environments
|
|
60
|
+
* @param {Object} opts Optional parameters
|
|
61
|
+
* @param {String} [expand]
|
|
62
|
+
* @param {Number} [limit]
|
|
63
|
+
* @param {Number} [offset]
|
|
64
|
+
* @param {String} [order]
|
|
65
|
+
* @param {String} [sort]
|
|
66
|
+
* @param {module:model/String} [status]
|
|
67
|
+
* @param {module:api/EnvironmentsApi~environmentsGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
68
|
+
* data is of type: {@link module:model/DtoListEnvironmentsResponse}
|
|
69
|
+
*/
|
|
70
|
+
return _createClass(EnvironmentsApi, [{
|
|
71
|
+
key: "environmentsGet",
|
|
72
|
+
value: function environmentsGet(opts, callback) {
|
|
73
|
+
opts = opts || {};
|
|
74
|
+
var postBody = null;
|
|
75
|
+
var pathParams = {};
|
|
76
|
+
var queryParams = {
|
|
77
|
+
'expand': opts['expand'],
|
|
78
|
+
'limit': opts['limit'],
|
|
79
|
+
'offset': opts['offset'],
|
|
80
|
+
'order': opts['order'],
|
|
81
|
+
'sort': opts['sort'],
|
|
82
|
+
'status': opts['status']
|
|
83
|
+
};
|
|
84
|
+
var headerParams = {};
|
|
85
|
+
var formParams = {};
|
|
86
|
+
var authNames = ['ApiKeyAuth'];
|
|
87
|
+
var contentTypes = [];
|
|
88
|
+
var accepts = ['application/json'];
|
|
89
|
+
var returnType = _DtoListEnvironmentsResponse["default"];
|
|
90
|
+
return this.apiClient.callApi('/environments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Callback function to receive the result of the environmentsIdGet operation.
|
|
95
|
+
* @callback module:api/EnvironmentsApi~environmentsIdGetCallback
|
|
96
|
+
* @param {String} error Error message, if any.
|
|
97
|
+
* @param {module:model/DtoEnvironmentResponse} data The data returned by the service call.
|
|
98
|
+
* @param {String} response The complete HTTP response.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Get an environment
|
|
103
|
+
* Get an environment
|
|
104
|
+
* @param {String} id Environment ID
|
|
105
|
+
* @param {module:api/EnvironmentsApi~environmentsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
106
|
+
* data is of type: {@link module:model/DtoEnvironmentResponse}
|
|
107
|
+
*/
|
|
108
|
+
}, {
|
|
109
|
+
key: "environmentsIdGet",
|
|
110
|
+
value: function environmentsIdGet(id, callback) {
|
|
111
|
+
var postBody = null;
|
|
112
|
+
// verify the required parameter 'id' is set
|
|
113
|
+
if (id === undefined || id === null) {
|
|
114
|
+
throw new Error("Missing the required parameter 'id' when calling environmentsIdGet");
|
|
115
|
+
}
|
|
116
|
+
var pathParams = {
|
|
117
|
+
'id': id
|
|
118
|
+
};
|
|
119
|
+
var queryParams = {};
|
|
120
|
+
var headerParams = {};
|
|
121
|
+
var formParams = {};
|
|
122
|
+
var authNames = ['ApiKeyAuth'];
|
|
123
|
+
var contentTypes = [];
|
|
124
|
+
var accepts = ['application/json'];
|
|
125
|
+
var returnType = _DtoEnvironmentResponse["default"];
|
|
126
|
+
return this.apiClient.callApi('/environments/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Callback function to receive the result of the environmentsIdPut operation.
|
|
131
|
+
* @callback module:api/EnvironmentsApi~environmentsIdPutCallback
|
|
132
|
+
* @param {String} error Error message, if any.
|
|
133
|
+
* @param {module:model/DtoEnvironmentResponse} data The data returned by the service call.
|
|
134
|
+
* @param {String} response The complete HTTP response.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Update an environment
|
|
139
|
+
* Update an environment
|
|
140
|
+
* @param {String} id Environment ID
|
|
141
|
+
* @param {module:model/DtoUpdateEnvironmentRequest} environment Environment
|
|
142
|
+
* @param {module:api/EnvironmentsApi~environmentsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
|
|
143
|
+
* data is of type: {@link module:model/DtoEnvironmentResponse}
|
|
144
|
+
*/
|
|
145
|
+
}, {
|
|
146
|
+
key: "environmentsIdPut",
|
|
147
|
+
value: function environmentsIdPut(id, environment, callback) {
|
|
148
|
+
var postBody = environment;
|
|
149
|
+
// verify the required parameter 'id' is set
|
|
150
|
+
if (id === undefined || id === null) {
|
|
151
|
+
throw new Error("Missing the required parameter 'id' when calling environmentsIdPut");
|
|
152
|
+
}
|
|
153
|
+
// verify the required parameter 'environment' is set
|
|
154
|
+
if (environment === undefined || environment === null) {
|
|
155
|
+
throw new Error("Missing the required parameter 'environment' when calling environmentsIdPut");
|
|
156
|
+
}
|
|
157
|
+
var pathParams = {
|
|
158
|
+
'id': id
|
|
159
|
+
};
|
|
160
|
+
var queryParams = {};
|
|
161
|
+
var headerParams = {};
|
|
162
|
+
var formParams = {};
|
|
163
|
+
var authNames = ['ApiKeyAuth'];
|
|
164
|
+
var contentTypes = ['application/json'];
|
|
165
|
+
var accepts = ['application/json'];
|
|
166
|
+
var returnType = _DtoEnvironmentResponse["default"];
|
|
167
|
+
return this.apiClient.callApi('/environments/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Callback function to receive the result of the environmentsPost operation.
|
|
172
|
+
* @callback module:api/EnvironmentsApi~environmentsPostCallback
|
|
173
|
+
* @param {String} error Error message, if any.
|
|
174
|
+
* @param {module:model/DtoEnvironmentResponse} data The data returned by the service call.
|
|
175
|
+
* @param {String} response The complete HTTP response.
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Create an environment
|
|
180
|
+
* Create an environment
|
|
181
|
+
* @param {module:model/DtoCreateEnvironmentRequest} environment Environment
|
|
182
|
+
* @param {module:api/EnvironmentsApi~environmentsPostCallback} callback The callback function, accepting three arguments: error, data, response
|
|
183
|
+
* data is of type: {@link module:model/DtoEnvironmentResponse}
|
|
184
|
+
*/
|
|
185
|
+
}, {
|
|
186
|
+
key: "environmentsPost",
|
|
187
|
+
value: function environmentsPost(environment, callback) {
|
|
188
|
+
var postBody = environment;
|
|
189
|
+
// verify the required parameter 'environment' is set
|
|
190
|
+
if (environment === undefined || environment === null) {
|
|
191
|
+
throw new Error("Missing the required parameter 'environment' when calling environmentsPost");
|
|
192
|
+
}
|
|
193
|
+
var pathParams = {};
|
|
194
|
+
var queryParams = {};
|
|
195
|
+
var headerParams = {};
|
|
196
|
+
var formParams = {};
|
|
197
|
+
var authNames = ['ApiKeyAuth'];
|
|
198
|
+
var contentTypes = ['application/json'];
|
|
199
|
+
var accepts = ['application/json'];
|
|
200
|
+
var returnType = _DtoEnvironmentResponse["default"];
|
|
201
|
+
return this.apiClient.callApi('/environments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
202
|
+
}
|
|
203
|
+
}]);
|
|
204
|
+
}();
|