1 Star 0 Fork 0

taadis / aikucun-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
order_list_all.go 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
taadis 提交于 2020-09-13 22:28 . implement Stringer interface
package aikucun
import (
"bytes"
"encoding/json"
"net/http"
)
// OrderListAllRequest
type OrderListAllRequest struct {
ActivityId string `json:"activityid"`
Page int `json:"page"`
PageSize int `json:"pagesize"`
WithWaybill int `json:"withwaybill"`
}
// OrderListAllResponse
type OrderListAllResponse struct {
BaseResponse
// ...
}
// Method
func (req *OrderListAllRequest) Method() string {
return http.MethodGet
}
// Path
func (req *OrderListAllRequest) Path() string {
return "/api/v2/order/listall"
}
// Params
func (req *OrderListAllRequest) Params() map[string]interface{} {
m := make(map[string]interface{})
m["version"] = 2
m["activityid"] = req.ActivityId
m["page"] = req.Page
m["pagesize"] = req.PageSize
m["withwaybill"] = req.WithWaybill
return m
}
// NewOrderListAllRequest
func NewOrderListAllRequest() *OrderListAllRequest {
return new(OrderListAllRequest)
}
// String
func (resp *OrderListAllResponse) String() string {
buf := bytes.NewBuffer(nil)
err := json.NewEncoder(buf).Encode(resp)
if err != nil {
panic(err)
}
return buf.String()
}
// OrderListAll
func (client *Client) OrderListAll(request *OrderListAllRequest) (response *OrderListAllResponse, err error) {
response = &OrderListAllResponse{}
err = client.Do(request, response)
return
}
Go
1
https://gitee.com/taadis/aikucun-sdk-go.git
git@gitee.com:taadis/aikucun-sdk-go.git
taadis
aikucun-sdk-go
aikucun-sdk-go
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891