conekta/conekta-node

View on GitHub
api/api-keys-api.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
90%
/* 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 { ApiKeyCreateResponse } from '../model';
// @ts-ignore
import { ApiKeyRequest } from '../model';
// @ts-ignore
import { ApiKeyResponse } from '../model';
// @ts-ignore
import { ApiKeyUpdateRequest } from '../model';
// @ts-ignore
import { DeleteApiKeysResponse } from '../model';
// @ts-ignore
import { GetApiKeysResponse } from '../model';
// @ts-ignore
import { ModelError } from '../model';
/**
 * ApiKeysApi - axios parameter creator
 * @export
 */
export const ApiKeysApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create a api key
         * @summary Create Api Key
         * @param {ApiKeyRequest} apiKeyRequest requested field for a api keys
         * @param {CreateApiKeyAcceptLanguageEnum} [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}
         */
        createApiKey: async (apiKeyRequest: ApiKeyRequest, acceptLanguage?: CreateApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'apiKeyRequest' is not null or undefined
            assertParamExists('createApiKey', 'apiKeyRequest', apiKeyRequest)
            const localVarPath = `/api_keys`;
            // 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(apiKeyRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deletes a api key that corresponds to a api key ID
         * @summary Delete Api Key
         * @param {string} id Identifier of the resource
         * @param {DeleteApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteApiKey: async (id: string, acceptLanguage?: DeleteApiKeyAcceptLanguageEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deleteApiKey', 'id', id)
            const localVarPath = `/api_keys/{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,
            };
        },
        /**
         * Gets a api key that corresponds to a api key ID
         * @summary Get Api Key
         * @param {string} id Identifier of the resource
         * @param {GetApiKeyAcceptLanguageEnum} [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}
         */
        getApiKey: async (id: string, acceptLanguage?: GetApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getApiKey', 'id', id)
            const localVarPath = `/api_keys/{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,
            };
        },
        /**
         * Consume the list of api keys you have
         * @summary Get list of Api Keys
         * @param {GetApiKeysAcceptLanguageEnum} [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} [next] next page
         * @param {string} [previous] previous page
         * @param {string} [search] General search, e.g. by id, description, prefix
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKeys: async (acceptLanguage?: GetApiKeysAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api_keys`;
            // 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 (next !== undefined) {
                localVarQueryParameter['next'] = next;
            }

            if (previous !== undefined) {
                localVarQueryParameter['previous'] = previous;
            }

            if (search !== undefined) {
                localVarQueryParameter['search'] = search;
            }

            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,
            };
        },
        /**
         * Update an existing api key
         * @summary Update Api Key
         * @param {string} id Identifier of the resource
         * @param {UpdateApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {ApiKeyUpdateRequest} [apiKeyUpdateRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateApiKey: async (id: string, acceptLanguage?: UpdateApiKeyAcceptLanguageEnum, apiKeyUpdateRequest?: ApiKeyUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('updateApiKey', 'id', id)
            const localVarPath = `/api_keys/{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);
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            localVarRequestOptions.data = serializeDataIfNeeded(apiKeyUpdateRequest, localVarRequestOptions, configuration)

            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ApiKeysApi - functional programming interface
 * @export
 */
export const ApiKeysApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ApiKeysApiAxiosParamCreator(configuration)
    return {
        /**
         * Create a api key
         * @summary Create Api Key
         * @param {ApiKeyRequest} apiKeyRequest requested field for a api keys
         * @param {CreateApiKeyAcceptLanguageEnum} [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 createApiKey(apiKeyRequest: ApiKeyRequest, acceptLanguage?: CreateApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiKeyCreateResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId, options);
            const index = configuration?.serverIndex ?? 0;
            const operationBasePath = operationServerMap['ApiKeysApi.createApiKey']?.[index]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
        },
        /**
         * Deletes a api key that corresponds to a api key ID
         * @summary Delete Api Key
         * @param {string} id Identifier of the resource
         * @param {DeleteApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteApiKey(id: string, acceptLanguage?: DeleteApiKeyAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteApiKeysResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteApiKey(id, acceptLanguage, options);
            const index = configuration?.serverIndex ?? 0;
            const operationBasePath = operationServerMap['ApiKeysApi.deleteApiKey']?.[index]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
        },
        /**
         * Gets a api key that corresponds to a api key ID
         * @summary Get Api Key
         * @param {string} id Identifier of the resource
         * @param {GetApiKeyAcceptLanguageEnum} [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 getApiKey(id: string, acceptLanguage?: GetApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiKeyResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getApiKey(id, acceptLanguage, xChildCompanyId, options);
            const index = configuration?.serverIndex ?? 0;
            const operationBasePath = operationServerMap['ApiKeysApi.getApiKey']?.[index]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
        },
        /**
         * Consume the list of api keys you have
         * @summary Get list of Api Keys
         * @param {GetApiKeysAcceptLanguageEnum} [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} [next] next page
         * @param {string} [previous] previous page
         * @param {string} [search] General search, e.g. by id, description, prefix
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getApiKeys(acceptLanguage?: GetApiKeysAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetApiKeysResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search, options);
            const index = configuration?.serverIndex ?? 0;
            const operationBasePath = operationServerMap['ApiKeysApi.getApiKeys']?.[index]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
        },
        /**
         * Update an existing api key
         * @summary Update Api Key
         * @param {string} id Identifier of the resource
         * @param {UpdateApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {ApiKeyUpdateRequest} [apiKeyUpdateRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateApiKey(id: string, acceptLanguage?: UpdateApiKeyAcceptLanguageEnum, apiKeyUpdateRequest?: ApiKeyUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiKeyResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateApiKey(id, acceptLanguage, apiKeyUpdateRequest, options);
            const index = configuration?.serverIndex ?? 0;
            const operationBasePath = operationServerMap['ApiKeysApi.updateApiKey']?.[index]?.url;
            return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
        },
    }
};

/**
 * ApiKeysApi - factory interface
 * @export
 */
export const ApiKeysApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ApiKeysApiFp(configuration)
    return {
        /**
         * Create a api key
         * @summary Create Api Key
         * @param {ApiKeyRequest} apiKeyRequest requested field for a api keys
         * @param {CreateApiKeyAcceptLanguageEnum} [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}
         */
        createApiKey(apiKeyRequest: ApiKeyRequest, acceptLanguage?: CreateApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<ApiKeyCreateResponse> {
            return localVarFp.createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
        },
        /**
         * Deletes a api key that corresponds to a api key ID
         * @summary Delete Api Key
         * @param {string} id Identifier of the resource
         * @param {DeleteApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteApiKey(id: string, acceptLanguage?: DeleteApiKeyAcceptLanguageEnum, options?: any): AxiosPromise<DeleteApiKeysResponse> {
            return localVarFp.deleteApiKey(id, acceptLanguage, options).then((request) => request(axios, basePath));
        },
        /**
         * Gets a api key that corresponds to a api key ID
         * @summary Get Api Key
         * @param {string} id Identifier of the resource
         * @param {GetApiKeyAcceptLanguageEnum} [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}
         */
        getApiKey(id: string, acceptLanguage?: GetApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<ApiKeyResponse> {
            return localVarFp.getApiKey(id, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
        },
        /**
         * Consume the list of api keys you have
         * @summary Get list of Api Keys
         * @param {GetApiKeysAcceptLanguageEnum} [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} [next] next page
         * @param {string} [previous] previous page
         * @param {string} [search] General search, e.g. by id, description, prefix
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getApiKeys(acceptLanguage?: GetApiKeysAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: any): AxiosPromise<GetApiKeysResponse> {
            return localVarFp.getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search, options).then((request) => request(axios, basePath));
        },
        /**
         * Update an existing api key
         * @summary Update Api Key
         * @param {string} id Identifier of the resource
         * @param {UpdateApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
         * @param {ApiKeyUpdateRequest} [apiKeyUpdateRequest] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateApiKey(id: string, acceptLanguage?: UpdateApiKeyAcceptLanguageEnum, apiKeyUpdateRequest?: ApiKeyUpdateRequest, options?: any): AxiosPromise<ApiKeyResponse> {
            return localVarFp.updateApiKey(id, acceptLanguage, apiKeyUpdateRequest, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * ApiKeysApi - interface
 * @export
 * @interface ApiKeysApi
 */
export interface ApiKeysApiInterface {
    /**
     * Create a api key
     * @summary Create Api Key
     * @param {ApiKeyRequest} apiKeyRequest requested field for a api keys
     * @param {CreateApiKeyAcceptLanguageEnum} [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 ApiKeysApiInterface
     */
    createApiKey(apiKeyRequest: ApiKeyRequest, acceptLanguage?: CreateApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiKeyCreateResponse>;

    /**
     * Deletes a api key that corresponds to a api key ID
     * @summary Delete Api Key
     * @param {string} id Identifier of the resource
     * @param {DeleteApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApiInterface
     */
    deleteApiKey(id: string, acceptLanguage?: DeleteApiKeyAcceptLanguageEnum, options?: RawAxiosRequestConfig): AxiosPromise<DeleteApiKeysResponse>;

    /**
     * Gets a api key that corresponds to a api key ID
     * @summary Get Api Key
     * @param {string} id Identifier of the resource
     * @param {GetApiKeyAcceptLanguageEnum} [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 ApiKeysApiInterface
     */
    getApiKey(id: string, acceptLanguage?: GetApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<ApiKeyResponse>;

    /**
     * Consume the list of api keys you have
     * @summary Get list of Api Keys
     * @param {GetApiKeysAcceptLanguageEnum} [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} [next] next page
     * @param {string} [previous] previous page
     * @param {string} [search] General search, e.g. by id, description, prefix
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApiInterface
     */
    getApiKeys(acceptLanguage?: GetApiKeysAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetApiKeysResponse>;

    /**
     * Update an existing api key
     * @summary Update Api Key
     * @param {string} id Identifier of the resource
     * @param {UpdateApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
     * @param {ApiKeyUpdateRequest} [apiKeyUpdateRequest] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApiInterface
     */
    updateApiKey(id: string, acceptLanguage?: UpdateApiKeyAcceptLanguageEnum, apiKeyUpdateRequest?: ApiKeyUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiKeyResponse>;

}

/**
 * ApiKeysApi - object-oriented interface
 * @export
 * @class ApiKeysApi
 * @extends {BaseAPI}
 */
export class ApiKeysApi extends BaseAPI implements ApiKeysApiInterface {
    /**
     * Create a api key
     * @summary Create Api Key
     * @param {ApiKeyRequest} apiKeyRequest requested field for a api keys
     * @param {CreateApiKeyAcceptLanguageEnum} [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 ApiKeysApi
     */
    public createApiKey(apiKeyRequest: ApiKeyRequest, acceptLanguage?: CreateApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
        return ApiKeysApiFp(this.configuration).createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deletes a api key that corresponds to a api key ID
     * @summary Delete Api Key
     * @param {string} id Identifier of the resource
     * @param {DeleteApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApi
     */
    public deleteApiKey(id: string, acceptLanguage?: DeleteApiKeyAcceptLanguageEnum, options?: RawAxiosRequestConfig) {
        return ApiKeysApiFp(this.configuration).deleteApiKey(id, acceptLanguage, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Gets a api key that corresponds to a api key ID
     * @summary Get Api Key
     * @param {string} id Identifier of the resource
     * @param {GetApiKeyAcceptLanguageEnum} [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 ApiKeysApi
     */
    public getApiKey(id: string, acceptLanguage?: GetApiKeyAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
        return ApiKeysApiFp(this.configuration).getApiKey(id, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Consume the list of api keys you have
     * @summary Get list of Api Keys
     * @param {GetApiKeysAcceptLanguageEnum} [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} [next] next page
     * @param {string} [previous] previous page
     * @param {string} [search] General search, e.g. by id, description, prefix
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApi
     */
    public getApiKeys(acceptLanguage?: GetApiKeysAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, next?: string, previous?: string, search?: string, options?: RawAxiosRequestConfig) {
        return ApiKeysApiFp(this.configuration).getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update an existing api key
     * @summary Update Api Key
     * @param {string} id Identifier of the resource
     * @param {UpdateApiKeyAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use
     * @param {ApiKeyUpdateRequest} [apiKeyUpdateRequest] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ApiKeysApi
     */
    public updateApiKey(id: string, acceptLanguage?: UpdateApiKeyAcceptLanguageEnum, apiKeyUpdateRequest?: ApiKeyUpdateRequest, options?: RawAxiosRequestConfig) {
        return ApiKeysApiFp(this.configuration).updateApiKey(id, acceptLanguage, apiKeyUpdateRequest, options).then((request) => request(this.axios, this.basePath));
    }
}

/**
 * @export
 */
export const CreateApiKeyAcceptLanguageEnum = {
    es: 'es',
    en: 'en'
} as const;
export type CreateApiKeyAcceptLanguageEnum = typeof CreateApiKeyAcceptLanguageEnum[keyof typeof CreateApiKeyAcceptLanguageEnum];
/**
 * @export
 */
export const DeleteApiKeyAcceptLanguageEnum = {
    es: 'es',
    en: 'en'
} as const;
export type DeleteApiKeyAcceptLanguageEnum = typeof DeleteApiKeyAcceptLanguageEnum[keyof typeof DeleteApiKeyAcceptLanguageEnum];
/**
 * @export
 */
export const GetApiKeyAcceptLanguageEnum = {
    es: 'es',
    en: 'en'
} as const;
export type GetApiKeyAcceptLanguageEnum = typeof GetApiKeyAcceptLanguageEnum[keyof typeof GetApiKeyAcceptLanguageEnum];
/**
 * @export
 */
export const GetApiKeysAcceptLanguageEnum = {
    es: 'es',
    en: 'en'
} as const;
export type GetApiKeysAcceptLanguageEnum = typeof GetApiKeysAcceptLanguageEnum[keyof typeof GetApiKeysAcceptLanguageEnum];
/**
 * @export
 */
export const UpdateApiKeyAcceptLanguageEnum = {
    es: 'es',
    en: 'en'
} as const;
export type UpdateApiKeyAcceptLanguageEnum = typeof UpdateApiKeyAcceptLanguageEnum[keyof typeof UpdateApiKeyAcceptLanguageEnum];