/**
 * 核心服务接口sdk（golang版）
 *
 * @desc 啪啪运动 核心服务接口sdk
 * ---------------------------------------------------------------------
 * @author		unphp <unphp@qq.com>
 * @date		2021-03-16
 * @copyright	core-utils
 * ---------------------------------------------------------------------
 */

package pposRequest

import (
	"net/url"
)

//new...
func (that *PPOSClient) NewDevicePassengerSourcePushRequest() *DevicePassengerSourcePushRequest {
	return &DevicePassengerSourcePushRequest{
		Request: Request{
			Client:     that,
			apiAddress: "/device/passengerSource/push",
		},
	}
}

//Response...

//Request...
type DevicePassengerSourcePushRequest struct {
	Request
}

func (that *DevicePassengerSourcePushRequest) SetData(value string) *DevicePassengerSourcePushRequest {
	that.initParams()
	that.params.Set("data", value) //客流数据
	return that
}

//Params ...
func (that *DevicePassengerSourcePushRequest) Params() (url.Values, error) {
	that.initParams()
	_params := that.params
	return _params, nil
}

//Do ...
func (that *DevicePassengerSourcePushRequest) Do() (interface{}, error) {
	//
	_data, _err := that.Client.GetJsonData(that.apiAddress, that)
	if _err != nil {
		return nil, _err
	}
	return _data, nil
}
