class Pohoda::Parsers::Pay::ForeignCurrencyType2

Public Instance Methods

amount() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 19
def amount
  at 'pay:amount'
end
amount_attributes() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 23
def amount_attributes
  attributes_at 'pay:amount'
end
currency() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 7
def currency
  submodel_at(Typ::RefType, 'pay:currency')
end
rate() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 11
def rate
  at 'pay:rate'
end
rate_attributes() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 15
def rate_attributes
  attributes_at 'pay:rate'
end
rate_automaticaly() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 27
def rate_automaticaly
  at 'pay:rateAutomaticaly'
end
rate_automaticaly_attributes() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 31
def rate_automaticaly_attributes
  attributes_at 'pay:rateAutomaticaly'
end
to_h() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 43
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:currency] = currency.to_h if has? 'pay:currency'
  hash[:rate] = rate if has? 'pay:rate'
  hash[:rate_attributes] = rate_attributes if has? 'pay:rate'
  hash[:amount] = amount if has? 'pay:amount'
  hash[:amount_attributes] = amount_attributes if has? 'pay:amount'
  hash[:rate_automaticaly] = rate_automaticaly if has? 'pay:rateAutomaticaly'
  hash[:rate_automaticaly_attributes] = rate_automaticaly_attributes if has? 'pay:rateAutomaticaly'
  hash[:use_yesterday_rate] = use_yesterday_rate if has? 'pay:useYesterdayRate'
  hash[:use_yesterday_rate_attributes] = use_yesterday_rate_attributes if has? 'pay:useYesterdayRate'

  hash
end
use_yesterday_rate() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 35
def use_yesterday_rate
  at 'pay:useYesterdayRate'
end
use_yesterday_rate_attributes() click to toggle source
# File lib/pohoda/parsers/pay/foreign_currency_type2.rb, line 39
def use_yesterday_rate_attributes
  attributes_at 'pay:useYesterdayRate'
end