UNPKG

digitalfemsa

Version:
417 lines (416 loc) 24.1 kB
/** * Femsa API * Femsa sdk * * The version of the OpenAPI document: 2.1.0 * Contact: engineering@femsa.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 { RequestArgs, BaseAPI } from '../base'; import { GetWebhooksResponse } from '../model'; import { WebhookRequest } from '../model'; import { WebhookResponse } from '../model'; import { WebhookUpdateRequest } from '../model'; /** * WebhooksApi - axios parameter creator * @export */ export declare const WebhooksApiAxiosParamCreator: (configuration?: Configuration) => { /** * What we do at Femsa translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc. * @summary Create Webhook * @param {WebhookRequest} webhookRequest requested field for webhook * @param {CreateWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWebhook: (webhookRequest: WebhookRequest, acceptLanguage?: CreateWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Delete Webhook * @param {string} id Identifier of the resource * @param {DeleteWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhook: (id: string, acceptLanguage?: DeleteWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get Webhook * @param {string} id Identifier of the resource * @param {GetWebhookAcceptLanguageEnum} [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} */ getWebhook: (id: string, acceptLanguage?: GetWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing) * @summary Get List of Webhooks * @param {GetWebhooksAcceptLanguageEnum} [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} */ getWebhooks: (acceptLanguage?: GetWebhooksAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Send a webhook.ping event * @summary Test Webhook * @param {string} id Identifier of the resource * @param {TestWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ testWebhook: (id: string, acceptLanguage?: TestWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * updates an existing webhook * @summary Update Webhook * @param {string} id Identifier of the resource * @param {WebhookUpdateRequest} webhookUpdateRequest requested fields in order to update a webhook * @param {UpdateWebhookAcceptLanguageEnum} [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} */ updateWebhook: (id: string, webhookUpdateRequest: WebhookUpdateRequest, acceptLanguage?: UpdateWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * WebhooksApi - functional programming interface * @export */ export declare const WebhooksApiFp: (configuration?: Configuration) => { /** * What we do at Femsa translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc. * @summary Create Webhook * @param {WebhookRequest} webhookRequest requested field for webhook * @param {CreateWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWebhook(webhookRequest: WebhookRequest, acceptLanguage?: CreateWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookResponse>>; /** * * @summary Delete Webhook * @param {string} id Identifier of the resource * @param {DeleteWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhook(id: string, acceptLanguage?: DeleteWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookResponse>>; /** * * @summary Get Webhook * @param {string} id Identifier of the resource * @param {GetWebhookAcceptLanguageEnum} [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} */ getWebhook(id: string, acceptLanguage?: GetWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookResponse>>; /** * Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing) * @summary Get List of Webhooks * @param {GetWebhooksAcceptLanguageEnum} [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} */ getWebhooks(acceptLanguage?: GetWebhooksAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetWebhooksResponse>>; /** * Send a webhook.ping event * @summary Test Webhook * @param {string} id Identifier of the resource * @param {TestWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ testWebhook(id: string, acceptLanguage?: TestWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookResponse>>; /** * updates an existing webhook * @summary Update Webhook * @param {string} id Identifier of the resource * @param {WebhookUpdateRequest} webhookUpdateRequest requested fields in order to update a webhook * @param {UpdateWebhookAcceptLanguageEnum} [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} */ updateWebhook(id: string, webhookUpdateRequest: WebhookUpdateRequest, acceptLanguage?: UpdateWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookResponse>>; }; /** * WebhooksApi - factory interface * @export */ export declare const WebhooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * What we do at Femsa translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc. * @summary Create Webhook * @param {WebhookRequest} webhookRequest requested field for webhook * @param {CreateWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWebhook(webhookRequest: WebhookRequest, acceptLanguage?: CreateWebhookAcceptLanguageEnum, options?: any): AxiosPromise<WebhookResponse>; /** * * @summary Delete Webhook * @param {string} id Identifier of the resource * @param {DeleteWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteWebhook(id: string, acceptLanguage?: DeleteWebhookAcceptLanguageEnum, options?: any): AxiosPromise<WebhookResponse>; /** * * @summary Get Webhook * @param {string} id Identifier of the resource * @param {GetWebhookAcceptLanguageEnum} [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} */ getWebhook(id: string, acceptLanguage?: GetWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<WebhookResponse>; /** * Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing) * @summary Get List of Webhooks * @param {GetWebhooksAcceptLanguageEnum} [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} */ getWebhooks(acceptLanguage?: GetWebhooksAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: any): AxiosPromise<GetWebhooksResponse>; /** * Send a webhook.ping event * @summary Test Webhook * @param {string} id Identifier of the resource * @param {TestWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} */ testWebhook(id: string, acceptLanguage?: TestWebhookAcceptLanguageEnum, options?: any): AxiosPromise<WebhookResponse>; /** * updates an existing webhook * @summary Update Webhook * @param {string} id Identifier of the resource * @param {WebhookUpdateRequest} webhookUpdateRequest requested fields in order to update a webhook * @param {UpdateWebhookAcceptLanguageEnum} [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} */ updateWebhook(id: string, webhookUpdateRequest: WebhookUpdateRequest, acceptLanguage?: UpdateWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<WebhookResponse>; }; /** * WebhooksApi - interface * @export * @interface WebhooksApi */ export interface WebhooksApiInterface { /** * What we do at Femsa translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc. * @summary Create Webhook * @param {WebhookRequest} webhookRequest requested field for webhook * @param {CreateWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApiInterface */ createWebhook(webhookRequest: WebhookRequest, acceptLanguage?: CreateWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): AxiosPromise<WebhookResponse>; /** * * @summary Delete Webhook * @param {string} id Identifier of the resource * @param {DeleteWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApiInterface */ deleteWebhook(id: string, acceptLanguage?: DeleteWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): AxiosPromise<WebhookResponse>; /** * * @summary Get Webhook * @param {string} id Identifier of the resource * @param {GetWebhookAcceptLanguageEnum} [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 WebhooksApiInterface */ getWebhook(id: string, acceptLanguage?: GetWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookResponse>; /** * Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing) * @summary Get List of Webhooks * @param {GetWebhooksAcceptLanguageEnum} [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 WebhooksApiInterface */ getWebhooks(acceptLanguage?: GetWebhooksAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetWebhooksResponse>; /** * Send a webhook.ping event * @summary Test Webhook * @param {string} id Identifier of the resource * @param {TestWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApiInterface */ testWebhook(id: string, acceptLanguage?: TestWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): AxiosPromise<WebhookResponse>; /** * updates an existing webhook * @summary Update Webhook * @param {string} id Identifier of the resource * @param {WebhookUpdateRequest} webhookUpdateRequest requested fields in order to update a webhook * @param {UpdateWebhookAcceptLanguageEnum} [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 WebhooksApiInterface */ updateWebhook(id: string, webhookUpdateRequest: WebhookUpdateRequest, acceptLanguage?: UpdateWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookResponse>; } /** * WebhooksApi - object-oriented interface * @export * @class WebhooksApi * @extends {BaseAPI} */ export declare class WebhooksApi extends BaseAPI implements WebhooksApiInterface { /** * What we do at Femsa translates into events. For example, an event of interest to us occurs at the time a payment is successfully processed. At that moment we will be interested in doing several things: Send an email to the buyer, generate an invoice, start the process of shipping the product, etc. * @summary Create Webhook * @param {WebhookRequest} webhookRequest requested field for webhook * @param {CreateWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApi */ createWebhook(webhookRequest: WebhookRequest, acceptLanguage?: CreateWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookResponse, any>>; /** * * @summary Delete Webhook * @param {string} id Identifier of the resource * @param {DeleteWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApi */ deleteWebhook(id: string, acceptLanguage?: DeleteWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookResponse, any>>; /** * * @summary Get Webhook * @param {string} id Identifier of the resource * @param {GetWebhookAcceptLanguageEnum} [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 WebhooksApi */ getWebhook(id: string, acceptLanguage?: GetWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookResponse, any>>; /** * Consume the list of webhooks you have, each environment supports 10 webhooks (For production and testing) * @summary Get List of Webhooks * @param {GetWebhooksAcceptLanguageEnum} [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 WebhooksApi */ getWebhooks(acceptLanguage?: GetWebhooksAcceptLanguageEnum, xChildCompanyId?: string, limit?: number, search?: string, next?: string, previous?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetWebhooksResponse, any>>; /** * Send a webhook.ping event * @summary Test Webhook * @param {string} id Identifier of the resource * @param {TestWebhookAcceptLanguageEnum} [acceptLanguage] Use for knowing which language to use * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApi */ testWebhook(id: string, acceptLanguage?: TestWebhookAcceptLanguageEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookResponse, any>>; /** * updates an existing webhook * @summary Update Webhook * @param {string} id Identifier of the resource * @param {WebhookUpdateRequest} webhookUpdateRequest requested fields in order to update a webhook * @param {UpdateWebhookAcceptLanguageEnum} [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 WebhooksApi */ updateWebhook(id: string, webhookUpdateRequest: WebhookUpdateRequest, acceptLanguage?: UpdateWebhookAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookResponse, any>>; } /** * @export */ export declare const CreateWebhookAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type CreateWebhookAcceptLanguageEnum = typeof CreateWebhookAcceptLanguageEnum[keyof typeof CreateWebhookAcceptLanguageEnum]; /** * @export */ export declare const DeleteWebhookAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type DeleteWebhookAcceptLanguageEnum = typeof DeleteWebhookAcceptLanguageEnum[keyof typeof DeleteWebhookAcceptLanguageEnum]; /** * @export */ export declare const GetWebhookAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type GetWebhookAcceptLanguageEnum = typeof GetWebhookAcceptLanguageEnum[keyof typeof GetWebhookAcceptLanguageEnum]; /** * @export */ export declare const GetWebhooksAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type GetWebhooksAcceptLanguageEnum = typeof GetWebhooksAcceptLanguageEnum[keyof typeof GetWebhooksAcceptLanguageEnum]; /** * @export */ export declare const TestWebhookAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type TestWebhookAcceptLanguageEnum = typeof TestWebhookAcceptLanguageEnum[keyof typeof TestWebhookAcceptLanguageEnum]; /** * @export */ export declare const UpdateWebhookAcceptLanguageEnum: { readonly es: "es"; readonly en: "en"; }; export type UpdateWebhookAcceptLanguageEnum = typeof UpdateWebhookAcceptLanguageEnum[keyof typeof UpdateWebhookAcceptLanguageEnum];