@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,24 +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 _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); } /**
1
+ /**
22
2
  * FlexPrice API
23
3
  * FlexPrice API Service
24
4
  *
@@ -30,12 +10,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
10
  * Do not edit the class manually.
31
11
  *
32
12
  */
13
+
14
+ import ApiClient from "../ApiClient";
15
+ import DtoCreateWalletRequest from '../model/DtoCreateWalletRequest';
16
+ import DtoListWalletTransactionsResponse from '../model/DtoListWalletTransactionsResponse';
17
+ import DtoTopUpWalletRequest from '../model/DtoTopUpWalletRequest';
18
+ import DtoUpdateWalletRequest from '../model/DtoUpdateWalletRequest';
19
+ import DtoWalletBalanceResponse from '../model/DtoWalletBalanceResponse';
20
+ import DtoWalletResponse from '../model/DtoWalletResponse';
21
+ import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
22
+
33
23
  /**
34
24
  * Wallets service.
35
25
  * @module api/WalletsApi
36
26
  * @version 1.0
37
27
  */
38
- var WalletsApi = exports["default"] = /*#__PURE__*/function () {
28
+ export default class WalletsApi {
39
29
  /**
40
30
  * Constructs a new WalletsApi.
41
31
  * @alias module:api/WalletsApi
@@ -43,9 +33,8 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
43
33
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
44
34
  * default to {@link module:ApiClient#instance} if unspecified.
45
35
  */
46
- function WalletsApi(apiClient) {
47
- _classCallCheck(this, WalletsApi);
48
- this.apiClient = apiClient || _ApiClient["default"].instance;
36
+ constructor(apiClient) {
37
+ this.apiClient = apiClient || ApiClient.instance;
49
38
  }
50
39
 
51
40
  /**
@@ -63,322 +52,341 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
63
52
  * @param {module:api/WalletsApi~customersIdWalletsGetCallback} callback The callback function, accepting three arguments: error, data, response
64
53
  * data is of type: {@link Array.<module:model/DtoWalletResponse>}
65
54
  */
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);
55
+ customersIdWalletsGet(id, callback) {
56
+ let postBody = null;
57
+ // verify the required parameter 'id' is set
58
+ if (id === undefined || id === null) {
59
+ throw new Error("Missing the required parameter 'id' when calling customersIdWalletsGet");
85
60
  }
61
+ let pathParams = {
62
+ 'id': id
63
+ };
64
+ let queryParams = {};
65
+ let headerParams = {};
66
+ let formParams = {};
67
+ let authNames = ['ApiKeyAuth'];
68
+ let contentTypes = [];
69
+ let accepts = ['application/json'];
70
+ let returnType = [DtoWalletResponse];
71
+ return this.apiClient.callApi('/customers/{id}/wallets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
72
+ }
86
73
 
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
- */
74
+ /**
75
+ * Callback function to receive the result of the customersWalletsGet operation.
76
+ * @callback module:api/WalletsApi~customersWalletsGetCallback
77
+ * @param {String} error Error message, if any.
78
+ * @param {Array.<module:model/DtoWalletResponse>} data The data returned by the service call.
79
+ * @param {String} response The complete HTTP response.
80
+ */
81
+
82
+ /**
83
+ * Get Customer Wallets
84
+ * Get all wallets for a customer by lookup key or id
85
+ * @param {Object} opts Optional parameters
86
+ * @param {String} [id]
87
+ * @param {Boolean} [includeRealTimeBalance = false)]
88
+ * @param {String} [lookupKey]
89
+ * @param {module:api/WalletsApi~customersWalletsGetCallback} callback The callback function, accepting three arguments: error, data, response
90
+ * data is of type: {@link Array.<module:model/DtoWalletResponse>}
91
+ */
92
+ customersWalletsGet(opts, callback) {
93
+ opts = opts || {};
94
+ let postBody = null;
95
+ let pathParams = {};
96
+ let queryParams = {
97
+ 'id': opts['id'],
98
+ 'include_real_time_balance': opts['includeRealTimeBalance'],
99
+ 'lookup_key': opts['lookupKey']
100
+ };
101
+ let headerParams = {};
102
+ let formParams = {};
103
+ let authNames = ['ApiKeyAuth'];
104
+ let contentTypes = [];
105
+ let accepts = ['application/json'];
106
+ let returnType = [DtoWalletResponse];
107
+ return this.apiClient.callApi('/customers/wallets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
108
+ }
109
+
110
+ /**
111
+ * Callback function to receive the result of the walletsIdBalanceRealTimeGet operation.
112
+ * @callback module:api/WalletsApi~walletsIdBalanceRealTimeGetCallback
113
+ * @param {String} error Error message, if any.
114
+ * @param {module:model/DtoWalletBalanceResponse} data The data returned by the service call.
115
+ * @param {String} response The complete HTTP response.
116
+ */
94
117
 
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);
118
+ /**
119
+ * Get wallet balance
120
+ * Get real-time balance of a wallet
121
+ * @param {String} id Wallet ID
122
+ * @param {module:api/WalletsApi~walletsIdBalanceRealTimeGetCallback} callback The callback function, accepting three arguments: error, data, response
123
+ * data is of type: {@link module:model/DtoWalletBalanceResponse}
124
+ */
125
+ walletsIdBalanceRealTimeGet(id, callback) {
126
+ let postBody = null;
127
+ // verify the required parameter 'id' is set
128
+ if (id === undefined || id === null) {
129
+ throw new Error("Missing the required parameter 'id' when calling walletsIdBalanceRealTimeGet");
121
130
  }
131
+ let pathParams = {
132
+ 'id': id
133
+ };
134
+ let queryParams = {};
135
+ let headerParams = {};
136
+ let formParams = {};
137
+ let authNames = ['ApiKeyAuth'];
138
+ let contentTypes = [];
139
+ let accepts = ['application/json'];
140
+ let returnType = DtoWalletBalanceResponse;
141
+ return this.apiClient.callApi('/wallets/{id}/balance/real-time', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
142
+ }
122
143
 
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
- */
144
+ /**
145
+ * Callback function to receive the result of the walletsIdGet operation.
146
+ * @callback module:api/WalletsApi~walletsIdGetCallback
147
+ * @param {String} error Error message, if any.
148
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
149
+ * @param {String} response The complete HTTP response.
150
+ */
130
151
 
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);
152
+ /**
153
+ * Get wallet by ID
154
+ * Get a wallet by its ID
155
+ * @param {String} id Wallet ID
156
+ * @param {module:api/WalletsApi~walletsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
157
+ * data is of type: {@link module:model/DtoWalletResponse}
158
+ */
159
+ walletsIdGet(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 walletsIdGet");
157
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 = DtoWalletResponse;
175
+ return this.apiClient.callApi('/wallets/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
176
+ }
158
177
 
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
- */
178
+ /**
179
+ * Callback function to receive the result of the walletsIdPut operation.
180
+ * @callback module:api/WalletsApi~walletsIdPutCallback
181
+ * @param {String} error Error message, if any.
182
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
183
+ * @param {String} response The complete HTTP response.
184
+ */
166
185
 
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);
186
+ /**
187
+ * Update a wallet
188
+ * Update a wallet's details including auto top-up configuration
189
+ * @param {String} id Wallet ID
190
+ * @param {module:model/DtoUpdateWalletRequest} request Update wallet request
191
+ * @param {module:api/WalletsApi~walletsIdPutCallback} callback The callback function, accepting three arguments: error, data, response
192
+ * data is of type: {@link module:model/DtoWalletResponse}
193
+ */
194
+ walletsIdPut(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 walletsIdPut");
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 walletsIdPut");
198
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 = DtoWalletResponse;
214
+ return this.apiClient.callApi('/wallets/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
215
+ }
199
216
 
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
- */
217
+ /**
218
+ * Callback function to receive the result of the walletsIdTerminatePost operation.
219
+ * @callback module:api/WalletsApi~walletsIdTerminatePostCallback
220
+ * @param {String} error Error message, if any.
221
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
222
+ * @param {String} response The complete HTTP response.
223
+ */
207
224
 
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);
225
+ /**
226
+ * Terminate a wallet
227
+ * Terminates a wallet by closing it and debiting remaining balance
228
+ * @param {String} id Wallet ID
229
+ * @param {module:api/WalletsApi~walletsIdTerminatePostCallback} callback The callback function, accepting three arguments: error, data, response
230
+ * data is of type: {@link module:model/DtoWalletResponse}
231
+ */
232
+ walletsIdTerminatePost(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 walletsIdTerminatePost");
234
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 = DtoWalletResponse;
248
+ return this.apiClient.callApi('/wallets/{id}/terminate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
249
+ }
235
250
 
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
- */
251
+ /**
252
+ * Callback function to receive the result of the walletsIdTopUpPost operation.
253
+ * @callback module:api/WalletsApi~walletsIdTopUpPostCallback
254
+ * @param {String} error Error message, if any.
255
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
256
+ * @param {String} response The complete HTTP response.
257
+ */
243
258
 
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);
259
+ /**
260
+ * Top up wallet
261
+ * Add credits to a wallet
262
+ * @param {String} id Wallet ID
263
+ * @param {module:model/DtoTopUpWalletRequest} request Top up request
264
+ * @param {module:api/WalletsApi~walletsIdTopUpPostCallback} callback The callback function, accepting three arguments: error, data, response
265
+ * data is of type: {@link module:model/DtoWalletResponse}
266
+ */
267
+ walletsIdTopUpPost(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 walletsIdTopUpPost");
275
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 walletsIdTopUpPost");
276
+ }
277
+ let pathParams = {
278
+ 'id': id
279
+ };
280
+ let queryParams = {};
281
+ let headerParams = {};
282
+ let formParams = {};
283
+ let authNames = ['ApiKeyAuth'];
284
+ let contentTypes = ['application/json'];
285
+ let accepts = ['application/json'];
286
+ let returnType = DtoWalletResponse;
287
+ return this.apiClient.callApi('/wallets/{id}/top-up', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
288
+ }
276
289
 
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
- */
290
+ /**
291
+ * Callback function to receive the result of the walletsIdTransactionsGet operation.
292
+ * @callback module:api/WalletsApi~walletsIdTransactionsGetCallback
293
+ * @param {String} error Error message, if any.
294
+ * @param {module:model/DtoListWalletTransactionsResponse} data The data returned by the service call.
295
+ * @param {String} response The complete HTTP response.
296
+ */
284
297
 
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);
298
+ /**
299
+ * Get wallet transactions
300
+ * Get transactions for a wallet with pagination
301
+ * @param {String} id Wallet ID
302
+ * @param {Object} opts Optional parameters
303
+ * @param {Number} [creditsAvailableGt]
304
+ * @param {String} [endTime]
305
+ * @param {String} [expand]
306
+ * @param {String} [expiryDateAfter]
307
+ * @param {String} [expiryDateBefore]
308
+ * @param {String} [id2]
309
+ * @param {Number} [limit]
310
+ * @param {Number} [offset]
311
+ * @param {module:model/String} [order]
312
+ * @param {String} [referenceId]
313
+ * @param {String} [referenceType]
314
+ * @param {String} [sort]
315
+ * @param {String} [startTime]
316
+ * @param {module:model/String} [status]
317
+ * @param {module:model/String} [transactionReason]
318
+ * @param {module:model/String} [transactionStatus]
319
+ * @param {module:model/String} [type]
320
+ * @param {module:api/WalletsApi~walletsIdTransactionsGetCallback} callback The callback function, accepting three arguments: error, data, response
321
+ * data is of type: {@link module:model/DtoListWalletTransactionsResponse}
322
+ */
323
+ walletsIdTransactionsGet(id, opts, callback) {
324
+ opts = opts || {};
325
+ let postBody = null;
326
+ // verify the required parameter 'id' is set
327
+ if (id === undefined || id === null) {
328
+ throw new Error("Missing the required parameter 'id' when calling walletsIdTransactionsGet");
348
329
  }
330
+ let pathParams = {
331
+ 'id': id
332
+ };
333
+ let queryParams = {
334
+ 'credits_available_gt': opts['creditsAvailableGt'],
335
+ 'end_time': opts['endTime'],
336
+ 'expand': opts['expand'],
337
+ 'expiry_date_after': opts['expiryDateAfter'],
338
+ 'expiry_date_before': opts['expiryDateBefore'],
339
+ 'id': opts['id2'],
340
+ 'limit': opts['limit'],
341
+ 'offset': opts['offset'],
342
+ 'order': opts['order'],
343
+ 'reference_id': opts['referenceId'],
344
+ 'reference_type': opts['referenceType'],
345
+ 'sort': opts['sort'],
346
+ 'start_time': opts['startTime'],
347
+ 'status': opts['status'],
348
+ 'transaction_reason': opts['transactionReason'],
349
+ 'transaction_status': opts['transactionStatus'],
350
+ 'type': opts['type']
351
+ };
352
+ let headerParams = {};
353
+ let formParams = {};
354
+ let authNames = ['ApiKeyAuth'];
355
+ let contentTypes = [];
356
+ let accepts = ['application/json'];
357
+ let returnType = DtoListWalletTransactionsResponse;
358
+ return this.apiClient.callApi('/wallets/{id}/transactions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
359
+ }
349
360
 
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
- */
361
+ /**
362
+ * Callback function to receive the result of the walletsPost operation.
363
+ * @callback module:api/WalletsApi~walletsPostCallback
364
+ * @param {String} error Error message, if any.
365
+ * @param {module:model/DtoWalletResponse} data The data returned by the service call.
366
+ * @param {String} response The complete HTTP response.
367
+ */
357
368
 
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);
369
+ /**
370
+ * Create a new wallet
371
+ * Create a new wallet for a customer
372
+ * @param {module:model/DtoCreateWalletRequest} request Create wallet request
373
+ * @param {module:api/WalletsApi~walletsPostCallback} callback The callback function, accepting three arguments: error, data, response
374
+ * data is of type: {@link module:model/DtoWalletResponse}
375
+ */
376
+ walletsPost(request, callback) {
377
+ let postBody = request;
378
+ // verify the required parameter 'request' is set
379
+ if (request === undefined || request === null) {
380
+ throw new Error("Missing the required parameter 'request' when calling walletsPost");
382
381
  }
383
- }]);
384
- }();
382
+ let pathParams = {};
383
+ let queryParams = {};
384
+ let headerParams = {};
385
+ let formParams = {};
386
+ let authNames = ['ApiKeyAuth'];
387
+ let contentTypes = ['application/json'];
388
+ let accepts = ['application/json'];
389
+ let returnType = DtoWalletResponse;
390
+ return this.apiClient.callApi('/wallets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
391
+ }
392
+ }