@iblai/iblai-api 4.194.2-core → 4.195.0-core
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/index.cjs.js +1163 -185
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1163 -186
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1163 -185
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +18 -1
- package/dist/types/models/CheckoutSessionCreate.d.ts +6 -0
- package/dist/types/models/CheckoutSessionResponse.d.ts +13 -0
- package/dist/types/models/GrandfatheringStrategyEnum.d.ts +8 -0
- package/dist/types/models/IntervalEnum.d.ts +10 -0
- package/dist/types/models/ItemAccessCheckResponse.d.ts +7 -2
- package/dist/types/models/ItemPaywallConfig.d.ts +52 -0
- package/dist/types/models/ItemPaywallConfigCreate.d.ts +8 -0
- package/dist/types/models/ItemPrice.d.ts +46 -0
- package/dist/types/models/ItemPriceCreate.d.ts +36 -0
- package/dist/types/models/ItemSubscription.d.ts +67 -0
- package/dist/types/models/ItemSubscriptionList.d.ts +34 -0
- package/dist/types/models/ItemType5d7Enum.d.ts +10 -0
- package/dist/types/models/{ItemAccessCheckResponseItemTypeEnum.d.ts → ItemTypeC6bEnum.d.ts} +1 -1
- package/dist/types/models/PaginatedItemSubscriptionList.d.ts +7 -0
- package/dist/types/models/PaginatedItemSubscriptionListList.d.ts +7 -0
- package/dist/types/models/PortalUrlResponse.d.ts +9 -0
- package/dist/types/models/PublicItemPricing.d.ts +11 -0
- package/dist/types/models/Status0e3Enum.d.ts +18 -0
- package/dist/types/services/BillingService.d.ts +271 -0
- package/dist/types/services/PlatformsService.d.ts +275 -0
- package/package.json +1 -1
- package/sdk_schema.yml +7861 -5691
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +18 -1
- package/src/models/CheckoutSessionCreate.ts +11 -0
- package/src/models/CheckoutSessionResponse.ts +18 -0
- package/src/models/GrandfatheringStrategyEnum.ts +12 -0
- package/src/models/IntervalEnum.ts +14 -0
- package/src/models/ItemAccessCheckResponse.ts +7 -2
- package/src/models/ItemPaywallConfig.ts +57 -0
- package/src/models/ItemPaywallConfigCreate.ts +13 -0
- package/src/models/ItemPrice.ts +51 -0
- package/src/models/ItemPriceCreate.ts +41 -0
- package/src/models/ItemSubscription.ts +72 -0
- package/src/models/ItemSubscriptionList.ts +39 -0
- package/src/models/ItemType5d7Enum.ts +14 -0
- package/src/models/{ItemAccessCheckResponseItemTypeEnum.ts → ItemTypeC6bEnum.ts} +1 -1
- package/src/models/PaginatedItemSubscriptionList.ts +12 -0
- package/src/models/PaginatedItemSubscriptionListList.ts +12 -0
- package/src/models/PortalUrlResponse.ts +14 -0
- package/src/models/PublicItemPricing.ts +16 -0
- package/src/models/Status0e3Enum.ts +22 -0
- package/src/services/BillingService.ts +591 -0
- package/src/services/PlatformsService.ts +601 -0
|
@@ -4,11 +4,22 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
import type { AutoRechargeTriggerRequest } from '../models/AutoRechargeTriggerRequest';
|
|
6
6
|
import type { AutoRechargeTriggerResponse } from '../models/AutoRechargeTriggerResponse';
|
|
7
|
+
import type { CheckoutSessionCreate } from '../models/CheckoutSessionCreate';
|
|
8
|
+
import type { CheckoutSessionResponse } from '../models/CheckoutSessionResponse';
|
|
7
9
|
import type { CreditAccountAutoRechargeUpdate } from '../models/CreditAccountAutoRechargeUpdate';
|
|
8
10
|
import type { CreditAccountInfo } from '../models/CreditAccountInfo';
|
|
9
11
|
import type { CreditTransactionHistory } from '../models/CreditTransactionHistory';
|
|
10
12
|
import type { ItemAccessCheckResponse } from '../models/ItemAccessCheckResponse';
|
|
13
|
+
import type { ItemPaywallConfig } from '../models/ItemPaywallConfig';
|
|
14
|
+
import type { ItemPaywallConfigCreate } from '../models/ItemPaywallConfigCreate';
|
|
15
|
+
import type { ItemPrice } from '../models/ItemPrice';
|
|
16
|
+
import type { ItemPriceCreate } from '../models/ItemPriceCreate';
|
|
17
|
+
import type { ItemSubscription } from '../models/ItemSubscription';
|
|
18
|
+
import type { PaginatedItemSubscriptionList } from '../models/PaginatedItemSubscriptionList';
|
|
19
|
+
import type { PaginatedItemSubscriptionListList } from '../models/PaginatedItemSubscriptionListList';
|
|
11
20
|
import type { PatchedCreditAccountAutoRechargeUpdate } from '../models/PatchedCreditAccountAutoRechargeUpdate';
|
|
21
|
+
import type { PortalUrlResponse } from '../models/PortalUrlResponse';
|
|
22
|
+
import type { PublicItemPricing } from '../models/PublicItemPricing';
|
|
12
23
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
13
24
|
import { OpenAPI } from '../core/OpenAPI';
|
|
14
25
|
import { request as __request } from '../core/request';
|
|
@@ -118,6 +129,586 @@ export class BillingService {
|
|
|
118
129
|
mediaType: 'application/json',
|
|
119
130
|
});
|
|
120
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Check whether the authenticated user has payment access to an item on a scoped platform.
|
|
134
|
+
* @returns ItemAccessCheckResponse
|
|
135
|
+
* @throws ApiError
|
|
136
|
+
*/
|
|
137
|
+
public static billingPlatformsItemsAccessCheckRetrieve({
|
|
138
|
+
itemId,
|
|
139
|
+
itemType,
|
|
140
|
+
platformKey,
|
|
141
|
+
}: {
|
|
142
|
+
itemId: string,
|
|
143
|
+
itemType: string,
|
|
144
|
+
platformKey: string,
|
|
145
|
+
}): CancelablePromise<ItemAccessCheckResponse> {
|
|
146
|
+
return __request(OpenAPI, {
|
|
147
|
+
method: 'GET',
|
|
148
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/access-check/',
|
|
149
|
+
path: {
|
|
150
|
+
'item_id': itemId,
|
|
151
|
+
'item_type': itemType,
|
|
152
|
+
'platform_key': platformKey,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Create checkout session
|
|
158
|
+
* Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
|
|
159
|
+
* @returns CheckoutSessionResponse
|
|
160
|
+
* @throws ApiError
|
|
161
|
+
*/
|
|
162
|
+
public static billingPlatformsItemsCheckoutCreate({
|
|
163
|
+
itemId,
|
|
164
|
+
itemType,
|
|
165
|
+
platformKey,
|
|
166
|
+
requestBody,
|
|
167
|
+
}: {
|
|
168
|
+
itemId: string,
|
|
169
|
+
itemType: string,
|
|
170
|
+
platformKey: string,
|
|
171
|
+
requestBody: CheckoutSessionCreate,
|
|
172
|
+
}): CancelablePromise<CheckoutSessionResponse> {
|
|
173
|
+
return __request(OpenAPI, {
|
|
174
|
+
method: 'POST',
|
|
175
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout/',
|
|
176
|
+
path: {
|
|
177
|
+
'item_id': itemId,
|
|
178
|
+
'item_type': itemType,
|
|
179
|
+
'platform_key': platformKey,
|
|
180
|
+
},
|
|
181
|
+
body: requestBody,
|
|
182
|
+
mediaType: 'application/json',
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Handle checkout callback
|
|
187
|
+
* Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
|
|
188
|
+
* @returns void
|
|
189
|
+
* @throws ApiError
|
|
190
|
+
*/
|
|
191
|
+
public static billingPlatformsItemsCheckoutCallbackRetrieve({
|
|
192
|
+
itemId,
|
|
193
|
+
itemType,
|
|
194
|
+
platformKey,
|
|
195
|
+
returnUrl,
|
|
196
|
+
}: {
|
|
197
|
+
itemId: string,
|
|
198
|
+
itemType: string,
|
|
199
|
+
platformKey: string,
|
|
200
|
+
returnUrl?: string | null,
|
|
201
|
+
}): CancelablePromise<void> {
|
|
202
|
+
return __request(OpenAPI, {
|
|
203
|
+
method: 'GET',
|
|
204
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/',
|
|
205
|
+
path: {
|
|
206
|
+
'item_id': itemId,
|
|
207
|
+
'item_type': itemType,
|
|
208
|
+
'platform_key': platformKey,
|
|
209
|
+
},
|
|
210
|
+
query: {
|
|
211
|
+
'return_url': returnUrl,
|
|
212
|
+
},
|
|
213
|
+
errors: {
|
|
214
|
+
302: `No response body`,
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Handle checkout callback
|
|
220
|
+
* Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
|
|
221
|
+
* @returns void
|
|
222
|
+
* @throws ApiError
|
|
223
|
+
*/
|
|
224
|
+
public static billingPlatformsItemsCheckoutCallbackRetrieve2({
|
|
225
|
+
checkoutSessionId,
|
|
226
|
+
itemId,
|
|
227
|
+
itemType,
|
|
228
|
+
platformKey,
|
|
229
|
+
returnUrl,
|
|
230
|
+
}: {
|
|
231
|
+
checkoutSessionId: string,
|
|
232
|
+
itemId: string,
|
|
233
|
+
itemType: string,
|
|
234
|
+
platformKey: string,
|
|
235
|
+
returnUrl?: string | null,
|
|
236
|
+
}): CancelablePromise<void> {
|
|
237
|
+
return __request(OpenAPI, {
|
|
238
|
+
method: 'GET',
|
|
239
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/{checkout_session_id}/',
|
|
240
|
+
path: {
|
|
241
|
+
'checkout_session_id': checkoutSessionId,
|
|
242
|
+
'item_id': itemId,
|
|
243
|
+
'item_type': itemType,
|
|
244
|
+
'platform_key': platformKey,
|
|
245
|
+
},
|
|
246
|
+
query: {
|
|
247
|
+
'return_url': returnUrl,
|
|
248
|
+
},
|
|
249
|
+
errors: {
|
|
250
|
+
302: `No response body`,
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Create guest checkout session
|
|
256
|
+
* Create a Stripe checkout session for a guest user (email required).
|
|
257
|
+
* @returns CheckoutSessionResponse
|
|
258
|
+
* @throws ApiError
|
|
259
|
+
*/
|
|
260
|
+
public static billingPlatformsItemsCheckoutGuestCreate({
|
|
261
|
+
itemId,
|
|
262
|
+
itemType,
|
|
263
|
+
platformKey,
|
|
264
|
+
requestBody,
|
|
265
|
+
}: {
|
|
266
|
+
itemId: string,
|
|
267
|
+
itemType: string,
|
|
268
|
+
platformKey: string,
|
|
269
|
+
requestBody: CheckoutSessionCreate,
|
|
270
|
+
}): CancelablePromise<CheckoutSessionResponse> {
|
|
271
|
+
return __request(OpenAPI, {
|
|
272
|
+
method: 'POST',
|
|
273
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-guest/',
|
|
274
|
+
path: {
|
|
275
|
+
'item_id': itemId,
|
|
276
|
+
'item_type': itemType,
|
|
277
|
+
'platform_key': platformKey,
|
|
278
|
+
},
|
|
279
|
+
body: requestBody,
|
|
280
|
+
mediaType: 'application/json',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Get paywall configuration
|
|
285
|
+
* Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
|
|
286
|
+
* @returns ItemPaywallConfig
|
|
287
|
+
* @throws ApiError
|
|
288
|
+
*/
|
|
289
|
+
public static billingPlatformsItemsPaywallRetrieve({
|
|
290
|
+
itemId,
|
|
291
|
+
itemType,
|
|
292
|
+
platformKey,
|
|
293
|
+
}: {
|
|
294
|
+
itemId: string,
|
|
295
|
+
itemType: string,
|
|
296
|
+
platformKey: string,
|
|
297
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
298
|
+
return __request(OpenAPI, {
|
|
299
|
+
method: 'GET',
|
|
300
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
|
|
301
|
+
path: {
|
|
302
|
+
'item_id': itemId,
|
|
303
|
+
'item_type': itemType,
|
|
304
|
+
'platform_key': platformKey,
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create or update paywall configuration
|
|
310
|
+
* Enable or configure the paywall for an item. Creates a Stripe product on first enable.
|
|
311
|
+
* @returns ItemPaywallConfig
|
|
312
|
+
* @throws ApiError
|
|
313
|
+
*/
|
|
314
|
+
public static billingPlatformsItemsPaywallCreate({
|
|
315
|
+
itemId,
|
|
316
|
+
itemType,
|
|
317
|
+
platformKey,
|
|
318
|
+
requestBody,
|
|
319
|
+
}: {
|
|
320
|
+
itemId: string,
|
|
321
|
+
itemType: string,
|
|
322
|
+
platformKey: string,
|
|
323
|
+
requestBody?: ItemPaywallConfigCreate,
|
|
324
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
325
|
+
return __request(OpenAPI, {
|
|
326
|
+
method: 'POST',
|
|
327
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
|
|
328
|
+
path: {
|
|
329
|
+
'item_id': itemId,
|
|
330
|
+
'item_type': itemType,
|
|
331
|
+
'platform_key': platformKey,
|
|
332
|
+
},
|
|
333
|
+
body: requestBody,
|
|
334
|
+
mediaType: 'application/json',
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Update paywall configuration
|
|
339
|
+
* Same as POST. Update the paywall configuration for an item.
|
|
340
|
+
* @returns ItemPaywallConfig
|
|
341
|
+
* @throws ApiError
|
|
342
|
+
*/
|
|
343
|
+
public static billingPlatformsItemsPaywallUpdate({
|
|
344
|
+
itemId,
|
|
345
|
+
itemType,
|
|
346
|
+
platformKey,
|
|
347
|
+
requestBody,
|
|
348
|
+
}: {
|
|
349
|
+
itemId: string,
|
|
350
|
+
itemType: string,
|
|
351
|
+
platformKey: string,
|
|
352
|
+
requestBody?: ItemPaywallConfigCreate,
|
|
353
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
354
|
+
return __request(OpenAPI, {
|
|
355
|
+
method: 'PUT',
|
|
356
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
|
|
357
|
+
path: {
|
|
358
|
+
'item_id': itemId,
|
|
359
|
+
'item_type': itemType,
|
|
360
|
+
'platform_key': platformKey,
|
|
361
|
+
},
|
|
362
|
+
body: requestBody,
|
|
363
|
+
mediaType: 'application/json',
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Disable paywall configuration
|
|
368
|
+
* Disable the paywall for an item. Does not delete the configuration.
|
|
369
|
+
* @returns void
|
|
370
|
+
* @throws ApiError
|
|
371
|
+
*/
|
|
372
|
+
public static billingPlatformsItemsPaywallDestroy({
|
|
373
|
+
itemId,
|
|
374
|
+
itemType,
|
|
375
|
+
platformKey,
|
|
376
|
+
}: {
|
|
377
|
+
itemId: string,
|
|
378
|
+
itemType: string,
|
|
379
|
+
platformKey: string,
|
|
380
|
+
}): CancelablePromise<void> {
|
|
381
|
+
return __request(OpenAPI, {
|
|
382
|
+
method: 'DELETE',
|
|
383
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
|
|
384
|
+
path: {
|
|
385
|
+
'item_id': itemId,
|
|
386
|
+
'item_type': itemType,
|
|
387
|
+
'platform_key': platformKey,
|
|
388
|
+
},
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* List prices
|
|
393
|
+
* List active prices for an item's paywall configuration.
|
|
394
|
+
* @returns ItemPrice
|
|
395
|
+
* @throws ApiError
|
|
396
|
+
*/
|
|
397
|
+
public static billingPlatformsItemsPaywallPricesList({
|
|
398
|
+
itemId,
|
|
399
|
+
itemType,
|
|
400
|
+
platformKey,
|
|
401
|
+
}: {
|
|
402
|
+
itemId: string,
|
|
403
|
+
itemType: string,
|
|
404
|
+
platformKey: string,
|
|
405
|
+
}): CancelablePromise<Array<ItemPrice>> {
|
|
406
|
+
return __request(OpenAPI, {
|
|
407
|
+
method: 'GET',
|
|
408
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
|
|
409
|
+
path: {
|
|
410
|
+
'item_id': itemId,
|
|
411
|
+
'item_type': itemType,
|
|
412
|
+
'platform_key': platformKey,
|
|
413
|
+
},
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Create a price
|
|
418
|
+
* Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
|
|
419
|
+
* @returns ItemPrice
|
|
420
|
+
* @throws ApiError
|
|
421
|
+
*/
|
|
422
|
+
public static billingPlatformsItemsPaywallPricesCreate({
|
|
423
|
+
itemId,
|
|
424
|
+
itemType,
|
|
425
|
+
platformKey,
|
|
426
|
+
requestBody,
|
|
427
|
+
}: {
|
|
428
|
+
itemId: string,
|
|
429
|
+
itemType: string,
|
|
430
|
+
platformKey: string,
|
|
431
|
+
requestBody: ItemPriceCreate,
|
|
432
|
+
}): CancelablePromise<ItemPrice> {
|
|
433
|
+
return __request(OpenAPI, {
|
|
434
|
+
method: 'POST',
|
|
435
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
|
|
436
|
+
path: {
|
|
437
|
+
'item_id': itemId,
|
|
438
|
+
'item_type': itemType,
|
|
439
|
+
'platform_key': platformKey,
|
|
440
|
+
},
|
|
441
|
+
body: requestBody,
|
|
442
|
+
mediaType: 'application/json',
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Get price details
|
|
447
|
+
* Retrieve a specific price by ID.
|
|
448
|
+
* @returns ItemPrice
|
|
449
|
+
* @throws ApiError
|
|
450
|
+
*/
|
|
451
|
+
public static billingPlatformsItemsPaywallPricesRetrieve({
|
|
452
|
+
itemId,
|
|
453
|
+
itemType,
|
|
454
|
+
platformKey,
|
|
455
|
+
priceId,
|
|
456
|
+
}: {
|
|
457
|
+
itemId: string,
|
|
458
|
+
itemType: string,
|
|
459
|
+
platformKey: string,
|
|
460
|
+
priceId: string,
|
|
461
|
+
}): CancelablePromise<ItemPrice> {
|
|
462
|
+
return __request(OpenAPI, {
|
|
463
|
+
method: 'GET',
|
|
464
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
|
|
465
|
+
path: {
|
|
466
|
+
'item_id': itemId,
|
|
467
|
+
'item_type': itemType,
|
|
468
|
+
'platform_key': platformKey,
|
|
469
|
+
'price_id': priceId,
|
|
470
|
+
},
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Update a price
|
|
475
|
+
* Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
|
|
476
|
+
* @returns ItemPrice
|
|
477
|
+
* @throws ApiError
|
|
478
|
+
*/
|
|
479
|
+
public static billingPlatformsItemsPaywallPricesUpdate({
|
|
480
|
+
itemId,
|
|
481
|
+
itemType,
|
|
482
|
+
platformKey,
|
|
483
|
+
priceId,
|
|
484
|
+
requestBody,
|
|
485
|
+
}: {
|
|
486
|
+
itemId: string,
|
|
487
|
+
itemType: string,
|
|
488
|
+
platformKey: string,
|
|
489
|
+
priceId: string,
|
|
490
|
+
requestBody: ItemPriceCreate,
|
|
491
|
+
}): CancelablePromise<ItemPrice> {
|
|
492
|
+
return __request(OpenAPI, {
|
|
493
|
+
method: 'PUT',
|
|
494
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
|
|
495
|
+
path: {
|
|
496
|
+
'item_id': itemId,
|
|
497
|
+
'item_type': itemType,
|
|
498
|
+
'platform_key': platformKey,
|
|
499
|
+
'price_id': priceId,
|
|
500
|
+
},
|
|
501
|
+
body: requestBody,
|
|
502
|
+
mediaType: 'application/json',
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Delete a price
|
|
507
|
+
* Soft-delete a price tier and deactivate the corresponding Stripe price.
|
|
508
|
+
* @returns void
|
|
509
|
+
* @throws ApiError
|
|
510
|
+
*/
|
|
511
|
+
public static billingPlatformsItemsPaywallPricesDestroy({
|
|
512
|
+
itemId,
|
|
513
|
+
itemType,
|
|
514
|
+
platformKey,
|
|
515
|
+
priceId,
|
|
516
|
+
}: {
|
|
517
|
+
itemId: string,
|
|
518
|
+
itemType: string,
|
|
519
|
+
platformKey: string,
|
|
520
|
+
priceId: string,
|
|
521
|
+
}): CancelablePromise<void> {
|
|
522
|
+
return __request(OpenAPI, {
|
|
523
|
+
method: 'DELETE',
|
|
524
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
|
|
525
|
+
path: {
|
|
526
|
+
'item_id': itemId,
|
|
527
|
+
'item_type': itemType,
|
|
528
|
+
'platform_key': platformKey,
|
|
529
|
+
'price_id': priceId,
|
|
530
|
+
},
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Get public pricing
|
|
535
|
+
* Retrieve public pricing information for an item. No authentication required.
|
|
536
|
+
* @returns PublicItemPricing
|
|
537
|
+
* @throws ApiError
|
|
538
|
+
*/
|
|
539
|
+
public static billingPlatformsItemsPricingRetrieve({
|
|
540
|
+
itemId,
|
|
541
|
+
itemType,
|
|
542
|
+
platformKey,
|
|
543
|
+
}: {
|
|
544
|
+
itemId: string,
|
|
545
|
+
itemType: string,
|
|
546
|
+
platformKey: string,
|
|
547
|
+
}): CancelablePromise<PublicItemPricing> {
|
|
548
|
+
return __request(OpenAPI, {
|
|
549
|
+
method: 'GET',
|
|
550
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/pricing/',
|
|
551
|
+
path: {
|
|
552
|
+
'item_id': itemId,
|
|
553
|
+
'item_type': itemType,
|
|
554
|
+
'platform_key': platformKey,
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* List item subscribers
|
|
560
|
+
* List all subscribers for an item. Optionally filter by subscription status.
|
|
561
|
+
* @returns PaginatedItemSubscriptionList
|
|
562
|
+
* @throws ApiError
|
|
563
|
+
*/
|
|
564
|
+
public static billingPlatformsItemsSubscribersList({
|
|
565
|
+
itemId,
|
|
566
|
+
itemType,
|
|
567
|
+
platformKey,
|
|
568
|
+
page,
|
|
569
|
+
pageSize,
|
|
570
|
+
status,
|
|
571
|
+
}: {
|
|
572
|
+
itemId: string,
|
|
573
|
+
itemType: string,
|
|
574
|
+
platformKey: string,
|
|
575
|
+
/**
|
|
576
|
+
* A page number within the paginated result set.
|
|
577
|
+
*/
|
|
578
|
+
page?: number,
|
|
579
|
+
/**
|
|
580
|
+
* Number of results to return per page.
|
|
581
|
+
*/
|
|
582
|
+
pageSize?: number,
|
|
583
|
+
/**
|
|
584
|
+
* * `active` - Active
|
|
585
|
+
* * `free` - Free Tier
|
|
586
|
+
* * `grandfathered` - Grandfathered
|
|
587
|
+
* * `trialing` - Trialing
|
|
588
|
+
* * `past_due` - Past Due
|
|
589
|
+
* * `canceled` - Canceled
|
|
590
|
+
* * `incomplete` - Incomplete
|
|
591
|
+
*/
|
|
592
|
+
status?: 'active' | 'free' | 'grandfathered' | 'trialing' | 'past_due' | 'canceled' | 'incomplete',
|
|
593
|
+
}): CancelablePromise<PaginatedItemSubscriptionList> {
|
|
594
|
+
return __request(OpenAPI, {
|
|
595
|
+
method: 'GET',
|
|
596
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscribers/',
|
|
597
|
+
path: {
|
|
598
|
+
'item_id': itemId,
|
|
599
|
+
'item_type': itemType,
|
|
600
|
+
'platform_key': platformKey,
|
|
601
|
+
},
|
|
602
|
+
query: {
|
|
603
|
+
'page': page,
|
|
604
|
+
'page_size': pageSize,
|
|
605
|
+
'status': status,
|
|
606
|
+
},
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Get user subscription
|
|
611
|
+
* Retrieve the current user's subscription to an item.
|
|
612
|
+
* @returns ItemSubscription
|
|
613
|
+
* @throws ApiError
|
|
614
|
+
*/
|
|
615
|
+
public static billingPlatformsItemsSubscriptionRetrieve({
|
|
616
|
+
itemId,
|
|
617
|
+
itemType,
|
|
618
|
+
platformKey,
|
|
619
|
+
}: {
|
|
620
|
+
itemId: string,
|
|
621
|
+
itemType: string,
|
|
622
|
+
platformKey: string,
|
|
623
|
+
}): CancelablePromise<ItemSubscription> {
|
|
624
|
+
return __request(OpenAPI, {
|
|
625
|
+
method: 'GET',
|
|
626
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/',
|
|
627
|
+
path: {
|
|
628
|
+
'item_id': itemId,
|
|
629
|
+
'item_type': itemType,
|
|
630
|
+
'platform_key': platformKey,
|
|
631
|
+
},
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Cancel subscription
|
|
636
|
+
* Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
|
|
637
|
+
* @returns PortalUrlResponse
|
|
638
|
+
* @throws ApiError
|
|
639
|
+
*/
|
|
640
|
+
public static billingPlatformsItemsSubscriptionCancelCreate({
|
|
641
|
+
itemId,
|
|
642
|
+
itemType,
|
|
643
|
+
platformKey,
|
|
644
|
+
}: {
|
|
645
|
+
itemId: string,
|
|
646
|
+
itemType: string,
|
|
647
|
+
platformKey: string,
|
|
648
|
+
}): CancelablePromise<PortalUrlResponse> {
|
|
649
|
+
return __request(OpenAPI, {
|
|
650
|
+
method: 'POST',
|
|
651
|
+
url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/cancel/',
|
|
652
|
+
path: {
|
|
653
|
+
'item_id': itemId,
|
|
654
|
+
'item_type': itemType,
|
|
655
|
+
'platform_key': platformKey,
|
|
656
|
+
},
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* List user subscriptions
|
|
661
|
+
* Paginated list of the current user's subscriptions on a platform. Optionally filter by status or item_type.
|
|
662
|
+
* @returns PaginatedItemSubscriptionListList
|
|
663
|
+
* @throws ApiError
|
|
664
|
+
*/
|
|
665
|
+
public static billingPlatformsMySubscriptionsList({
|
|
666
|
+
platformKey,
|
|
667
|
+
itemType,
|
|
668
|
+
page,
|
|
669
|
+
pageSize,
|
|
670
|
+
status,
|
|
671
|
+
}: {
|
|
672
|
+
platformKey: string,
|
|
673
|
+
/**
|
|
674
|
+
* * `mentor` - mentor
|
|
675
|
+
* * `course` - course
|
|
676
|
+
* * `program` - program
|
|
677
|
+
*/
|
|
678
|
+
itemType?: 'mentor' | 'course' | 'program',
|
|
679
|
+
/**
|
|
680
|
+
* A page number within the paginated result set.
|
|
681
|
+
*/
|
|
682
|
+
page?: number,
|
|
683
|
+
/**
|
|
684
|
+
* Number of results to return per page.
|
|
685
|
+
*/
|
|
686
|
+
pageSize?: number,
|
|
687
|
+
/**
|
|
688
|
+
* * `active` - Active
|
|
689
|
+
* * `free` - Free Tier
|
|
690
|
+
* * `grandfathered` - Grandfathered
|
|
691
|
+
* * `trialing` - Trialing
|
|
692
|
+
* * `past_due` - Past Due
|
|
693
|
+
* * `canceled` - Canceled
|
|
694
|
+
* * `incomplete` - Incomplete
|
|
695
|
+
*/
|
|
696
|
+
status?: 'active' | 'free' | 'grandfathered' | 'trialing' | 'past_due' | 'canceled' | 'incomplete',
|
|
697
|
+
}): CancelablePromise<PaginatedItemSubscriptionListList> {
|
|
698
|
+
return __request(OpenAPI, {
|
|
699
|
+
method: 'GET',
|
|
700
|
+
url: '/api/billing/platforms/{platform_key}/my-subscriptions/',
|
|
701
|
+
path: {
|
|
702
|
+
'platform_key': platformKey,
|
|
703
|
+
},
|
|
704
|
+
query: {
|
|
705
|
+
'item_type': itemType,
|
|
706
|
+
'page': page,
|
|
707
|
+
'page_size': pageSize,
|
|
708
|
+
'status': status,
|
|
709
|
+
},
|
|
710
|
+
});
|
|
711
|
+
}
|
|
121
712
|
/**
|
|
122
713
|
* List transaction history
|
|
123
714
|
* Paginated transaction history for the credit account. Use platform_key query param to list platform account transactions (if permitted). Filter by transaction_type, from_date (YYYY-MM-DD), to_date (YYYY-MM-DD).
|