Skip to content

Commit

Permalink
AI-125: Regenerate SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
nicocedron committed Dec 17, 2024
1 parent 32c73d2 commit 0957feb
Show file tree
Hide file tree
Showing 120 changed files with 1,336 additions and 1,974 deletions.
56 changes: 13 additions & 43 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ api/logs-api.ts
api/orders-api.ts
api/payment-link-api.ts
api/payment-methods-api.ts
api/payout-orders-api.ts
api/plans-api.ts
api/products-api.ts
api/shipping-contacts-api.ts
Expand All @@ -34,7 +35,6 @@ common.ts
conekta.png
configuration.ts
index.ts
model/api-key-create-response-all-of.ts
model/api-key-create-response.ts
model/api-key-request.ts
model/api-key-response-on-delete.ts
Expand All @@ -43,33 +43,29 @@ model/api-key-update-request.ts
model/balance-common-field.ts
model/balance-response.ts
model/blacklist-rule-response.ts
model/charge-data-payment-method-bank-transfer-response.ts
model/charge-data-payment-method-card-response.ts
model/charge-data-payment-method-cash-response.ts
model/charge-order-response-payment-method.ts
model/charge-order-response.ts
model/charge-request-payment-method.ts
model/charge-request.ts
model/charge-response-channel.ts
model/charge-response-payment-method.ts
model/charge-response-refunds-all-of.ts
model/charge-response-refunds-data.ts
model/charge-response-refunds.ts
model/charge-response.ts
model/charge-update-request.ts
model/charges-data-response.ts
model/charges-order-response-all-of-data.ts
model/charges-order-response.ts
model/checkout-order-template-customer-info.ts
model/checkout-order-template.ts
model/checkout-request.ts
model/checkout-response.ts
model/checkout.ts
model/checkouts-response-all-of.ts
model/checkouts-response.ts
model/company-fiscal-info-address-response.ts
model/company-fiscal-info-response.ts
model/company-payout-destination-response.ts
model/company-response.ts
model/create-customer-fiscal-entities-response-all-of.ts
model/create-customer-fiscal-entities-response.ts
model/create-customer-payment-methods-request.ts
model/create-customer-payment-methods-response.ts
Expand All @@ -78,9 +74,7 @@ model/customer-address.ts
model/customer-antifraud-info-response.ts
model/customer-antifraud-info.ts
model/customer-fiscal-entities-data-response.ts
model/customer-fiscal-entities-request-address.ts
model/customer-fiscal-entities-request.ts
model/customer-fiscal-entities-response-all-of.ts
model/customer-fiscal-entities-response.ts
model/customer-info-just-customer-id-response.ts
model/customer-info-just-customer-id.ts
Expand All @@ -89,58 +83,41 @@ model/customer-payment-method-request.ts
model/customer-payment-methods-data.ts
model/customer-payment-methods-request.ts
model/customer-payment-methods-response.ts
model/customer-payment-methods.ts
model/customer-response-shipping-contacts-all-of.ts
model/customer-response-shipping-contacts.ts
model/customer-response.ts
model/customer-shipping-contacts-address.ts
model/customer-shipping-contacts-data-response-all-of.ts
model/customer-shipping-contacts-data-response.ts
model/customer-shipping-contacts-response-address.ts
model/customer-shipping-contacts-response.ts
model/customer-shipping-contacts.ts
model/customer-update-fiscal-entities-request.ts
model/customer-update-shipping-contacts.ts
model/customer.ts
model/customers-response-all-of.ts
model/customers-response.ts
model/delete-api-keys-response-all-of.ts
model/delete-api-keys-response.ts
model/deleted-blacklist-rule-response.ts
model/deleted-whitelist-rule-response.ts
model/details-error.ts
model/details.ts
model/discount-lines-data-response.ts
model/discount-lines-response-all-of.ts
model/discount-lines-response.ts
model/email-checkout-request.ts
model/error-all-of.ts
model/event-response.ts
model/event-types.ts
model/events-resend-response.ts
model/fiscal-entity-address.ts
model/get-api-keys-response-all-of.ts
model/get-api-keys-response.ts
model/get-charges-response-all-of.ts
model/get-charges-response.ts
model/get-companies-response-all-of.ts
model/get-companies-response.ts
model/get-customer-payment-method-data-response.ts
model/get-events-response-all-of.ts
model/get-events-response.ts
model/get-order-discount-lines-response-all-of.ts
model/get-order-discount-lines-response.ts
model/get-orders-response.ts
model/get-payment-method-response-all-of.ts
model/get-payment-method-response.ts
model/get-plans-response-all-of.ts
model/get-plans-response.ts
model/get-transactions-response-all-of.ts
model/get-transactions-response.ts
model/get-transfers-response-all-of.ts
model/get-transfers-response.ts
model/get-webhook-keys-response-all-of.ts
model/get-webhook-keys-response.ts
model/get-webhooks-response-all-of.ts
model/get-webhooks-response.ts
model/index.ts
model/log-response.ts
Expand All @@ -150,7 +127,6 @@ model/model-error.ts
model/order-capture-request.ts
model/order-customer-info-response.ts
model/order-discount-lines-request.ts
model/order-fiscal-entity-address-response-all-of.ts
model/order-fiscal-entity-address-response.ts
model/order-fiscal-entity-request.ts
model/order-fiscal-entity-response.ts
Expand All @@ -159,16 +135,11 @@ model/order-next-action-response.ts
model/order-refund-request.ts
model/order-request-customer-info.ts
model/order-request.ts
model/order-response-charges-all-of.ts
model/order-response-charges.ts
model/order-response-checkout.ts
model/order-response-customer-info-all-of.ts
model/order-response-customer-info.ts
model/order-response-discount-lines-all-of.ts
model/order-response-discount-lines.ts
model/order-response-products-all-of.ts
model/order-response-products.ts
model/order-response-shipping-contact-all-of.ts
model/order-response-shipping-contact.ts
model/order-response.ts
model/order-tax-request.ts
Expand All @@ -179,32 +150,33 @@ model/orders-response.ts
model/page.ts
model/pagination.ts
model/payment-method-bank-transfer.ts
model/payment-method-card-request-all-of.ts
model/payment-method-card-request.ts
model/payment-method-card-response-all-of.ts
model/payment-method-card-response.ts
model/payment-method-card.ts
model/payment-method-cash-request-all-of.ts
model/payment-method-cash-request.ts
model/payment-method-cash-response-all-of.ts
model/payment-method-cash-response.ts
model/payment-method-cash.ts
model/payment-method-general-request.ts
model/payment-method-response.ts
model/payment-method-spei-recurrent-all-of.ts
model/payment-method-spei-recurrent.ts
model/payment-method-spei-request.ts
model/payment-method-token-request.ts
model/payment-method.ts
model/payout-method.ts
model/payout-order-payouts-item.ts
model/payout-order-response-customer-info.ts
model/payout-order-response.ts
model/payout-order.ts
model/payout-orders-response.ts
model/payout.ts
model/plan-request.ts
model/plan-response.ts
model/plan-update-request.ts
model/product-data-response-all-of.ts
model/product-data-response.ts
model/product-order-response-all-of.ts
model/product-order-response.ts
model/product.ts
model/risk-rules-data.ts
model/risk-rules-list.ts
model/risk-rules.ts
model/shipping-order-response.ts
model/shipping-request.ts
model/sms-checkout-request.ts
Expand All @@ -223,13 +195,11 @@ model/transfer-method-response.ts
model/transfer-response.ts
model/transfers-response.ts
model/update-customer-antifraud-info.ts
model/update-customer-fiscal-entities-response-all-of.ts
model/update-customer-fiscal-entities-response.ts
model/update-customer-payment-methods-response.ts
model/update-customer.ts
model/update-order-discount-lines-request.ts
model/update-order-tax-request.ts
model/update-order-tax-response-all-of.ts
model/update-order-tax-response.ts
model/update-payment-methods.ts
model/update-product.ts
Expand Down
1 change: 1 addition & 0 deletions api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export * from './api/logs-api';
export * from './api/orders-api';
export * from './api/payment-link-api';
export * from './api/payment-methods-api';
export * from './api/payout-orders-api';
export * from './api/plans-api';
export * from './api/products-api';
export * from './api/shipping-contacts-api';
Expand Down
121 changes: 121 additions & 0 deletions api/charges-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { ChargeResponse } from '../model';
// @ts-ignore
import { ChargeUpdateRequest } from '../model';
// @ts-ignore
import { ChargesOrderResponse } from '../model';
// @ts-ignore
import { GetChargesResponse } from '../model';
// @ts-ignore
import { ModelError } from '../model';
Expand Down Expand Up @@ -145,6 +147,60 @@ export const ChargesApiAxiosParamCreator = function (configuration?: Configurati



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

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

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Create charges for an existing orden
* @summary Create charges
* @param {string} id Identifier of the resource
* @param {ChargeRequest} chargeRequest requested field for a charge
* @param {OrdersCreateChargesAcceptLanguageEnum} [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}
*/
ordersCreateCharges: async (id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargesAcceptLanguageEnum, xChildCompanyId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('ordersCreateCharges', 'id', id)
// verify required parameter 'chargeRequest' is not null or undefined
assertParamExists('ordersCreateCharges', 'chargeRequest', chargeRequest)
const localVarPath = `/orders/{id}/add_charges`
.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: '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);
Expand Down Expand Up @@ -255,6 +311,22 @@ export const ChargesApiFp = function(configuration?: Configuration) {
const operationBasePath = operationServerMap['ChargesApi.ordersCreateCharge']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
* Create charges for an existing orden
* @summary Create charges
* @param {string} id Identifier of the resource
* @param {ChargeRequest} chargeRequest requested field for a charge
* @param {OrdersCreateChargesAcceptLanguageEnum} [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 ordersCreateCharges(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargesAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChargesOrderResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId, options);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['ChargesApi.ordersCreateCharges']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},
/**
*
* @summary Update a charge
Expand Down Expand Up @@ -309,6 +381,19 @@ export const ChargesApiFactory = function (configuration?: Configuration, basePa
ordersCreateCharge(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargeAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<ChargeOrderResponse> {
return localVarFp.ordersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
},
/**
* Create charges for an existing orden
* @summary Create charges
* @param {string} id Identifier of the resource
* @param {ChargeRequest} chargeRequest requested field for a charge
* @param {OrdersCreateChargesAcceptLanguageEnum} [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}
*/
ordersCreateCharges(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargesAcceptLanguageEnum, xChildCompanyId?: string, options?: any): AxiosPromise<ChargesOrderResponse> {
return localVarFp.ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Update a charge
Expand Down Expand Up @@ -359,6 +444,19 @@ export interface ChargesApiInterface {
*/
ordersCreateCharge(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargeAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<ChargeOrderResponse>;

/**
* Create charges for an existing orden
* @summary Create charges
* @param {string} id Identifier of the resource
* @param {ChargeRequest} chargeRequest requested field for a charge
* @param {OrdersCreateChargesAcceptLanguageEnum} [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 ChargesApiInterface
*/
ordersCreateCharges(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargesAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig): AxiosPromise<ChargesOrderResponse>;

/**
*
* @summary Update a charge
Expand Down Expand Up @@ -413,6 +511,21 @@ export class ChargesApi extends BaseAPI implements ChargesApiInterface {
return ChargesApiFp(this.configuration).ordersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
}

/**
* Create charges for an existing orden
* @summary Create charges
* @param {string} id Identifier of the resource
* @param {ChargeRequest} chargeRequest requested field for a charge
* @param {OrdersCreateChargesAcceptLanguageEnum} [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 ChargesApi
*/
public ordersCreateCharges(id: string, chargeRequest: ChargeRequest, acceptLanguage?: OrdersCreateChargesAcceptLanguageEnum, xChildCompanyId?: string, options?: RawAxiosRequestConfig) {
return ChargesApiFp(this.configuration).ordersCreateCharges(id, chargeRequest, acceptLanguage, xChildCompanyId, options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary Update a charge
Expand Down Expand Up @@ -445,6 +558,14 @@ export const OrdersCreateChargeAcceptLanguageEnum = {
en: 'en'
} as const;
export type OrdersCreateChargeAcceptLanguageEnum = typeof OrdersCreateChargeAcceptLanguageEnum[keyof typeof OrdersCreateChargeAcceptLanguageEnum];
/**
* @export
*/
export const OrdersCreateChargesAcceptLanguageEnum = {
es: 'es',
en: 'en'
} as const;
export type OrdersCreateChargesAcceptLanguageEnum = typeof OrdersCreateChargesAcceptLanguageEnum[keyof typeof OrdersCreateChargesAcceptLanguageEnum];
/**
* @export
*/
Expand Down
Loading

0 comments on commit 0957feb

Please sign in to comment.