Class: Stripe::CustomerCashBalanceTransaction
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::CustomerCashBalanceTransaction
- Defined in:
- lib/stripe/resources/customer_cash_balance_transaction.rb
Overview
Customers with certain payments enabled have a cash balance, representing funds that were paid by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions represent when funds are moved into or out of this balance. This includes funding by the customer, allocation to payments, and refunds to the customer.
Defined Under Namespace
Classes: AdjustedForOverdraft, AppliedToPayment, Funded, RefundedFromPayment, TransferredToBalance, UnappliedFromPayment
Constant Summary collapse
- OBJECT_NAME =
"customer_cash_balance_transaction"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#adjusted_for_overdraft ⇒ Object
readonly
Attribute for field adjusted_for_overdraft.
-
#applied_to_payment ⇒ Object
readonly
Attribute for field applied_to_payment.
-
#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.
-
#customer ⇒ Object
readonly
The customer whose available cash balance changed as a result of this transaction.
-
#customer_account ⇒ Object
readonly
The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.
-
#ending_balance ⇒ Object
readonly
The total available cash balance for the specified currency after this transaction was applied.
-
#funded ⇒ Object
readonly
Attribute for field funded.
-
#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.
-
#net_amount ⇒ Object
readonly
The amount by which the cash balance changed, represented in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#refunded_from_payment ⇒ Object
readonly
Attribute for field refunded_from_payment.
-
#transferred_to_balance ⇒ Object
readonly
Attribute for field transferred_to_balance.
-
#type ⇒ Object
readonly
The type of the cash balance transaction.
-
#unapplied_from_payment ⇒ Object
readonly
Attribute for field unapplied_from_payment.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
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
#adjusted_for_overdraft ⇒ Object (readonly)
Attribute for field adjusted_for_overdraft
187 188 189 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 187 def adjusted_for_overdraft @adjusted_for_overdraft end |
#applied_to_payment ⇒ Object (readonly)
Attribute for field applied_to_payment
189 190 191 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 189 def applied_to_payment @applied_to_payment end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
191 192 193 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 191 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).
193 194 195 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 193 def currency @currency end |
#customer ⇒ Object (readonly)
The customer whose available cash balance changed as a result of this transaction.
195 196 197 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 195 def customer @customer end |
#customer_account ⇒ Object (readonly)
The ID of an Account representing a customer whose available cash balance changed as a result of this transaction.
197 198 199 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 197 def customer_account @customer_account end |
#ending_balance ⇒ Object (readonly)
The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal).
199 200 201 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 199 def ending_balance @ending_balance end |
#funded ⇒ Object (readonly)
Attribute for field funded
201 202 203 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 201 def funded @funded end |
#id ⇒ Object (readonly)
Unique identifier for the object.
203 204 205 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 203 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.
205 206 207 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 205 def livemode @livemode end |
#net_amount ⇒ Object (readonly)
The amount by which the cash balance changed, represented in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
207 208 209 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 207 def net_amount @net_amount end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
209 210 211 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 209 def object @object end |
#refunded_from_payment ⇒ Object (readonly)
Attribute for field refunded_from_payment
211 212 213 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 211 def refunded_from_payment @refunded_from_payment end |
#transferred_to_balance ⇒ Object (readonly)
Attribute for field transferred_to_balance
213 214 215 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 213 def transferred_to_balance @transferred_to_balance end |
#type ⇒ Object (readonly)
The type of the cash balance transaction. New types may be added in future. See [Customer Balance](docs.stripe.com/payments/customer-balance#types) to learn more about these types.
215 216 217 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 215 def type @type end |
#unapplied_from_payment ⇒ Object (readonly)
Attribute for field unapplied_from_payment
217 218 219 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 217 def unapplied_from_payment @unapplied_from_payment end |
Class Method Details
.field_remappings ⇒ Object
230 231 232 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 230 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 219 def self.inner_class_types @inner_class_types = { adjusted_for_overdraft: AdjustedForOverdraft, applied_to_payment: AppliedToPayment, funded: Funded, refunded_from_payment: RefundedFromPayment, transferred_to_balance: TransferredToBalance, unapplied_from_payment: UnappliedFromPayment, } end |
.object_name ⇒ Object
11 12 13 |
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 11 def self.object_name "customer_cash_balance_transaction" end |