Class: Stripe::BalanceTransfer
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::BalanceTransfer
- Extended by:
- APIOperations::Create
- Defined in:
- lib/stripe/resources/balance_transfer.rb
Overview
Balance transfers represent funds moving between balance types on your Stripe account. They currently support moving funds between your Stripe balance and your [Issuing](stripe.com/docs/issuing) balance and between your [Allocated Funds](stripe.com/docs/connect/funds-segregation) balance and your Stripe balance.
Defined Under Namespace
Classes: DestinationBalance, SourceBalance
Constant Summary collapse
- OBJECT_NAME =
"balance_transfer"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
A positive integer representing how much was transferred in the smallest currency unit.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#destination_balance ⇒ Object
readonly
The balance that funds were transferred to.
-
#hosted_regulatory_receipt_url ⇒ Object
readonly
A [hosted transaction receipt](stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#source_balance ⇒ Object
readonly
The balance that funds were transferred from.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a balance transfer.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .object_name ⇒ Object
Methods included from APIOperations::Create
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
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, 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
#amount ⇒ Object (readonly)
A positive integer representing how much was transferred in the smallest currency unit.
101 102 103 |
# File 'lib/stripe/resources/balance_transfer.rb', line 101 def amount @amount end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
103 104 105 |
# File 'lib/stripe/resources/balance_transfer.rb', line 103 def created @created end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
105 106 107 |
# File 'lib/stripe/resources/balance_transfer.rb', line 105 def currency @currency end |
#destination_balance ⇒ Object (readonly)
The balance that funds were transferred to.
107 108 109 |
# File 'lib/stripe/resources/balance_transfer.rb', line 107 def destination_balance @destination_balance end |
#hosted_regulatory_receipt_url ⇒ Object (readonly)
A [hosted transaction receipt](stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.
109 110 111 |
# File 'lib/stripe/resources/balance_transfer.rb', line 109 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
111 112 113 |
# File 'lib/stripe/resources/balance_transfer.rb', line 111 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
113 114 115 |
# File 'lib/stripe/resources/balance_transfer.rb', line 113 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
115 116 117 |
# File 'lib/stripe/resources/balance_transfer.rb', line 115 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
117 118 119 |
# File 'lib/stripe/resources/balance_transfer.rb', line 117 def object @object end |
#source_balance ⇒ Object (readonly)
The balance that funds were transferred from. One of ‘card`, `fpx`, or `bank_account`.
119 120 121 |
# File 'lib/stripe/resources/balance_transfer.rb', line 119 def source_balance @source_balance end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a balance transfer. For Issuing use cases, funds will be debited immediately from the source balance and credited to the destination balance immediately (if your account is based in the US) or next-business-day (if your account is based in the EU). For Segregated Separate Charges and Transfers use cases, funds will be debited immediately from the source balance and credited immediately to the destination balance.
122 123 124 125 126 127 128 129 |
# File 'lib/stripe/resources/balance_transfer.rb', line 122 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/balance_transfers", params: params, opts: opts ) end |
.field_remappings ⇒ Object
135 136 137 |
# File 'lib/stripe/resources/balance_transfer.rb', line 135 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
131 132 133 |
# File 'lib/stripe/resources/balance_transfer.rb', line 131 def self.inner_class_types @inner_class_types = { destination_balance: DestinationBalance, source_balance: SourceBalance } end |
.object_name ⇒ Object
11 12 13 |
# File 'lib/stripe/resources/balance_transfer.rb', line 11 def self.object_name "balance_transfer" end |