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

/** 创建经销商返点客户 POST /operation/createDealerRebateCustomer */
export async function createDealerRebateCustomer(
  body: BusinessAPI.DealerRebateCustomerCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerRebateCustomerVO>(
    "/operation/createDealerRebateCustomer",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

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

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

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

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

/** 经销商返点客户更新 PUT /operation/updateDealerRebateCustomer */
export async function updateDealerRebateCustomer(
  body: BusinessAPI.DealerRebateCustomerUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerRebateCustomerVO>(
    "/operation/updateDealerRebateCustomer",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 经销商返点客户更新 PATCH /operation/updateDealerRebateCustomer */
export async function updateDealerRebateCustomer1(
  body: BusinessAPI.DealerRebateCustomerUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseDealerRebateCustomerVO>(
    "/operation/updateDealerRebateCustomer",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
