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

/** 创建经销商付款账户 POST /operation/createDealerPaymentAccount */
export async function createDealerPaymentAccount(
  body: BusinessAPI.DealerPaymentAccountCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerPaymentAccountVO>(
    "/operation/createDealerPaymentAccount",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商付款账户删除 DELETE /operation/destroyDealerPaymentAccount */
export async function destroyDealerPaymentAccount(
  body: BusinessAPI.DealerPaymentAccountDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>(
    "/operation/destroyDealerPaymentAccount",
    {
      method: "DELETE",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商付款账户列表 GET /operation/listDealerPaymentAccount */
export async function listDealerPaymentAccount(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listDealerPaymentAccountParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseDealerPaymentAccountVO>(
    "/operation/listDealerPaymentAccount",
    {
      method: "GET",
      params: {
        ...params,
        dealerPaymentAccountListQry: undefined,
        ...params["dealerPaymentAccountListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商付款账户列表 GET /operation/pageDealerPaymentAccount */
export async function pageDealerPaymentAccount(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageDealerPaymentAccountParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseDealerPaymentAccountVO>(
    "/operation/pageDealerPaymentAccount",
    {
      method: "GET",
      params: {
        ...params,
        dealerPaymentAccountPageQry: undefined,
        ...params["dealerPaymentAccountPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商付款账户详情 GET /operation/showDealerPaymentAccount */
export async function showDealerPaymentAccount(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showDealerPaymentAccountParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerPaymentAccountVO>(
    "/operation/showDealerPaymentAccount",
    {
      method: "GET",
      params: {
        ...params,
        dealerPaymentAccountShowQry: undefined,
        ...params["dealerPaymentAccountShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 经销商付款账户更新 PUT /operation/updateDealerPaymentAccount */
export async function updateDealerPaymentAccount(
  body: BusinessAPI.DealerPaymentAccountUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerPaymentAccountVO>(
    "/operation/updateDealerPaymentAccount",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商付款账户更新 PATCH /operation/updateDealerPaymentAccount */
export async function updateDealerPaymentAccount1(
  body: BusinessAPI.DealerPaymentAccountUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerPaymentAccountVO>(
    "/operation/updateDealerPaymentAccount",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
