@flexprice/sdk 1.0.17 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +281 -200
  2. package/package.json +29 -41
  3. package/LICENSE +0 -663
  4. package/dist/ApiClient.js +0 -653
  5. package/dist/api/AuthApi.js +0 -100
  6. package/dist/api/CustomersApi.js +0 -376
  7. package/dist/api/EntitlementsApi.js +0 -267
  8. package/dist/api/EnvironmentsApi.js +0 -184
  9. package/dist/api/EventsApi.js +0 -238
  10. package/dist/api/FeaturesApi.js +0 -263
  11. package/dist/api/IntegrationsApi.js +0 -169
  12. package/dist/api/InvoicesApi.js +0 -419
  13. package/dist/api/PaymentsApi.js +0 -272
  14. package/dist/api/PlansApi.js +0 -226
  15. package/dist/api/PricesApi.js +0 -228
  16. package/dist/api/SecretsApi.js +0 -137
  17. package/dist/api/SubscriptionsApi.js +0 -353
  18. package/dist/api/TasksApi.js +0 -232
  19. package/dist/api/TenantsApi.js +0 -162
  20. package/dist/api/UsersApi.js +0 -61
  21. package/dist/api/WalletsApi.js +0 -392
  22. package/dist/index.js +0 -1102
  23. package/dist/model/DtoAddress.js +0 -132
  24. package/dist/model/DtoAggregatedEntitlement.js +0 -106
  25. package/dist/model/DtoAggregatedFeature.js +0 -109
  26. package/dist/model/DtoAuthResponse.js +0 -96
  27. package/dist/model/DtoBillingPeriodInfo.js +0 -97
  28. package/dist/model/DtoBulkIngestEventRequest.js +0 -91
  29. package/dist/model/DtoCreateAPIKeyRequest.js +0 -117
  30. package/dist/model/DtoCreateAPIKeyResponse.js +0 -86
  31. package/dist/model/DtoCreateCustomerRequest.js +0 -188
  32. package/dist/model/DtoCreateEntitlementRequest.js +0 -150
  33. package/dist/model/DtoCreateEnvironmentRequest.js +0 -96
  34. package/dist/model/DtoCreateFeatureRequest.js +0 -177
  35. package/dist/model/DtoCreateIntegrationRequest.js +0 -105
  36. package/dist/model/DtoCreateInvoiceLineItemRequest.js +0 -206
  37. package/dist/model/DtoCreateInvoiceRequest.js +0 -289
  38. package/dist/model/DtoCreateMeterRequest.js +0 -144
  39. package/dist/model/DtoCreatePaymentRequest.js +0 -172
  40. package/dist/model/DtoCreatePlanEntitlementRequest.js +0 -150
  41. package/dist/model/DtoCreatePlanPriceRequest.js +0 -279
  42. package/dist/model/DtoCreatePlanRequest.js +0 -148
  43. package/dist/model/DtoCreatePriceRequest.js +0 -279
  44. package/dist/model/DtoCreatePriceTier.js +0 -102
  45. package/dist/model/DtoCreateSubscriptionRequest.js +0 -223
  46. package/dist/model/DtoCreateTaskRequest.js +0 -137
  47. package/dist/model/DtoCreateTenantRequest.js +0 -96
  48. package/dist/model/DtoCreateWalletRequest.js +0 -205
  49. package/dist/model/DtoCustomerEntitlementsResponse.js +0 -93
  50. package/dist/model/DtoCustomerInvoiceSummary.js +0 -148
  51. package/dist/model/DtoCustomerMultiCurrencyInvoiceSummary.js +0 -105
  52. package/dist/model/DtoCustomerResponse.js +0 -283
  53. package/dist/model/DtoCustomerUsageSummaryResponse.js +0 -121
  54. package/dist/model/DtoEntitlementResponse.js +0 -259
  55. package/dist/model/DtoEntitlementSource.js +0 -144
  56. package/dist/model/DtoEnvironmentResponse.js +0 -120
  57. package/dist/model/DtoEvent.js +0 -154
  58. package/dist/model/DtoFeatureResponse.js +0 -258
  59. package/dist/model/DtoFeatureUsageSummary.js +0 -135
  60. package/dist/model/DtoGetEventsRequest.js +0 -219
  61. package/dist/model/DtoGetEventsResponse.js +0 -129
  62. package/dist/model/DtoGetPreviewInvoiceRequest.js +0 -106
  63. package/dist/model/DtoGetUsageAnalyticsRequest.js +0 -152
  64. package/dist/model/DtoGetUsageAnalyticsResponse.js +0 -101
  65. package/dist/model/DtoGetUsageByMeterRequest.js +0 -149
  66. package/dist/model/DtoGetUsageBySubscriptionRequest.js +0 -114
  67. package/dist/model/DtoGetUsageBySubscriptionResponse.js +0 -137
  68. package/dist/model/DtoGetUsageRequest.js +0 -173
  69. package/dist/model/DtoGetUsageResponse.js +0 -110
  70. package/dist/model/DtoIngestEventRequest.js +0 -156
  71. package/dist/model/DtoInvoiceLineItemResponse.js +0 -326
  72. package/dist/model/DtoInvoiceResponse.js +0 -450
  73. package/dist/model/DtoLinkedIntegrationsResponse.js +0 -72
  74. package/dist/model/DtoListCustomersResponse.js +0 -95
  75. package/dist/model/DtoListEntitlementsResponse.js +0 -95
  76. package/dist/model/DtoListEnvironmentsResponse.js +0 -105
  77. package/dist/model/DtoListFeaturesResponse.js +0 -95
  78. package/dist/model/DtoListInvoicesResponse.js +0 -95
  79. package/dist/model/DtoListPaymentsResponse.js +0 -95
  80. package/dist/model/DtoListPlansResponse.js +0 -95
  81. package/dist/model/DtoListPricesResponse.js +0 -95
  82. package/dist/model/DtoListSecretsResponse.js +0 -95
  83. package/dist/model/DtoListSubscriptionPausesResponse.js +0 -89
  84. package/dist/model/DtoListSubscriptionsResponse.js +0 -95
  85. package/dist/model/DtoListTasksResponse.js +0 -95
  86. package/dist/model/DtoListWalletTransactionsResponse.js +0 -95
  87. package/dist/model/DtoLoginRequest.js +0 -108
  88. package/dist/model/DtoMeterResponse.js +0 -188
  89. package/dist/model/DtoPauseSubscriptionRequest.js +0 -141
  90. package/dist/model/DtoPaymentAttemptResponse.js +0 -174
  91. package/dist/model/DtoPaymentResponse.js +0 -314
  92. package/dist/model/DtoPlanResponse.js +0 -231
  93. package/dist/model/DtoPriceResponse.js +0 -373
  94. package/dist/model/DtoResumeSubscriptionRequest.js +0 -97
  95. package/dist/model/DtoSecretResponse.js +0 -183
  96. package/dist/model/DtoSignUpRequest.js +0 -118
  97. package/dist/model/DtoSubscriptionPauseResponse.js +0 -283
  98. package/dist/model/DtoSubscriptionResponse.js +0 -489
  99. package/dist/model/DtoSubscriptionUsageByMetersResponse.js +0 -148
  100. package/dist/model/DtoTaskResponse.js +0 -294
  101. package/dist/model/DtoTenantBillingDetails.js +0 -110
  102. package/dist/model/DtoTenantBillingUsage.js +0 -95
  103. package/dist/model/DtoTenantResponse.js +0 -134
  104. package/dist/model/DtoTopUpWalletRequest.js +0 -148
  105. package/dist/model/DtoUpdateCustomerRequest.js +0 -178
  106. package/dist/model/DtoUpdateEntitlementRequest.js +0 -105
  107. package/dist/model/DtoUpdateEnvironmentRequest.js +0 -84
  108. package/dist/model/DtoUpdateFeatureRequest.js +0 -139
  109. package/dist/model/DtoUpdatePaymentRequest.js +0 -82
  110. package/dist/model/DtoUpdatePaymentStatusRequest.js +0 -87
  111. package/dist/model/DtoUpdatePlanEntitlementRequest.js +0 -163
  112. package/dist/model/DtoUpdatePlanPriceRequest.js +0 -292
  113. package/dist/model/DtoUpdatePlanRequest.js +0 -138
  114. package/dist/model/DtoUpdatePriceRequest.js +0 -94
  115. package/dist/model/DtoUpdateTaskStatusRequest.js +0 -79
  116. package/dist/model/DtoUpdateTenantRequest.js +0 -86
  117. package/dist/model/DtoUpdateWalletRequest.js +0 -133
  118. package/dist/model/DtoUsageAnalyticItem.js +0 -190
  119. package/dist/model/DtoUsageAnalyticPoint.js +0 -88
  120. package/dist/model/DtoUsageResult.js +0 -80
  121. package/dist/model/DtoUserResponse.js +0 -98
  122. package/dist/model/DtoWalletBalanceResponse.js +0 -336
  123. package/dist/model/DtoWalletResponse.js +0 -235
  124. package/dist/model/DtoWalletTransactionResponse.js +0 -221
  125. package/dist/model/ErrorsErrorDetail.js +0 -94
  126. package/dist/model/ErrorsErrorResponse.js +0 -82
  127. package/dist/model/GithubComFlexpriceFlexpriceInternalTypesValue.js +0 -112
  128. package/dist/model/MeterAggregation.js +0 -82
  129. package/dist/model/MeterFilter.js +0 -86
  130. package/dist/model/PriceJSONBTransformQuantity.js +0 -82
  131. package/dist/model/PricePrice.js +0 -359
  132. package/dist/model/PricePriceTier.js +0 -87
  133. package/dist/model/PriceTransformQuantity.js +0 -82
  134. package/dist/model/SubscriptionSubscriptionLineItem.js +0 -338
  135. package/dist/model/SubscriptionSubscriptionPause.js +0 -283
  136. package/dist/model/TypesAggregationType.js +0 -53
  137. package/dist/model/TypesAutoTopupTrigger.js +0 -41
  138. package/dist/model/TypesBillingCadence.js +0 -41
  139. package/dist/model/TypesBillingCycle.js +0 -41
  140. package/dist/model/TypesBillingModel.js +0 -47
  141. package/dist/model/TypesBillingPeriod.js +0 -65
  142. package/dist/model/TypesBillingTier.js +0 -41
  143. package/dist/model/TypesCustomerFilter.js +0 -230
  144. package/dist/model/TypesDataType.js +0 -53
  145. package/dist/model/TypesEntityType.js +0 -47
  146. package/dist/model/TypesFeatureFilter.js +0 -243
  147. package/dist/model/TypesFeatureType.js +0 -47
  148. package/dist/model/TypesFileType.js +0 -41
  149. package/dist/model/TypesFilterCondition.js +0 -104
  150. package/dist/model/TypesFilterOperatorType.js +0 -77
  151. package/dist/model/TypesInvoiceBillingReason.js +0 -53
  152. package/dist/model/TypesInvoiceCadence.js +0 -41
  153. package/dist/model/TypesInvoiceStatus.js +0 -47
  154. package/dist/model/TypesInvoiceType.js +0 -47
  155. package/dist/model/TypesPaginationResponse.js +0 -84
  156. package/dist/model/TypesPauseMode.js +0 -47
  157. package/dist/model/TypesPauseStatus.js +0 -59
  158. package/dist/model/TypesPaymentDestinationType.js +0 -35
  159. package/dist/model/TypesPaymentMethodType.js +0 -53
  160. package/dist/model/TypesPaymentStatus.js +0 -65
  161. package/dist/model/TypesPriceType.js +0 -41
  162. package/dist/model/TypesResetUsage.js +0 -41
  163. package/dist/model/TypesResumeMode.js +0 -47
  164. package/dist/model/TypesSecretProvider.js +0 -47
  165. package/dist/model/TypesSecretType.js +0 -47
  166. package/dist/model/TypesSortCondition.js +0 -81
  167. package/dist/model/TypesSortDirection.js +0 -41
  168. package/dist/model/TypesStatus.js +0 -47
  169. package/dist/model/TypesSubscriptionStatus.js +0 -77
  170. package/dist/model/TypesTaskStatus.js +0 -53
  171. package/dist/model/TypesTaskType.js +0 -41
  172. package/dist/model/TypesTransactionReason.js +0 -77
  173. package/dist/model/TypesTransactionStatus.js +0 -47
  174. package/dist/model/TypesTransactionType.js +0 -41
  175. package/dist/model/TypesWalletConfig.js +0 -74
  176. package/dist/model/TypesWalletConfigPriceType.js +0 -47
  177. package/dist/model/TypesWalletStatus.js +0 -47
  178. package/dist/model/TypesWalletTxReferenceType.js +0 -47
  179. package/dist/model/TypesWalletType.js +0 -41
  180. package/dist/model/TypesWindowSize.js +0 -83
