Class: Fintoc::V2::AccountStatement

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, object:, start_date:, end_date:, total_debited_cents:, total_credited_cents:, initial_balance_cents:, final_balance_cents:, download_url:, created_at:) ⇒ AccountStatement

Returns a new instance of AccountStatement.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fintoc/v2/resources/account_statement.rb', line 8

def initialize(
  id:,
  object:,
  start_date:,
  end_date:,
  total_debited_cents:,
  total_credited_cents:,
  initial_balance_cents:,
  final_balance_cents:,
  download_url:,
  created_at:,
  **
)
  @id = id
  @object = object
  @start_date = start_date
  @end_date = end_date
  @total_debited_cents = total_debited_cents
  @total_credited_cents = total_credited_cents
  @initial_balance_cents = initial_balance_cents
  @final_balance_cents = final_balance_cents
  @download_url = download_url
  @created_at = created_at
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#download_urlObject (readonly)

Returns the value of attribute download_url.



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

def download_url
  @download_url
end

#end_dateObject (readonly)

Returns the value of attribute end_date.



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

def end_date
  @end_date
end

#final_balance_centsObject (readonly)

Returns the value of attribute final_balance_cents.



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

def final_balance_cents
  @final_balance_cents
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#initial_balance_centsObject (readonly)

Returns the value of attribute initial_balance_cents.



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

def initial_balance_cents
  @initial_balance_cents
end

#objectObject (readonly)

Returns the value of attribute object.



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

def object
  @object
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



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

def start_date
  @start_date
end

#total_credited_centsObject (readonly)

Returns the value of attribute total_credited_cents.



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

def total_credited_cents
  @total_credited_cents
end

#total_debited_centsObject (readonly)

Returns the value of attribute total_debited_cents.



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

def total_debited_cents
  @total_debited_cents
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



33
34
35
# File 'lib/fintoc/v2/resources/account_statement.rb', line 33

def ==(other)
  @id == other.id
end

#hashObject



39
40
41
# File 'lib/fintoc/v2/resources/account_statement.rb', line 39

def hash
  @id.hash
end

#to_sObject



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

def to_s
  "AccountStatement(#{@id}) #{@start_date} - #{@end_date}"
end