@flexprice/sdk 1.0.1 → 1.0.14

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