import api from "src/api";

export const getClientPaymentMethods = async (clientId) => {
  const { data } = await api.get(`/client/payment-methods/${clientId}`);
  return data.payload;
}

export const getClientPaymentMethod = async (id) => {
  const { data } = await api.get(`/client/payment-method/${id}`);
  return data.payload;
}

export const createClientPaymentMethod = async (info) => {
  const { data } = await api.post(`/client/payment-method`, info);
  return data.payload;
}

export const updateClientPaymentMethod = async (id, info) => {
  const { data } = await api.put(`/client/payment-method/${id}`, info);
  return data.payload;
}

export const deleteClientPaymentMethod = async (id) => {
  const { data } = await api.delete(`/client/payment-method/${id}`);
  return data.payload;
}
