package pposRequest

import (
	"net/url"
)

func (that *PPOSClient) NewQuickNewGetBoxUseLogRequest() *QuickNewGetBoxUseLogRequest {
	return &QuickNewGetBoxUseLogRequest{
		Request: Request{
			Client:     that,
			apiAddress: "/enterAdmin/quickNew/getBoxUseLog",
		},
	}
}

// QuickNewGetBoxUseLogRequest 请求参数...
type QuickNewGetBoxUseLogRequest struct {
	Request
	Appid       string `json:"appid"`        //商家授权key
	Uid         string `json:"uid"`          //用户编号
	RingCode    string `json:"ringCode"`     //手环编号
	DeviceID    string `json:"deviceID"`     //设备编号
	NameLine    string `json:"nameLine"`     //格口线路号
	Type        string `json:"type"`         //绑定类型
	NameBox     string `json:"nameBox"`      //格口名称
	NameDevice  string `json:"nameDevice"`   //储物柜名称
}

//SetAppid ...
func (that *QuickNewGetBoxUseLogRequest) SetAppid(value string) *QuickNewGetBoxUseLogRequest {
	that.Appid = value
	return that
}

//SetUid ...
func (that *QuickNewGetBoxUseLogRequest) SetUid(value string) *QuickNewGetBoxUseLogRequest {
	that.Uid = value
	return that
}

//SetRingCode ...
func (that *QuickNewGetBoxUseLogRequest) SetRingCode(value string) *QuickNewGetBoxUseLogRequest {
	that.RingCode = value
	return that
}

//SetDeviceID ...
func (that *QuickNewGetBoxUseLogRequest) SetDeviceID(value string) *QuickNewGetBoxUseLogRequest {
	that.DeviceID = value
	return that
}

//SetNameLine ...
func (that *QuickNewGetBoxUseLogRequest) SetNameLine(value string) *QuickNewGetBoxUseLogRequest {
	that.NameLine = value
	return that
}

//SetType ...
func (that *QuickNewGetBoxUseLogRequest) SetType(value string) *QuickNewGetBoxUseLogRequest {
	that.Type = value
	return that
}

//SetNameBox ...
func (that *QuickNewGetBoxUseLogRequest) SetNameBox(value string) *QuickNewGetBoxUseLogRequest {
	that.NameBox = value
	return that
}

//SetNameDevice ...
func (that *QuickNewGetBoxUseLogRequest) SetNameDevice(value string) *QuickNewGetBoxUseLogRequest {
	that.NameDevice = value
	return that
}

//Params ...
func (that *QuickNewGetBoxUseLogRequest) Params() (url.Values, error) {
	var m = make(url.Values)
	m.Set("appid", that.Appid)
	m.Set("uid", that.Uid)
	m.Set("ringCode", that.RingCode)
	m.Set("deviceID", that.DeviceID)
	m.Set("nameLine", that.NameLine)
	m.Set("type", that.Type)
	m.Set("nameBox", that.NameBox)
	m.Set("nameDevice", that.NameDevice)
	return m, nil
}

//Do ...
func (that *QuickNewGetBoxUseLogRequest) Do() (interface{}, error) {
	_responData, _err := that.Client.GetData(that.apiAddress, that)
	if _err != nil {
		return nil, _err
	}
	return _responData, nil
}