@@ -1,162 +0,0 @@
1
- /**
2
- * FlexPrice API
3
- * FlexPrice API Service
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- *
12
- */
13
-
14
- import ApiClient from "../ApiClient";
15
- import DtoCreateTenantRequest from '../model/DtoCreateTenantRequest';
16
- import DtoTenantBillingUsage from '../model/DtoTenantBillingUsage';
17
- import DtoTenantResponse from '../model/DtoTenantResponse';
18
- import DtoUpdateTenantRequest from '../model/DtoUpdateTenantRequest';
19
- import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
20
-
21
- /**
22
- * Tenants service.
23
- * @module api/TenantsApi
24
- * @version 1.0
25
- */
26
- export default class TenantsApi {
27
- /**
28
- * Constructs a new TenantsApi.
29
- * @alias module:api/TenantsApi
30
- * @class
31
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
32
- * default to {@link module:ApiClient#instance} if unspecified.
33
- */
34
- constructor(apiClient) {
35
- this.apiClient = apiClient || ApiClient.instance;
36
- }
37
-
38
- /**
39
- * Callback function to receive the result of the tenantBillingGet operation.
40
- * @callback module:api/TenantsApi~tenantBillingGetCallback
41
- * @param {String} error Error message, if any.
42
- * @param {module:model/DtoTenantBillingUsage} data The data returned by the service call.
43
- * @param {String} response The complete HTTP response.
44
- */
45
-
46
- /**
47
- * Get billing usage for the current tenant
48
- * Get the subscription and usage details for the current tenant
49
- * @param {module:api/TenantsApi~tenantBillingGetCallback} callback The callback function, accepting three arguments: error, data, response
50
- * data is of type: {@link module:model/DtoTenantBillingUsage}
51
- */
52
- tenantBillingGet(callback) {
53
- let postBody = null;
54
- let pathParams = {};
55
- let queryParams = {};
56
- let headerParams = {};
57
- let formParams = {};
58
- let authNames = ['ApiKeyAuth'];
59
- let contentTypes = [];
60
- let accepts = ['application/json'];
61
- let returnType = DtoTenantBillingUsage;
62
- return this.apiClient.callApi('/tenant/billing', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
63
- }
64
-
65
- /**
66
- * Callback function to receive the result of the tenantsIdGet operation.
67
- * @callback module:api/TenantsApi~tenantsIdGetCallback
68
- * @param {String} error Error message, if any.
69
- * @param {module:model/DtoTenantResponse} data The data returned by the service call.
70
- * @param {String} response The complete HTTP response.
71
- */
72
-
73
- /**
74
- * Get tenant by ID
75
- * Get tenant by ID
76
- * @param {String} id Tenant ID
77
- * @param {module:api/TenantsApi~tenantsIdGetCallback} callback The callback function, accepting three arguments: error, data, response
78
- * data is of type: {@link module:model/DtoTenantResponse}
79
- */
80
- tenantsIdGet(id, callback) {
81
- let postBody = null;
82
- // verify the required parameter 'id' is set
83
- if (id === undefined || id === null) {
84
- throw new Error("Missing the required parameter 'id' when calling tenantsIdGet");
85
- }
86
- let pathParams = {
87
- 'id': id
88
- };
89
- let queryParams = {};
90
- let headerParams = {};
91
- let formParams = {};
92
- let authNames = ['ApiKeyAuth'];
93
- let contentTypes = [];
94
- let accepts = ['application/json'];
95
- let returnType = DtoTenantResponse;
96
- return this.apiClient.callApi('/tenants/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
97
- }
98
-
99
- /**
100
- * Callback function to receive the result of the tenantsPost operation.
101
- * @callback module:api/TenantsApi~tenantsPostCallback
102
- * @param {String} error Error message, if any.
103
- * @param {module:model/DtoTenantResponse} data The data returned by the service call.
104
- * @param {String} response The complete HTTP response.
105
- */
106
-
107
- /**
108
- * Create a new tenant
109
- * Create a new tenant
110
- * @param {module:model/DtoCreateTenantRequest} request Create tenant request
111
- * @param {module:api/TenantsApi~tenantsPostCallback} callback The callback function, accepting three arguments: error, data, response
112
- * data is of type: {@link module:model/DtoTenantResponse}
113
- */
114
- tenantsPost(request, callback) {
115
- let postBody = request;
116
- // verify the required parameter 'request' is set
117
- if (request === undefined || request === null) {
118
- throw new Error("Missing the required parameter 'request' when calling tenantsPost");
119
- }
120
- let pathParams = {};
121
- let queryParams = {};
122
- let headerParams = {};
123
- let formParams = {};
124
- let authNames = ['ApiKeyAuth'];
125
- let contentTypes = ['application/json'];
126
- let accepts = ['application/json'];
127
- let returnType = DtoTenantResponse;
128
- return this.apiClient.callApi('/tenants', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
129
- }
130
-
131
- /**
132
- * Callback function to receive the result of the tenantsUpdatePut operation.
133
- * @callback module:api/TenantsApi~tenantsUpdatePutCallback
134
- * @param {String} error Error message, if any.
135
- * @param {module:model/DtoTenantResponse} data The data returned by the service call.
136
- * @param {String} response The complete HTTP response.
137
- */
138
-
139
- /**
140
- * Update a tenant
141
- * Update a tenant's details including name and billing information
142
- * @param {module:model/DtoUpdateTenantRequest} request Update tenant request
143
- * @param {module:api/TenantsApi~tenantsUpdatePutCallback} callback The callback function, accepting three arguments: error, data, response
144
- * data is of type: {@link module:model/DtoTenantResponse}
145
- */
146
- tenantsUpdatePut(request, callback) {
147
- let postBody = request;
148
- // verify the required parameter 'request' is set
149
- if (request === undefined || request === null) {
150
- throw new Error("Missing the required parameter 'request' when calling tenantsUpdatePut");
151
- }
152
- let pathParams = {};
153
- let queryParams = {};
154
- let headerParams = {};
155
- let formParams = {};
156
- let authNames = ['ApiKeyAuth'];
157
- let contentTypes = ['application/json'];
158
- let accepts = ['application/json'];
159
- let returnType = DtoTenantResponse;
160
- return this.apiClient.callApi('/tenants/update', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
161
- }
162
- }
@@ -1,61 +0,0 @@
1
- /**
2
- * FlexPrice API
3
- * FlexPrice API Service
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- *
12
- */
13
-
14
- import ApiClient from "../ApiClient";
15
- import DtoUserResponse from '../model/DtoUserResponse';
16
- import ErrorsErrorResponse from '../model/ErrorsErrorResponse';
17
-
18
- /**
19
- * Users service.
20
- * @module api/UsersApi
21
- * @version 1.0
22
- */
23
- export default class UsersApi {
24
- /**
25
- * Constructs a new UsersApi.
26
- * @alias module:api/UsersApi
27
- * @class
28
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
29
- * default to {@link module:ApiClient#instance} if unspecified.
30
- */
31
- constructor(apiClient) {
32
- this.apiClient = apiClient || ApiClient.instance;
33
- }
34
-
35
- /**
36
- * Callback function to receive the result of the usersMeGet operation.
37
- * @callback module:api/UsersApi~usersMeGetCallback
38
- * @param {String} error Error message, if any.
39
- * @param {module:model/DtoUserResponse} data The data returned by the service call.
40
- * @param {String} response The complete HTTP response.
41
- */
42
-
43
- /**
44
- * Get user info
45
- * Get the current user's information
46
- * @param {module:api/UsersApi~usersMeGetCallback} callback The callback function, accepting three arguments: error, data, response
47
- * data is of type: {@link module:model/DtoUserResponse}
48
- */
49
- usersMeGet(callback) {
50
- let postBody = null;
51
- let pathParams = {};
52
- let queryParams = {};
53
- let headerParams = {};
54
- let formParams = {};
55
- let authNames = ['ApiKeyAuth'];
56
- let contentTypes = [];
57
- let accepts = ['application/json'];
58
- let returnType = DtoUserResponse;
59
- return this.apiClient.callApi('/users/me', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
60
- }
61
- }
@@ -1,392 +0,0 @@
1
- /**
2
- * FlexPrice API
3
- * FlexPrice API Service
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- *
12
- */
13
-
14
- import ApiClient from "../ApiClient";
15
- import 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
-
23
- /**
24
- * Wallets service.
25
- * @module api/WalletsApi
26
- * @version 1.0
27
- */
28
- export default class WalletsApi {
29
- /**
30
- * Constructs a new WalletsApi.
31
- * @alias module:api/WalletsApi
32
- * @class
33
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
34
- * default to {@link module:ApiClient#instance} if unspecified.
35
- */
36
- constructor(apiClient) {
37
- this.apiClient = apiClient || ApiClient.instance;
38
- }
39
-
40
- /**
41
- * Callback function to receive the result of the customersIdWalletsGet operation.
42
- * @callback module:api/WalletsApi~customersIdWalletsGetCallback
43
- * @param {String} error Error message, if any.
44
- * @param {Array.<module:model/DtoWalletResponse>} data The data returned by the service call.
45
- * @param {String} response The complete HTTP response.
46
- */
47
-
48
- /**
49
- * Get wallets by customer ID
50
- * Get all wallets for a customer
51
- * @param {String} id Customer ID
52
- * @param {module:api/WalletsApi~customersIdWalletsGetCallback} callback The callback function, accepting three arguments: error, data, response
53
- * data is of type: {@link Array.<module:model/DtoWalletResponse>}
54
- */
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");
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
- }
73
-
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
- */
117
-
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");
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
- }
143
-
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
- */
151
-
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");
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
- }
177
-
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
- */
185
-
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");
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
- }
216
-
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
- */
224
-
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");
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
- }
250
-
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
- */
258
-
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");
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
- }
289
-
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
- */
297
-
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");
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
- }
360
-
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
- */
368
-
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");
381
- }
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
- }