2 Star 0 Fork 0

hansdq / dyQcSDk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
product_editComponentTemplate_request.go 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
Hansdq 提交于 2022-12-25 22:28 . 路径迁移
package product_editComponentTemplate_request
import (
"gitee.com/hansdq/dy-qc-sdk/api/product_editComponentTemplate/response"
"gitee.com/hansdq/dy-qc-sdk/core"
"encoding/json"
)
type ProductEditComponentTemplateRequest struct {
doudian_sdk.BaseDoudianOpApiRequest
Param *ProductEditComponentTemplateParam
}
func (c *ProductEditComponentTemplateRequest) GetUrlPath() string{
return "/product/editComponentTemplate"
}
func New() *ProductEditComponentTemplateRequest{
request := &ProductEditComponentTemplateRequest{
Param: &ProductEditComponentTemplateParam{},
}
request.SetConfig(doudian_sdk.GlobalConfig)
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
return request
}
func (c *ProductEditComponentTemplateRequest) Execute(accessToken *doudian_sdk.AccessToken) (*product_editComponentTemplate_response.ProductEditComponentTemplateResponse, error){
responseJson, err := c.GetClient().Request(c, accessToken)
if err != nil {
return nil, err
}
response := &product_editComponentTemplate_response.ProductEditComponentTemplateResponse{}
_ = json.Unmarshal([]byte(responseJson), response)
return response, nil
}
func (c *ProductEditComponentTemplateRequest) GetParamObject() interface{}{
return c.Param
}
func (c *ProductEditComponentTemplateRequest) GetParams() *ProductEditComponentTemplateParam{
return c.Param
}
type ProductEditComponentTemplateParam struct {
// 模板ID
TemplateId int64 `json:"template_id"`
// 模板名称
TemplateName string `json:"template_name"`
// 模板数据json
ComponentData string `json:"component_data"`
// 是否为公有模板(多个商品可共用)
Shareable bool `json:"shareable"`
}
Go
1
https://gitee.com/hansdq/dy-qc-sdk.git
git@gitee.com:hansdq/dy-qc-sdk.git
hansdq
dy-qc-sdk
dyQcSDk
v1.0.8

搜索帮助