From 5e72abc65129a3e905b347b50996672f035c1ac9 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Thu, 30 Apr 2020 22:25:44 -0700 Subject: [PATCH] Add support for `Issuing` in `Balance` --- balance.go | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/balance.go b/balance.go index c24916205b..6b49ee7a85 100644 --- a/balance.go +++ b/balance.go @@ -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"` +}