44 * pollination-server
55 * Pollination Server OpenAPI Definition
66 *
7- * The version of the OpenAPI document: 1.8.0
7+ * The version of the OpenAPI document: 1.8.1
8899 *
1010 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,6 +26,8 @@ import type { AppServerRestBillingDtoPayLink } from '../models';
2626// @ts -ignore
2727import type { BillingProduct } from '../models' ;
2828// @ts -ignore
29+ import type { BillingSubscription } from '../models' ;
30+ // @ts -ignore
2931import type { BillingSubscriptionCreate } from '../models' ;
3032// @ts -ignore
3133import type { BillingSubscriptionUpdate } from '../models' ;
@@ -168,6 +170,47 @@ export const BillingApiAxiosParamCreator = function (configuration?: Configurati
168170 options : localVarRequestOptions ,
169171 } ;
170172 } ,
173+ /**
174+ * Get a Paddle Billing subscription by its ID
175+ * @summary Get a Paddle Billing subscription by ID
176+ * @param {string } subscriptionId
177+ * @param {* } [options] Override http request option.
178+ * @throws {RequiredError }
179+ */
180+ getBillingSubscription : async ( subscriptionId : string , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
181+ // verify required parameter 'subscriptionId' is not null or undefined
182+ assertParamExists ( 'getBillingSubscription' , 'subscriptionId' , subscriptionId )
183+ const localVarPath = `/billing/subscriptions/{subscription_id}`
184+ . replace ( `{${ "subscription_id" } }` , encodeURIComponent ( String ( subscriptionId ) ) ) ;
185+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
186+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
187+ let baseOptions ;
188+ if ( configuration ) {
189+ baseOptions = configuration . baseOptions ;
190+ }
191+
192+ const localVarRequestOptions = { method : 'GET' , ...baseOptions , ...options } ;
193+ const localVarHeaderParameter = { } as any ;
194+ const localVarQueryParameter = { } as any ;
195+
196+ // authentication JWTAuth required
197+ // http bearer authentication required
198+ await setBearerAuthToObject ( localVarHeaderParameter , configuration )
199+
200+ // authentication APIKeyAuth required
201+ await setApiKeyToObject ( localVarHeaderParameter , "x-pollination-token" , configuration )
202+
203+
204+
205+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
206+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
207+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
208+
209+ return {
210+ url : toPathString ( localVarUrlObj ) ,
211+ options : localVarRequestOptions ,
212+ } ;
213+ } ,
171214 /**
172215 * List all available products from Paddle Billing API
173216 * @summary List available Paddle Billing products
@@ -237,6 +280,48 @@ export const BillingApiAxiosParamCreator = function (configuration?: Configurati
237280
238281
239282
283+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
284+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
285+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
286+
287+ return {
288+ url : toPathString ( localVarUrlObj ) ,
289+ options : localVarRequestOptions ,
290+ } ;
291+ } ,
292+ /**
293+ * List all Paddle Billing subscriptions
294+ * @summary List all Paddle Billing subscriptions
295+ * @param {string } [account]
296+ * @param {* } [options] Override http request option.
297+ * @throws {RequiredError }
298+ */
299+ listBillingSubscriptions : async ( account ?: string , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
300+ const localVarPath = `/billing/subscriptions` ;
301+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
302+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
303+ let baseOptions ;
304+ if ( configuration ) {
305+ baseOptions = configuration . baseOptions ;
306+ }
307+
308+ const localVarRequestOptions = { method : 'GET' , ...baseOptions , ...options } ;
309+ const localVarHeaderParameter = { } as any ;
310+ const localVarQueryParameter = { } as any ;
311+
312+ // authentication JWTAuth required
313+ // http bearer authentication required
314+ await setBearerAuthToObject ( localVarHeaderParameter , configuration )
315+
316+ // authentication APIKeyAuth required
317+ await setApiKeyToObject ( localVarHeaderParameter , "x-pollination-token" , configuration )
318+
319+ if ( account !== undefined ) {
320+ localVarQueryParameter [ 'account' ] = account ;
321+ }
322+
323+
324+
240325 setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
241326 let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
242327 localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
@@ -389,6 +474,19 @@ export const BillingApiFp = function(configuration?: Configuration) {
389474 const localVarOperationServerBasePath = operationServerMap [ 'BillingApi.createBillingSubscriptionTransaction' ] ?. [ localVarOperationServerIndex ] ?. url ;
390475 return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
391476 } ,
477+ /**
478+ * Get a Paddle Billing subscription by its ID
479+ * @summary Get a Paddle Billing subscription by ID
480+ * @param {string } subscriptionId
481+ * @param {* } [options] Override http request option.
482+ * @throws {RequiredError }
483+ */
484+ async getBillingSubscription ( subscriptionId : string , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < BillingSubscription > > {
485+ const localVarAxiosArgs = await localVarAxiosParamCreator . getBillingSubscription ( subscriptionId , options ) ;
486+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
487+ const localVarOperationServerBasePath = operationServerMap [ 'BillingApi.getBillingSubscription' ] ?. [ localVarOperationServerIndex ] ?. url ;
488+ return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
489+ } ,
392490 /**
393491 * List all available products from Paddle Billing API
394492 * @summary List available Paddle Billing products
@@ -414,6 +512,19 @@ export const BillingApiFp = function(configuration?: Configuration) {
414512 const localVarOperationServerBasePath = operationServerMap [ 'BillingApi.listBillingSubscriptionTransactions' ] ?. [ localVarOperationServerIndex ] ?. url ;
415513 return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
416514 } ,
515+ /**
516+ * List all Paddle Billing subscriptions
517+ * @summary List all Paddle Billing subscriptions
518+ * @param {string } [account]
519+ * @param {* } [options] Override http request option.
520+ * @throws {RequiredError }
521+ */
522+ async listBillingSubscriptions ( account ?: string , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < Array < BillingSubscription > > > {
523+ const localVarAxiosArgs = await localVarAxiosParamCreator . listBillingSubscriptions ( account , options ) ;
524+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
525+ const localVarOperationServerBasePath = operationServerMap [ 'BillingApi.listBillingSubscriptions' ] ?. [ localVarOperationServerIndex ] ?. url ;
526+ return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
527+ } ,
417528 /**
418529 * Preview the cost and details of a Billing subscription before creation
419530 * @summary Preview a Paddle Billing subscription transaction
@@ -482,6 +593,16 @@ export const BillingApiFactory = function (configuration?: Configuration, basePa
482593 createBillingSubscriptionTransaction ( requestParameters : BillingApiCreateBillingSubscriptionTransactionRequest , options ?: RawAxiosRequestConfig ) : AxiosPromise < AppServerRestBillingDtoPayLink > {
483594 return localVarFp . createBillingSubscriptionTransaction ( requestParameters . billingSubscriptionCreate , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
484595 } ,
596+ /**
597+ * Get a Paddle Billing subscription by its ID
598+ * @summary Get a Paddle Billing subscription by ID
599+ * @param {BillingApiGetBillingSubscriptionRequest } requestParameters Request parameters.
600+ * @param {* } [options] Override http request option.
601+ * @throws {RequiredError }
602+ */
603+ getBillingSubscription ( requestParameters : BillingApiGetBillingSubscriptionRequest , options ?: RawAxiosRequestConfig ) : AxiosPromise < BillingSubscription > {
604+ return localVarFp . getBillingSubscription ( requestParameters . subscriptionId , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
605+ } ,
485606 /**
486607 * List all available products from Paddle Billing API
487608 * @summary List available Paddle Billing products
@@ -501,6 +622,16 @@ export const BillingApiFactory = function (configuration?: Configuration, basePa
501622 listBillingSubscriptionTransactions ( requestParameters : BillingApiListBillingSubscriptionTransactionsRequest , options ?: RawAxiosRequestConfig ) : AxiosPromise < Array < BillingTransaction > > {
502623 return localVarFp . listBillingSubscriptionTransactions ( requestParameters . subscriptionId , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
503624 } ,
625+ /**
626+ * List all Paddle Billing subscriptions
627+ * @summary List all Paddle Billing subscriptions
628+ * @param {BillingApiListBillingSubscriptionsRequest } requestParameters Request parameters.
629+ * @param {* } [options] Override http request option.
630+ * @throws {RequiredError }
631+ */
632+ listBillingSubscriptions ( requestParameters : BillingApiListBillingSubscriptionsRequest = { } , options ?: RawAxiosRequestConfig ) : AxiosPromise < Array < BillingSubscription > > {
633+ return localVarFp . listBillingSubscriptions ( requestParameters . account , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
634+ } ,
504635 /**
505636 * Preview the cost and details of a Billing subscription before creation
506637 * @summary Preview a Paddle Billing subscription transaction
@@ -566,6 +697,20 @@ export interface BillingApiCreateBillingSubscriptionTransactionRequest {
566697 readonly billingSubscriptionCreate : BillingSubscriptionCreate
567698}
568699
700+ /**
701+ * Request parameters for getBillingSubscription operation in BillingApi.
702+ * @export
703+ * @interface BillingApiGetBillingSubscriptionRequest
704+ */
705+ export interface BillingApiGetBillingSubscriptionRequest {
706+ /**
707+ *
708+ * @type {string }
709+ * @memberof BillingApiGetBillingSubscription
710+ */
711+ readonly subscriptionId : string
712+ }
713+
569714/**
570715 * Request parameters for listBillingSubscriptionTransactions operation in BillingApi.
571716 * @export
@@ -580,6 +725,20 @@ export interface BillingApiListBillingSubscriptionTransactionsRequest {
580725 readonly subscriptionId : string
581726}
582727
728+ /**
729+ * Request parameters for listBillingSubscriptions operation in BillingApi.
730+ * @export
731+ * @interface BillingApiListBillingSubscriptionsRequest
732+ */
733+ export interface BillingApiListBillingSubscriptionsRequest {
734+ /**
735+ *
736+ * @type {string }
737+ * @memberof BillingApiListBillingSubscriptions
738+ */
739+ readonly account ?: string
740+ }
741+
583742/**
584743 * Request parameters for previewBillingSubscription operation in BillingApi.
585744 * @export
@@ -665,6 +824,18 @@ export class BillingApi extends BaseAPI {
665824 return BillingApiFp ( this . configuration ) . createBillingSubscriptionTransaction ( requestParameters . billingSubscriptionCreate , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
666825 }
667826
827+ /**
828+ * Get a Paddle Billing subscription by its ID
829+ * @summary Get a Paddle Billing subscription by ID
830+ * @param {BillingApiGetBillingSubscriptionRequest } requestParameters Request parameters.
831+ * @param {* } [options] Override http request option.
832+ * @throws {RequiredError }
833+ * @memberof BillingApi
834+ */
835+ public getBillingSubscription ( requestParameters : BillingApiGetBillingSubscriptionRequest , options ?: RawAxiosRequestConfig ) {
836+ return BillingApiFp ( this . configuration ) . getBillingSubscription ( requestParameters . subscriptionId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
837+ }
838+
668839 /**
669840 * List all available products from Paddle Billing API
670841 * @summary List available Paddle Billing products
@@ -688,6 +859,18 @@ export class BillingApi extends BaseAPI {
688859 return BillingApiFp ( this . configuration ) . listBillingSubscriptionTransactions ( requestParameters . subscriptionId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
689860 }
690861
862+ /**
863+ * List all Paddle Billing subscriptions
864+ * @summary List all Paddle Billing subscriptions
865+ * @param {BillingApiListBillingSubscriptionsRequest } requestParameters Request parameters.
866+ * @param {* } [options] Override http request option.
867+ * @throws {RequiredError }
868+ * @memberof BillingApi
869+ */
870+ public listBillingSubscriptions ( requestParameters : BillingApiListBillingSubscriptionsRequest = { } , options ?: RawAxiosRequestConfig ) {
871+ return BillingApiFp ( this . configuration ) . listBillingSubscriptions ( requestParameters . account , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
872+ }
873+
691874 /**
692875 * Preview the cost and details of a Billing subscription before creation
693876 * @summary Preview a Paddle Billing subscription transaction
0 commit comments