Skip to content

Commit

Permalink
Merge pull request #1089 from stripe/remi-add-issuing-balance
Browse files Browse the repository at this point in the history
Add support for `Issuing` in `Balance`
  • Loading branch information
remi-stripe authored May 1, 2020
2 parents 48e7181 + 5e72abc commit 1094e0d
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,26 @@ type BalanceParams struct {
Params `form:"*"`
}

// Balance is the resource representing your Stripe balance.
// For more details see https://stripe.com/docs/api/#balance.
type Balance struct {
APIResource
Available []*Amount `json:"available"`
ConnectReserved []*Amount `json:"connect_reserved"`
Livemode bool `json:"livemode"`
Pending []*Amount `json:"pending"`
}

// Amount is a structure wrapping an amount value and its currency.
type Amount struct {
Currency Currency `json:"currency"`
SourceTypes map[BalanceSourceType]int64 `json:"source_types"`
Value int64 `json:"amount"`
}

// BalanceDetails is the resource representing details about a specific product's balance.
type BalanceDetails struct {
Available []*Amount `json:"available"`
}

// Balance is the resource representing your Stripe balance.
// For more details see https://stripe.com/docs/api/#balance.
type Balance struct {
APIResource
Available []*Amount `json:"available"`
ConnectReserved []*Amount `json:"connect_reserved"`
Issuing *BalanceDetails `json:"issuing"`
Livemode bool `json:"livemode"`
Object string `json:"object"`
Pending []*Amount `json:"pending"`
}

0 comments on commit 1094e0d

Please sign in to comment.