package superm_getStoreAutoCallRiderInfo_request

import (
	"encoding/json"
	superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response"
	doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
)

type SupermGetStoreAutoCallRiderInfoRequest struct {
	doudian_sdk.BaseDoudianOpApiRequest
	Param *SupermGetStoreAutoCallRiderInfoParam
}

func (c *SupermGetStoreAutoCallRiderInfoRequest) GetUrlPath() string {
	return "/superm/getStoreAutoCallRiderInfo"
}

func New() *SupermGetStoreAutoCallRiderInfoRequest {
	request := &SupermGetStoreAutoCallRiderInfoRequest{
		Param: &SupermGetStoreAutoCallRiderInfoParam{},
	}
	request.SetConfig(doudian_sdk.GlobalConfig)
	request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
	return request

}

func (c *SupermGetStoreAutoCallRiderInfoRequest) Execute(accessToken *doudian_sdk.AccessToken) (*superm_getStoreAutoCallRiderInfo_response.SupermGetStoreAutoCallRiderResponse, error) {
	responseJson, err := c.GetClient().Request(c, accessToken)
	if err != nil {
		return nil, err
	}
	response := &superm_getStoreAutoCallRiderInfo_response.SupermGetStoreAutoCallRiderResponse{}
	_ = json.Unmarshal([]byte(responseJson), response)
	return response, nil

}

func (c *SupermGetStoreAutoCallRiderInfoRequest) GetParamObject() interface{} {
	return c.Param
}

func (c *SupermGetStoreAutoCallRiderInfoRequest) GetParams() *SupermGetStoreAutoCallRiderInfoParam {
	return c.Param
}

type SupermGetStoreAutoCallRiderInfoParam struct {
	StoreID int64 `json:"store_id"` //店铺的门店ID
}
