package request

import (
	"topsdk/util"
)

type TmallExchangeGetRequest struct {
	/*
	   换货单号ID     */
	DisputeId *int64 `json:"dispute_id" required:"true" `
	/*
	   返回字段。目前支持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     */
	Fields *[]string `json:"fields" required:"true" `
}

func (s *TmallExchangeGetRequest) SetDisputeId(v int64) *TmallExchangeGetRequest {
	s.DisputeId = &v
	return s
}
func (s *TmallExchangeGetRequest) SetFields(v []string) *TmallExchangeGetRequest {
	s.Fields = &v
	return s
}

func (req *TmallExchangeGetRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.DisputeId != nil {
		paramMap["dispute_id"] = *req.DisputeId
	}
	if req.Fields != nil {
		paramMap["fields"] = util.ConvertBasicList(*req.Fields)
	}
	return paramMap
}

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