import api from "src/api";

export const getProviderPaymentMethods = async (providerId) => {
  const { data } = await api.get(`/provider/payment-methods/${providerId}`);
  return data.payload;
};

export const createProviderPaymentMethod = async (info) => {
  const { data } = await api.post("/provider/payment-method", info);
  return data.payload;
};

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

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