Class: OctaSpace::Types::Balance

Inherits:
Data
  • Object
show all
Defined in:
lib/octaspace/types/balance.rb

Overview

Value object representing an account balance

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



6
7
8
# File 'lib/octaspace/types/balance.rb', line 6

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency

Returns:

  • (Object)

    the current value of currency



6
7
8
# File 'lib/octaspace/types/balance.rb', line 6

def currency
  @currency
end

Instance Method Details

#to_sString

Returns:

  • (String)


8
# File 'lib/octaspace/types/balance.rb', line 8

def to_s = "#{amount} #{currency}"