Class: Fintoc::V2::Movement
- Inherits:
-
Object
- Object
- Fintoc::V2::Movement
- Defined in:
- lib/fintoc/v2/resources/movement.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#return_pair_id ⇒ Object
readonly
Returns the value of attribute return_pair_id.
-
#transaction_date ⇒ Object
readonly
Returns the value of attribute transaction_date.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(id:, object:, type:, direction:, mode:, amount:, currency:, transaction_date:, balance:, account_id:, resource_id: nil, return_pair_id: nil) ⇒ Movement
constructor
A new instance of Movement.
- #to_s ⇒ Object
Constructor Details
#initialize(id:, object:, type:, direction:, mode:, amount:, currency:, transaction_date:, balance:, account_id:, resource_id: nil, return_pair_id: nil) ⇒ Movement
Returns a new instance of Movement.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/fintoc/v2/resources/movement.rb', line 8 def initialize( id:, object:, type:, direction:, mode:, amount:, currency:, transaction_date:, balance:, account_id:, resource_id: nil, return_pair_id: nil, ** ) @id = id @object = object @type = type @direction = direction @resource_id = resource_id @mode = mode @amount = amount @currency = currency @transaction_date = transaction_date @return_pair_id = return_pair_id @balance = balance @account_id = account_id end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def account_id @account_id end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def amount @amount end |
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def balance @balance end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def currency @currency end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def direction @direction end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def id @id end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def mode @mode end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def object @object end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def resource_id @resource_id end |
#return_pair_id ⇒ Object (readonly)
Returns the value of attribute return_pair_id.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def return_pair_id @return_pair_id end |
#transaction_date ⇒ Object (readonly)
Returns the value of attribute transaction_date.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def transaction_date @transaction_date end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/fintoc/v2/resources/movement.rb', line 4 def type @type end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
37 38 39 |
# File 'lib/fintoc/v2/resources/movement.rb', line 37 def ==(other) @id == other.id end |
#hash ⇒ Object
43 44 45 |
# File 'lib/fintoc/v2/resources/movement.rb', line 43 def hash @id.hash end |
#to_s ⇒ Object
47 48 49 |
# File 'lib/fintoc/v2/resources/movement.rb', line 47 def to_s "#{@direction} #{@amount} #{@currency} (#{@type})" end |