Class: Mondo::Balance

Inherits:
Resource show all
Defined in:
lib/api/mondo/balance.rb

Instance Attribute Summary

Attributes inherited from Resource

#client, #raw_data

Instance Method Summary collapse

Methods inherited from Resource

boolean_accessor, boolean_reader, date_accessor, date_writer, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Mondo::Resource

Instance Method Details

#balanceObject



3
4
5
# File 'lib/api/mondo/balance.rb', line 3

def balance
  Money.new(raw_data['balance'], currency)
end

#currencyObject



11
12
13
# File 'lib/api/mondo/balance.rb', line 11

def currency
  Money::Currency.new(raw_data['currency'])
end

#spent_todayObject



7
8
9
# File 'lib/api/mondo/balance.rb', line 7

def spent_today
  Money.new(raw_data['spent_today'], currency)
end