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,
  });
} 