import request from '@/utils/request'
import Qs from 'qs'

export function listCustomerBillingInfo(query) {
  return request({
    method: 'post',
    params:{
      _gp: 'admin.customerbilling',
      _mt: 'list',
      page: query.page,
      limit: query.limit,
      ...query
    }
  })
}

export function createCustomerBillingInfo(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.customerbilling',
      _mt: 'create',
      CustomerBillingInfoDTO: JSON.stringify(data)
    })
  })
}

export function updateCustomerBillingInfo(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.customerbilling',
      _mt: 'edit',
      CustomerBillingInfoDTO: JSON.stringify(data)
    })
  })
}

export function deleteCustomerBillingInfo(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.customerbilling',
      _mt: 'delete',
      id: id
    }
  })
}
