@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.
Files changed (180) hide show
  1. package/README.md +281 -200
  2. package/package.json +29 -41
  3. package/LICENSE +0 -663
  4. package/dist/ApiClient.js +0 -653
  5. package/dist/api/AuthApi.js +0 -100
  6. package/dist/api/CustomersApi.js +0 -376
  7. package/dist/api/EntitlementsApi.js +0 -267
  8. package/dist/api/EnvironmentsApi.js +0 -184
  9. package/dist/api/EventsApi.js +0 -238
  10. package/dist/api/FeaturesApi.js +0 -263
  11. package/dist/api/IntegrationsApi.js +0 -169
  12. package/dist/api/InvoicesApi.js +0 -419
  13. package/dist/api/PaymentsApi.js +0 -272
  14. package/dist/api/PlansApi.js +0 -226
  15. package/dist/api/PricesApi.js +0 -228
  16. package/dist/api/SecretsApi.js +0 -137
  17. package/dist/api/SubscriptionsApi.js +0 -353
  18. package/dist/api/TasksApi.js +0 -232
  19. package/dist/api/TenantsApi.js +0 -162
  20. package/dist/api/UsersApi.js +0 -61
  21. package/dist/api/WalletsApi.js +0 -392
  22. package/dist/index.js +0 -1102
  23. package/dist/model/DtoAddress.js +0 -132
  24. package/dist/model/DtoAggregatedEntitlement.js +0 -106
  25. package/dist/model/DtoAggregatedFeature.js +0 -109
  26. package/dist/model/DtoAuthResponse.js +0 -96
  27. package/dist/model/DtoBillingPeriodInfo.js +0 -97
  28. package/dist/model/DtoBulkIngestEventRequest.js +0 -91
  29. package/dist/model/DtoCreateAPIKeyRequest.js +0 -117
  30. package/dist/model/DtoCreateAPIKeyResponse.js +0 -86
  31. package/dist/model/DtoCreateCustomerRequest.js +0 -188
  32. package/dist/model/DtoCreateEntitlementRequest.js +0 -150
  33. package/dist/model/DtoCreateEnvironmentRequest.js +0 -96
  34. package/dist/model/DtoCreateFeatureRequest.js +0 -177
  35. package/dist/model/DtoCreateIntegrationRequest.js +0 -105
  36. package/dist/model/DtoCreateInvoiceLineItemRequest.js +0 -206
  37. package/dist/model/DtoCreateInvoiceRequest.js +0 -289
  38. package/dist/model/DtoCreateMeterRequest.js +0 -144
  39. package/dist/model/DtoCreatePaymentRequest.js +0 -172
  40. package/dist/model/DtoCreatePlanEntitlementRequest.js +0 -150
  41. package/dist/model/DtoCreatePlanPriceRequest.js +0 -279
  42. package/dist/model/DtoCreatePlanRequest.js +0 -148
  43. package/dist/model/DtoCreatePriceRequest.js +0 -279
  44. package/dist/model/DtoCreatePriceTier.js +0 -102
  45. package/dist/model/DtoCreateSubscriptionRequest.js +0 -223
  46. package/dist/model/DtoCreateTaskRequest.js +0 -137
  47. package/dist/model/DtoCreateTenantRequest.js +0 -96
  48. package/dist/model/DtoCreateWalletRequest.js +0 -205
  49. package/dist/model/DtoCustomerEntitlementsResponse.js +0 -93
  50. package/dist/model/DtoCustomerInvoiceSummary.js +0 -148
  51. package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +0 -105
  52. package/dist/model/DtoCustomerResponse.js +0 -283
  53. package/dist/model/DtoCustomerUsageSummaryResponse.js +0 -121
  54. package/dist/model/DtoEntitlementResponse.js +0 -259
  55. package/dist/model/DtoEntitlementSource.js +0 -144
  56. package/dist/model/DtoEnvironmentResponse.js +0 -120
  57. package/dist/model/DtoEvent.js +0 -154
  58. package/dist/model/DtoFeatureResponse.js +0 -258
  59. package/dist/model/DtoFeatureUsageSummary.js +0 -135
  60. package/dist/model/DtoGetEventsRequest.js +0 -193
  61. package/dist/model/DtoGetEventsResponse.js +0 -129
  62. package/dist/model/DtoGetPreviewInvoiceRequest.js +0 -106
  63. package/dist/model/DtoGetUsageAnalyticsRequest.js +0 -156
  64. package/dist/model/DtoGetUsageAnalyticsResponse.js +0 -101
  65. package/dist/model/DtoGetUsageByMeterRequest.js +0 -149
  66. package/dist/model/DtoGetUsageBySubscriptionRequest.js +0 -114
  67. package/dist/model/DtoGetUsageBySubscriptionResponse.js +0 -137
  68. package/dist/model/DtoGetUsageRequest.js +0 -173
  69. package/dist/model/DtoGetUsageResponse.js +0 -110
  70. package/dist/model/DtoIngestEventRequest.js +0 -156
  71. package/dist/model/DtoInvoiceLineItemResponse.js +0 -326
  72. package/dist/model/DtoInvoiceResponse.js +0 -450
  73. package/dist/model/DtoLinkedIntegrationsResponse.js +0 -72
  74. package/dist/model/DtoListCustomersResponse.js +0 -95
  75. package/dist/model/DtoListEntitlementsResponse.js +0 -95
  76. package/dist/model/DtoListEnvironmentsResponse.js +0 -105
  77. package/dist/model/DtoListFeaturesResponse.js +0 -95
  78. package/dist/model/DtoListInvoicesResponse.js +0 -95
  79. package/dist/model/DtoListPaymentsResponse.js +0 -95
  80. package/dist/model/DtoListPlansResponse.js +0 -95
  81. package/dist/model/DtoListPricesResponse.js +0 -95
  82. package/dist/model/DtoListSecretsResponse.js +0 -95
  83. package/dist/model/DtoListSubscriptionPausesResponse.js +0 -89
  84. package/dist/model/DtoListSubscriptionsResponse.js +0 -95
  85. package/dist/model/DtoListTasksResponse.js +0 -95
  86. package/dist/model/DtoListWalletTransactionsResponse.js +0 -95
  87. package/dist/model/DtoLoginRequest.js +0 -108
  88. package/dist/model/DtoMeterResponse.js +0 -188
  89. package/dist/model/DtoPauseSubscriptionRequest.js +0 -141
  90. package/dist/model/DtoPaymentAttemptResponse.js +0 -174
  91. package/dist/model/DtoPaymentResponse.js +0 -314
  92. package/dist/model/DtoPlanResponse.js +0 -231
  93. package/dist/model/DtoPriceResponse.js +0 -373
  94. package/dist/model/DtoResumeSubscriptionRequest.js +0 -97
  95. package/dist/model/DtoSecretResponse.js +0 -183
  96. package/dist/model/DtoSignUpRequest.js +0 -118
  97. package/dist/model/DtoSubscriptionPauseResponse.js +0 -283
  98. package/dist/model/DtoSubscriptionResponse.js +0 -489
  99. package/dist/model/DtoSubscriptionUsageByMetersResponse.js +0 -148
  100. package/dist/model/DtoTaskResponse.js +0 -294
  101. package/dist/model/DtoTenantBillingDetails.js +0 -110
  102. package/dist/model/DtoTenantBillingUsage.js +0 -95
  103. package/dist/model/DtoTenantResponse.js +0 -134
  104. package/dist/model/DtoTopUpWalletRequest.js +0 -148
  105. package/dist/model/DtoUpdateCustomerRequest.js +0 -178
  106. package/dist/model/DtoUpdateEntitlementRequest.js +0 -105
  107. package/dist/model/DtoUpdateEnvironmentRequest.js +0 -84
  108. package/dist/model/DtoUpdateFeatureRequest.js +0 -139
  109. package/dist/model/DtoUpdatePaymentRequest.js +0 -82
  110. package/dist/model/DtoUpdatePaymentStatusRequest.js +0 -87
  111. package/dist/model/DtoUpdatePlanEntitlementRequest.js +0 -163
  112. package/dist/model/DtoUpdatePlanPriceRequest.js +0 -292
  113. package/dist/model/DtoUpdatePlanRequest.js +0 -138
  114. package/dist/model/DtoUpdatePriceRequest.js +0 -94
  115. package/dist/model/DtoUpdateTaskStatusRequest.js +0 -79
  116. package/dist/model/DtoUpdateTenantRequest.js +0 -86
  117. package/dist/model/DtoUpdateWalletRequest.js +0 -133
  118. package/dist/model/DtoUsageAnalyticItem.js +0 -190
  119. package/dist/model/DtoUsageAnalyticPoint.js +0 -88
  120. package/dist/model/DtoUsageResult.js +0 -80
  121. package/dist/model/DtoUserResponse.js +0 -98
  122. package/dist/model/DtoWalletBalanceResponse.js +0 -336
  123. package/dist/model/DtoWalletResponse.js +0 -235
  124. package/dist/model/DtoWalletTransactionResponse.js +0 -221
  125. package/dist/model/ErrorsErrorDetail.js +0 -94
  126. package/dist/model/ErrorsErrorResponse.js +0 -82
  127. package/dist/model/GithubComFlexpriceFlexpriceInternalTypesValue.js +0 -112
  128. package/dist/model/MeterAggregation.js +0 -82
  129. package/dist/model/MeterFilter.js +0 -86
  130. package/dist/model/PriceJSONBTransformQuantity.js +0 -82
  131. package/dist/model/PricePrice.js +0 -359
  132. package/dist/model/PricePriceTier.js +0 -87
  133. package/dist/model/PriceTransformQuantity.js +0 -82
  134. package/dist/model/SubscriptionSubscriptionLineItem.js +0 -338
  135. package/dist/model/SubscriptionSubscriptionPause.js +0 -283
  136. package/dist/model/TypesAggregationType.js +0 -53
  137. package/dist/model/TypesAutoTopupTrigger.js +0 -41
  138. package/dist/model/TypesBillingCadence.js +0 -41
  139. package/dist/model/TypesBillingCycle.js +0 -41
  140. package/dist/model/TypesBillingModel.js +0 -47
  141. package/dist/model/TypesBillingPeriod.js +0 -65
  142. package/dist/model/TypesBillingTier.js +0 -41
  143. package/dist/model/TypesCustomerFilter.js +0 -230
  144. package/dist/model/TypesDataType.js +0 -53
  145. package/dist/model/TypesEntityType.js +0 -47
  146. package/dist/model/TypesFeatureFilter.js +0 -243
  147. package/dist/model/TypesFeatureType.js +0 -47
  148. package/dist/model/TypesFileType.js +0 -41
  149. package/dist/model/TypesFilterCondition.js +0 -104
  150. package/dist/model/TypesFilterOperatorType.js +0 -77
  151. package/dist/model/TypesInvoiceBillingReason.js +0 -53
  152. package/dist/model/TypesInvoiceCadence.js +0 -41
  153. package/dist/model/TypesInvoiceStatus.js +0 -47
  154. package/dist/model/TypesInvoiceType.js +0 -47
  155. package/dist/model/TypesPaginationResponse.js +0 -84
  156. package/dist/model/TypesPauseMode.js +0 -47
  157. package/dist/model/TypesPauseStatus.js +0 -59
  158. package/dist/model/TypesPaymentDestinationType.js +0 -35
  159. package/dist/model/TypesPaymentMethodType.js +0 -53
  160. package/dist/model/TypesPaymentStatus.js +0 -65
  161. package/dist/model/TypesPriceType.js +0 -41
  162. package/dist/model/TypesResetUsage.js +0 -41
  163. package/dist/model/TypesResumeMode.js +0 -47
  164. package/dist/model/TypesSecretProvider.js +0 -47
  165. package/dist/model/TypesSecretType.js +0 -47
  166. package/dist/model/TypesSortCondition.js +0 -81
  167. package/dist/model/TypesSortDirection.js +0 -41
  168. package/dist/model/TypesStatus.js +0 -47
  169. package/dist/model/TypesSubscriptionStatus.js +0 -77
  170. package/dist/model/TypesTaskStatus.js +0 -53
  171. package/dist/model/TypesTaskType.js +0 -41
  172. package/dist/model/TypesTransactionReason.js +0 -77
  173. package/dist/model/TypesTransactionStatus.js +0 -47
  174. package/dist/model/TypesTransactionType.js +0 -41
  175. package/dist/model/TypesWalletConfig.js +0 -74
  176. package/dist/model/TypesWalletConfigPriceType.js +0 -47
  177. package/dist/model/TypesWalletStatus.js +0 -47
  178. package/dist/model/TypesWalletTxReferenceType.js +0 -47
  179. package/dist/model/TypesWalletType.js +0 -41
  180. package/dist/model/TypesWindowSize.js +0 -47
