package request

import (
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
)

type AlibabaTclsAelophyRefundAgreeRequest struct {
	/*
	   门店ID     */
	StoreId *string `json:"store_id,omitempty" required:"false" `
	/*
	   外部订单ID     */
	OutOrderId *string `json:"out_order_id,omitempty" required:"false" `
	/*
	   退款单ID     */
	RefundId *string `json:"refund_id,omitempty" required:"false" `
	/*
	   审核说明     */
	AuditMemo *string `json:"audit_memo,omitempty" required:"false" `
	/*
	   外部子订单列表     */
	SubRefundList *[]domain.AlibabaTclsAelophyRefundAgreeSubrefundlist `json:"sub_refund_list,omitempty" required:"false" `
	/*
	   渠道     */
	OrderFrom *int64 `json:"order_from,omitempty" required:"false" `
}

func (s *AlibabaTclsAelophyRefundAgreeRequest) SetStoreId(v string) *AlibabaTclsAelophyRefundAgreeRequest {
	s.StoreId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundAgreeRequest) SetOutOrderId(v string) *AlibabaTclsAelophyRefundAgreeRequest {
	s.OutOrderId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundAgreeRequest) SetRefundId(v string) *AlibabaTclsAelophyRefundAgreeRequest {
	s.RefundId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundAgreeRequest) SetAuditMemo(v string) *AlibabaTclsAelophyRefundAgreeRequest {
	s.AuditMemo = &v
	return s
}
func (s *AlibabaTclsAelophyRefundAgreeRequest) SetSubRefundList(v []domain.AlibabaTclsAelophyRefundAgreeSubrefundlist) *AlibabaTclsAelophyRefundAgreeRequest {
	s.SubRefundList = &v
	return s
}
func (s *AlibabaTclsAelophyRefundAgreeRequest) SetOrderFrom(v int64) *AlibabaTclsAelophyRefundAgreeRequest {
	s.OrderFrom = &v
	return s
}

func (req *AlibabaTclsAelophyRefundAgreeRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.StoreId != nil {
		paramMap["store_id"] = *req.StoreId
	}
	if req.OutOrderId != nil {
		paramMap["out_order_id"] = *req.OutOrderId
	}
	if req.RefundId != nil {
		paramMap["refund_id"] = *req.RefundId
	}
	if req.AuditMemo != nil {
		paramMap["audit_memo"] = *req.AuditMemo
	}
	if req.SubRefundList != nil {
		paramMap["sub_refund_list"] = util.ConvertStructList(*req.SubRefundList)
	}
	if req.OrderFrom != nil {
		paramMap["order_from"] = *req.OrderFrom
	}
	return paramMap
}

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