Class: Fintoc::V2::Movement

Inherits:
Object
  • Object
show all
Defined in:
lib/fintoc/v2/resources/movement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = 
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def 
  @account_id
end

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def amount
  @amount
end

#balanceObject (readonly)

Returns the value of attribute balance.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def balance
  @balance
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def currency
  @currency
end

#directionObject (readonly)

Returns the value of attribute direction.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def direction
  @direction
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def id
  @id
end

#modeObject (readonly)

Returns the value of attribute mode.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def mode
  @mode
end

#objectObject (readonly)

Returns the value of attribute object.



4
5
6
# File 'lib/fintoc/v2/resources/movement.rb', line 4

def object
  @object
end

#resource_idObject (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_idObject (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_dateObject (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

#typeObject (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

#hashObject



43
44
45
# File 'lib/fintoc/v2/resources/movement.rb', line 43

def hash
  @id.hash
end

#to_sObject



47
48
49
# File 'lib/fintoc/v2/resources/movement.rb', line 47

def to_s
  "#{@direction} #{@amount} #{@currency} (#{@type})"
end