import apiClient from "@/infrastructure/apiClient";
import apiPath from "@/infrastructure/apiPath";
export default {
  async getById(id) {
    var searchResult = await apiClient
      .get(apiPath.orderFin.getById + id)
      .then((r) => {
        return r.data;
      })
      .catch((e) => {
        console.log(e);
        return {};
      });
    return searchResult;
  },
  async update(model) {
    var searchResult = await apiClient
      .put(apiPath.orderFin.update, model)
      .then((r) => {
        return r.data;
      })
      .catch((e) => {
        console.log(e);
        return {};
      });
    return searchResult;
  },
  async collectMoney(model) {
    var searchResult = await apiClient
      .put(apiPath.orderFin.collectMoney, model)
      .then((r) => {
        return r.data;
      })
      .catch((e) => {
        console.log(e);
        return {};
      });
    return searchResult;
  },
};
