class Pohoda::Parsers::Pro::ProdejkaItemType

Public Instance Methods

accounting() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 111
def accounting
  submodel_at(Typ::RefType, 'pro:accounting')
end
activity() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 119
def activity
  submodel_at(Typ::RefType, 'pro:activity')
end
centre() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 115
def centre
  submodel_at(Typ::RefType, 'pro:centre')
end
code() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 83
def code
  at 'pro:code'
end
code_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 87
def code_attributes
  attributes_at 'pro:code'
end
coefficient() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 31
def coefficient
  at 'pro:coefficient'
end
coefficient_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 35
def coefficient_attributes
  attributes_at 'pro:coefficient'
end
contract() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 123
def contract
  submodel_at(Typ::RefType, 'pro:contract')
end
discount_percentage() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 63
def discount_percentage
  at 'pro:discountPercentage'
end
discount_percentage_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 67
def discount_percentage_attributes
  attributes_at 'pro:discountPercentage'
end
eet_item() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 135
def eet_item
  at 'pro:EETItem'
end
eet_item_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 139
def eet_item_attributes
  attributes_at 'pro:EETItem'
end
expiration_date() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 127
def expiration_date
  at 'pro:expirationDate'
end
expiration_date_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 131
def expiration_date_attributes
  attributes_at 'pro:expirationDate'
end
guarantee() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 91
def guarantee
  at 'pro:guarantee'
end
guarantee_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 95
def guarantee_attributes
  attributes_at 'pro:guarantee'
end
guarantee_type() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 99
def guarantee_type
  at 'pro:guaranteeType'
end
guarantee_type_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 103
def guarantee_type_attributes
  attributes_at 'pro:guaranteeType'
end
home_currency() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 71
def home_currency
  submodel_at(Typ::TypeCurrencyHomeItem, 'pro:homeCurrency')
end
note() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 75
def note
  at 'pro:note'
end
note_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 79
def note_attributes
  attributes_at 'pro:note'
end
parameters() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 143
def parameters
  array_of_at(Typ::ParameterDocType, ['pro:parameters', 'typ:parameter'])
end
pay_vat() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 39
def pay_vat
  at 'pro:payVAT'
end
pay_vat_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 43
def pay_vat_attributes
  attributes_at 'pro:payVAT'
end
percent_vat() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 55
def percent_vat
  at 'pro:percentVAT'
end
percent_vat_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 59
def percent_vat_attributes
  attributes_at 'pro:percentVAT'
end
quantity() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 15
def quantity
  at 'pro:quantity'
end
quantity_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 19
def quantity_attributes
  attributes_at 'pro:quantity'
end
rate_vat() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 47
def rate_vat
  at 'pro:rateVAT'
end
rate_vat_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 51
def rate_vat_attributes
  attributes_at 'pro:rateVAT'
end
stock_item() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 107
def stock_item
  submodel_at(Typ::StockItemType, 'pro:stockItem')
end
text() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 7
def text
  at 'pro:text'
end
text_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 11
def text_attributes
  attributes_at 'pro:text'
end
to_h() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 147
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:text] = text if has? 'pro:text'
  hash[:text_attributes] = text_attributes if has? 'pro:text'
  hash[:quantity] = quantity if has? 'pro:quantity'
  hash[:quantity_attributes] = quantity_attributes if has? 'pro:quantity'
  hash[:unit] = unit if has? 'pro:unit'
  hash[:unit_attributes] = unit_attributes if has? 'pro:unit'
  hash[:coefficient] = coefficient if has? 'pro:coefficient'
  hash[:coefficient_attributes] = coefficient_attributes if has? 'pro:coefficient'
  hash[:pay_vat] = pay_vat if has? 'pro:payVAT'
  hash[:pay_vat_attributes] = pay_vat_attributes if has? 'pro:payVAT'
  hash[:rate_vat] = rate_vat if has? 'pro:rateVAT'
  hash[:rate_vat_attributes] = rate_vat_attributes if has? 'pro:rateVAT'
  hash[:percent_vat] = percent_vat if has? 'pro:percentVAT'
  hash[:percent_vat_attributes] = percent_vat_attributes if has? 'pro:percentVAT'
  hash[:discount_percentage] = discount_percentage if has? 'pro:discountPercentage'
  hash[:discount_percentage_attributes] = discount_percentage_attributes if has? 'pro:discountPercentage'
  hash[:home_currency] = home_currency.to_h if has? 'pro:homeCurrency'
  hash[:note] = note if has? 'pro:note'
  hash[:note_attributes] = note_attributes if has? 'pro:note'
  hash[:code] = code if has? 'pro:code'
  hash[:code_attributes] = code_attributes if has? 'pro:code'
  hash[:guarantee] = guarantee if has? 'pro:guarantee'
  hash[:guarantee_attributes] = guarantee_attributes if has? 'pro:guarantee'
  hash[:guarantee_type] = guarantee_type if has? 'pro:guaranteeType'
  hash[:guarantee_type_attributes] = guarantee_type_attributes if has? 'pro:guaranteeType'
  hash[:stock_item] = stock_item.to_h if has? 'pro:stockItem'
  hash[:accounting] = accounting.to_h if has? 'pro:accounting'
  hash[:centre] = centre.to_h if has? 'pro:centre'
  hash[:activity] = activity.to_h if has? 'pro:activity'
  hash[:contract] = contract.to_h if has? 'pro:contract'
  hash[:expiration_date] = expiration_date if has? 'pro:expirationDate'
  hash[:expiration_date_attributes] = expiration_date_attributes if has? 'pro:expirationDate'
  hash[:eet_item] = eet_item if has? 'pro:EETItem'
  hash[:eet_item_attributes] = eet_item_attributes if has? 'pro:EETItem'
  hash[:parameters] = parameters.map(&:to_h) if has? 'pro:parameters'

  hash
end
unit() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 23
def unit
  at 'pro:unit'
end
unit_attributes() click to toggle source
# File lib/pohoda/parsers/pro/prodejka_item_type.rb, line 27
def unit_attributes
  attributes_at 'pro:unit'
end