@l7mp/tivadar-ai-api-sdk 0.2.9 → 0.2.11
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.
- package/dist/api-client.d.ts +29 -4
- package/dist/api-client.js +22 -3
- package/dist/apis/AdminSubscriptionsApi.d.ts +82 -0
- package/dist/apis/AdminSubscriptionsApi.js +242 -0
- package/dist/apis/SubscriptionApi.d.ts +54 -75
- package/dist/apis/SubscriptionApi.js +95 -114
- package/dist/apis/VoiceUsageApi.d.ts +31 -0
- package/dist/apis/VoiceUsageApi.js +73 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/api-client.d.ts +29 -4
- package/dist/esm/api-client.js +22 -3
- package/dist/esm/apis/AdminSubscriptionsApi.d.ts +82 -0
- package/dist/esm/apis/AdminSubscriptionsApi.js +238 -0
- package/dist/esm/apis/SubscriptionApi.d.ts +54 -75
- package/dist/esm/apis/SubscriptionApi.js +96 -115
- package/dist/esm/apis/VoiceUsageApi.d.ts +31 -0
- package/dist/esm/apis/VoiceUsageApi.js +69 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/AdminGrantMinutesRequest.d.ts +38 -0
- package/dist/esm/models/AdminGrantMinutesRequest.js +45 -0
- package/dist/esm/models/AdminSetSubscriptionRequest.d.ts +86 -0
- package/dist/esm/models/AdminSetSubscriptionRequest.js +71 -0
- package/dist/esm/models/BillingPortalRequest.d.ts +1 -1
- package/dist/esm/models/BillingPortalResponse.d.ts +1 -1
- package/dist/esm/models/CancelSubscriptionRequest.d.ts +2 -2
- package/dist/esm/models/CheckoutSessionResponse.d.ts +2 -2
- package/dist/esm/models/CreateCheckoutSessionRequest.d.ts +21 -7
- package/dist/esm/models/CreateCheckoutSessionRequest.js +18 -5
- package/dist/esm/models/CurrentPeriodUsage.d.ts +59 -0
- package/dist/esm/models/CurrentPeriodUsage.js +62 -0
- package/dist/esm/models/LifecycleResponse.d.ts +50 -0
- package/dist/esm/models/LifecycleResponse.js +51 -0
- package/dist/esm/models/PauseSubscriptionRequest.d.ts +1 -1
- package/dist/esm/models/PlanCatalogEntry.d.ts +90 -0
- package/dist/esm/models/PlanCatalogEntry.js +73 -0
- package/dist/esm/models/PlanCatalogEntryOverageInner.d.ts +44 -0
- package/dist/esm/models/PlanCatalogEntryOverageInner.js +45 -0
- package/dist/esm/models/PlanCatalogPrice.d.ts +58 -0
- package/dist/esm/models/PlanCatalogPrice.js +60 -0
- package/dist/esm/models/SubscriptionPlanSummary.d.ts +83 -0
- package/dist/esm/models/SubscriptionPlanSummary.js +70 -0
- package/dist/esm/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
- package/dist/esm/models/SubscriptionPlanSummaryOverageRate.js +43 -0
- package/dist/esm/models/SubscriptionStatus.d.ts +103 -10
- package/dist/esm/models/SubscriptionStatus.js +58 -9
- package/dist/esm/models/SubscriptionUsageSummary.d.ts +56 -0
- package/dist/esm/models/SubscriptionUsageSummary.js +57 -0
- package/dist/esm/models/UpdatePlanRequest.d.ts +13 -5
- package/dist/esm/models/UpdatePlanRequest.js +12 -3
- package/dist/esm/models/UsageBreakdownByAgent.d.ts +44 -0
- package/dist/esm/models/UsageBreakdownByAgent.js +49 -0
- package/dist/esm/models/UsageBreakdownByDay.d.ts +44 -0
- package/dist/esm/models/UsageBreakdownByDay.js +51 -0
- package/dist/esm/models/UsageHistoryResponse.d.ts +39 -0
- package/dist/esm/models/UsageHistoryResponse.js +48 -0
- package/dist/esm/models/UsageRecordDto.d.ts +80 -0
- package/dist/esm/models/UsageRecordDto.js +65 -0
- package/dist/esm/models/VoiceAgentMetadata.d.ts +6 -0
- package/dist/esm/models/VoiceAgentMetadata.js +2 -0
- package/dist/esm/models/VoiceUsageReportRequest.d.ts +62 -0
- package/dist/esm/models/VoiceUsageReportRequest.js +57 -0
- package/dist/esm/models/VoiceUsageReportResponse.d.ts +51 -0
- package/dist/esm/models/VoiceUsageReportResponse.js +52 -0
- package/dist/esm/models/index.d.ts +16 -13
- package/dist/esm/models/index.js +16 -13
- package/dist/models/AdminGrantMinutesRequest.d.ts +38 -0
- package/dist/models/AdminGrantMinutesRequest.js +52 -0
- package/dist/models/AdminSetSubscriptionRequest.d.ts +86 -0
- package/dist/models/AdminSetSubscriptionRequest.js +79 -0
- package/dist/models/BillingPortalRequest.d.ts +1 -1
- package/dist/models/BillingPortalResponse.d.ts +1 -1
- package/dist/models/CancelSubscriptionRequest.d.ts +2 -2
- package/dist/models/CheckoutSessionResponse.d.ts +2 -2
- package/dist/models/CreateCheckoutSessionRequest.d.ts +21 -7
- package/dist/models/CreateCheckoutSessionRequest.js +19 -5
- package/dist/models/CurrentPeriodUsage.d.ts +59 -0
- package/dist/models/CurrentPeriodUsage.js +69 -0
- package/dist/models/LifecycleResponse.d.ts +50 -0
- package/dist/models/LifecycleResponse.js +58 -0
- package/dist/models/PauseSubscriptionRequest.d.ts +1 -1
- package/dist/models/PlanCatalogEntry.d.ts +90 -0
- package/dist/models/PlanCatalogEntry.js +80 -0
- package/dist/models/PlanCatalogEntryOverageInner.d.ts +44 -0
- package/dist/models/PlanCatalogEntryOverageInner.js +52 -0
- package/dist/models/PlanCatalogPrice.d.ts +58 -0
- package/dist/models/PlanCatalogPrice.js +68 -0
- package/dist/models/SubscriptionPlanSummary.d.ts +83 -0
- package/dist/models/SubscriptionPlanSummary.js +77 -0
- package/dist/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
- package/dist/models/SubscriptionPlanSummaryOverageRate.js +50 -0
- package/dist/models/SubscriptionStatus.d.ts +103 -10
- package/dist/models/SubscriptionStatus.js +59 -9
- package/dist/models/SubscriptionUsageSummary.d.ts +56 -0
- package/dist/models/SubscriptionUsageSummary.js +64 -0
- package/dist/models/UpdatePlanRequest.d.ts +13 -5
- package/dist/models/UpdatePlanRequest.js +13 -3
- package/dist/models/UsageBreakdownByAgent.d.ts +44 -0
- package/dist/models/UsageBreakdownByAgent.js +56 -0
- package/dist/models/UsageBreakdownByDay.d.ts +44 -0
- package/dist/models/UsageBreakdownByDay.js +58 -0
- package/dist/models/UsageHistoryResponse.d.ts +39 -0
- package/dist/models/UsageHistoryResponse.js +55 -0
- package/dist/models/UsageRecordDto.d.ts +80 -0
- package/dist/models/UsageRecordDto.js +72 -0
- package/dist/models/VoiceAgentMetadata.d.ts +6 -0
- package/dist/models/VoiceAgentMetadata.js +2 -0
- package/dist/models/VoiceUsageReportRequest.d.ts +62 -0
- package/dist/models/VoiceUsageReportRequest.js +64 -0
- package/dist/models/VoiceUsageReportResponse.d.ts +51 -0
- package/dist/models/VoiceUsageReportResponse.js +59 -0
- package/dist/models/index.d.ts +16 -13
- package/dist/models/index.js +16 -13
- package/package.json +1 -1
- package/src/api-client.ts +42 -6
- package/src/apis/AdminSubscriptionsApi.ts +327 -0
- package/src/apis/SubscriptionApi.ts +130 -162
- package/src/apis/VoiceUsageApi.ts +86 -0
- package/src/apis/index.ts +2 -0
- package/src/models/AdminGrantMinutesRequest.ts +74 -0
- package/src/models/AdminSetSubscriptionRequest.ts +136 -0
- package/src/models/BillingPortalRequest.ts +1 -1
- package/src/models/BillingPortalResponse.ts +1 -1
- package/src/models/CancelSubscriptionRequest.ts +2 -2
- package/src/models/CheckoutSessionResponse.ts +2 -2
- package/src/models/CreateCheckoutSessionRequest.ts +33 -12
- package/src/models/CurrentPeriodUsage.ts +124 -0
- package/src/models/LifecycleResponse.ts +91 -0
- package/src/models/PauseSubscriptionRequest.ts +1 -1
- package/src/models/PlanCatalogEntry.ts +158 -0
- package/src/models/PlanCatalogEntryOverageInner.ts +81 -0
- package/src/models/PlanCatalogPrice.ts +103 -0
- package/src/models/SubscriptionPlanSummary.ts +143 -0
- package/src/models/SubscriptionPlanSummaryOverageRate.ts +73 -0
- package/src/models/SubscriptionStatus.ts +150 -32
- package/src/models/SubscriptionUsageSummary.ts +101 -0
- package/src/models/UpdatePlanRequest.ts +20 -8
- package/src/models/UsageBreakdownByAgent.ts +83 -0
- package/src/models/UsageBreakdownByDay.ts +84 -0
- package/src/models/UsageHistoryResponse.ts +83 -0
- package/src/models/UsageRecordDto.ts +133 -0
- package/src/models/VoiceAgentMetadata.ts +8 -0
- package/src/models/VoiceUsageReportRequest.ts +108 -0
- package/src/models/VoiceUsageReportResponse.ts +99 -0
- package/src/models/index.ts +16 -13
|
@@ -18,19 +18,14 @@ import type {
|
|
|
18
18
|
BillingPortalRequest,
|
|
19
19
|
BillingPortalResponse,
|
|
20
20
|
CancelSubscriptionRequest,
|
|
21
|
-
CancelSubscriptionResponse,
|
|
22
21
|
CheckoutSessionResponse,
|
|
23
22
|
CreateCheckoutSessionRequest,
|
|
24
|
-
|
|
25
|
-
CreditTransactionsResponse,
|
|
23
|
+
CurrentPeriodUsage,
|
|
26
24
|
PauseSubscriptionRequest,
|
|
27
|
-
|
|
28
|
-
ResumeSubscriptionResponse,
|
|
29
|
-
SubscriptionDetails,
|
|
25
|
+
PlanCatalogEntry,
|
|
30
26
|
SubscriptionStatus,
|
|
31
|
-
UnpauseSubscriptionResponse,
|
|
32
27
|
UpdatePlanRequest,
|
|
33
|
-
|
|
28
|
+
UsageHistoryResponse,
|
|
34
29
|
} from '../models/index';
|
|
35
30
|
import {
|
|
36
31
|
BillingPortalRequestFromJSON,
|
|
@@ -39,32 +34,22 @@ import {
|
|
|
39
34
|
BillingPortalResponseToJSON,
|
|
40
35
|
CancelSubscriptionRequestFromJSON,
|
|
41
36
|
CancelSubscriptionRequestToJSON,
|
|
42
|
-
CancelSubscriptionResponseFromJSON,
|
|
43
|
-
CancelSubscriptionResponseToJSON,
|
|
44
37
|
CheckoutSessionResponseFromJSON,
|
|
45
38
|
CheckoutSessionResponseToJSON,
|
|
46
39
|
CreateCheckoutSessionRequestFromJSON,
|
|
47
40
|
CreateCheckoutSessionRequestToJSON,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
CreditTransactionsResponseFromJSON,
|
|
51
|
-
CreditTransactionsResponseToJSON,
|
|
41
|
+
CurrentPeriodUsageFromJSON,
|
|
42
|
+
CurrentPeriodUsageToJSON,
|
|
52
43
|
PauseSubscriptionRequestFromJSON,
|
|
53
44
|
PauseSubscriptionRequestToJSON,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ResumeSubscriptionResponseFromJSON,
|
|
57
|
-
ResumeSubscriptionResponseToJSON,
|
|
58
|
-
SubscriptionDetailsFromJSON,
|
|
59
|
-
SubscriptionDetailsToJSON,
|
|
45
|
+
PlanCatalogEntryFromJSON,
|
|
46
|
+
PlanCatalogEntryToJSON,
|
|
60
47
|
SubscriptionStatusFromJSON,
|
|
61
48
|
SubscriptionStatusToJSON,
|
|
62
|
-
UnpauseSubscriptionResponseFromJSON,
|
|
63
|
-
UnpauseSubscriptionResponseToJSON,
|
|
64
49
|
UpdatePlanRequestFromJSON,
|
|
65
50
|
UpdatePlanRequestToJSON,
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
UsageHistoryResponseFromJSON,
|
|
52
|
+
UsageHistoryResponseToJSON,
|
|
68
53
|
} from '../models/index';
|
|
69
54
|
|
|
70
55
|
export interface OrganizationsOrganizationIdSubscriptionBillingPortalPostRequest {
|
|
@@ -82,41 +67,42 @@ export interface OrganizationsOrganizationIdSubscriptionCheckoutPostRequest {
|
|
|
82
67
|
createCheckoutSessionRequest: CreateCheckoutSessionRequest;
|
|
83
68
|
}
|
|
84
69
|
|
|
85
|
-
export interface
|
|
70
|
+
export interface OrganizationsOrganizationIdSubscriptionGetRequest {
|
|
86
71
|
organizationId: string;
|
|
87
72
|
}
|
|
88
73
|
|
|
89
|
-
export interface
|
|
74
|
+
export interface OrganizationsOrganizationIdSubscriptionPausePostRequest {
|
|
90
75
|
organizationId: string;
|
|
91
|
-
|
|
92
|
-
limit?: number;
|
|
93
|
-
offset?: number;
|
|
76
|
+
pauseSubscriptionRequest?: PauseSubscriptionRequest;
|
|
94
77
|
}
|
|
95
78
|
|
|
96
|
-
export interface
|
|
79
|
+
export interface OrganizationsOrganizationIdSubscriptionPlanPatchRequest {
|
|
97
80
|
organizationId: string;
|
|
81
|
+
updatePlanRequest: UpdatePlanRequest;
|
|
98
82
|
}
|
|
99
83
|
|
|
100
|
-
export interface
|
|
84
|
+
export interface OrganizationsOrganizationIdSubscriptionPlansGetRequest {
|
|
101
85
|
organizationId: string;
|
|
102
86
|
}
|
|
103
87
|
|
|
104
|
-
export interface
|
|
88
|
+
export interface OrganizationsOrganizationIdSubscriptionResumePostRequest {
|
|
105
89
|
organizationId: string;
|
|
106
|
-
pauseSubscriptionRequest?: PauseSubscriptionRequest;
|
|
107
90
|
}
|
|
108
91
|
|
|
109
|
-
export interface
|
|
92
|
+
export interface OrganizationsOrganizationIdSubscriptionUnpausePostRequest {
|
|
110
93
|
organizationId: string;
|
|
111
|
-
updatePlanRequest: UpdatePlanRequest;
|
|
112
94
|
}
|
|
113
95
|
|
|
114
|
-
export interface
|
|
96
|
+
export interface OrganizationsOrganizationIdSubscriptionUsageGetRequest {
|
|
115
97
|
organizationId: string;
|
|
116
98
|
}
|
|
117
99
|
|
|
118
|
-
export interface
|
|
100
|
+
export interface OrganizationsOrganizationIdSubscriptionUsageHistoryGetRequest {
|
|
119
101
|
organizationId: string;
|
|
102
|
+
from?: Date;
|
|
103
|
+
to?: Date;
|
|
104
|
+
limit?: number;
|
|
105
|
+
offset?: number;
|
|
120
106
|
}
|
|
121
107
|
|
|
122
108
|
/**
|
|
@@ -125,8 +111,7 @@ export interface OrganizationsOrganizationIdSubscriptionUnpausePostRequest {
|
|
|
125
111
|
export class SubscriptionApi extends runtime.BaseAPI {
|
|
126
112
|
|
|
127
113
|
/**
|
|
128
|
-
*
|
|
129
|
-
* Create billing portal session
|
|
114
|
+
* Create a Stripe billing portal session
|
|
130
115
|
*/
|
|
131
116
|
async organizationsOrganizationIdSubscriptionBillingPortalPostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionBillingPortalPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingPortalResponse>> {
|
|
132
117
|
if (requestParameters['organizationId'] == null) {
|
|
@@ -173,8 +158,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
173
158
|
}
|
|
174
159
|
|
|
175
160
|
/**
|
|
176
|
-
*
|
|
177
|
-
* Create billing portal session
|
|
161
|
+
* Create a Stripe billing portal session
|
|
178
162
|
*/
|
|
179
163
|
async organizationsOrganizationIdSubscriptionBillingPortalPost(requestParameters: OrganizationsOrganizationIdSubscriptionBillingPortalPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingPortalResponse> {
|
|
180
164
|
const response = await this.organizationsOrganizationIdSubscriptionBillingPortalPostRaw(requestParameters, initOverrides);
|
|
@@ -182,10 +166,9 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
182
166
|
}
|
|
183
167
|
|
|
184
168
|
/**
|
|
185
|
-
*
|
|
186
|
-
* Cancel subscription
|
|
169
|
+
* Cancel the subscription (at period end by default)
|
|
187
170
|
*/
|
|
188
|
-
async organizationsOrganizationIdSubscriptionCancelPostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
171
|
+
async organizationsOrganizationIdSubscriptionCancelPostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
189
172
|
if (requestParameters['organizationId'] == null) {
|
|
190
173
|
throw new runtime.RequiredError(
|
|
191
174
|
'organizationId',
|
|
@@ -219,21 +202,19 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
219
202
|
body: CancelSubscriptionRequestToJSON(requestParameters['cancelSubscriptionRequest']),
|
|
220
203
|
}, initOverrides);
|
|
221
204
|
|
|
222
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
205
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
223
206
|
}
|
|
224
207
|
|
|
225
208
|
/**
|
|
226
|
-
*
|
|
227
|
-
* Cancel subscription
|
|
209
|
+
* Cancel the subscription (at period end by default)
|
|
228
210
|
*/
|
|
229
|
-
async organizationsOrganizationIdSubscriptionCancelPost(requestParameters: OrganizationsOrganizationIdSubscriptionCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
211
|
+
async organizationsOrganizationIdSubscriptionCancelPost(requestParameters: OrganizationsOrganizationIdSubscriptionCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
230
212
|
const response = await this.organizationsOrganizationIdSubscriptionCancelPostRaw(requestParameters, initOverrides);
|
|
231
213
|
return await response.value();
|
|
232
214
|
}
|
|
233
215
|
|
|
234
216
|
/**
|
|
235
|
-
*
|
|
236
|
-
* Create a checkout session for subscription
|
|
217
|
+
* Create a Stripe Checkout session
|
|
237
218
|
*/
|
|
238
219
|
async organizationsOrganizationIdSubscriptionCheckoutPostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionCheckoutPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CheckoutSessionResponse>> {
|
|
239
220
|
if (requestParameters['organizationId'] == null) {
|
|
@@ -280,8 +261,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
280
261
|
}
|
|
281
262
|
|
|
282
263
|
/**
|
|
283
|
-
*
|
|
284
|
-
* Create a checkout session for subscription
|
|
264
|
+
* Create a Stripe Checkout session
|
|
285
265
|
*/
|
|
286
266
|
async organizationsOrganizationIdSubscriptionCheckoutPost(requestParameters: OrganizationsOrganizationIdSubscriptionCheckoutPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CheckoutSessionResponse> {
|
|
287
267
|
const response = await this.organizationsOrganizationIdSubscriptionCheckoutPostRaw(requestParameters, initOverrides);
|
|
@@ -289,14 +269,13 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
289
269
|
}
|
|
290
270
|
|
|
291
271
|
/**
|
|
292
|
-
*
|
|
293
|
-
* Get credit balances for an organization
|
|
272
|
+
* Get subscription status with current-period usage
|
|
294
273
|
*/
|
|
295
|
-
async
|
|
274
|
+
async organizationsOrganizationIdSubscriptionGetRaw(requestParameters: OrganizationsOrganizationIdSubscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
296
275
|
if (requestParameters['organizationId'] == null) {
|
|
297
276
|
throw new runtime.RequiredError(
|
|
298
277
|
'organizationId',
|
|
299
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
278
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionGet().'
|
|
300
279
|
);
|
|
301
280
|
}
|
|
302
281
|
|
|
@@ -313,7 +292,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
313
292
|
}
|
|
314
293
|
}
|
|
315
294
|
|
|
316
|
-
let urlPath = `/organizations/{organizationId}/subscription
|
|
295
|
+
let urlPath = `/organizations/{organizationId}/subscription`;
|
|
317
296
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
318
297
|
|
|
319
298
|
const response = await this.request({
|
|
@@ -323,46 +302,34 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
323
302
|
query: queryParameters,
|
|
324
303
|
}, initOverrides);
|
|
325
304
|
|
|
326
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue
|
|
305
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
327
306
|
}
|
|
328
307
|
|
|
329
308
|
/**
|
|
330
|
-
*
|
|
331
|
-
* Get credit balances for an organization
|
|
309
|
+
* Get subscription status with current-period usage
|
|
332
310
|
*/
|
|
333
|
-
async
|
|
334
|
-
const response = await this.
|
|
311
|
+
async organizationsOrganizationIdSubscriptionGet(requestParameters: OrganizationsOrganizationIdSubscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
312
|
+
const response = await this.organizationsOrganizationIdSubscriptionGetRaw(requestParameters, initOverrides);
|
|
335
313
|
return await response.value();
|
|
336
314
|
}
|
|
337
315
|
|
|
338
316
|
/**
|
|
339
|
-
*
|
|
340
|
-
* Get credit transaction history
|
|
317
|
+
* Pause payment collection
|
|
341
318
|
*/
|
|
342
|
-
async
|
|
319
|
+
async organizationsOrganizationIdSubscriptionPausePostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionPausePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
343
320
|
if (requestParameters['organizationId'] == null) {
|
|
344
321
|
throw new runtime.RequiredError(
|
|
345
322
|
'organizationId',
|
|
346
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
323
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPausePost().'
|
|
347
324
|
);
|
|
348
325
|
}
|
|
349
326
|
|
|
350
327
|
const queryParameters: any = {};
|
|
351
328
|
|
|
352
|
-
if (requestParameters['creditType'] != null) {
|
|
353
|
-
queryParameters['credit_type'] = requestParameters['creditType'];
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (requestParameters['limit'] != null) {
|
|
357
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
if (requestParameters['offset'] != null) {
|
|
361
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
362
|
-
}
|
|
363
|
-
|
|
364
329
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
365
330
|
|
|
331
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
332
|
+
|
|
366
333
|
if (this.configuration && this.configuration.accessToken) {
|
|
367
334
|
const token = this.configuration.accessToken;
|
|
368
335
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -372,37 +339,43 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
372
339
|
}
|
|
373
340
|
}
|
|
374
341
|
|
|
375
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
342
|
+
let urlPath = `/organizations/{organizationId}/subscription/pause`;
|
|
376
343
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
377
344
|
|
|
378
345
|
const response = await this.request({
|
|
379
346
|
path: urlPath,
|
|
380
|
-
method: '
|
|
347
|
+
method: 'POST',
|
|
381
348
|
headers: headerParameters,
|
|
382
349
|
query: queryParameters,
|
|
350
|
+
body: PauseSubscriptionRequestToJSON(requestParameters['pauseSubscriptionRequest']),
|
|
383
351
|
}, initOverrides);
|
|
384
352
|
|
|
385
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
353
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
386
354
|
}
|
|
387
355
|
|
|
388
356
|
/**
|
|
389
|
-
*
|
|
390
|
-
* Get credit transaction history
|
|
357
|
+
* Pause payment collection
|
|
391
358
|
*/
|
|
392
|
-
async
|
|
393
|
-
const response = await this.
|
|
359
|
+
async organizationsOrganizationIdSubscriptionPausePost(requestParameters: OrganizationsOrganizationIdSubscriptionPausePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
360
|
+
const response = await this.organizationsOrganizationIdSubscriptionPausePostRaw(requestParameters, initOverrides);
|
|
394
361
|
return await response.value();
|
|
395
362
|
}
|
|
396
363
|
|
|
397
364
|
/**
|
|
398
|
-
*
|
|
399
|
-
* Get detailed subscription information
|
|
365
|
+
* Change subscription plan
|
|
400
366
|
*/
|
|
401
|
-
async
|
|
367
|
+
async organizationsOrganizationIdSubscriptionPlanPatchRaw(requestParameters: OrganizationsOrganizationIdSubscriptionPlanPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
402
368
|
if (requestParameters['organizationId'] == null) {
|
|
403
369
|
throw new runtime.RequiredError(
|
|
404
370
|
'organizationId',
|
|
405
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
371
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().'
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (requestParameters['updatePlanRequest'] == null) {
|
|
376
|
+
throw new runtime.RequiredError(
|
|
377
|
+
'updatePlanRequest',
|
|
378
|
+
'Required parameter "updatePlanRequest" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().'
|
|
406
379
|
);
|
|
407
380
|
}
|
|
408
381
|
|
|
@@ -410,6 +383,8 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
410
383
|
|
|
411
384
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
412
385
|
|
|
386
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
387
|
+
|
|
413
388
|
if (this.configuration && this.configuration.accessToken) {
|
|
414
389
|
const token = this.configuration.accessToken;
|
|
415
390
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -419,37 +394,36 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
419
394
|
}
|
|
420
395
|
}
|
|
421
396
|
|
|
422
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
397
|
+
let urlPath = `/organizations/{organizationId}/subscription/plan`;
|
|
423
398
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
424
399
|
|
|
425
400
|
const response = await this.request({
|
|
426
401
|
path: urlPath,
|
|
427
|
-
method: '
|
|
402
|
+
method: 'PATCH',
|
|
428
403
|
headers: headerParameters,
|
|
429
404
|
query: queryParameters,
|
|
405
|
+
body: UpdatePlanRequestToJSON(requestParameters['updatePlanRequest']),
|
|
430
406
|
}, initOverrides);
|
|
431
407
|
|
|
432
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
408
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
433
409
|
}
|
|
434
410
|
|
|
435
411
|
/**
|
|
436
|
-
*
|
|
437
|
-
* Get detailed subscription information
|
|
412
|
+
* Change subscription plan
|
|
438
413
|
*/
|
|
439
|
-
async
|
|
440
|
-
const response = await this.
|
|
414
|
+
async organizationsOrganizationIdSubscriptionPlanPatch(requestParameters: OrganizationsOrganizationIdSubscriptionPlanPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
415
|
+
const response = await this.organizationsOrganizationIdSubscriptionPlanPatchRaw(requestParameters, initOverrides);
|
|
441
416
|
return await response.value();
|
|
442
417
|
}
|
|
443
418
|
|
|
444
419
|
/**
|
|
445
|
-
*
|
|
446
|
-
* Check subscription status for an organization
|
|
420
|
+
* List available plans and their prices
|
|
447
421
|
*/
|
|
448
|
-
async
|
|
422
|
+
async organizationsOrganizationIdSubscriptionPlansGetRaw(requestParameters: OrganizationsOrganizationIdSubscriptionPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PlanCatalogEntry>>> {
|
|
449
423
|
if (requestParameters['organizationId'] == null) {
|
|
450
424
|
throw new runtime.RequiredError(
|
|
451
425
|
'organizationId',
|
|
452
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
426
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPlansGet().'
|
|
453
427
|
);
|
|
454
428
|
}
|
|
455
429
|
|
|
@@ -466,7 +440,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
466
440
|
}
|
|
467
441
|
}
|
|
468
442
|
|
|
469
|
-
let urlPath = `/organizations/{organizationId}/subscription`;
|
|
443
|
+
let urlPath = `/organizations/{organizationId}/subscription/plans`;
|
|
470
444
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
471
445
|
|
|
472
446
|
const response = await this.request({
|
|
@@ -476,27 +450,25 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
476
450
|
query: queryParameters,
|
|
477
451
|
}, initOverrides);
|
|
478
452
|
|
|
479
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
453
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlanCatalogEntryFromJSON));
|
|
480
454
|
}
|
|
481
455
|
|
|
482
456
|
/**
|
|
483
|
-
*
|
|
484
|
-
* Check subscription status for an organization
|
|
457
|
+
* List available plans and their prices
|
|
485
458
|
*/
|
|
486
|
-
async
|
|
487
|
-
const response = await this.
|
|
459
|
+
async organizationsOrganizationIdSubscriptionPlansGet(requestParameters: OrganizationsOrganizationIdSubscriptionPlansGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PlanCatalogEntry>> {
|
|
460
|
+
const response = await this.organizationsOrganizationIdSubscriptionPlansGetRaw(requestParameters, initOverrides);
|
|
488
461
|
return await response.value();
|
|
489
462
|
}
|
|
490
463
|
|
|
491
464
|
/**
|
|
492
|
-
*
|
|
493
|
-
* Pause subscription
|
|
465
|
+
* Resume a subscription scheduled for cancellation
|
|
494
466
|
*/
|
|
495
|
-
async
|
|
467
|
+
async organizationsOrganizationIdSubscriptionResumePostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionResumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
496
468
|
if (requestParameters['organizationId'] == null) {
|
|
497
469
|
throw new runtime.RequiredError(
|
|
498
470
|
'organizationId',
|
|
499
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
471
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionResumePost().'
|
|
500
472
|
);
|
|
501
473
|
}
|
|
502
474
|
|
|
@@ -504,8 +476,6 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
504
476
|
|
|
505
477
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
506
478
|
|
|
507
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
508
|
-
|
|
509
479
|
if (this.configuration && this.configuration.accessToken) {
|
|
510
480
|
const token = this.configuration.accessToken;
|
|
511
481
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -515,7 +485,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
515
485
|
}
|
|
516
486
|
}
|
|
517
487
|
|
|
518
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
488
|
+
let urlPath = `/organizations/{organizationId}/subscription/resume`;
|
|
519
489
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
520
490
|
|
|
521
491
|
const response = await this.request({
|
|
@@ -523,37 +493,27 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
523
493
|
method: 'POST',
|
|
524
494
|
headers: headerParameters,
|
|
525
495
|
query: queryParameters,
|
|
526
|
-
body: PauseSubscriptionRequestToJSON(requestParameters['pauseSubscriptionRequest']),
|
|
527
496
|
}, initOverrides);
|
|
528
497
|
|
|
529
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
498
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
530
499
|
}
|
|
531
500
|
|
|
532
501
|
/**
|
|
533
|
-
*
|
|
534
|
-
* Pause subscription
|
|
502
|
+
* Resume a subscription scheduled for cancellation
|
|
535
503
|
*/
|
|
536
|
-
async
|
|
537
|
-
const response = await this.
|
|
504
|
+
async organizationsOrganizationIdSubscriptionResumePost(requestParameters: OrganizationsOrganizationIdSubscriptionResumePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
505
|
+
const response = await this.organizationsOrganizationIdSubscriptionResumePostRaw(requestParameters, initOverrides);
|
|
538
506
|
return await response.value();
|
|
539
507
|
}
|
|
540
508
|
|
|
541
509
|
/**
|
|
542
|
-
*
|
|
543
|
-
* Update subscription plan
|
|
510
|
+
* Resume payment collection
|
|
544
511
|
*/
|
|
545
|
-
async
|
|
512
|
+
async organizationsOrganizationIdSubscriptionUnpausePostRaw(requestParameters: OrganizationsOrganizationIdSubscriptionUnpausePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionStatus>> {
|
|
546
513
|
if (requestParameters['organizationId'] == null) {
|
|
547
514
|
throw new runtime.RequiredError(
|
|
548
515
|
'organizationId',
|
|
549
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
550
|
-
);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
if (requestParameters['updatePlanRequest'] == null) {
|
|
554
|
-
throw new runtime.RequiredError(
|
|
555
|
-
'updatePlanRequest',
|
|
556
|
-
'Required parameter "updatePlanRequest" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().'
|
|
516
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUnpausePost().'
|
|
557
517
|
);
|
|
558
518
|
}
|
|
559
519
|
|
|
@@ -561,8 +521,6 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
561
521
|
|
|
562
522
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
563
523
|
|
|
564
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
565
|
-
|
|
566
524
|
if (this.configuration && this.configuration.accessToken) {
|
|
567
525
|
const token = this.configuration.accessToken;
|
|
568
526
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -572,38 +530,35 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
572
530
|
}
|
|
573
531
|
}
|
|
574
532
|
|
|
575
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
533
|
+
let urlPath = `/organizations/{organizationId}/subscription/unpause`;
|
|
576
534
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
577
535
|
|
|
578
536
|
const response = await this.request({
|
|
579
537
|
path: urlPath,
|
|
580
|
-
method: '
|
|
538
|
+
method: 'POST',
|
|
581
539
|
headers: headerParameters,
|
|
582
540
|
query: queryParameters,
|
|
583
|
-
body: UpdatePlanRequestToJSON(requestParameters['updatePlanRequest']),
|
|
584
541
|
}, initOverrides);
|
|
585
542
|
|
|
586
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
543
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
587
544
|
}
|
|
588
545
|
|
|
589
546
|
/**
|
|
590
|
-
*
|
|
591
|
-
* Update subscription plan
|
|
547
|
+
* Resume payment collection
|
|
592
548
|
*/
|
|
593
|
-
async
|
|
594
|
-
const response = await this.
|
|
549
|
+
async organizationsOrganizationIdSubscriptionUnpausePost(requestParameters: OrganizationsOrganizationIdSubscriptionUnpausePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionStatus> {
|
|
550
|
+
const response = await this.organizationsOrganizationIdSubscriptionUnpausePostRaw(requestParameters, initOverrides);
|
|
595
551
|
return await response.value();
|
|
596
552
|
}
|
|
597
553
|
|
|
598
554
|
/**
|
|
599
|
-
*
|
|
600
|
-
* Resume subscription
|
|
555
|
+
* Get current-period voice usage breakdown
|
|
601
556
|
*/
|
|
602
|
-
async
|
|
557
|
+
async organizationsOrganizationIdSubscriptionUsageGetRaw(requestParameters: OrganizationsOrganizationIdSubscriptionUsageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrentPeriodUsage>> {
|
|
603
558
|
if (requestParameters['organizationId'] == null) {
|
|
604
559
|
throw new runtime.RequiredError(
|
|
605
560
|
'organizationId',
|
|
606
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
561
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUsageGet().'
|
|
607
562
|
);
|
|
608
563
|
}
|
|
609
564
|
|
|
@@ -620,42 +575,56 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
620
575
|
}
|
|
621
576
|
}
|
|
622
577
|
|
|
623
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
578
|
+
let urlPath = `/organizations/{organizationId}/subscription/usage`;
|
|
624
579
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
625
580
|
|
|
626
581
|
const response = await this.request({
|
|
627
582
|
path: urlPath,
|
|
628
|
-
method: '
|
|
583
|
+
method: 'GET',
|
|
629
584
|
headers: headerParameters,
|
|
630
585
|
query: queryParameters,
|
|
631
586
|
}, initOverrides);
|
|
632
587
|
|
|
633
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
588
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CurrentPeriodUsageFromJSON(jsonValue));
|
|
634
589
|
}
|
|
635
590
|
|
|
636
591
|
/**
|
|
637
|
-
*
|
|
638
|
-
* Resume subscription
|
|
592
|
+
* Get current-period voice usage breakdown
|
|
639
593
|
*/
|
|
640
|
-
async
|
|
641
|
-
const response = await this.
|
|
594
|
+
async organizationsOrganizationIdSubscriptionUsageGet(requestParameters: OrganizationsOrganizationIdSubscriptionUsageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrentPeriodUsage> {
|
|
595
|
+
const response = await this.organizationsOrganizationIdSubscriptionUsageGetRaw(requestParameters, initOverrides);
|
|
642
596
|
return await response.value();
|
|
643
597
|
}
|
|
644
598
|
|
|
645
599
|
/**
|
|
646
|
-
*
|
|
647
|
-
* Unpause subscription
|
|
600
|
+
* List individual usage records (paginated)
|
|
648
601
|
*/
|
|
649
|
-
async
|
|
602
|
+
async organizationsOrganizationIdSubscriptionUsageHistoryGetRaw(requestParameters: OrganizationsOrganizationIdSubscriptionUsageHistoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UsageHistoryResponse>> {
|
|
650
603
|
if (requestParameters['organizationId'] == null) {
|
|
651
604
|
throw new runtime.RequiredError(
|
|
652
605
|
'organizationId',
|
|
653
|
-
'Required parameter "organizationId" was null or undefined when calling
|
|
606
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUsageHistoryGet().'
|
|
654
607
|
);
|
|
655
608
|
}
|
|
656
609
|
|
|
657
610
|
const queryParameters: any = {};
|
|
658
611
|
|
|
612
|
+
if (requestParameters['from'] != null) {
|
|
613
|
+
queryParameters['from'] = (requestParameters['from'] as any).toISOString();
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
if (requestParameters['to'] != null) {
|
|
617
|
+
queryParameters['to'] = (requestParameters['to'] as any).toISOString();
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
if (requestParameters['limit'] != null) {
|
|
621
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if (requestParameters['offset'] != null) {
|
|
625
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
626
|
+
}
|
|
627
|
+
|
|
659
628
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
660
629
|
|
|
661
630
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -667,25 +636,24 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
667
636
|
}
|
|
668
637
|
}
|
|
669
638
|
|
|
670
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
639
|
+
let urlPath = `/organizations/{organizationId}/subscription/usage/history`;
|
|
671
640
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
672
641
|
|
|
673
642
|
const response = await this.request({
|
|
674
643
|
path: urlPath,
|
|
675
|
-
method: '
|
|
644
|
+
method: 'GET',
|
|
676
645
|
headers: headerParameters,
|
|
677
646
|
query: queryParameters,
|
|
678
647
|
}, initOverrides);
|
|
679
648
|
|
|
680
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
649
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UsageHistoryResponseFromJSON(jsonValue));
|
|
681
650
|
}
|
|
682
651
|
|
|
683
652
|
/**
|
|
684
|
-
*
|
|
685
|
-
* Unpause subscription
|
|
653
|
+
* List individual usage records (paginated)
|
|
686
654
|
*/
|
|
687
|
-
async
|
|
688
|
-
const response = await this.
|
|
655
|
+
async organizationsOrganizationIdSubscriptionUsageHistoryGet(requestParameters: OrganizationsOrganizationIdSubscriptionUsageHistoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UsageHistoryResponse> {
|
|
656
|
+
const response = await this.organizationsOrganizationIdSubscriptionUsageHistoryGetRaw(requestParameters, initOverrides);
|
|
689
657
|
return await response.value();
|
|
690
658
|
}
|
|
691
659
|
|