api/plans-api.ts
/* tslint:disable */
/* eslint-disable */
/**
* Conekta API
* Conekta sdk
*
* The version of the OpenAPI document: 2.1.0
* Contact: engineering@conekta.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import { GetPlansResponse } from '../model';
// @ts-ignore
import { ModelError } from '../model';
// @ts-ignore
import { PlanRequest } from '../model';
// @ts-ignore
import { PlanResponse } from '../model';
// @ts-ignore
import { PlanUpdateRequest } from '../model';
/**
* PlansApi - axios parameter creator
* @export
*/
export const PlansApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Create a new plan for an existing order
* @summary Create Plan
* @param {PlanRequest} planRequest requested field for plan
* @param {CreatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPlan: async (planRequest: PlanRequest, acceptLanguage?: CreatePlanAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'planRequest' is not null or undefined
assertParamExists('createPlan', 'planRequest', planRequest)
const localVarPath = `/plans`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (acceptLanguage != null) {
localVarHeaderParameter['Accept-Language'] = String(acceptLanguage);
}
if (xChildCompanyId != null) {
localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(planRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Delete Plan
* @param {string} id Identifier of the resource
* @param {DeletePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePlan: async (id: string, acceptLanguage?: DeletePlanAcceptLanguageEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deletePlan', 'id', id)
const localVarPath = `/plans/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (acceptLanguage != null) {
localVarHeaderParameter['Accept-Language'] = String(acceptLanguage);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get Plan
* @param {string} id Identifier of the resource
* @param {GetPlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlan: async (id: string, acceptLanguage?: GetPlanAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getPlan', 'id', id)
const localVarPath = `/plans/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (acceptLanguage != null) {
localVarHeaderParameter['Accept-Language'] = String(acceptLanguage);
}
if (xChildCompanyId != null) {
localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Get A List of Plans
* @param {GetPlansAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {number} [limit] The numbers of items to return, the maximum value is 250
* @param {string} [search] General order search, e.g. by mail, reference etc.
* @param {string} [next] next page
* @param {string} [previous] previous page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlans: async (acceptLanguage?: GetPlansAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/plans`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (next !== undefined) {
localVarQueryParameter['next'] = next;
}
if (previous !== undefined) {
localVarQueryParameter['previous'] = previous;
}
if (acceptLanguage != null) {
localVarHeaderParameter['Accept-Language'] = String(acceptLanguage);
}
if (xChildCompanyId != null) {
localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Update Plan
* @param {string} id Identifier of the resource
* @param {PlanUpdateRequest} planUpdateRequest requested field for plan
* @param {UpdatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlan: async (id: string, planUpdateRequest: PlanUpdateRequest, acceptLanguage?: UpdatePlanAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('updatePlan', 'id', id)
// verify required parameter 'planUpdateRequest' is not null or undefined
assertParamExists('updatePlan', 'planUpdateRequest', planUpdateRequest)
const localVarPath = `/plans/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (acceptLanguage != null) {
localVarHeaderParameter['Accept-Language'] = String(acceptLanguage);
}
if (xChildCompanyId != null) {
localVarHeaderParameter['X-Child-Company-Id'] = String(xChildCompanyId);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(planUpdateRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* PlansApi - functional programming interface
* @export
*/
export const PlansApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = PlansApiAxiosParamCreator(configuration)
return {
/**
* Create a new plan for an existing order
* @summary Create Plan
* @param {PlanRequest} planRequest requested field for plan
* @param {CreatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createPlan(planRequest: PlanRequest, acceptLanguage?: CreatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createPlan(planRequest, acceptLanguage, xChildCompanyId, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['PlansApi.createPlan']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
*
* @summary Delete Plan
* @param {string} id Identifier of the resource
* @param {DeletePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deletePlan(id: string, acceptLanguage?: DeletePlanAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePlan(id, acceptLanguage, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['PlansApi.deletePlan']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
*
* @summary Get Plan
* @param {string} id Identifier of the resource
* @param {GetPlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getPlan(id: string, acceptLanguage?: GetPlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlan(id, acceptLanguage, xChildCompanyId, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['PlansApi.getPlan']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
*
* @summary Get A List of Plans
* @param {GetPlansAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {number} [limit] The numbers of items to return, the maximum value is 250
* @param {string} [search] General order search, e.g. by mail, reference etc.
* @param {string} [next] next page
* @param {string} [previous] previous page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getPlans(acceptLanguage?: GetPlansAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPlansResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPlans(acceptLanguage, xChildCompanyId, limit, search, next, previous, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['PlansApi.getPlans']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
*
* @summary Update Plan
* @param {string} id Identifier of the resource
* @param {PlanUpdateRequest} planUpdateRequest requested field for plan
* @param {UpdatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updatePlan(id: string, planUpdateRequest: PlanUpdateRequest, acceptLanguage?: UpdatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PlanResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePlan(id, planUpdateRequest, acceptLanguage, xChildCompanyId, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['PlansApi.updatePlan']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
}
};
/**
* PlansApi - factory interface
* @export
*/
export const PlansApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = PlansApiFp(configuration)
return {
/**
* Create a new plan for an existing order
* @summary Create Plan
* @param {PlanRequest} planRequest requested field for plan
* @param {CreatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createPlan(planRequest: PlanRequest, acceptLanguage?: CreatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<PlanResponse> {
return localVarFp.createPlan(planRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Delete Plan
* @param {string} id Identifier of the resource
* @param {DeletePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePlan(id: string, acceptLanguage?: DeletePlanAcceptLanguageEnum, options?: any): AxiosPromise<PlanResponse> {
return localVarFp.deletePlan(id, acceptLanguage, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get Plan
* @param {string} id Identifier of the resource
* @param {GetPlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlan(id: string, acceptLanguage?: GetPlanAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<PlanResponse> {
return localVarFp.getPlan(id, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Get A List of Plans
* @param {GetPlansAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {number} [limit] The numbers of items to return, the maximum value is 250
* @param {string} [search] General order search, e.g. by mail, reference etc.
* @param {string} [next] next page
* @param {string} [previous] previous page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPlans(acceptLanguage?: GetPlansAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: any): AxiosPromise<GetPlansResponse> {
return localVarFp.getPlans(acceptLanguage, xChildCompanyId, limit, search, next, previous, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Update Plan
* @param {string} id Identifier of the resource
* @param {PlanUpdateRequest} planUpdateRequest requested field for plan
* @param {UpdatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updatePlan(id: string, planUpdateRequest: PlanUpdateRequest, acceptLanguage?: UpdatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<PlanResponse> {
return localVarFp.updatePlan(id, planUpdateRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
},
};
};
/**
* PlansApi - interface
* @export
* @interface PlansApi
*/
export interface PlansApiInterface {
/**
* Create a new plan for an existing order
* @summary Create Plan
* @param {PlanRequest} planRequest requested field for plan
* @param {CreatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApiInterface
*/
createPlan(planRequest: PlanRequest, acceptLanguage?: CreatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PlanResponse>;
/**
*
* @summary Delete Plan
* @param {string} id Identifier of the resource
* @param {DeletePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApiInterface
*/
deletePlan(id: string, acceptLanguage?: DeletePlanAcceptLanguageEnum, options?: RawAxiosRequestConfig): AxiosPromise<PlanResponse>;
/**
*
* @summary Get Plan
* @param {string} id Identifier of the resource
* @param {GetPlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApiInterface
*/
getPlan(id: string, acceptLanguage?: GetPlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PlanResponse>;
/**
*
* @summary Get A List of Plans
* @param {GetPlansAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {number} [limit] The numbers of items to return, the maximum value is 250
* @param {string} [search] General order search, e.g. by mail, reference etc.
* @param {string} [next] next page
* @param {string} [previous] previous page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApiInterface
*/
getPlans(acceptLanguage?: GetPlansAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetPlansResponse>;
/**
*
* @summary Update Plan
* @param {string} id Identifier of the resource
* @param {PlanUpdateRequest} planUpdateRequest requested field for plan
* @param {UpdatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApiInterface
*/
updatePlan(id: string, planUpdateRequest: PlanUpdateRequest, acceptLanguage?: UpdatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<PlanResponse>;
}
/**
* PlansApi - object-oriented interface
* @export
* @class PlansApi
* @extends {BaseAPI}
*/
export class PlansApi extends BaseAPI implements PlansApiInterface {
/**
* Create a new plan for an existing order
* @summary Create Plan
* @param {PlanRequest} planRequest requested field for plan
* @param {CreatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApi
*/
public createPlan(planRequest: PlanRequest, acceptLanguage?: CreatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
return PlansApiFp(this.configuration).createPlan(planRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Delete Plan
* @param {string} id Identifier of the resource
* @param {DeletePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApi
*/
public deletePlan(id: string, acceptLanguage?: DeletePlanAcceptLanguageEnum, options?: RawAxiosRequestConfig) {
return PlansApiFp(this.configuration).deletePlan(id, acceptLanguage, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get Plan
* @param {string} id Identifier of the resource
* @param {GetPlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApi
*/
public getPlan(id: string, acceptLanguage?: GetPlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
return PlansApiFp(this.configuration).getPlan(id, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Get A List of Plans
* @param {GetPlansAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {number} [limit] The numbers of items to return, the maximum value is 250
* @param {string} [search] General order search, e.g. by mail, reference etc.
* @param {string} [next] next page
* @param {string} [previous] previous page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApi
*/
public getPlans(acceptLanguage?: GetPlansAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig) {
return PlansApiFp(this.configuration).getPlans(acceptLanguage, xChildCompanyId, limit, search, next, previous, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Update Plan
* @param {string} id Identifier of the resource
* @param {PlanUpdateRequest} planUpdateRequest requested field for plan
* @param {UpdatePlanAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
* @param {string} [xChildCompanyId] In the case of a holding company, the company id of the child company to which will process the request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PlansApi
*/
public updatePlan(id: string, planUpdateRequest: PlanUpdateRequest, acceptLanguage?: UpdatePlanAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
return PlansApiFp(this.configuration).updatePlan(id, planUpdateRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
}
}
/**
* @export
*/
export const CreatePlanAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type CreatePlanAcceptLanguageEnum = typeof CreatePlanAcceptLanguageEnum[keyof typeof CreatePlanAcceptLanguageEnum];
/**
* @export
*/
export const DeletePlanAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type DeletePlanAcceptLanguageEnum = typeof DeletePlanAcceptLanguageEnum[keyof typeof DeletePlanAcceptLanguageEnum];
/**
* @export
*/
export const GetPlanAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type GetPlanAcceptLanguageEnum = typeof GetPlanAcceptLanguageEnum[keyof typeof GetPlanAcceptLanguageEnum];
/**
* @export
*/
export const GetPlansAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type GetPlansAcceptLanguageEnum = typeof GetPlansAcceptLanguageEnum[keyof typeof GetPlansAcceptLanguageEnum];
/**
* @export
*/
export const UpdatePlanAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type UpdatePlanAcceptLanguageEnum = typeof UpdatePlanAcceptLanguageEnum[keyof typeof UpdatePlanAcceptLanguageEnum];