UNPKG

sdk-node-apis-efi

Version:

Module for integration with Efi Bank API

24 lines (23 loc) 649 B
import { endpoints } from '../constants/endpoints'; import { httpRequest } from '../httpClient'; import { PixCreateImmediateChargeBody, PixCreateImmediateChargeResponse } from '../types/pix'; // Função modelo para criar uma cobrança Pix imediata export async function pixCreateImmediateCharge({ baseUrl, body, headers, }: { baseUrl: string; body: PixCreateImmediateChargeBody; headers?: Record<string, string>; }): Promise<PixCreateImmediateChargeResponse> { return httpRequest<PixCreateImmediateChargeResponse>({ baseUrl, endpoint: endpoints.APIS.PIX.ENDPOINTS.pixCreateImmediateCharge, body, headers, }); }