Class: Stripe::V2::MoneyManagement::Transaction

Inherits:
APIResource show all
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: BalanceImpact, Counterparty, Flow, StatusTransitions

Constant Summary collapse

OBJECT_NAME =
"v2.money_management.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

#==, #[], #[]=, #_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

#amountObject (readonly)

The amount of the Transaction.



126
127
128
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 126

def amount
  @amount
end

#balance_impactObject (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.



129
130
131
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 129

def balance_impact
  @balance_impact
end

#categoryObject (readonly)

Open Enum. A descriptive category used to classify the Transaction.



131
132
133
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 131

def category
  @category
end

#counterpartyObject (readonly)

Counterparty to this Transaction.



133
134
135
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 133

def counterparty
  @counterparty
end

#createdObject (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.



135
136
137
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 135

def created
  @created
end

#descriptionObject (readonly)

Description of this Transaction. When applicable, the description is copied from the Flow object at the time of transaction creation.



138
139
140
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 138

def description
  @description
end

#financial_accountObject (readonly)

Indicates the FinancialAccount affected by this Transaction.



140
141
142
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 140

def 
  @financial_account
end

#flowObject (readonly)

Details about the Flow object that created the Transaction.



142
143
144
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 142

def flow
  @flow
end

#idObject (readonly)

Unique identifier for the object.



144
145
146
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 144

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.



158
159
160
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 158

def livemode
  @livemode
end

#objectObject (readonly)

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



146
147
148
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 146

def object
  @object
end

#statusObject (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.



152
153
154
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 152

def status
  @status
end

#status_transitionsObject (readonly)

Timestamps for when the Transaction transitioned to a particular status.



154
155
156
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 154

def status_transitions
  @status_transitions
end

#treasury_transactionObject (readonly)

The v1 Treasury transaction associated with this transaction.



156
157
158
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 156

def treasury_transaction
  @treasury_transaction
end

Class Method Details

.field_remappingsObject



169
170
171
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 169

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



160
161
162
163
164
165
166
167
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 160

def self.inner_class_types
  @inner_class_types = {
    balance_impact: BalanceImpact,
    counterparty: Counterparty,
    flow: Flow,
    status_transitions: StatusTransitions,
  }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/v2/money_management/transaction.rb', line 10

def self.object_name
  "v2.money_management.transaction"
end