// @ts-ignore
/* eslint-disable */
import request from "../request";

/** 创建对账发票 POST /operation/createReconciliationInvoice */
export async function createReconciliationInvoice(
  body: BusinessAPI.ReconciliationInvoiceCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
    "/operation/createReconciliationInvoice",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 对账发票删除 DELETE /operation/destroyReconciliationInvoice */
export async function destroyReconciliationInvoice(
  body: BusinessAPI.ReconciliationInvoiceDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>(
    "/operation/destroyReconciliationInvoice",
    {
      method: "DELETE",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 对账发票列表 GET /operation/listReconciliationInvoice */
export async function listReconciliationInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listReconciliationInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseReconciliationInvoiceVO>(
    "/operation/listReconciliationInvoice",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationInvoiceListQry: undefined,
        ...params["reconciliationInvoiceListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账发票列表 GET /operation/pageReconciliationInvoice */
export async function pageReconciliationInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageReconciliationInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseReconciliationInvoiceVO>(
    "/operation/pageReconciliationInvoice",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationInvoicePageQry: undefined,
        ...params["reconciliationInvoicePageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账发票详情 GET /operation/showReconciliationInvoice */
export async function showReconciliationInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showReconciliationInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
    "/operation/showReconciliationInvoice",
    {
      method: "GET",
      params: {
        ...params,
        reconciliationInvoiceShowQry: undefined,
        ...params["reconciliationInvoiceShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 对账发票更新 PUT /operation/updateReconciliationInvoice */
export async function updateReconciliationInvoice(
  body: BusinessAPI.ReconciliationInvoiceUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
    "/operation/updateReconciliationInvoice",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 对账发票更新 PATCH /operation/updateReconciliationInvoice */
export async function updateReconciliationInvoice1(
  body: BusinessAPI.ReconciliationInvoiceUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
    "/operation/updateReconciliationInvoice",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
