import { httpGetRequest, httpPutRequest, APIUrlGenerator } from "@/utils/baseHttpService";
import { API_ROUTES } from "@/constant/routes";
import { PaymentCard, UpdatePaymentCardRequest, UpdatePaymentCardResponse } from "./_models";

export const getPaymentCard = async (): Promise<PaymentCard> => {
  const response = await httpGetRequest<PaymentCard>(
    APIUrlGenerator(API_ROUTES.GET_PAYMENT_CARD)
  );
  return response.data;
};

export const updatePaymentCard = async (
  payload: UpdatePaymentCardRequest
): Promise<UpdatePaymentCardResponse> => {
  const response = await httpPutRequest<UpdatePaymentCardResponse>(
    APIUrlGenerator(API_ROUTES.UPDATE_PAYMENT_CARD),
    payload
  );
  return response.data;
};







