aswzk

package
v1.0.214 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeError   = 0 // 请求异常
	CodeSuccess = 1 // 请求成功
)
View Source
const (
	OrderStatusRecharge = "RECHARGE" // 充值中
	OrderStatusFailure  = "FAILURE"  // 充值失败
	OrderStatusSuccess  = "SUCCESS"  // 充值成功
)
View Source
const (
	LogTable = "aswzk"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client 实例

func NewClient

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

NewClient 创建实例化

func (*Client) ConfigApp

func (c *Client) ConfigApp(userID string, apiKey string) *Client

ConfigApp 配置

func (*Client) ConfigSLogClientFun

func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)

ConfigSLogClientFun 日志配置

func (*Client) DefaultHttp

func (c *Client) DefaultHttp()

DefaultHttp 默认请求

func (*Client) ElectricityBillOrder

func (c *Client) ElectricityBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*ElectricityBillOrderResult, error)

ElectricityBillOrder 电费订单下单

func (*Client) ElectricityBillOrderQuery added in v1.0.202

func (c *Client) ElectricityBillOrderQuery(ctx context.Context, orderID string, orderNo string, notMustParams ...gorequest.Params) (*ElectricityBillOrderQueryResult, error)

ElectricityBillOrderQuery 电费订单查询

func (*Client) GetApiKey

func (c *Client) GetApiKey() string

func (*Client) GetUserID

func (c *Client) GetUserID() string

func (*Client) PackageList added in v1.0.211

func (c *Client) PackageList(ctx context.Context, packageType string, notMustParams ...gorequest.Params) (*PackageListResult, error)

PackageList 套餐列表

func (*Client) PhoneBillOrder

func (c *Client) PhoneBillOrder(ctx context.Context, notMustParams ...gorequest.Params) (*PhoneBillOrderResult, error)

PhoneBillOrder 话费订单下单

func (*Client) PhoneBillOrderQuery added in v1.0.202

func (c *Client) PhoneBillOrderQuery(ctx context.Context, orderID, orderNo string, notMustParams ...gorequest.Params) (*PhoneBillOrderQueryResult, error)

PhoneBillOrderQuery 话费订单查询

func (*Client) SetHttp

func (c *Client) SetHttp(app *gorequest.App)

SetHttp 配置请求

type ClientConfig

type ClientConfig struct {
	UserID string // 用户编号
	ApiKey string // 秘钥
}

ClientConfig 实例配置

type ElectricityBillOrderQueryResponse added in v1.0.202

type ElectricityBillOrderQueryResponse struct {
	Code int    `json:"code"` // 状态码
	Info string `json:"info"` // 状态信息
	Data struct {
		RechargeAccount string  `json:"recharge_account"`          // 充值账号
		RechargeMoney   float64 `json:"recharge_money"`            // 充值金额
		RechargeType    string  `json:"recharge_type"`             // 充值类型
		RechargeReason  string  `json:"recharge_reason,omitempty"` // 充值失败原因
		OrderID         string  `json:"order_id"`                  // 订单编号
		OrderNo         string  `json:"order_no"`                  // 商户订单编号
		Remark          string  `json:"remark"`                    // 订单备注
		OrderStatus     string  `json:"order_status"`              // 订单状态
		OrderCost       float64 `json:"order_cost,omitempty"`      // 订单成本价
	} `json:"data"`
	Time    int    `json:"time"`
	TraceId string `json:"trace_id"`
}

type ElectricityBillOrderQueryResult added in v1.0.202

type ElectricityBillOrderQueryResult struct {
	Result ElectricityBillOrderQueryResponse // 结果
	Body   []byte                            // 内容
	Http   gorequest.Response                // 请求
}

type ElectricityBillOrderResponse

type ElectricityBillOrderResponse struct {
	Code    int         `json:"code"`
	Info    string      `json:"info"`
	Data    interface{} `json:"data"`
	Time    int64       `json:"time"`
	TraceID string      `json:"trace_id"`
}

type ElectricityBillOrderResult

type ElectricityBillOrderResult struct {
	Result ElectricityBillOrderResponse // 结果
	Body   []byte                       // 内容
	Http   gorequest.Response           // 请求
}

type PackageListResponse added in v1.0.211

type PackageListResponse struct {
	Code int    `json:"code"`
	Info string `json:"info"`
	Data []struct {
		RechargeMoney        int    `json:"recharge_money"`                   // 充值金额
		RechargeType         string `json:"recharge_type"`                    // 充值类型
		RechargeOperatorType string `json:"recharge_operator_type,omitempty"` // 充值运营商类型
	} `json:"data"`
	Time    int    `json:"time"`
	TraceId string `json:"trace_id"`
}

type PackageListResult added in v1.0.211

type PackageListResult struct {
	Result PackageListResponse // 结果
	Body   []byte              // 内容
	Http   gorequest.Response  // 请求
}

type PhoneBillOrderQueryResponse added in v1.0.202

type PhoneBillOrderQueryResponse struct {
	Code int    `json:"code"`
	Info string `json:"info"`
	Data struct {
		RechargeAccount string  `json:"recharge_account"`          // 充值账号
		RechargeMoney   float64 `json:"recharge_money"`            // 充值金额
		RechargeType    string  `json:"recharge_type"`             // 充值类型
		RechargeReason  string  `json:"recharge_reason,omitempty"` // 充值失败原因
		OrderID         string  `json:"order_id"`                  // 订单编号
		OrderNo         string  `json:"order_no"`                  // 商户订单编号
		Remark          string  `json:"remark"`                    // 订单备注
		OrderStatus     string  `json:"order_status"`              // 订单状态
		OrderCost       float64 `json:"order_cost,omitempty"`      // 订单成本价
	} `json:"data"`
	Time    int    `json:"time"`
	TraceId string `json:"trace_id"`
}

type PhoneBillOrderQueryResult added in v1.0.202

type PhoneBillOrderQueryResult struct {
	Result PhoneBillOrderQueryResponse // 结果
	Body   []byte                      // 内容
	Http   gorequest.Response          // 请求
}

type PhoneBillOrderResponse

type PhoneBillOrderResponse struct {
	Code    int         `json:"code"`
	Info    string      `json:"info"`
	Data    interface{} `json:"data"`
	Time    int64       `json:"time"`
	TraceID string      `json:"trace_id"`
}

type PhoneBillOrderResult

type PhoneBillOrderResult struct {
	Result PhoneBillOrderResponse // 结果
	Body   []byte                 // 内容
	Http   gorequest.Response     // 请求
}

Jump to

Keyboard shortcuts

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