package request

type TmallExchangeReturngoodsRefuseRequest struct {
	/*
	   凭证图片     */
	LeaveMessagePics *[]byte `json:"leave_message_pics,omitempty" required:"false" `
	/*
	   留言说明     */
	LeaveMessage *string `json:"leave_message,omitempty" required:"false" `
	/*
	   换货单号ID     */
	DisputeId *int64 `json:"dispute_id" required:"true" `
	/*
	   拒绝原因ID     */
	SellerRefuseReasonId *int64 `json:"seller_refuse_reason_id" required:"true" `
}

func (s *TmallExchangeReturngoodsRefuseRequest) SetLeaveMessagePics(v []byte) *TmallExchangeReturngoodsRefuseRequest {
	s.LeaveMessagePics = &v
	return s
}
func (s *TmallExchangeReturngoodsRefuseRequest) SetLeaveMessage(v string) *TmallExchangeReturngoodsRefuseRequest {
	s.LeaveMessage = &v
	return s
}
func (s *TmallExchangeReturngoodsRefuseRequest) SetDisputeId(v int64) *TmallExchangeReturngoodsRefuseRequest {
	s.DisputeId = &v
	return s
}
func (s *TmallExchangeReturngoodsRefuseRequest) SetSellerRefuseReasonId(v int64) *TmallExchangeReturngoodsRefuseRequest {
	s.SellerRefuseReasonId = &v
	return s
}

func (req *TmallExchangeReturngoodsRefuseRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.LeaveMessage != nil {
		paramMap["leave_message"] = *req.LeaveMessage
	}
	if req.DisputeId != nil {
		paramMap["dispute_id"] = *req.DisputeId
	}
	if req.SellerRefuseReasonId != nil {
		paramMap["seller_refuse_reason_id"] = *req.SellerRefuseReasonId
	}
	return paramMap
}

func (req *TmallExchangeReturngoodsRefuseRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	if req.LeaveMessagePics != nil {
		fileMap["leave_message_pics"] = *req.LeaveMessagePics
	}
	return fileMap
}
