sendcloud

package
v1.0.159 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiV2UserinfoGetResponse

type ApiV2UserinfoGetResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Data    struct {
		ID                 int64   `json:"id"`                   // 订单号
		ProductID          int     `json:"product_id"`           // 商品编号
		ProductName        string  `json:"product_name"`         // 商品名称
		ProductType        int     `json:"product_type"`         // 商品类型(1:充值,2:卡密,3:卡券,4:人工)
		ProductPrice       string  `json:"product_price"`        // 售价
		Quantity           int     `json:"quantity"`             // 购买数量
		TotalPrice         string  `json:"total_price"`          // 总支付价格
		RefundedAmount     float64 `json:"refunded_amount"`      // 已退款金额
		BuyerCustomerID    int     `json:"buyer_customer_id"`    // 买家编号
		BuyerCustomerName  string  `json:"buyer_customer_name"`  // 买家名称
		SellerCustomerID   int     `json:"seller_customer_id"`   // 卖家编号
		SellerCustomerName string  `json:"seller_customer_name"` // 卖家名称
		State              int     `json:"state"`                // 订单状态(100:等待发货,101:正在充值,200:交易成功,500:交易失败,501:未知状态)
		CreatedAt          string  `json:"created_at"`           // 下单时间
		RechargeAccount    string  `json:"recharge_account"`     // 充值账号
		ProgressInit       int     `json:"progress_init"`        // 充值进度:初始值
		ProgressNow        int     `json:"progress_now"`         // 充值进度:现在值
		ProgressTarget     int     `json:"progress_target"`      // 充值进度:目标值
		RechargeInfo       string  `json:"recharge_info"`        // 返回信息
		RechargeUrl        string  `json:"recharge_url"`         // 卡密充值网址
		Cards              []struct {
			No       string `json:"no"`
			Password string `json:"password"`
		} `json:"cards"` //【卡密类订单】卡密
		RechargeParams          string `json:"recharge_params"`                     //【充值类订单】
		OuterApiV2UserinfoGetID string `json:"outer_ApiV2UserinfoGet_id,omitempty"` // 外部订单号
	} `json:"data"`
}

type ApiV2UserinfoGetResult

type ApiV2UserinfoGetResult struct {
	Result ApiV2UserinfoGetResponse // 结果
	Body   []byte                   // 内容
	Http   gorequest.Response       // 请求
	Err    error                    // 错误
}

type Client added in v1.0.47

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v1.0.47

func NewClient(config *ConfigClient) (*Client, error)

func (*Client) ApiV2UserinfoGet added in v1.0.47

func (c *Client) ApiV2UserinfoGet(ctx context.Context) *ApiV2UserinfoGetResult

ApiV2UserinfoGet 获取单个订单信息。 仅能获取自己购买的订单。 http://doc.cqmeihu.cn/sales/ApiV2UserinfoGet-info.html

func (*Client) ConfigZapClientFun added in v1.0.141

func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)

ConfigZapClientFun 日志配置

func (*Client) Get added in v1.0.109

func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

func (*Client) GetApiKey added in v1.0.47

func (c *Client) GetApiKey() string

func (*Client) GetApiUser added in v1.0.47

func (c *Client) GetApiUser() string

func (*Client) Post added in v1.0.109

func (c *Client) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

type ConfigClient added in v1.0.47

type ConfigClient struct {
	ApiUser string // API_USER
	ApiKey  string // API_KEY
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL