8
0
gaore-common-sdk-go/services/game/pay_switch.go

46 lines
1.4 KiB
Go
Raw Normal View History

package game
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
// GetPaySwitchUserReq
// 微信小游戏切支付名单中转查询请求(按 user_name + game_id 读 db_center.wd_pay_switch_user
type GetPaySwitchUserReq struct {
*requests.RpcRequest
UserName string `position:"Body" field:"user_name"` // 账号
GameId int64 `position:"Body" field:"game_id"` // 子游戏ID
}
// GetPaySwitchUserRespData 中转返回的名单状态
type GetPaySwitchUserRespData struct {
Status int64 `json:"status"` // 切支付开关 1开启 0关闭
RiskLevel int64 `json:"risk_level"` // 风险档位 1高 2中 3低0未设置/关闭
}
type GetPaySwitchUserResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data GetPaySwitchUserRespData `json:"data"`
}
func CreateGetPaySwitchUserReq(userName string, gameId int64) *GetPaySwitchUserReq {
req := &GetPaySwitchUserReq{
RpcRequest: &requests.RpcRequest{},
}
req.UserName = userName
req.GameId = gameId
req.InitWithApiInfo(HOST, VERSION, "/api/pay/switchUser")
req.Method = requests.POST
return req
}
func CreateGetPaySwitchUserResp() *GetPaySwitchUserResp {
resp := &GetPaySwitchUserResp{
BaseResponse: &responses.BaseResponse{},
}
return resp
}