Class: Stripe::V2::MoneyManagement::Transaction
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::MoneyManagement::Transaction
- Defined in:
- lib/stripe/resources/v2/money_management/transaction.rb
Overview
Use Transactions to view changes to your FinancialAccount balance over time. Every flow that moves money, such as OutboundPayments or ReceivedCredits, will have one or more Transactions that describes how the flow impacted your balance. Note that while the FinancialAccount balance will always be up to date, be aware that Transactions and TransactionEntries are created shortly after to reflect changes.
Defined Under Namespace
Classes: Amount, BalanceImpact, Flow, StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"v2.money_management.transaction"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
The amount of the Transaction.
-
#balance_impact ⇒ Object
readonly
The delta to the FinancialAccount’s balance.
-
#category ⇒ Object
readonly
Open Enum.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#financial_account ⇒ Object
readonly
Indicates the FinancialAccount affected by this Transaction.
-
#flow ⇒ Object
readonly
Details about the Flow object that created the Transaction.
-
#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.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#status ⇒ Object
readonly
Closed Enum.
-
#status_transitions ⇒ Object
readonly
Timestamps for when the Transaction transitioned to a particular status.
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
#amount ⇒ Object (readonly)
The amount of the Transaction.
160 161 162 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 160 def amount @amount end |
#balance_impact ⇒ Object (readonly)
The delta to the FinancialAccount’s balance. The balance_impact for the Transaction is equal to sum of its TransactionEntries that have ‘effective_at`s in the past.
163 164 165 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 163 def balance_impact @balance_impact end |
#category ⇒ Object (readonly)
Open Enum. A descriptive category used to classify the Transaction.
165 166 167 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 165 def category @category end |
#created ⇒ Object (readonly)
Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
167 168 169 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 167 def created @created end |
#financial_account ⇒ Object (readonly)
Indicates the FinancialAccount affected by this Transaction.
169 170 171 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 169 def financial_account @financial_account end |
#flow ⇒ Object (readonly)
Details about the Flow object that created the Transaction.
171 172 173 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 171 def flow @flow end |
#id ⇒ Object (readonly)
Unique identifier for the object.
173 174 175 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 173 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.
185 186 187 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 185 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
175 176 177 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 175 def object @object end |
#status ⇒ Object (readonly)
Closed Enum. Current status of the Transaction. A Transaction is ‘pending` if either `balance_impact.inbound_pending` or `balance_impact.outbound_pending` is non-zero. A Transaction is `posted` if only `balance_impact.available` is non-zero. A Transaction is `void` if there is no balance impact. `posted` and `void` are terminal states, and no additional entries will be added to the Transaction.
181 182 183 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 181 def status @status end |
#status_transitions ⇒ Object (readonly)
Timestamps for when the Transaction transitioned to a particular status.
183 184 185 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 183 def status_transitions @status_transitions end |
Class Method Details
.field_remappings ⇒ Object
196 197 198 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 196 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
187 188 189 190 191 192 193 194 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 187 def self.inner_class_types @inner_class_types = { amount: Amount, balance_impact: BalanceImpact, flow: Flow, status_transitions: StatusTransitions, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 10 def self.object_name "v2.money_management.transaction" end |