package request

import (
	"topsdk/util"
)

type TmallExchangeReceiveGetRequest struct {
	/*
	   查询修改时间段的结束时间点     */
	EndGmtModifedTime *util.LocalTime `json:"end_gmt_modifed_time,omitempty" required:"false" `
	/*
	   快递单号     */
	LogisticNo *string `json:"logistic_no,omitempty" required:"false" `
	/*
	   买家昵称     */
	BuyerNick *string `json:"buyer_nick,omitempty" required:"false" `
	/*
	   查询申请时间段的开始时间点     */
	StartCreatedTime *util.LocalTime `json:"start_created_time,omitempty" required:"false" `
	/*
	   返回字段。目前支持dispute_id, bizorder_id, num, buyer_nick, status, created, modified, reason, title, buyer_logistic_no, seller_logistic_no, bought_sku, exchange_sku, buyer_address, address, buyer_phone, buyer_logistic_name, seller_logistic_name, alipay_no, buyer_name, seller_nick,new_bought_sku     */
	Fields *[]string `json:"fields" required:"true" `
	/*
	   每页条数 defalutValue��30    */
	PageSize *int64 `json:"page_size,omitempty" required:"false" `
	/*
	   换货状态，具体包括：换货待处理(1), 待买家退货(2), 买家已退货，待收货(3),  换货关闭(4), 换货成功(5), 待买家修改(6), 待发出换货商品(12), 待买家收货(13), 请退款(14)     */
	DisputeStatusArray *[]int32 `json:"dispute_status_array,omitempty" required:"false" `
	/*
	   查询申请时间段的结束时间点     */
	EndCreatedTime *util.LocalTime `json:"end_created_time,omitempty" required:"false" `
	/*
	   买家的openId     */
	BuyerOpenUid *string `json:"buyer_open_uid,omitempty" required:"false" `
	/*
	   退款单号ID列表，最多只能输入20个id     */
	RefundIdArray *[]int64 `json:"refund_id_array,omitempty" required:"false" `
	/*
	   页码 defalutValue��1    */
	PageNo *int64 `json:"page_no,omitempty" required:"false" `
	/*
	   查询修改时间段的开始时间点     */
	StartGmtModifiedTime *util.LocalTime `json:"start_gmt_modified_time,omitempty" required:"false" `
	/*
	   正向订单号     */
	BizOrderId *int64 `json:"biz_order_id,omitempty" required:"false" `
}

func (s *TmallExchangeReceiveGetRequest) SetEndGmtModifedTime(v util.LocalTime) *TmallExchangeReceiveGetRequest {
	s.EndGmtModifedTime = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetLogisticNo(v string) *TmallExchangeReceiveGetRequest {
	s.LogisticNo = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetBuyerNick(v string) *TmallExchangeReceiveGetRequest {
	s.BuyerNick = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetStartCreatedTime(v util.LocalTime) *TmallExchangeReceiveGetRequest {
	s.StartCreatedTime = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetFields(v []string) *TmallExchangeReceiveGetRequest {
	s.Fields = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetPageSize(v int64) *TmallExchangeReceiveGetRequest {
	s.PageSize = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetDisputeStatusArray(v []int32) *TmallExchangeReceiveGetRequest {
	s.DisputeStatusArray = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetEndCreatedTime(v util.LocalTime) *TmallExchangeReceiveGetRequest {
	s.EndCreatedTime = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetBuyerOpenUid(v string) *TmallExchangeReceiveGetRequest {
	s.BuyerOpenUid = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetRefundIdArray(v []int64) *TmallExchangeReceiveGetRequest {
	s.RefundIdArray = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetPageNo(v int64) *TmallExchangeReceiveGetRequest {
	s.PageNo = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetStartGmtModifiedTime(v util.LocalTime) *TmallExchangeReceiveGetRequest {
	s.StartGmtModifiedTime = &v
	return s
}
func (s *TmallExchangeReceiveGetRequest) SetBizOrderId(v int64) *TmallExchangeReceiveGetRequest {
	s.BizOrderId = &v
	return s
}

func (req *TmallExchangeReceiveGetRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.EndGmtModifedTime != nil {
		paramMap["end_gmt_modifed_time"] = *req.EndGmtModifedTime
	}
	if req.LogisticNo != nil {
		paramMap["logistic_no"] = *req.LogisticNo
	}
	if req.BuyerNick != nil {
		paramMap["buyer_nick"] = *req.BuyerNick
	}
	if req.StartCreatedTime != nil {
		paramMap["start_created_time"] = *req.StartCreatedTime
	}
	if req.Fields != nil {
		paramMap["fields"] = util.ConvertBasicList(*req.Fields)
	}
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.DisputeStatusArray != nil {
		paramMap["dispute_status_array"] = util.ConvertBasicList(*req.DisputeStatusArray)
	}
	if req.EndCreatedTime != nil {
		paramMap["end_created_time"] = *req.EndCreatedTime
	}
	if req.BuyerOpenUid != nil {
		paramMap["buyer_open_uid"] = *req.BuyerOpenUid
	}
	if req.RefundIdArray != nil {
		paramMap["refund_id_array"] = util.ConvertBasicList(*req.RefundIdArray)
	}
	if req.PageNo != nil {
		paramMap["page_no"] = *req.PageNo
	}
	if req.StartGmtModifiedTime != nil {
		paramMap["start_gmt_modified_time"] = *req.StartGmtModifiedTime
	}
	if req.BizOrderId != nil {
		paramMap["biz_order_id"] = *req.BizOrderId
	}
	return paramMap
}

func (req *TmallExchangeReceiveGetRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
