|
@@ -327,11 +327,11 @@ type CreateRequest struct {
|
|
|
|
|
|
NotifyUrl *string `json:"notify_url,omitempty"`
|
|
|
|
|
|
-
|
|
|
+ FundsAccount *ReqFundsAccount `json:"funds_account,omitempty"`
|
|
|
|
|
|
Amount *AmountReq `json:"amount"`
|
|
|
|
|
|
-
|
|
|
+ GoodsDetail []GoodsDetail `json:"goods_detail,omitempty"`
|
|
|
|
|
|
|
|
|
MchId *string `json:"mchid,omitempty"`
|
|
@@ -375,18 +375,18 @@ func (o CreateRequest) MarshalJSON() ([]byte, error) {
|
|
|
toSerialize["notify_url"] = o.NotifyUrl
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if o.FundsAccount != nil {
|
|
|
+ toSerialize["funds_account"] = o.FundsAccount
|
|
|
+ }
|
|
|
|
|
|
if o.Amount == nil {
|
|
|
return nil, fmt.Errorf("field `Amount` is required and must be specified in CreateRequest")
|
|
|
}
|
|
|
toSerialize["amount"] = o.Amount
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if o.GoodsDetail != nil {
|
|
|
+ toSerialize["goods_detail"] = o.GoodsDetail
|
|
|
+ }
|
|
|
return json.Marshal(toSerialize)
|
|
|
}
|
|
|
|