Ai
2 Star 0 Fork 0

mirrors_sourcegraph/stripe-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
topup.go 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
Remi Jannel 提交于 2018-04-18 11:01 +08:00 . Review fixes
package stripe
// TopupParams is the set of parameters that can be used when creating or updating a top-up.
// For more details see https://stripe.com/docs/api#create_topup and https://stripe.com/docs/api#update_topup.
type TopupParams struct {
Params `form:"*"`
Amount *int64 `form:"amount"`
Currency *string `form:"currency"`
Description *string `form:"description"`
Source *SourceParams `form:"*"` // SourceParams has custom encoding so brought to top level with "*"
StatementDescriptor *string `form:"statement_descriptor"`
}
// SetSource adds valid sources to a TopupParams object,
// returning an error for unsupported sources.
func (p *TopupParams) SetSource(sp interface{}) error {
source, err := SourceParamsFor(sp)
p.Source = source
return err
}
// TopupListParams is the set of parameters that can be used when listing top-ups.
// For more details see https://stripe.com/docs/api#list_topups.
type TopupListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
}
// TopupList is a list of top-ups as retrieved from a list endpoint.
type TopupList struct {
ListMeta
Data []*Topup `json:"data"`
}
// Topup is the resource representing a Stripe top-up.
// For more details see https://stripe.com/docs/api#topups.
type Topup struct {
Amount int64 `json:"amount"`
ArrivalDate int64 `json:"arrival_date"`
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
Created int64 `json:"created"`
Currency Currency `json:"currency"`
Description string `json:"description"`
ExpectedAvailabilityDate int64 `json:"expected_availability_date"`
FailureCode string `json:"failure_code"`
FailureMessage string `json:"failure_message"`
ID string `json:"id"`
Livemode bool `json:"livemode"`
Source *PaymentSource `json:"source"`
StatementDescriptor string `json:"statement_descriptor"`
Status string `json:"status"`
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_sourcegraph/stripe-go.git
git@gitee.com:mirrors_sourcegraph/stripe-go.git
mirrors_sourcegraph
stripe-go
stripe-go
master

搜索帮助