@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,182 @@
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 _DtoCreateTenantRequest = _interopRequireDefault(require("../model/DtoCreateTenantRequest"));
9
+ var _DtoTenantBillingUsage = _interopRequireDefault(require("../model/DtoTenantBillingUsage"));
10
+ var _DtoTenantResponse = _interopRequireDefault(require("../model/DtoTenantResponse"));
11
+ var _DtoUpdateTenantRequest = _interopRequireDefault(require("../model/DtoUpdateTenantRequest"));
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
+ * Tenants service.
33
+ * @module api/TenantsApi
34
+ * @version 1.0
35
+ */
36
+ var TenantsApi = exports["default"] = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new TenantsApi.
39
+ * @alias module:api/TenantsApi
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 TenantsApi(apiClient) {
45
+ _classCallCheck(this, TenantsApi);
46
+ this.apiClient = apiClient || _ApiClient["default"].instance;
47
+ }
48
+
49
+ /**
50
+ * Callback function to receive the result of the tenantBillingGet operation.
51
+ * @callback module:api/TenantsApi~tenantBillingGetCallback
52
+ * @param {String} error Error message, if any.
53
+ * @param {module:model/DtoTenantBillingUsage} data The data returned by the service call.
54
+ * @param {String} response The complete HTTP response.
55
+ */
56
+
57
+ /**
58
+ * Get billing usage for the current tenant
59
+ * Get the subscription and usage details for the current tenant
60
+ * @param {module:api/TenantsApi~tenantBillingGetCallback} callback The callback function, accepting three arguments: error, data, response
61
+ * data is of type: {@link module:model/DtoTenantBillingUsage}
62
+ */
63
+ return _createClass(TenantsApi, [{
64
+ key: "tenantBillingGet",
65
+ value: function tenantBillingGet(callback) {
66
+ var postBody = null;
67
+ var pathParams = {};
68
+ var queryParams = {};
69
+ var headerParams = {};
70
+ var formParams = {};
71
+ var authNames = ['ApiKeyAuth'];
72
+ var contentTypes = [];
73
+ var accepts = ['application/json'];
74
+ var returnType = _DtoTenantBillingUsage["default"];
75
+ return this.apiClient.callApi('/tenant/billing', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
76
+ }
77
+
78
+ /**
79
+ * Callback function to receive the result of the tenantsIdGet operation.
80
+ * @callback module:api/TenantsApi~tenantsIdGetCallback
81
+ * @param {String} error Error message, if any.
82
+ * @param {module:model/DtoTenantResponse} data The data returned by the service call.
83
+ * @param {String} response The complete HTTP response.
84
+ */
85
+
86
+ /**
87
+ * Get tenant by ID
88
+ * Get tenant by ID
89
+ * @param {String} id Tenant ID
90
+ * @param {module:api/TenantsApi~tenantsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
91
+ * data is of type: {@link module:model/DtoTenantResponse}
92
+ */
93
+ }, {
94
+ key: "tenantsIdGet",
95
+ value: function tenantsIdGet(id, callback) {
96
+ var postBody = null;
97
+ // verify the required parameter 'id' is set
98
+ if (id === undefined || id === null) {
99
+ throw new Error("Missing the required parameter 'id' when calling tenantsIdGet");
100
+ }
101
+ var pathParams = {
102
+ 'id': id
103
+ };
104
+ var queryParams = {};
105
+ var headerParams = {};
106
+ var formParams = {};
107
+ var authNames = ['ApiKeyAuth'];
108
+ var contentTypes = [];
109
+ var accepts = ['application/json'];
110
+ var returnType = _DtoTenantResponse["default"];
111
+ return this.apiClient.callApi('/tenants/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
112
+ }
113
+
114
+ /**
115
+ * Callback function to receive the result of the tenantsPost operation.
116
+ * @callback module:api/TenantsApi~tenantsPostCallback
117
+ * @param {String} error Error message, if any.
118
+ * @param {module:model/DtoTenantResponse} data The data returned by the service call.
119
+ * @param {String} response The complete HTTP response.
120
+ */
121
+
122
+ /**
123
+ * Create a new tenant
124
+ * Create a new tenant
125
+ * @param {module:model/DtoCreateTenantRequest} request Create tenant request
126
+ * @param {module:api/TenantsApi~tenantsPostCallback} callback The callback function, accepting three arguments: error, data, response
127
+ * data is of type: {@link module:model/DtoTenantResponse}
128
+ */
129
+ }, {
130
+ key: "tenantsPost",
131
+ value: function tenantsPost(request, callback) {
132
+ var postBody = request;
133
+ // verify the required parameter 'request' is set
134
+ if (request === undefined || request === null) {
135
+ throw new Error("Missing the required parameter 'request' when calling tenantsPost");
136
+ }
137
+ var pathParams = {};
138
+ var queryParams = {};
139
+ var headerParams = {};
140
+ var formParams = {};
141
+ var authNames = ['ApiKeyAuth'];
142
+ var contentTypes = ['application/json'];
143
+ var accepts = ['application/json'];
144
+ var returnType = _DtoTenantResponse["default"];
145
+ return this.apiClient.callApi('/tenants', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
146
+ }
147
+
148
+ /**
149
+ * Callback function to receive the result of the tenantsUpdatePut operation.
150
+ * @callback module:api/TenantsApi~tenantsUpdatePutCallback
151
+ * @param {String} error Error message, if any.
152
+ * @param {module:model/DtoTenantResponse} data The data returned by the service call.
153
+ * @param {String} response The complete HTTP response.
154
+ */
155
+
156
+ /**
157
+ * Update a tenant
158
+ * Update a tenant's details including name and billing information
159
+ * @param {module:model/DtoUpdateTenantRequest} request Update tenant request
160
+ * @param {module:api/TenantsApi~tenantsUpdatePutCallback} callback The callback function, accepting three arguments: error, data, response
161
+ * data is of type: {@link module:model/DtoTenantResponse}
162
+ */
163
+ }, {
164
+ key: "tenantsUpdatePut",
165
+ value: function tenantsUpdatePut(request, callback) {
166
+ var postBody = request;
167
+ // verify the required parameter 'request' is set
168
+ if (request === undefined || request === null) {
169
+ throw new Error("Missing the required parameter 'request' when calling tenantsUpdatePut");
170
+ }
171
+ var pathParams = {};
172
+ var queryParams = {};
173
+ var headerParams = {};
174
+ var formParams = {};
175
+ var authNames = ['ApiKeyAuth'];
176
+ var contentTypes = ['application/json'];
177
+ var accepts = ['application/json'];
178
+ var returnType = _DtoTenantResponse["default"];
179
+ return this.apiClient.callApi('/tenants/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
180
+ }
181
+ }]);
182
+ }();
@@ -0,0 +1,75 @@
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 _DtoUserResponse = _interopRequireDefault(require("../model/DtoUserResponse"));
9
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ 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); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ 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); } /**
17
+ * FlexPrice API
18
+ * FlexPrice API Service
19
+ *
20
+ * The version of the OpenAPI document: 1.0
21
+ *
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * Users service.
30
+ * @module api/UsersApi
31
+ * @version 1.0
32
+ */
33
+ var UsersApi = exports["default"] = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new UsersApi.
36
+ * @alias module:api/UsersApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function UsersApi(apiClient) {
42
+ _classCallCheck(this, UsersApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Callback function to receive the result of the usersMeGet operation.
48
+ * @callback module:api/UsersApi~usersMeGetCallback
49
+ * @param {String} error Error message, if any.
50
+ * @param {module:model/DtoUserResponse} data The data returned by the service call.
51
+ * @param {String} response The complete HTTP response.
52
+ */
53
+
54
+ /**
55
+ * Get user info
56
+ * Get the current user's information
57
+ * @param {module:api/UsersApi~usersMeGetCallback} callback The callback function, accepting three arguments: error, data, response
58
+ * data is of type: {@link module:model/DtoUserResponse}
59
+ */
60
+ return _createClass(UsersApi, [{
61
+ key: "usersMeGet",
62
+ value: function usersMeGet(callback) {
63
+ var postBody = null;
64
+ var pathParams = {};
65
+ var queryParams = {};
66
+ var headerParams = {};
67
+ var formParams = {};
68
+ var authNames = ['ApiKeyAuth'];
69
+ var contentTypes = [];
70
+ var accepts = ['application/json'];
71
+ var returnType = _DtoUserResponse["default"];
72
+ return this.apiClient.callApi('/users/me', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
73
+ }
74
+ }]);
75
+ }();
@@ -0,0 +1,384 @@
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 _DtoCreateWalletRequest = _interopRequireDefault(require("../model/DtoCreateWalletRequest"));
9
+ var _DtoListWalletTransactionsResponse = _interopRequireDefault(require("../model/DtoListWalletTransactionsResponse"));
10
+ var _DtoTopUpWalletRequest = _interopRequireDefault(require("../model/DtoTopUpWalletRequest"));
11
+ var _DtoUpdateWalletRequest = _interopRequireDefault(require("../model/DtoUpdateWalletRequest"));
12
+ var _DtoWalletBalanceResponse = _interopRequireDefault(require("../model/DtoWalletBalanceResponse"));
13
+ var _DtoWalletResponse = _interopRequireDefault(require("../model/DtoWalletResponse"));
14
+ var _ErrorsErrorResponse = _interopRequireDefault(require("../model/ErrorsErrorResponse"));
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
+ 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); }
17
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
18
+ 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); } }
19
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
21
+ 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); } /**
22
+ * FlexPrice API
23
+ * FlexPrice API Service
24
+ *
25
+ * The version of the OpenAPI document: 1.0
26
+ *
27
+ *
28
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29
+ * https://openapi-generator.tech
30
+ * Do not edit the class manually.
31
+ *
32
+ */
33
+ /**
34
+ * Wallets service.
35
+ * @module api/WalletsApi
36
+ * @version 1.0
37
+ */
38
+ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
39
+ /**
40
+ * Constructs a new WalletsApi.
41
+ * @alias module:api/WalletsApi
42
+ * @class
43
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
44
+ * default to {@link module:ApiClient#instance} if unspecified.
45
+ */
46
+ function WalletsApi(apiClient) {
47
+ _classCallCheck(this, WalletsApi);
48
+ this.apiClient = apiClient || _ApiClient["default"].instance;
49
+ }
50
+
51
+ /**
52
+ * Callback function to receive the result of the customersIdWalletsGet operation.
53
+ * @callback module:api/WalletsApi~customersIdWalletsGetCallback
54
+ * @param {String} error Error message, if any.
55
+ * @param {Array.<module:model/DtoWalletResponse>} data The data returned by the service call.
56
+ * @param {String} response The complete HTTP response.
57
+ */
58
+
59
+ /**
60
+ * Get wallets by customer ID
61
+ * Get all wallets for a customer
62
+ * @param {String} id Customer ID
63
+ * @param {module:api/WalletsApi~customersIdWalletsGetCallback} callback The callback function, accepting three arguments: error, data, response
64
+ * data is of type: {@link Array.<module:model/DtoWalletResponse>}
65
+ */
66
+ return _createClass(WalletsApi, [{
67
+ key: "customersIdWalletsGet",
68
+ value: function customersIdWalletsGet(id, callback) {
69
+ var postBody = null;
70
+ // verify the required parameter 'id' is set
71
+ if (id === undefined || id === null) {
72
+ throw new Error("Missing the required parameter 'id' when calling customersIdWalletsGet");
73
+ }
74
+ var pathParams = {
75
+ 'id': id
76
+ };
77
+ var queryParams = {};
78
+ var headerParams = {};
79
+ var formParams = {};
80
+ var authNames = ['ApiKeyAuth'];
81
+ var contentTypes = [];
82
+ var accepts = ['application/json'];
83
+ var returnType = [_DtoWalletResponse["default"]];
84
+ return this.apiClient.callApi('/customers/{id}/wallets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
85
+ }
86
+
87
+ /**
88
+ * Callback function to receive the result of the walletsIdBalanceRealTimeGet operation.
89
+ * @callback module:api/WalletsApi~walletsIdBalanceRealTimeGetCallback
90
+ * @param {String} error Error message, if any.
91
+ * @param {module:model/DtoWalletBalanceResponse} data The data returned by the service call.
92
+ * @param {String} response The complete HTTP response.
93
+ */
94
+
95
+ /**
96
+ * Get wallet balance
97
+ * Get real-time balance of a wallet
98
+ * @param {String} id Wallet ID
99
+ * @param {module:api/WalletsApi~walletsIdBalanceRealTimeGetCallback} callback The callback function, accepting three arguments: error, data, response
100
+ * data is of type: {@link module:model/DtoWalletBalanceResponse}
101
+ */
102
+ }, {
103
+ key: "walletsIdBalanceRealTimeGet",
104
+ value: function walletsIdBalanceRealTimeGet(id, callback) {
105
+ var postBody = null;
106
+ // verify the required parameter 'id' is set
107
+ if (id === undefined || id === null) {
108
+ throw new Error("Missing the required parameter 'id' when calling walletsIdBalanceRealTimeGet");
109
+ }
110
+ var pathParams = {
111
+ 'id': id
112
+ };
113
+ var queryParams = {};
114
+ var headerParams = {};
115
+ var formParams = {};
116
+ var authNames = ['ApiKeyAuth'];
117
+ var contentTypes = [];
118
+ var accepts = ['application/json'];
119
+ var returnType = _DtoWalletBalanceResponse["default"];
120
+ return this.apiClient.callApi('/wallets/{id}/balance/real-time', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
121
+ }
122
+
123
+ /**
124
+ * Callback function to receive the result of the walletsIdGet operation.
125
+ * @callback module:api/WalletsApi~walletsIdGetCallback
126
+ * @param {String} error Error message, if any.
127
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
128
+ * @param {String} response The complete HTTP response.
129
+ */
130
+
131
+ /**
132
+ * Get wallet by ID
133
+ * Get a wallet by its ID
134
+ * @param {String} id Wallet ID
135
+ * @param {module:api/WalletsApi~walletsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
136
+ * data is of type: {@link module:model/DtoWalletResponse}
137
+ */
138
+ }, {
139
+ key: "walletsIdGet",
140
+ value: function walletsIdGet(id, callback) {
141
+ var postBody = null;
142
+ // verify the required parameter 'id' is set
143
+ if (id === undefined || id === null) {
144
+ throw new Error("Missing the required parameter 'id' when calling walletsIdGet");
145
+ }
146
+ var pathParams = {
147
+ 'id': id
148
+ };
149
+ var queryParams = {};
150
+ var headerParams = {};
151
+ var formParams = {};
152
+ var authNames = ['ApiKeyAuth'];
153
+ var contentTypes = [];
154
+ var accepts = ['application/json'];
155
+ var returnType = _DtoWalletResponse["default"];
156
+ return this.apiClient.callApi('/wallets/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
157
+ }
158
+
159
+ /**
160
+ * Callback function to receive the result of the walletsIdPut operation.
161
+ * @callback module:api/WalletsApi~walletsIdPutCallback
162
+ * @param {String} error Error message, if any.
163
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
164
+ * @param {String} response The complete HTTP response.
165
+ */
166
+
167
+ /**
168
+ * Update a wallet
169
+ * Update a wallet's details including auto top-up configuration
170
+ * @param {String} id Wallet ID
171
+ * @param {module:model/DtoUpdateWalletRequest} request Update wallet request
172
+ * @param {module:api/WalletsApi~walletsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
173
+ * data is of type: {@link module:model/DtoWalletResponse}
174
+ */
175
+ }, {
176
+ key: "walletsIdPut",
177
+ value: function walletsIdPut(id, request, callback) {
178
+ var postBody = request;
179
+ // verify the required parameter 'id' is set
180
+ if (id === undefined || id === null) {
181
+ throw new Error("Missing the required parameter 'id' when calling walletsIdPut");
182
+ }
183
+ // verify the required parameter 'request' is set
184
+ if (request === undefined || request === null) {
185
+ throw new Error("Missing the required parameter 'request' when calling walletsIdPut");
186
+ }
187
+ var pathParams = {
188
+ 'id': id
189
+ };
190
+ var queryParams = {};
191
+ var headerParams = {};
192
+ var formParams = {};
193
+ var authNames = [];
194
+ var contentTypes = ['application/json'];
195
+ var accepts = ['application/json'];
196
+ var returnType = _DtoWalletResponse["default"];
197
+ return this.apiClient.callApi('/wallets/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
198
+ }
199
+
200
+ /**
201
+ * Callback function to receive the result of the walletsIdTerminatePost operation.
202
+ * @callback module:api/WalletsApi~walletsIdTerminatePostCallback
203
+ * @param {String} error Error message, if any.
204
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
205
+ * @param {String} response The complete HTTP response.
206
+ */
207
+
208
+ /**
209
+ * Terminate a wallet
210
+ * Terminates a wallet by closing it and debiting remaining balance
211
+ * @param {String} id Wallet ID
212
+ * @param {module:api/WalletsApi~walletsIdTerminatePostCallback} callback The callback function, accepting three arguments: error, data, response
213
+ * data is of type: {@link module:model/DtoWalletResponse}
214
+ */
215
+ }, {
216
+ key: "walletsIdTerminatePost",
217
+ value: function walletsIdTerminatePost(id, callback) {
218
+ var postBody = null;
219
+ // verify the required parameter 'id' is set
220
+ if (id === undefined || id === null) {
221
+ throw new Error("Missing the required parameter 'id' when calling walletsIdTerminatePost");
222
+ }
223
+ var pathParams = {
224
+ 'id': id
225
+ };
226
+ var queryParams = {};
227
+ var headerParams = {};
228
+ var formParams = {};
229
+ var authNames = [];
230
+ var contentTypes = [];
231
+ var accepts = ['application/json'];
232
+ var returnType = _DtoWalletResponse["default"];
233
+ return this.apiClient.callApi('/wallets/{id}/terminate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
234
+ }
235
+
236
+ /**
237
+ * Callback function to receive the result of the walletsIdTopUpPost operation.
238
+ * @callback module:api/WalletsApi~walletsIdTopUpPostCallback
239
+ * @param {String} error Error message, if any.
240
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
241
+ * @param {String} response The complete HTTP response.
242
+ */
243
+
244
+ /**
245
+ * Top up wallet
246
+ * Add credits to a wallet
247
+ * @param {String} id Wallet ID
248
+ * @param {module:model/DtoTopUpWalletRequest} request Top up request
249
+ * @param {module:api/WalletsApi~walletsIdTopUpPostCallback} callback The callback function, accepting three arguments: error, data, response
250
+ * data is of type: {@link module:model/DtoWalletResponse}
251
+ */
252
+ }, {
253
+ key: "walletsIdTopUpPost",
254
+ value: function walletsIdTopUpPost(id, request, callback) {
255
+ var postBody = request;
256
+ // verify the required parameter 'id' is set
257
+ if (id === undefined || id === null) {
258
+ throw new Error("Missing the required parameter 'id' when calling walletsIdTopUpPost");
259
+ }
260
+ // verify the required parameter 'request' is set
261
+ if (request === undefined || request === null) {
262
+ throw new Error("Missing the required parameter 'request' when calling walletsIdTopUpPost");
263
+ }
264
+ var pathParams = {
265
+ 'id': id
266
+ };
267
+ var queryParams = {};
268
+ var headerParams = {};
269
+ var formParams = {};
270
+ var authNames = ['ApiKeyAuth'];
271
+ var contentTypes = ['application/json'];
272
+ var accepts = ['application/json'];
273
+ var returnType = _DtoWalletResponse["default"];
274
+ return this.apiClient.callApi('/wallets/{id}/top-up', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
275
+ }
276
+
277
+ /**
278
+ * Callback function to receive the result of the walletsIdTransactionsGet operation.
279
+ * @callback module:api/WalletsApi~walletsIdTransactionsGetCallback
280
+ * @param {String} error Error message, if any.
281
+ * @param {module:model/DtoListWalletTransactionsResponse} data The data returned by the service call.
282
+ * @param {String} response The complete HTTP response.
283
+ */
284
+
285
+ /**
286
+ * Get wallet transactions
287
+ * Get transactions for a wallet with pagination
288
+ * @param {String} id Wallet ID
289
+ * @param {Object} opts Optional parameters
290
+ * @param {Number} [creditsAvailableGt]
291
+ * @param {String} [endTime]
292
+ * @param {String} [expand]
293
+ * @param {String} [expiryDateAfter]
294
+ * @param {String} [expiryDateBefore]
295
+ * @param {String} [id2]
296
+ * @param {Number} [limit]
297
+ * @param {Number} [offset]
298
+ * @param {module:model/String} [order]
299
+ * @param {String} [referenceId]
300
+ * @param {String} [referenceType]
301
+ * @param {String} [sort]
302
+ * @param {String} [startTime]
303
+ * @param {module:model/String} [status]
304
+ * @param {module:model/String} [transactionReason]
305
+ * @param {module:model/String} [transactionStatus]
306
+ * @param {module:model/String} [type]
307
+ * @param {module:api/WalletsApi~walletsIdTransactionsGetCallback} callback The callback function, accepting three arguments: error, data, response
308
+ * data is of type: {@link module:model/DtoListWalletTransactionsResponse}
309
+ */
310
+ }, {
311
+ key: "walletsIdTransactionsGet",
312
+ value: function walletsIdTransactionsGet(id, opts, callback) {
313
+ opts = opts || {};
314
+ var postBody = null;
315
+ // verify the required parameter 'id' is set
316
+ if (id === undefined || id === null) {
317
+ throw new Error("Missing the required parameter 'id' when calling walletsIdTransactionsGet");
318
+ }
319
+ var pathParams = {
320
+ 'id': id
321
+ };
322
+ var queryParams = {
323
+ 'credits_available_gt': opts['creditsAvailableGt'],
324
+ 'end_time': opts['endTime'],
325
+ 'expand': opts['expand'],
326
+ 'expiry_date_after': opts['expiryDateAfter'],
327
+ 'expiry_date_before': opts['expiryDateBefore'],
328
+ 'id': opts['id2'],
329
+ 'limit': opts['limit'],
330
+ 'offset': opts['offset'],
331
+ 'order': opts['order'],
332
+ 'reference_id': opts['referenceId'],
333
+ 'reference_type': opts['referenceType'],
334
+ 'sort': opts['sort'],
335
+ 'start_time': opts['startTime'],
336
+ 'status': opts['status'],
337
+ 'transaction_reason': opts['transactionReason'],
338
+ 'transaction_status': opts['transactionStatus'],
339
+ 'type': opts['type']
340
+ };
341
+ var headerParams = {};
342
+ var formParams = {};
343
+ var authNames = ['ApiKeyAuth'];
344
+ var contentTypes = [];
345
+ var accepts = ['application/json'];
346
+ var returnType = _DtoListWalletTransactionsResponse["default"];
347
+ return this.apiClient.callApi('/wallets/{id}/transactions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
348
+ }
349
+
350
+ /**
351
+ * Callback function to receive the result of the walletsPost operation.
352
+ * @callback module:api/WalletsApi~walletsPostCallback
353
+ * @param {String} error Error message, if any.
354
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
355
+ * @param {String} response The complete HTTP response.
356
+ */
357
+
358
+ /**
359
+ * Create a new wallet
360
+ * Create a new wallet for a customer
361
+ * @param {module:model/DtoCreateWalletRequest} request Create wallet request
362
+ * @param {module:api/WalletsApi~walletsPostCallback} callback The callback function, accepting three arguments: error, data, response
363
+ * data is of type: {@link module:model/DtoWalletResponse}
364
+ */
365
+ }, {
366
+ key: "walletsPost",
367
+ value: function walletsPost(request, callback) {
368
+ var postBody = request;
369
+ // verify the required parameter 'request' is set
370
+ if (request === undefined || request === null) {
371
+ throw new Error("Missing the required parameter 'request' when calling walletsPost");
372
+ }
373
+ var pathParams = {};
374
+ var queryParams = {};
375
+ var headerParams = {};
376
+ var formParams = {};
377
+ var authNames = ['ApiKeyAuth'];
378
+ var contentTypes = ['application/json'];
379
+ var accepts = ['application/json'];
380
+ var returnType = _DtoWalletResponse["default"];
381
+ return this.apiClient.callApi('/wallets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
382
+ }
383
+ }]);
384
+ }();