Class: Fintoc::V1::Balance

Inherits:
Object
  • Object
show all
Defined in:
lib/fintoc/v1/resources/balance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(available:, current:, limit:) ⇒ Balance

Returns a new instance of Balance.



8
9
10
11
12
# File 'lib/fintoc/v1/resources/balance.rb', line 8

def initialize(available:, current:, limit:)
  @available = available
  @current = current
  @limit = limit
end

Instance Attribute Details

#availableObject (readonly)

Returns the value of attribute available.



6
7
8
# File 'lib/fintoc/v1/resources/balance.rb', line 6

def available
  @available
end

#currentObject (readonly)

Returns the value of attribute current.



6
7
8
# File 'lib/fintoc/v1/resources/balance.rb', line 6

def current
  @current
end

#limitObject (readonly)

Returns the value of attribute limit.



6
7
8
# File 'lib/fintoc/v1/resources/balance.rb', line 6

def limit
  @limit
end

Instance Method Details

#idObject



14
15
16
# File 'lib/fintoc/v1/resources/balance.rb', line 14

def id
  object_id
end

#inspectObject



22
23
24
# File 'lib/fintoc/v1/resources/balance.rb', line 22

def inspect
  "<Fintoc::V1::Balance #{@available} (#{@current})>"
end

#to_sObject



18
19
20
# File 'lib/fintoc/v1/resources/balance.rb', line 18

def to_s
  "#{@available} (#{@current})"
end