Method: CoinSync::Importers::BitBayAPI::HistoryEntry#initialize

Defined in:
lib/coinsync/importers/bitbay_api.rb

#initialize(hash) ⇒ HistoryEntry

Returns a new instance of HistoryEntry.



34
35
36
37
38
39
# File 'lib/coinsync/importers/bitbay_api.rb', line 34

def initialize(hash)
  @date = POLISH_TIMEZONE.local_to_utc(Time.parse(hash['time']))
  @amount = BigDecimal.new(hash['amount'])
  @type = hash['operation_type']
  @currency = parse_currency(hash['currency'])
end