@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.
Files changed (167) hide show
  1. package/README.md +380 -0
  2. package/dist/ApiClient.js +703 -0
  3. package/dist/api/AuthApi.js +116 -0
  4. package/dist/api/CustomersApi.js +373 -0
  5. package/dist/api/EntitlementsApi.js +291 -0
  6. package/dist/api/EnvironmentsApi.js +204 -0
  7. package/dist/api/EventsApi.js +237 -0
  8. package/dist/api/FeaturesApi.js +252 -0
  9. package/dist/api/IntegrationsApi.js +189 -0
  10. package/dist/api/InvoicesApi.js +444 -0
  11. package/dist/api/MetersApi.js +287 -0
  12. package/dist/api/PaymentsApi.js +296 -0
  13. package/dist/api/PlansApi.js +248 -0
  14. package/dist/api/PricesApi.js +250 -0
  15. package/dist/api/SecretsApi.js +155 -0
  16. package/dist/api/SubscriptionsApi.js +383 -0
  17. package/dist/api/TasksApi.js +254 -0
  18. package/dist/api/TenantsApi.js +182 -0
  19. package/dist/api/UsersApi.js +75 -0
  20. package/dist/api/WalletsApi.js +384 -0
  21. package/dist/index.js +1154 -0
  22. package/dist/model/DtoAddress.js +149 -0
  23. package/dist/model/DtoAggregatedEntitlement.js +123 -0
  24. package/dist/model/DtoAggregatedFeature.js +138 -0
  25. package/dist/model/DtoAuthResponse.js +113 -0
  26. package/dist/model/DtoBillingPeriodInfo.js +114 -0
  27. package/dist/model/DtoBulkIngestEventRequest.js +130 -0
  28. package/dist/model/DtoCreateAPIKeyRequest.js +147 -0
  29. package/dist/model/DtoCreateAPIKeyResponse.js +103 -0
  30. package/dist/model/DtoCreateCustomerRequest.js +218 -0
  31. package/dist/model/DtoCreateEntitlementRequest.js +180 -0
  32. package/dist/model/DtoCreateEnvironmentRequest.js +126 -0
  33. package/dist/model/DtoCreateFeatureRequest.js +193 -0
  34. package/dist/model/DtoCreateIntegrationRequest.js +135 -0
  35. package/dist/model/DtoCreateInvoiceLineItemRequest.js +238 -0
  36. package/dist/model/DtoCreateInvoiceRequest.js +316 -0
  37. package/dist/model/DtoCreateMeterRequest.js +183 -0
  38. package/dist/model/DtoCreatePaymentRequest.js +202 -0
  39. package/dist/model/DtoCreatePlanEntitlementRequest.js +180 -0
  40. package/dist/model/DtoCreatePlanPriceRequest.js +318 -0
  41. package/dist/model/DtoCreatePlanRequest.js +196 -0
  42. package/dist/model/DtoCreatePriceRequest.js +318 -0
  43. package/dist/model/DtoCreatePriceTier.js +132 -0
  44. package/dist/model/DtoCreateSubscriptionRequest.js +244 -0
  45. package/dist/model/DtoCreateTaskRequest.js +167 -0
  46. package/dist/model/DtoCreateTenantRequest.js +126 -0
  47. package/dist/model/DtoCreateWalletRequest.js +216 -0
  48. package/dist/model/DtoCustomerEntitlementsResponse.js +122 -0
  49. package/dist/model/DtoCustomerInvoiceSummary.js +165 -0
  50. package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +134 -0
  51. package/dist/model/DtoCustomerResponse.js +300 -0
  52. package/dist/model/DtoCustomerUsageSummaryResponse.js +150 -0
  53. package/dist/model/DtoEntitlementResponse.js +276 -0
  54. package/dist/model/DtoEntitlementSource.js +161 -0
  55. package/dist/model/DtoEnvironmentResponse.js +137 -0
  56. package/dist/model/DtoEvent.js +159 -0
  57. package/dist/model/DtoFeatureResponse.js +275 -0
  58. package/dist/model/DtoFeatureUsageSummary.js +164 -0
  59. package/dist/model/DtoGetEventsResponse.js +142 -0
  60. package/dist/model/DtoGetPreviewInvoiceRequest.js +136 -0
  61. package/dist/model/DtoGetUsageByMeterRequest.js +179 -0
  62. package/dist/model/DtoGetUsageBySubscriptionRequest.js +144 -0
  63. package/dist/model/DtoGetUsageBySubscriptionResponse.js +166 -0
  64. package/dist/model/DtoGetUsageRequest.js +203 -0
  65. package/dist/model/DtoGetUsageResponse.js +139 -0
  66. package/dist/model/DtoIngestEventRequest.js +186 -0
  67. package/dist/model/DtoInvoiceLineItemResponse.js +343 -0
  68. package/dist/model/DtoInvoiceResponse.js +479 -0
  69. package/dist/model/DtoLinkedIntegrationsResponse.js +89 -0
  70. package/dist/model/DtoListCustomersResponse.js +124 -0
  71. package/dist/model/DtoListEntitlementsResponse.js +124 -0
  72. package/dist/model/DtoListEnvironmentsResponse.js +134 -0
  73. package/dist/model/DtoListFeaturesResponse.js +124 -0
  74. package/dist/model/DtoListInvoicesResponse.js +124 -0
  75. package/dist/model/DtoListPaymentsResponse.js +124 -0
  76. package/dist/model/DtoListPlansResponse.js +124 -0
  77. package/dist/model/DtoListPricesResponse.js +124 -0
  78. package/dist/model/DtoListSecretsResponse.js +124 -0
  79. package/dist/model/DtoListSubscriptionPausesResponse.js +118 -0
  80. package/dist/model/DtoListSubscriptionsResponse.js +124 -0
  81. package/dist/model/DtoListTasksResponse.js +124 -0
  82. package/dist/model/DtoListWalletTransactionsResponse.js +124 -0
  83. package/dist/model/DtoLoginRequest.js +138 -0
  84. package/dist/model/DtoMeterResponse.js +217 -0
  85. package/dist/model/DtoPauseSubscriptionRequest.js +171 -0
  86. package/dist/model/DtoPaymentAttemptResponse.js +191 -0
  87. package/dist/model/DtoPaymentResponse.js +331 -0
  88. package/dist/model/DtoPlanResponse.js +269 -0
  89. package/dist/model/DtoPriceResponse.js +412 -0
  90. package/dist/model/DtoResumeSubscriptionRequest.js +127 -0
  91. package/dist/model/DtoSecretResponse.js +200 -0
  92. package/dist/model/DtoSignUpRequest.js +148 -0
  93. package/dist/model/DtoSubscriptionPauseResponse.js +300 -0
  94. package/dist/model/DtoSubscriptionResponse.js +518 -0
  95. package/dist/model/DtoSubscriptionUsageByMetersResponse.js +165 -0
  96. package/dist/model/DtoTaskResponse.js +311 -0
  97. package/dist/model/DtoTenantBillingDetails.js +127 -0
  98. package/dist/model/DtoTenantBillingUsage.js +124 -0
  99. package/dist/model/DtoTenantResponse.js +151 -0
  100. package/dist/model/DtoTopUpWalletRequest.js +185 -0
  101. package/dist/model/DtoUpdateCustomerRequest.js +195 -0
  102. package/dist/model/DtoUpdateEntitlementRequest.js +122 -0
  103. package/dist/model/DtoUpdateEnvironmentRequest.js +101 -0
  104. package/dist/model/DtoUpdateFeatureRequest.js +135 -0
  105. package/dist/model/DtoUpdateMeterRequest.js +110 -0
  106. package/dist/model/DtoUpdatePaymentRequest.js +99 -0
  107. package/dist/model/DtoUpdatePaymentStatusRequest.js +117 -0
  108. package/dist/model/DtoUpdatePlanEntitlementRequest.js +193 -0
  109. package/dist/model/DtoUpdatePlanPriceRequest.js +331 -0
  110. package/dist/model/DtoUpdatePlanRequest.js +176 -0
  111. package/dist/model/DtoUpdatePriceRequest.js +111 -0
  112. package/dist/model/DtoUpdateTaskStatusRequest.js +109 -0
  113. package/dist/model/DtoUpdateTenantRequest.js +91 -0
  114. package/dist/model/DtoUpdateWalletRequest.js +150 -0
  115. package/dist/model/DtoUsageResult.js +97 -0
  116. package/dist/model/DtoUserResponse.js +115 -0
  117. package/dist/model/DtoWalletBalanceResponse.js +353 -0
  118. package/dist/model/DtoWalletResponse.js +252 -0
  119. package/dist/model/DtoWalletTransactionResponse.js +238 -0
  120. package/dist/model/ErrorsErrorDetail.js +111 -0
  121. package/dist/model/ErrorsErrorResponse.js +99 -0
  122. package/dist/model/MeterAggregation.js +99 -0
  123. package/dist/model/MeterFilter.js +103 -0
  124. package/dist/model/PriceJSONBTransformQuantity.js +99 -0
  125. package/dist/model/PricePrice.js +398 -0
  126. package/dist/model/PricePriceTier.js +104 -0
  127. package/dist/model/PriceTransformQuantity.js +99 -0
  128. package/dist/model/SubscriptionSubscriptionLineItem.js +355 -0
  129. package/dist/model/SubscriptionSubscriptionPause.js +300 -0
  130. package/dist/model/TypesAggregationType.js +68 -0
  131. package/dist/model/TypesAutoTopupTrigger.js +58 -0
  132. package/dist/model/TypesBillingCadence.js +58 -0
  133. package/dist/model/TypesBillingModel.js +63 -0
  134. package/dist/model/TypesBillingPeriod.js +78 -0
  135. package/dist/model/TypesBillingTier.js +58 -0
  136. package/dist/model/TypesEntityType.js +63 -0
  137. package/dist/model/TypesFeatureType.js +63 -0
  138. package/dist/model/TypesFileType.js +58 -0
  139. package/dist/model/TypesInvoiceBillingReason.js +68 -0
  140. package/dist/model/TypesInvoiceCadence.js +58 -0
  141. package/dist/model/TypesInvoiceStatus.js +63 -0
  142. package/dist/model/TypesInvoiceType.js +63 -0
  143. package/dist/model/TypesPaginationResponse.js +101 -0
  144. package/dist/model/TypesPauseMode.js +63 -0
  145. package/dist/model/TypesPauseStatus.js +73 -0
  146. package/dist/model/TypesPaymentDestinationType.js +53 -0
  147. package/dist/model/TypesPaymentMethodType.js +68 -0
  148. package/dist/model/TypesPaymentStatus.js +78 -0
  149. package/dist/model/TypesPriceType.js +58 -0
  150. package/dist/model/TypesResetUsage.js +58 -0
  151. package/dist/model/TypesResumeMode.js +63 -0
  152. package/dist/model/TypesSecretProvider.js +63 -0
  153. package/dist/model/TypesSecretType.js +63 -0
  154. package/dist/model/TypesStatus.js +63 -0
  155. package/dist/model/TypesSubscriptionStatus.js +88 -0
  156. package/dist/model/TypesTaskStatus.js +68 -0
  157. package/dist/model/TypesTaskType.js +58 -0
  158. package/dist/model/TypesTransactionReason.js +88 -0
  159. package/dist/model/TypesTransactionStatus.js +63 -0
  160. package/dist/model/TypesTransactionType.js +58 -0
  161. package/dist/model/TypesWalletConfig.js +91 -0
  162. package/dist/model/TypesWalletConfigPriceType.js +63 -0
  163. package/dist/model/TypesWalletStatus.js +63 -0
  164. package/dist/model/TypesWalletTxReferenceType.js +68 -0
  165. package/dist/model/TypesWalletType.js +58 -0
  166. package/dist/model/TypesWindowSize.js +63 -0
  167. package/package.json +54 -0
