Class: Hbci::Segments::HISALv6

Inherits:
Hbci::Segment show all
Defined in:
lib/hbci/segments/hisal.rb

Instance Attribute Summary

Attributes inherited from Hbci::Segment

#defined_element_groups, #dialog, #element_groups, #message, #request_message

Instance Method Summary collapse

Methods inherited from Hbci::Segment

#build, #compile, element, element_group, element_groups_to_be_defined, fill, #initialize, #to_s

Constructor Details

This class inherits a constructor from Hbci::Segment

Instance Method Details

#booked_amountObject



68
69
70
71
72
73
74
# File 'lib/hbci/segments/hisal.rb', line 68

def booked_amount
  sign = case booked.credit_debit
         when 'C' then 1
         when 'D' then -1
         end
  sign * Monetize.parse(booked.value, booked.curr)
end