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.

The top-level ‘available` and `pending` comprise your “payments balance.”

Related guide: [Balances and settlement time](docs.stripe.com/payments/balances), [Understanding Connect account balances](docs.stripe.com/connect/account-balances)

Defined Under Namespace

Classes: Available, ConnectReserved, InstantAvailable, Issuing, Pending, RefundAndDisputePrefunding, RiskReserved

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

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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](api.stripe.com#transfers) or [Payouts API](api.stripe.com#payouts). You can find the available balance for each currency and payment type in the ‘source_types` property.



389
390
391
# File 'lib/stripe/resources/balance.rb', line 389

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.



391
392
393
# File 'lib/stripe/resources/balance.rb', line 391

def connect_reserved
  @connect_reserved
end

#instant_availableObject (readonly)

Funds that you can pay out using Instant Payouts.



393
394
395
# File 'lib/stripe/resources/balance.rb', line 393

def instant_available
  @instant_available
end

#issuingObject (readonly)

Attribute for field issuing



395
396
397
# File 'lib/stripe/resources/balance.rb', line 395

def issuing
  @issuing
end

#livemodeObject (readonly)

If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.



397
398
399
# File 'lib/stripe/resources/balance.rb', line 397

def livemode
  @livemode
end

#objectObject (readonly)

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



399
400
401
# File 'lib/stripe/resources/balance.rb', line 399

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.



401
402
403
# File 'lib/stripe/resources/balance.rb', line 401

def pending
  @pending
end

#refund_and_dispute_prefundingObject (readonly)

Attribute for field refund_and_dispute_prefunding



403
404
405
# File 'lib/stripe/resources/balance.rb', line 403

def refund_and_dispute_prefunding
  @refund_and_dispute_prefunding
end

#risk_reservedObject (readonly)

Attribute for field risk_reserved



405
406
407
# File 'lib/stripe/resources/balance.rb', line 405

def risk_reserved
  @risk_reserved
end

Class Method Details

.field_remappingsObject



419
420
421
# File 'lib/stripe/resources/balance.rb', line 419

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



407
408
409
410
411
412
413
414
415
416
417
# File 'lib/stripe/resources/balance.rb', line 407

def self.inner_class_types
  @inner_class_types = {
    available: Available,
    connect_reserved: ConnectReserved,
    instant_available: InstantAvailable,
    issuing: Issuing,
    pending: Pending,
    refund_and_dispute_prefunding: RefundAndDisputePrefunding,
    risk_reserved: RiskReserved,
  }
end

.object_nameObject



13
14
15
# File 'lib/stripe/resources/balance.rb', line 13

def self.object_name
  "balance"
end