Class: Stripe::Balance

Inherits:
SingletonAPIResource show all
Defined in:
lib/stripe/resources/balance.rb

Overview

This is an object representing your Stripe balance. You can retrieve it to see the balance currently on your Stripe account.

You can also retrieve the balance history, which contains a list of [transactions](stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance (charges, payouts, and so forth).

The available and pending amounts for each currency are broken down further by payment source types.

Related guide: [Understanding Connect account balances](stripe.com/docs/connect/account-balances)

Defined Under Namespace

Classes: Available, ConnectReserved, InstantAvailable, Issuing, Pending

Constant Summary collapse

OBJECT_NAME =
"balance"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from SingletonAPIResource

resource_url, #resource_url, retrieve

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#availableObject (readonly)

Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](stripe.com/docs/api#transfers) or [Payouts API](stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the ‘source_types` property.



67
68
69
# File 'lib/stripe/resources/balance.rb', line 67

def available
  @available
end

#connect_reservedObject (readonly)

Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.



69
70
71
# File 'lib/stripe/resources/balance.rb', line 69

def connect_reserved
  @connect_reserved
end

#instant_availableObject (readonly)

Funds that you can pay out using Instant Payouts.



71
72
73
# File 'lib/stripe/resources/balance.rb', line 71

def instant_available
  @instant_available
end

#issuingObject (readonly)

Attribute for field issuing



73
74
75
# File 'lib/stripe/resources/balance.rb', line 73

def issuing
  @issuing
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



75
76
77
# File 'lib/stripe/resources/balance.rb', line 75

def livemode
  @livemode
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



77
78
79
# File 'lib/stripe/resources/balance.rb', line 77

def object
  @object
end

#pendingObject (readonly)

Funds that aren’t available in the balance yet. You can find the pending balance for each currency and each payment type in the ‘source_types` property.



79
80
81
# File 'lib/stripe/resources/balance.rb', line 79

def pending
  @pending
end

Class Method Details

.object_nameObject



18
19
20
# File 'lib/stripe/resources/balance.rb', line 18

def self.object_name
  "balance"
end