@@ -0,0 +1,287 @@
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 _DtoCreateMeterRequest = _interopRequireDefault(require("../model/DtoCreateMeterRequest"));
9
+ var _DtoMeterResponse = _interopRequireDefault(require("../model/DtoMeterResponse"));
10
+ var _DtoUpdateMeterRequest = _interopRequireDefault(require("../model/DtoUpdateMeterRequest"));
11
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ 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); }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * FlexPrice API
20
+ * FlexPrice API Service
21
+ *
22
+ * The version of the OpenAPI document: 1.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * Meters service.
32
+ * @module api/MetersApi
33
+ * @version 1.0
34
+ */
35
+ var MetersApi = exports["default"] = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new MetersApi.
38
+ * @alias module:api/MetersApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
+ function MetersApi(apiClient) {
44
+ _classCallCheck(this, MetersApi);
45
+ this.apiClient = apiClient || _ApiClient["default"].instance;
46
+ }
47
+
48
+ /**
49
+ * Callback function to receive the result of the metersGet operation.
50
+ * @callback module:api/MetersApi~metersGetCallback
51
+ * @param {String} error Error message, if any.
52
+ * @param {Array.<module:model/DtoMeterResponse>} data The data returned by the service call.
53
+ * @param {String} response The complete HTTP response.
54
+ */
55
+
56
+ /**
57
+ * List meters
58
+ * Get all meters
59
+ * @param {Object} opts Optional parameters
60
+ * @param {String} [endTime]
61
+ * @param {String} [eventName]
62
+ * @param {String} [expand]
63
+ * @param {Number} [limit]
64
+ * @param {Array.<String>} [meterIds]
65
+ * @param {Number} [offset]
66
+ * @param {module:model/String} [order]
67
+ * @param {String} [sort]
68
+ * @param {String} [startTime]
69
+ * @param {module:model/String} [status]
70
+ * @param {module:api/MetersApi~metersGetCallback} callback The callback function, accepting three arguments: error, data, response
71
+ * data is of type: {@link Array.<module:model/DtoMeterResponse>}
72
+ */
73
+ return _createClass(MetersApi, [{
74
+ key: "metersGet",
75
+ value: function metersGet(opts, callback) {
76
+ opts = opts || {};
77
+ var postBody = null;
78
+ var pathParams = {};
79
+ var queryParams = {
80
+ 'end_time': opts['endTime'],
81
+ 'event_name': opts['eventName'],
82
+ 'expand': opts['expand'],
83
+ 'limit': opts['limit'],
84
+ 'meter_ids': this.apiClient.buildCollectionParam(opts['meterIds'], 'csv'),
85
+ 'offset': opts['offset'],
86
+ 'order': opts['order'],
87
+ 'sort': opts['sort'],
88
+ 'start_time': opts['startTime'],
89
+ 'status': opts['status']
90
+ };
91
+ var headerParams = {};
92
+ var formParams = {};
93
+ var authNames = ['ApiKeyAuth'];
94
+ var contentTypes = [];
95
+ var accepts = ['application/json'];
96
+ var returnType = [_DtoMeterResponse["default"]];
97
+ return this.apiClient.callApi('/meters', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
98
+ }
99
+
100
+ /**
101
+ * Callback function to receive the result of the metersIdDelete operation.
102
+ * @callback module:api/MetersApi~metersIdDeleteCallback
103
+ * @param {String} error Error message, if any.
104
+ * @param {Object.<String, {String: String}>} data The data returned by the service call.
105
+ * @param {String} response The complete HTTP response.
106
+ */
107
+
108
+ /**
109
+ * Delete meter
110
+ * Delete an existing meter
111
+ * @param {String} id Meter ID
112
+ * @param {module:api/MetersApi~metersIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
113
+ * data is of type: {@link Object.<String, {String: String}>}
114
+ */
115
+ }, {
116
+ key: "metersIdDelete",
117
+ value: function metersIdDelete(id, callback) {
118
+ var postBody = null;
119
+ // verify the required parameter 'id' is set
120
+ if (id === undefined || id === null) {
121
+ throw new Error("Missing the required parameter 'id' when calling metersIdDelete");
122
+ }
123
+ var pathParams = {
124
+ 'id': id
125
+ };
126
+ var queryParams = {};
127
+ var headerParams = {};
128
+ var formParams = {};
129
+ var authNames = ['ApiKeyAuth'];
130
+ var contentTypes = [];
131
+ var accepts = ['application/json'];
132
+ var returnType = {
133
+ 'String': 'String'
134
+ };
135
+ return this.apiClient.callApi('/meters/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
136
+ }
137
+
138
+ /**
139
+ * Callback function to receive the result of the metersIdDisablePost operation.
140
+ * @callback module:api/MetersApi~metersIdDisablePostCallback
141
+ * @param {String} error Error message, if any.
142
+ * @param {Object.<String, {String: String}>} data The data returned by the service call.
143
+ * @param {String} response The complete HTTP response.
144
+ */
145
+
146
+ /**
147
+ * Disable meter [TODO: Deprecate]
148
+ * Disable an existing meter
149
+ * @param {String} id Meter ID
150
+ * @param {module:api/MetersApi~metersIdDisablePostCallback} callback The callback function, accepting three arguments: error, data, response
151
+ * data is of type: {@link Object.<String, {String: String}>}
152
+ */
153
+ }, {
154
+ key: "metersIdDisablePost",
155
+ value: function metersIdDisablePost(id, callback) {
156
+ var postBody = null;
157
+ // verify the required parameter 'id' is set
158
+ if (id === undefined || id === null) {
159
+ throw new Error("Missing the required parameter 'id' when calling metersIdDisablePost");
160
+ }
161
+ var pathParams = {
162
+ 'id': id
163
+ };
164
+ var queryParams = {};
165
+ var headerParams = {};
166
+ var formParams = {};
167
+ var authNames = ['ApiKeyAuth'];
168
+ var contentTypes = [];
169
+ var accepts = ['application/json'];
170
+ var returnType = {
171
+ 'String': 'String'
172
+ };
173
+ return this.apiClient.callApi('/meters/{id}/disable', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
174
+ }
175
+
176
+ /**
177
+ * Callback function to receive the result of the metersIdGet operation.
178
+ * @callback module:api/MetersApi~metersIdGetCallback
179
+ * @param {String} error Error message, if any.
180
+ * @param {module:model/DtoMeterResponse} data The data returned by the service call.
181
+ * @param {String} response The complete HTTP response.
182
+ */
183
+
184
+ /**
185
+ * Get meter
186
+ * Get a specific meter by ID
187
+ * @param {String} id Meter ID
188
+ * @param {module:api/MetersApi~metersIdGetCallback} callback The callback function, accepting three arguments: error, data, response
189
+ * data is of type: {@link module:model/DtoMeterResponse}
190
+ */
191
+ }, {
192
+ key: "metersIdGet",
193
+ value: function metersIdGet(id, callback) {
194
+ var postBody = null;
195
+ // verify the required parameter 'id' is set
196
+ if (id === undefined || id === null) {
197
+ throw new Error("Missing the required parameter 'id' when calling metersIdGet");
198
+ }
199
+ var pathParams = {
200
+ 'id': id
201
+ };
202
+ var queryParams = {};
203
+ var headerParams = {};
204
+ var formParams = {};
205
+ var authNames = ['ApiKeyAuth'];
206
+ var contentTypes = [];
207
+ var accepts = ['application/json'];
208
+ var returnType = _DtoMeterResponse["default"];
209
+ return this.apiClient.callApi('/meters/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
210
+ }
211
+
212
+ /**
213
+ * Callback function to receive the result of the metersIdPut operation.
214
+ * @callback module:api/MetersApi~metersIdPutCallback
215
+ * @param {String} error Error message, if any.
216
+ * @param {module:model/DtoMeterResponse} data The data returned by the service call.
217
+ * @param {String} response The complete HTTP response.
218
+ */
219
+
220
+ /**
221
+ * Update meter
222
+ * Update an existing meter
223
+ * @param {String} id Meter ID
224
+ * @param {module:model/DtoUpdateMeterRequest} meter Meter configuration
225
+ * @param {module:api/MetersApi~metersIdPutCallback} callback The callback function, accepting three arguments: error, data, response
226
+ * data is of type: {@link module:model/DtoMeterResponse}
227
+ */
228
+ }, {
229
+ key: "metersIdPut",
230
+ value: function metersIdPut(id, meter, callback) {
231
+ var postBody = meter;
232
+ // verify the required parameter 'id' is set
233
+ if (id === undefined || id === null) {
234
+ throw new Error("Missing the required parameter 'id' when calling metersIdPut");
235
+ }
236
+ // verify the required parameter 'meter' is set
237
+ if (meter === undefined || meter === null) {
238
+ throw new Error("Missing the required parameter 'meter' when calling metersIdPut");
239
+ }
240
+ var pathParams = {
241
+ 'id': id
242
+ };
243
+ var queryParams = {};
244
+ var headerParams = {};
245
+ var formParams = {};
246
+ var authNames = ['ApiKeyAuth'];
247
+ var contentTypes = ['application/json'];
248
+ var accepts = ['application/json'];
249
+ var returnType = _DtoMeterResponse["default"];
250
+ return this.apiClient.callApi('/meters/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
251
+ }
252
+
253
+ /**
254
+ * Callback function to receive the result of the metersPost operation.
255
+ * @callback module:api/MetersApi~metersPostCallback
256
+ * @param {String} error Error message, if any.
257
+ * @param {module:model/DtoMeterResponse} data The data returned by the service call.
258
+ * @param {String} response The complete HTTP response.
259
+ */
260
+
261
+ /**
262
+ * Create meter
263
+ * Create a new meter with the specified configuration
264
+ * @param {module:model/DtoCreateMeterRequest} meter Meter configuration
265
+ * @param {module:api/MetersApi~metersPostCallback} callback The callback function, accepting three arguments: error, data, response
266
+ * data is of type: {@link module:model/DtoMeterResponse}
267
+ */
268
+ }, {
269
+ key: "metersPost",
270
+ value: function metersPost(meter, callback) {
271
+ var postBody = meter;
272
+ // verify the required parameter 'meter' is set
273
+ if (meter === undefined || meter === null) {
274
+ throw new Error("Missing the required parameter 'meter' when calling metersPost");
275
+ }
276
+ var pathParams = {};
277
+ var queryParams = {};
278
+ var headerParams = {};
279
+ var formParams = {};
280
+ var authNames = ['ApiKeyAuth'];
281
+ var contentTypes = ['application/json'];
282
+ var accepts = ['application/json'];
283
+ var returnType = _DtoMeterResponse["default"];
284
+ return this.apiClient.callApi('/meters', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
285
+ }
286
+ }]);
287
+ }();
@@ -0,0 +1,296 @@
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 _DtoCreatePaymentRequest = _interopRequireDefault(require("../model/DtoCreatePaymentRequest"));
9
+ var _DtoListPaymentsResponse = _interopRequireDefault(require("../model/DtoListPaymentsResponse"));
10
+ var _DtoPaymentResponse = _interopRequireDefault(require("../model/DtoPaymentResponse"));
11
+ var _DtoUpdatePaymentRequest = _interopRequireDefault(require("../model/DtoUpdatePaymentRequest"));
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
+ * Payments service.
33
+ * @module api/PaymentsApi
34
+ * @version 1.0
35
+ */
36
+ var PaymentsApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new PaymentsApi.
39
+ * @alias module:api/PaymentsApi
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 PaymentsApi(apiClient) {
45
+ _classCallCheck(this, PaymentsApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Callback function to receive the result of the paymentsGet operation.
51
+ * @callback module:api/PaymentsApi~paymentsGetCallback
52
+ * @param {String} error Error message, if any.
53
+ * @param {module:model/DtoListPaymentsResponse} data The data returned by the service call.
54
+ * @param {String} response The complete HTTP response.
55
+ */
56
+
57
+ /**
58
+ * List payments
59
+ * List payments with the specified filter
60
+ * @param {Object} opts Optional parameters
61
+ * @param {String} [currency]
62
+ * @param {String} [destinationId]
63
+ * @param {String} [destinationType]
64
+ * @param {String} [endTime]
65
+ * @param {String} [expand]
66
+ * @param {Number} [limit]
67
+ * @param {Number} [offset]
68
+ * @param {module:model/String} [order]
69
+ * @param {String} [paymentGateway]
70
+ * @param {Array.<String>} [paymentIds]
71
+ * @param {String} [paymentMethodType]
72
+ * @param {String} [paymentStatus]
73
+ * @param {String} [sort]
74
+ * @param {String} [startTime]
75
+ * @param {module:model/String} [status]
76
+ * @param {module:api/PaymentsApi~paymentsGetCallback} callback The callback function, accepting three arguments: error, data, response
77
+ * data is of type: {@link module:model/DtoListPaymentsResponse}
78
+ */
79
+ return _createClass(PaymentsApi, [{
80
+ key: "paymentsGet",
81
+ value: function paymentsGet(opts, callback) {
82
+ opts = opts || {};
83
+ var postBody = null;
84
+ var pathParams = {};
85
+ var queryParams = {
86
+ 'currency': opts['currency'],
87
+ 'destination_id': opts['destinationId'],
88
+ 'destination_type': opts['destinationType'],
89
+ 'end_time': opts['endTime'],
90
+ 'expand': opts['expand'],
91
+ 'limit': opts['limit'],
92
+ 'offset': opts['offset'],
93
+ 'order': opts['order'],
94
+ 'payment_gateway': opts['paymentGateway'],
95
+ 'payment_ids': this.apiClient.buildCollectionParam(opts['paymentIds'], 'csv'),
96
+ 'payment_method_type': opts['paymentMethodType'],
97
+ 'payment_status': opts['paymentStatus'],
98
+ 'sort': opts['sort'],
99
+ 'start_time': opts['startTime'],
100
+ 'status': opts['status']
101
+ };
102
+ var headerParams = {};
103
+ var formParams = {};
104
+ var authNames = ['ApiKeyAuth'];
105
+ var contentTypes = [];
106
+ var accepts = ['application/json'];
107
+ var returnType = _DtoListPaymentsResponse["default"];
108
+ return this.apiClient.callApi('/payments', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
109
+ }
110
+
111
+ /**
112
+ * Callback function to receive the result of the paymentsIdDelete operation.
113
+ * @callback module:api/PaymentsApi~paymentsIdDeleteCallback
114
+ * @param {String} error Error message, if any.
115
+ * @param {Object.<String, {String: Object}>} data The data returned by the service call.
116
+ * @param {String} response The complete HTTP response.
117
+ */
118
+
119
+ /**
120
+ * Delete a payment
121
+ * Delete a payment
122
+ * @param {String} id Payment ID
123
+ * @param {module:api/PaymentsApi~paymentsIdDeleteCallback} callback The callback function, accepting three arguments: error, data, response
124
+ * data is of type: {@link Object.<String, {String: Object}>}
125
+ */
126
+ }, {
127
+ key: "paymentsIdDelete",
128
+ value: function paymentsIdDelete(id, callback) {
129
+ var postBody = null;
130
+ // verify the required parameter 'id' is set
131
+ if (id === undefined || id === null) {
132
+ throw new Error("Missing the required parameter 'id' when calling paymentsIdDelete");
133
+ }
134
+ var pathParams = {
135
+ 'id': id
136
+ };
137
+ var queryParams = {};
138
+ var headerParams = {};
139
+ var formParams = {};
140
+ var authNames = ['ApiKeyAuth'];
141
+ var contentTypes = [];
142
+ var accepts = ['application/json'];
143
+ var returnType = {
144
+ 'String': Object
145
+ };
146
+ return this.apiClient.callApi('/payments/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
147
+ }
148
+
149
+ /**
150
+ * Callback function to receive the result of the paymentsIdGet operation.
151
+ * @callback module:api/PaymentsApi~paymentsIdGetCallback
152
+ * @param {String} error Error message, if any.
153
+ * @param {module:model/DtoPaymentResponse} data The data returned by the service call.
154
+ * @param {String} response The complete HTTP response.
155
+ */
156
+
157
+ /**
158
+ * Get a payment by ID
159
+ * Get a payment by ID
160
+ * @param {String} id Payment ID
161
+ * @param {module:api/PaymentsApi~paymentsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
162
+ * data is of type: {@link module:model/DtoPaymentResponse}
163
+ */
164
+ }, {
165
+ key: "paymentsIdGet",
166
+ value: function paymentsIdGet(id, callback) {
167
+ var postBody = null;
168
+ // verify the required parameter 'id' is set
169
+ if (id === undefined || id === null) {
170
+ throw new Error("Missing the required parameter 'id' when calling paymentsIdGet");
171
+ }
172
+ var pathParams = {
173
+ 'id': id
174
+ };
175
+ var queryParams = {};
176
+ var headerParams = {};
177
+ var formParams = {};
178
+ var authNames = ['ApiKeyAuth'];
179
+ var contentTypes = [];
180
+ var accepts = ['application/json'];
181
+ var returnType = _DtoPaymentResponse["default"];
182
+ return this.apiClient.callApi('/payments/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
183
+ }
184
+
185
+ /**
186
+ * Callback function to receive the result of the paymentsIdProcessPost operation.
187
+ * @callback module:api/PaymentsApi~paymentsIdProcessPostCallback
188
+ * @param {String} error Error message, if any.
189
+ * @param {module:model/DtoPaymentResponse} data The data returned by the service call.
190
+ * @param {String} response The complete HTTP response.
191
+ */
192
+
193
+ /**
194
+ * Process a payment
195
+ * Process a payment
196
+ * @param {String} id Payment ID
197
+ * @param {module:api/PaymentsApi~paymentsIdProcessPostCallback} callback The callback function, accepting three arguments: error, data, response
198
+ * data is of type: {@link module:model/DtoPaymentResponse}
199
+ */
200
+ }, {
201
+ key: "paymentsIdProcessPost",
202
+ value: function paymentsIdProcessPost(id, callback) {
203
+ var postBody = null;
204
+ // verify the required parameter 'id' is set
205
+ if (id === undefined || id === null) {
206
+ throw new Error("Missing the required parameter 'id' when calling paymentsIdProcessPost");
207
+ }
208
+ var pathParams = {
209
+ 'id': id
210
+ };
211
+ var queryParams = {};
212
+ var headerParams = {};
213
+ var formParams = {};
214
+ var authNames = ['ApiKeyAuth'];
215
+ var contentTypes = [];
216
+ var accepts = ['application/json'];
217
+ var returnType = _DtoPaymentResponse["default"];
218
+ return this.apiClient.callApi('/payments/{id}/process', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
219
+ }
220
+
221
+ /**
222
+ * Callback function to receive the result of the paymentsIdPut operation.
223
+ * @callback module:api/PaymentsApi~paymentsIdPutCallback
224
+ * @param {String} error Error message, if any.
225
+ * @param {module:model/DtoPaymentResponse} data The data returned by the service call.
226
+ * @param {String} response The complete HTTP response.
227
+ */
228
+
229
+ /**
230
+ * Update a payment
231
+ * Update a payment with the specified configuration
232
+ * @param {String} id Payment ID
233
+ * @param {module:model/DtoUpdatePaymentRequest} payment Payment configuration
234
+ * @param {module:api/PaymentsApi~paymentsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
235
+ * data is of type: {@link module:model/DtoPaymentResponse}
236
+ */
237
+ }, {
238
+ key: "paymentsIdPut",
239
+ value: function paymentsIdPut(id, payment, callback) {
240
+ var postBody = payment;
241
+ // verify the required parameter 'id' is set
242
+ if (id === undefined || id === null) {
243
+ throw new Error("Missing the required parameter 'id' when calling paymentsIdPut");
244
+ }
245
+ // verify the required parameter 'payment' is set
246
+ if (payment === undefined || payment === null) {
247
+ throw new Error("Missing the required parameter 'payment' when calling paymentsIdPut");
248
+ }
249
+ var pathParams = {
250
+ 'id': id
251
+ };
252
+ var queryParams = {};
253
+ var headerParams = {};
254
+ var formParams = {};
255
+ var authNames = ['ApiKeyAuth'];
256
+ var contentTypes = ['application/json'];
257
+ var accepts = ['application/json'];
258
+ var returnType = _DtoPaymentResponse["default"];
259
+ return this.apiClient.callApi('/payments/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
260
+ }
261
+
262
+ /**
263
+ * Callback function to receive the result of the paymentsPost operation.
264
+ * @callback module:api/PaymentsApi~paymentsPostCallback
265
+ * @param {String} error Error message, if any.
266
+ * @param {module:model/DtoPaymentResponse} data The data returned by the service call.
267
+ * @param {String} response The complete HTTP response.
268
+ */
269
+
270
+ /**
271
+ * Create a new payment
272
+ * Create a new payment with the specified configuration
273
+ * @param {module:model/DtoCreatePaymentRequest} payment Payment configuration
274
+ * @param {module:api/PaymentsApi~paymentsPostCallback} callback The callback function, accepting three arguments: error, data, response
275
+ * data is of type: {@link module:model/DtoPaymentResponse}
276
+ */
277
+ }, {
278
+ key: "paymentsPost",
279
+ value: function paymentsPost(payment, callback) {
280
+ var postBody = payment;
281
+ // verify the required parameter 'payment' is set
282
+ if (payment === undefined || payment === null) {
283
+ throw new Error("Missing the required parameter 'payment' when calling paymentsPost");
284
+ }
285
+ var pathParams = {};
286
+ var queryParams = {};
287
+ var headerParams = {};
288
+ var formParams = {};
289
+ var authNames = ['ApiKeyAuth'];
290
+ var contentTypes = ['application/json'];
291
+ var accepts = ['application/json'];
292
+ var returnType = _DtoPaymentResponse["default"];
293
+ return this.apiClient.callApi('/payments', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
294
+ }
295
+ }]);
296
+ }();