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

/** 创建付款记录 POST /operation/createPaymentRecord */
export async function createPaymentRecord(
  body: BusinessAPI.PaymentRecordCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePaymentRecordVO>(
    "/operation/createPaymentRecord",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 付款记录删除 DELETE /operation/destroyPaymentRecord */
export async function destroyPaymentRecord(
  body: BusinessAPI.PaymentRecordDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/destroyPaymentRecord", {
    method: "DELETE",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 付款记录列表 GET /operation/listPaymentRecord */
export async function listPaymentRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listPaymentRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponsePaymentRecordVO>(
    "/operation/listPaymentRecord",
    {
      method: "GET",
      params: {
        ...params,
        paymentRecordListQry: undefined,
        ...params["paymentRecordListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 付款记录列表 GET /operation/pagePaymentRecord */
export async function pagePaymentRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pagePaymentRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponsePaymentRecordVO>(
    "/operation/pagePaymentRecord",
    {
      method: "GET",
      params: {
        ...params,
        paymentRecordPageQry: undefined,
        ...params["paymentRecordPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 付款记录详情 GET /operation/showPaymentRecord */
export async function showPaymentRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showPaymentRecordParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePaymentRecordVO>(
    "/operation/showPaymentRecord",
    {
      method: "GET",
      params: {
        ...params,
        paymentRecordShowQry: undefined,
        ...params["paymentRecordShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 付款记录更新 PUT /operation/updatePaymentRecord */
export async function updatePaymentRecord(
  body: BusinessAPI.PaymentRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePaymentRecordVO>(
    "/operation/updatePaymentRecord",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 付款记录更新 PATCH /operation/updatePaymentRecord */
export async function updatePaymentRecord1(
  body: BusinessAPI.PaymentRecordUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponsePaymentRecordVO>(
    "/operation/updatePaymentRecord",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