@@ -1,353 +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 DtoCreateSubscriptionRequest from '../model/DtoCreateSubscriptionRequest';
16
- import DtoGetUsageBySubscriptionRequest from '../model/DtoGetUsageBySubscriptionRequest';
17
- import DtoGetUsageBySubscriptionResponse from '../model/DtoGetUsageBySubscriptionResponse';
18
- import DtoListSubscriptionPausesResponse from '../model/DtoListSubscriptionPausesResponse';
19
- import DtoListSubscriptionsResponse from '../model/DtoListSubscriptionsResponse';
20
- import DtoPauseSubscriptionRequest from '../model/DtoPauseSubscriptionRequest';
21
- import DtoResumeSubscriptionRequest from '../model/DtoResumeSubscriptionRequest';
22
- import DtoSubscriptionPauseResponse from '../model/DtoSubscriptionPauseResponse';
23
- import DtoSubscriptionResponse from '../model/DtoSubscriptionResponse';
24
- import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
25
-
26
- /**
27
- * Subscriptions service.
28
- * @module api/SubscriptionsApi
29
- * @version 1.0
30
- */
31
- export default class SubscriptionsApi {
32
- /**
33
- * Constructs a new SubscriptionsApi.
34
- * @alias module:api/SubscriptionsApi
35
- * @class
36
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
37
- * default to {@link module:ApiClient#instance} if unspecified.
38
- */
39
- constructor(apiClient) {
40
- this.apiClient = apiClient || ApiClient.instance;
41
- }
42
-
43
- /**
44
- * Callback function to receive the result of the subscriptionsGet operation.
45
- * @callback module:api/SubscriptionsApi~subscriptionsGetCallback
46
- * @param {String} error Error message, if any.
47
- * @param {module:model/DtoListSubscriptionsResponse} data The data returned by the service call.
48
- * @param {String} response The complete HTTP response.
49
- */
50
-
51
- /**
52
- * List subscriptions
53
- * Get subscriptions with optional filtering
54
- * @param {Object} opts Optional parameters
55
- * @param {String} [activeAt] ActiveAt filters subscriptions that are active at the given time
56
- * @param {Array.<module:model/String>} [billingCadence] BillingCadence filters by billing cadence
57
- * @param {Array.<module:model/String>} [billingPeriod] BillingPeriod filters by billing period
58
- * @param {String} [customerId] CustomerID filters by customer ID
59
- * @param {String} [endTime]
60
- * @param {String} [expand]
61
- * @param {Number} [limit]
62
- * @param {Number} [offset]
63
- * @param {module:model/String} [order]
64
- * @param {String} [planId] PlanID filters by plan ID
65
- * @param {String} [sort]
66
- * @param {String} [startTime]
67
- * @param {module:model/String} [status]
68
- * @param {Array.<module:model/String>} [subscriptionStatus] SubscriptionStatus filters by subscription status
69
- * @param {Boolean} [withLineItems] WithLineItems includes line items in the response
70
- * @param {module:api/SubscriptionsApi~subscriptionsGetCallback} callback The callback function, accepting three arguments: error, data, response
71
- * data is of type: {@link module:model/DtoListSubscriptionsResponse}
72
- */
73
- subscriptionsGet(opts, callback) {
74
- opts = opts || {};
75
- let postBody = null;
76
- let pathParams = {};
77
- let queryParams = {
78
- 'active_at': opts['activeAt'],
79
- 'billing_cadence': this.apiClient.buildCollectionParam(opts['billingCadence'], 'csv'),
80
- 'billing_period': this.apiClient.buildCollectionParam(opts['billingPeriod'], 'csv'),
81
- 'customer_id': opts['customerId'],
82
- 'end_time': opts['endTime'],
83
- 'expand': opts['expand'],
84
- 'limit': opts['limit'],
85
- 'offset': opts['offset'],
86
- 'order': opts['order'],
87
- 'plan_id': opts['planId'],
88
- 'sort': opts['sort'],
89
- 'start_time': opts['startTime'],
90
- 'status': opts['status'],
91
- 'subscription_status': this.apiClient.buildCollectionParam(opts['subscriptionStatus'], 'csv'),
92
- 'with_line_items': opts['withLineItems']
93
- };
94
- let headerParams = {};
95
- let formParams = {};
96
- let authNames = ['ApiKeyAuth'];
97
- let contentTypes = [];
98
- let accepts = ['application/json'];
99
- let returnType = DtoListSubscriptionsResponse;
100
- return this.apiClient.callApi('/subscriptions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
101
- }
102
-
103
- /**
104
- * Callback function to receive the result of the subscriptionsIdCancelPost operation.
105
- * @callback module:api/SubscriptionsApi~subscriptionsIdCancelPostCallback
106
- * @param {String} error Error message, if any.
107
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
108
- * @param {String} response The complete HTTP response.
109
- */
110
-
111
- /**
112
- * Cancel subscription
113
- * Cancel a subscription
114
- * @param {String} id Subscription ID
115
- * @param {Object} opts Optional parameters
116
- * @param {Boolean} [cancelAtPeriodEnd] Cancel at period end
117
- * @param {module:api/SubscriptionsApi~subscriptionsIdCancelPostCallback} callback The callback function, accepting three arguments: error, data, response
118
- * data is of type: {@link Object.<String, {String: Object}>}
119
- */
120
- subscriptionsIdCancelPost(id, opts, callback) {
121
- opts = opts || {};
122
- let postBody = null;
123
- // verify the required parameter 'id' is set
124
- if (id === undefined || id === null) {
125
- throw new Error("Missing the required parameter 'id' when calling subscriptionsIdCancelPost");
126
- }
127
- let pathParams = {
128
- 'id': id
129
- };
130
- let queryParams = {
131
- 'cancel_at_period_end': opts['cancelAtPeriodEnd']
132
- };
133
- let headerParams = {};
134
- let formParams = {};
135
- let authNames = ['ApiKeyAuth'];
136
- let contentTypes = [];
137
- let accepts = ['application/json'];
138
- let returnType = {
139
- 'String': Object
140
- };
141
- return this.apiClient.callApi('/subscriptions/{id}/cancel', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
142
- }
143
-
144
- /**
145
- * Callback function to receive the result of the subscriptionsIdGet operation.
146
- * @callback module:api/SubscriptionsApi~subscriptionsIdGetCallback
147
- * @param {String} error Error message, if any.
148
- * @param {module:model/DtoSubscriptionResponse} data The data returned by the service call.
149
- * @param {String} response The complete HTTP response.
150
- */
151
-
152
- /**
153
- * Get subscription
154
- * Get a subscription by ID
155
- * @param {String} id Subscription ID
156
- * @param {module:api/SubscriptionsApi~subscriptionsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
157
- * data is of type: {@link module:model/DtoSubscriptionResponse}
158
- */
159
- subscriptionsIdGet(id, callback) {
160
- let postBody = null;
161
- // verify the required parameter 'id' is set
162
- if (id === undefined || id === null) {
163
- throw new Error("Missing the required parameter 'id' when calling subscriptionsIdGet");
164
- }
165
- let pathParams = {
166
- 'id': id
167
- };
168
- let queryParams = {};
169
- let headerParams = {};
170
- let formParams = {};
171
- let authNames = ['ApiKeyAuth'];
172
- let contentTypes = [];
173
- let accepts = ['application/json'];
174
- let returnType = DtoSubscriptionResponse;
175
- return this.apiClient.callApi('/subscriptions/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
176
- }
177
-
178
- /**
179
- * Callback function to receive the result of the subscriptionsIdPausePost operation.
180
- * @callback module:api/SubscriptionsApi~subscriptionsIdPausePostCallback
181
- * @param {String} error Error message, if any.
182
- * @param {module:model/DtoSubscriptionPauseResponse} data The data returned by the service call.
183
- * @param {String} response The complete HTTP response.
184
- */
185
-
186
- /**
187
- * Pause a subscription
188
- * Pause a subscription with the specified parameters
189
- * @param {String} id Subscription ID
190
- * @param {module:model/DtoPauseSubscriptionRequest} request Pause subscription request
191
- * @param {module:api/SubscriptionsApi~subscriptionsIdPausePostCallback} callback The callback function, accepting three arguments: error, data, response
192
- * data is of type: {@link module:model/DtoSubscriptionPauseResponse}
193
- */
194
- subscriptionsIdPausePost(id, request, callback) {
195
- let postBody = request;
196
- // verify the required parameter 'id' is set
197
- if (id === undefined || id === null) {
198
- throw new Error("Missing the required parameter 'id' when calling subscriptionsIdPausePost");
199
- }
200
- // verify the required parameter 'request' is set
201
- if (request === undefined || request === null) {
202
- throw new Error("Missing the required parameter 'request' when calling subscriptionsIdPausePost");
203
- }
204
- let pathParams = {
205
- 'id': id
206
- };
207
- let queryParams = {};
208
- let headerParams = {};
209
- let formParams = {};
210
- let authNames = [];
211
- let contentTypes = ['application/json'];
212
- let accepts = ['application/json'];
213
- let returnType = DtoSubscriptionPauseResponse;
214
- return this.apiClient.callApi('/subscriptions/{id}/pause', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
215
- }
216
-
217
- /**
218
- * Callback function to receive the result of the subscriptionsIdPausesGet operation.
219
- * @callback module:api/SubscriptionsApi~subscriptionsIdPausesGetCallback
220
- * @param {String} error Error message, if any.
221
- * @param {Array.<module:model/DtoListSubscriptionPausesResponse>} data The data returned by the service call.
222
- * @param {String} response The complete HTTP response.
223
- */
224
-
225
- /**
226
- * List all pauses for a subscription
227
- * List all pauses for a subscription
228
- * @param {String} id Subscription ID
229
- * @param {module:api/SubscriptionsApi~subscriptionsIdPausesGetCallback} callback The callback function, accepting three arguments: error, data, response
230
- * data is of type: {@link Array.<module:model/DtoListSubscriptionPausesResponse>}
231
- */
232
- subscriptionsIdPausesGet(id, callback) {
233
- let postBody = null;
234
- // verify the required parameter 'id' is set
235
- if (id === undefined || id === null) {
236
- throw new Error("Missing the required parameter 'id' when calling subscriptionsIdPausesGet");
237
- }
238
- let pathParams = {
239
- 'id': id
240
- };
241
- let queryParams = {};
242
- let headerParams = {};
243
- let formParams = {};
244
- let authNames = [];
245
- let contentTypes = [];
246
- let accepts = ['application/json'];
247
- let returnType = [DtoListSubscriptionPausesResponse];
248
- return this.apiClient.callApi('/subscriptions/{id}/pauses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
249
- }
250
-
251
- /**
252
- * Callback function to receive the result of the subscriptionsIdResumePost operation.
253
- * @callback module:api/SubscriptionsApi~subscriptionsIdResumePostCallback
254
- * @param {String} error Error message, if any.
255
- * @param {module:model/DtoSubscriptionPauseResponse} data The data returned by the service call.
256
- * @param {String} response The complete HTTP response.
257
- */
258
-
259
- /**
260
- * Resume a paused subscription
261
- * Resume a paused subscription with the specified parameters
262
- * @param {String} id Subscription ID
263
- * @param {module:model/DtoResumeSubscriptionRequest} request Resume subscription request
264
- * @param {module:api/SubscriptionsApi~subscriptionsIdResumePostCallback} callback The callback function, accepting three arguments: error, data, response
265
- * data is of type: {@link module:model/DtoSubscriptionPauseResponse}
266
- */
267
- subscriptionsIdResumePost(id, request, callback) {
268
- let postBody = request;
269
- // verify the required parameter 'id' is set
270
- if (id === undefined || id === null) {
271
- throw new Error("Missing the required parameter 'id' when calling subscriptionsIdResumePost");
272
- }
273
- // verify the required parameter 'request' is set
274
- if (request === undefined || request === null) {
275
- throw new Error("Missing the required parameter 'request' when calling subscriptionsIdResumePost");
276
- }
277
- let pathParams = {
278
- 'id': id
279
- };
280
- let queryParams = {};
281
- let headerParams = {};
282
- let formParams = {};
283
- let authNames = [];
284
- let contentTypes = ['application/json'];
285
- let accepts = ['application/json'];
286
- let returnType = DtoSubscriptionPauseResponse;
287
- return this.apiClient.callApi('/subscriptions/{id}/resume', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
288
- }
289
-
290
- /**
291
- * Callback function to receive the result of the subscriptionsPost operation.
292
- * @callback module:api/SubscriptionsApi~subscriptionsPostCallback
293
- * @param {String} error Error message, if any.
294
- * @param {module:model/DtoSubscriptionResponse} data The data returned by the service call.
295
- * @param {String} response The complete HTTP response.
296
- */
297
-
298
- /**
299
- * Create subscription
300
- * Create a new subscription
301
- * @param {module:model/DtoCreateSubscriptionRequest} subscription Subscription Request
302
- * @param {module:api/SubscriptionsApi~subscriptionsPostCallback} callback The callback function, accepting three arguments: error, data, response
303
- * data is of type: {@link module:model/DtoSubscriptionResponse}
304
- */
305
- subscriptionsPost(subscription, callback) {
306
- let postBody = subscription;
307
- // verify the required parameter 'subscription' is set
308
- if (subscription === undefined || subscription === null) {
309
- throw new Error("Missing the required parameter 'subscription' when calling subscriptionsPost");
310
- }
311
- let pathParams = {};
312
- let queryParams = {};
313
- let headerParams = {};
314
- let formParams = {};
315
- let authNames = ['ApiKeyAuth'];
316
- let contentTypes = ['application/json'];
317
- let accepts = ['application/json'];
318
- let returnType = DtoSubscriptionResponse;
319
- return this.apiClient.callApi('/subscriptions', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
320
- }
321
-
322
- /**
323
- * Callback function to receive the result of the subscriptionsUsagePost operation.
324
- * @callback module:api/SubscriptionsApi~subscriptionsUsagePostCallback
325
- * @param {String} error Error message, if any.
326
- * @param {module:model/DtoGetUsageBySubscriptionResponse} data The data returned by the service call.
327
- * @param {String} response The complete HTTP response.
328
- */
329
-
330
- /**
331
- * Get usage by subscription
332
- * Get usage for a subscription
333
- * @param {module:model/DtoGetUsageBySubscriptionRequest} request Usage request
334
- * @param {module:api/SubscriptionsApi~subscriptionsUsagePostCallback} callback The callback function, accepting three arguments: error, data, response
335
- * data is of type: {@link module:model/DtoGetUsageBySubscriptionResponse}
336
- */
337
- subscriptionsUsagePost(request, callback) {
338
- let postBody = request;
339
- // verify the required parameter 'request' is set
340
- if (request === undefined || request === null) {
341
- throw new Error("Missing the required parameter 'request' when calling subscriptionsUsagePost");
342
- }
343
- let pathParams = {};
344
- let queryParams = {};
345
- let headerParams = {};
346
- let formParams = {};
347
- let authNames = ['ApiKeyAuth'];
348
- let contentTypes = ['application/json'];
349
- let accepts = ['application/json'];
350
- let returnType = DtoGetUsageBySubscriptionResponse;
351
- return this.apiClient.callApi('/subscriptions/usage', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
352
- }
353
- }
@@ -1,232 +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 DtoCreateTaskRequest from '../model/DtoCreateTaskRequest';
16
- import DtoListTasksResponse from '../model/DtoListTasksResponse';
17
- import DtoTaskResponse from '../model/DtoTaskResponse';
18
- import DtoUpdateTaskStatusRequest from '../model/DtoUpdateTaskStatusRequest';
19
- import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
20
-
21
- /**
22
- * Tasks service.
23
- * @module api/TasksApi
24
- * @version 1.0
25
- */
26
- export default class TasksApi {
27
- /**
28
- * Constructs a new TasksApi.
29
- * @alias module:api/TasksApi
30
- * @class
31
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
32
- * default to {@link module:ApiClient#instance} if unspecified.
33
- */
34
- constructor(apiClient) {
35
- this.apiClient = apiClient || ApiClient.instance;
36
- }
37
-
38
- /**
39
- * Callback function to receive the result of the tasksGet operation.
40
- * @callback module:api/TasksApi~tasksGetCallback
41
- * @param {String} error Error message, if any.
42
- * @param {module:model/DtoListTasksResponse} data The data returned by the service call.
43
- * @param {String} response The complete HTTP response.
44
- */
45
-
46
- /**
47
- * List tasks
48
- * List tasks with optional filtering
49
- * @param {Object} opts Optional parameters
50
- * @param {String} [createdBy]
51
- * @param {String} [endTime]
52
- * @param {module:model/String} [entityType]
53
- * @param {String} [expand]
54
- * @param {Number} [limit]
55
- * @param {Number} [offset]
56
- * @param {module:model/String} [order]
57
- * @param {String} [sort]
58
- * @param {String} [startTime]
59
- * @param {module:model/String} [status]
60
- * @param {module:model/String} [taskStatus]
61
- * @param {module:model/String} [taskType]
62
- * @param {module:api/TasksApi~tasksGetCallback} callback The callback function, accepting three arguments: error, data, response
63
- * data is of type: {@link module:model/DtoListTasksResponse}
64
- */
65
- tasksGet(opts, callback) {
66
- opts = opts || {};
67
- let postBody = null;
68
- let pathParams = {};
69
- let queryParams = {
70
- 'created_by': opts['createdBy'],
71
- 'end_time': opts['endTime'],
72
- 'entity_type': opts['entityType'],
73
- 'expand': opts['expand'],
74
- 'limit': opts['limit'],
75
- 'offset': opts['offset'],
76
- 'order': opts['order'],
77
- 'sort': opts['sort'],
78
- 'start_time': opts['startTime'],
79
- 'status': opts['status'],
80
- 'task_status': opts['taskStatus'],
81
- 'task_type': opts['taskType']
82
- };
83
- let headerParams = {};
84
- let formParams = {};
85
- let authNames = [];
86
- let contentTypes = [];
87
- let accepts = ['application/json'];
88
- let returnType = DtoListTasksResponse;
89
- return this.apiClient.callApi('/tasks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
90
- }
91
-
92
- /**
93
- * Callback function to receive the result of the tasksIdGet operation.
94
- * @callback module:api/TasksApi~tasksIdGetCallback
95
- * @param {String} error Error message, if any.
96
- * @param {module:model/DtoTaskResponse} data The data returned by the service call.
97
- * @param {String} response The complete HTTP response.
98
- */
99
-
100
- /**
101
- * Get a task by ID
102
- * Get detailed information about a task
103
- * @param {String} id Task ID
104
- * @param {module:api/TasksApi~tasksIdGetCallback} callback The callback function, accepting three arguments: error, data, response
105
- * data is of type: {@link module:model/DtoTaskResponse}
106
- */
107
- tasksIdGet(id, callback) {
108
- let postBody = null;
109
- // verify the required parameter 'id' is set
110
- if (id === undefined || id === null) {
111
- throw new Error("Missing the required parameter 'id' when calling tasksIdGet");
112
- }
113
- let pathParams = {
114
- 'id': id
115
- };
116
- let queryParams = {};
117
- let headerParams = {};
118
- let formParams = {};
119
- let authNames = [];
120
- let contentTypes = [];
121
- let accepts = ['application/json'];
122
- let returnType = DtoTaskResponse;
123
- return this.apiClient.callApi('/tasks/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
124
- }
125
-
126
- /**
127
- * Callback function to receive the result of the tasksIdProcessPost operation.
128
- * @callback module:api/TasksApi~tasksIdProcessPostCallback
129
- * @param {String} error Error message, if any.
130
- * @param {Object.<String, {String: Object}>} data The data returned by the service call.
131
- * @param {String} response The complete HTTP response.
132
- */
133
-
134
- /**
135
- * Process a task
136
- * Start processing a task
137
- * @param {String} id Task ID
138
- * @param {module:api/TasksApi~tasksIdProcessPostCallback} callback The callback function, accepting three arguments: error, data, response
139
- * data is of type: {@link Object.<String, {String: Object}>}
140
- */
141
- tasksIdProcessPost(id, callback) {
142
- let postBody = null;
143
- // verify the required parameter 'id' is set
144
- if (id === undefined || id === null) {
145
- throw new Error("Missing the required parameter 'id' when calling tasksIdProcessPost");
146
- }
147
- let pathParams = {
148
- 'id': id
149
- };
150
- let queryParams = {};
151
- let headerParams = {};
152
- let formParams = {};
153
- let authNames = [];
154
- let contentTypes = [];
155
- let accepts = ['application/json'];
156
- let returnType = {
157
- 'String': Object
158
- };
159
- return this.apiClient.callApi('/tasks/{id}/process', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
160
- }
161
-
162
- /**
163
- * Callback function to receive the result of the tasksIdStatusPut operation.
164
- * @callback module:api/TasksApi~tasksIdStatusPutCallback
165
- * @param {String} error Error message, if any.
166
- * @param {module:model/DtoTaskResponse} data The data returned by the service call.
167
- * @param {String} response The complete HTTP response.
168
- */
169
-
170
- /**
171
- * Update task status
172
- * Update the status of a task
173
- * @param {String} id Task ID
174
- * @param {module:model/DtoUpdateTaskStatusRequest} status New status
175
- * @param {module:api/TasksApi~tasksIdStatusPutCallback} callback The callback function, accepting three arguments: error, data, response
176
- * data is of type: {@link module:model/DtoTaskResponse}
177
- */
178
- tasksIdStatusPut(id, status, callback) {
179
- let postBody = status;
180
- // verify the required parameter 'id' is set
181
- if (id === undefined || id === null) {
182
- throw new Error("Missing the required parameter 'id' when calling tasksIdStatusPut");
183
- }
184
- // verify the required parameter 'status' is set
185
- if (status === undefined || status === null) {
186
- throw new Error("Missing the required parameter 'status' when calling tasksIdStatusPut");
187
- }
188
- let pathParams = {
189
- 'id': id
190
- };
191
- let queryParams = {};
192
- let headerParams = {};
193
- let formParams = {};
194
- let authNames = [];
195
- let contentTypes = ['application/json'];
196
- let accepts = ['application/json'];
197
- let returnType = DtoTaskResponse;
198
- return this.apiClient.callApi('/tasks/{id}/status', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
199
- }
200
-
201
- /**
202
- * Callback function to receive the result of the tasksPost operation.
203
- * @callback module:api/TasksApi~tasksPostCallback
204
- * @param {String} error Error message, if any.
205
- * @param {module:model/DtoTaskResponse} data The data returned by the service call.
206
- * @param {String} response The complete HTTP response.
207
- */
208
-
209
- /**
210
- * Create a new task
211
- * Create a new import/export task
212
- * @param {module:model/DtoCreateTaskRequest} task Task details
213
- * @param {module:api/TasksApi~tasksPostCallback} callback The callback function, accepting three arguments: error, data, response
214
- * data is of type: {@link module:model/DtoTaskResponse}
215
- */
216
- tasksPost(task, callback) {
217
- let postBody = task;
218
- // verify the required parameter 'task' is set
219
- if (task === undefined || task === null) {
220
- throw new Error("Missing the required parameter 'task' when calling tasksPost");
221
- }
222
- let pathParams = {};
223
- let queryParams = {};
224
- let headerParams = {};
225
- let formParams = {};
226
- let authNames = [];
227
- let contentTypes = ['application/json'];
228
- let accepts = ['application/json'];
229
- let returnType = DtoTaskResponse;
230
- return this.apiClient.callApi('/tasks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
231
- }
232
- }