Class: Stripe::CustomerCashBalanceTransaction

Inherits:
APIResource show all
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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

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

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

#adjusted_for_overdraftObject (readonly)

Attribute for field adjusted_for_overdraft



94
95
96
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 94

def adjusted_for_overdraft
  @adjusted_for_overdraft
end

#applied_to_paymentObject (readonly)

Attribute for field applied_to_payment



96
97
98
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 96

def applied_to_payment
  @applied_to_payment
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



98
99
100
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 98

def created
  @created
end

#currencyObject (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).



100
101
102
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 100

def currency
  @currency
end

#customerObject (readonly)

The customer whose available cash balance changed as a result of this transaction.



102
103
104
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 102

def customer
  @customer
end

#ending_balanceObject (readonly)

The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal).



104
105
106
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 104

def ending_balance
  @ending_balance
end

#fundedObject (readonly)

Attribute for field funded



106
107
108
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 106

def funded
  @funded
end

#idObject (readonly)

Unique identifier for the object.



108
109
110
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 108

def id
  @id
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.



110
111
112
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 110

def livemode
  @livemode
end

#net_amountObject (readonly)

The amount by which the cash balance changed, represented in the [smallest currency unit](stripe.com/docs/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.



112
113
114
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 112

def net_amount
  @net_amount
end

#objectObject (readonly)

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



114
115
116
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 114

def object
  @object
end

#refunded_from_paymentObject (readonly)

Attribute for field refunded_from_payment



116
117
118
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 116

def refunded_from_payment
  @refunded_from_payment
end

#transferred_to_balanceObject (readonly)

Attribute for field transferred_to_balance



118
119
120
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 118

def transferred_to_balance
  @transferred_to_balance
end

#typeObject (readonly)

The type of the cash balance transaction. New types may be added in future. See [Customer Balance](stripe.com/docs/payments/customer-balance#types) to learn more about these types.



120
121
122
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 120

def type
  @type
end

#unapplied_from_paymentObject (readonly)

Attribute for field unapplied_from_payment



122
123
124
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 122

def unapplied_from_payment
  @unapplied_from_payment
end

Class Method Details

.object_nameObject



11
12
13
# File 'lib/stripe/resources/customer_cash_balance_transaction.rb', line 11

def self.object_name
  "customer_cash_balance_transaction"
end