github.com/stripe/stripe-go/v76@v76.25.0/cashbalance.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 // The configuration for how funds that land in the customer cash balance are reconciled. 10 type CashBalanceSettingsReconciliationMode string 11 12 // List of values that CashBalanceSettingsReconciliationMode can take 13 const ( 14 CashBalanceSettingsReconciliationModeAutomatic CashBalanceSettingsReconciliationMode = "automatic" 15 CashBalanceSettingsReconciliationModeManual CashBalanceSettingsReconciliationMode = "manual" 16 ) 17 18 // Retrieves a customer's cash balance. 19 type CashBalanceParams struct { 20 Params `form:"*"` 21 // Specifies which fields in the response should be expanded. 22 Expand []*string `form:"expand"` 23 // A hash of settings for this cash balance. 24 Settings *CashBalanceSettingsParams `form:"settings"` 25 Customer *string `form:"-"` // Included in URL 26 } 27 28 // AddExpand appends a new field to expand. 29 func (p *CashBalanceParams) AddExpand(f string) { 30 p.Expand = append(p.Expand, &f) 31 } 32 33 // A hash of settings for this cash balance. 34 type CashBalanceSettingsParams struct { 35 // Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). 36 ReconciliationMode *string `form:"reconciliation_mode"` 37 } 38 type CashBalanceSettings struct { 39 // The configuration for how funds that land in the customer cash balance are reconciled. 40 ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"` 41 // A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance 42 UsingMerchantDefault bool `json:"using_merchant_default"` 43 } 44 45 // A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. 46 type CashBalance struct { 47 APIResource 48 // A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). 49 Available map[string]int64 `json:"available"` 50 // The ID of the customer whose cash balance this object represents. 51 Customer string `json:"customer"` 52 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 53 Livemode bool `json:"livemode"` 54 // String representing the object's type. Objects of the same type share the same value. 55 Object string `json:"object"` 56 Settings *CashBalanceSettings `json:"settings"` 57 }