添加文件: ymt_v3/types.go
This commit is contained in:
parent
c4212042bf
commit
3337067fcf
|
|
@ -0,0 +1,91 @@
|
|||
package ymt_v3
|
||||
|
||||
// OrderRequest 获取券码请求(业务明文参数)
|
||||
type OrderRequest struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
ActivityNo string `json:"activity_no"`
|
||||
Account string `json:"account,omitempty"`
|
||||
NotifyURL string `json:"notify_url,omitempty"`
|
||||
}
|
||||
|
||||
// OrderResponse 获取券码/券码查询响应(解密后)
|
||||
type OrderResponse struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
TradeNo string `json:"trade_no"`
|
||||
Key string `json:"key,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
ValidBeginTime string `json:"valid_begin_time,omitempty"`
|
||||
ValidEndTime string `json:"valid_end_time,omitempty"`
|
||||
UsableNum uint32 `json:"usable_num"`
|
||||
UsageNum uint32 `json:"usage_num"`
|
||||
Status uint32 `json:"status"`
|
||||
SettlementPrice float64 `json:"settlement_price,omitempty"`
|
||||
Account string `json:"account,omitempty"`
|
||||
}
|
||||
|
||||
// QueryRequest 券码查询请求(业务明文参数)
|
||||
type QueryRequest struct {
|
||||
OutBizNo string `json:"out_biz_no,omitempty"`
|
||||
TradeNo string `json:"trade_no,omitempty"`
|
||||
}
|
||||
|
||||
// DiscardRequest 券码作废请求(业务明文参数)
|
||||
type DiscardRequest struct {
|
||||
OutBizNo string `json:"out_biz_no,omitempty"`
|
||||
TradeNo string `json:"trade_no,omitempty"`
|
||||
}
|
||||
|
||||
// DiscardResponse 券码作废响应(解密后)
|
||||
type DiscardResponse struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
TradeNo string `json:"trade_no"`
|
||||
Status uint32 `json:"status"`
|
||||
}
|
||||
|
||||
// BatchOrderRequest 批量发卡请求(业务明文参数)
|
||||
type BatchOrderRequest struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
ActivityNo string `json:"activity_no"`
|
||||
Number int32 `json:"number"`
|
||||
NotifyURL string `json:"notify_url,omitempty"`
|
||||
}
|
||||
|
||||
// BatchOrderResponse 批量发卡响应(解密后)
|
||||
type BatchOrderResponse struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
TradeNo string `json:"trade_no"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// BatchQueryRequest 批量查询请求(业务明文参数)
|
||||
type BatchQueryRequest struct {
|
||||
OutBizNo string `json:"out_biz_no,omitempty"`
|
||||
TradeNo string `json:"trade_no,omitempty"`
|
||||
}
|
||||
|
||||
// BatchQueryResponse 批量查询响应(解密后)
|
||||
type BatchQueryResponse struct {
|
||||
OutBizNo string `json:"out_biz_no"`
|
||||
TradeNo string `json:"trade_no"`
|
||||
Status string `json:"status"`
|
||||
DownloadURL string `json:"download_url,omitempty"`
|
||||
ZipPassword string `json:"zip_password,omitempty"`
|
||||
}
|
||||
|
||||
// EncryptedRequest 公共加密请求体
|
||||
type EncryptedRequest struct {
|
||||
Ciphertext string `json:"ciphertext"`
|
||||
}
|
||||
|
||||
// EncryptedResponse 公共加密响应体
|
||||
type EncryptedResponse struct {
|
||||
Code int32 `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Data *EncryptedData `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
// EncryptedData 加密数据包装
|
||||
type EncryptedData struct {
|
||||
Ciphertext string `json:"ciphertext"`
|
||||
}
|
||||
Loading…
Reference in New Issue