class Pohoda::Parsers::Vyr::VyrobaItemType

Public Instance Methods

expiration_date() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 19
def expiration_date
  at 'vyr:expirationDate'
end
expiration_date_attributes() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 23
def expiration_date_attributes
  attributes_at 'vyr:expirationDate'
end
note() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 27
def note
  at 'vyr:note'
end
note_attributes() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 31
def note_attributes
  attributes_at 'vyr:note'
end
quantity() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 7
def quantity
  at 'vyr:quantity'
end
quantity_attributes() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 11
def quantity_attributes
  attributes_at 'vyr:quantity'
end
stock_item() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 15
def stock_item
  submodel_at(Typ::StockItemType, 'vyr:stockItem')
end
to_h() click to toggle source
# File lib/pohoda/parsers/vyr/vyroba_item_type.rb, line 35
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:quantity] = quantity if has? 'vyr:quantity'
  hash[:quantity_attributes] = quantity_attributes if has? 'vyr:quantity'
  hash[:stock_item] = stock_item.to_h if has? 'vyr:stockItem'
  hash[:expiration_date] = expiration_date if has? 'vyr:expirationDate'
  hash[:expiration_date_attributes] = expiration_date_attributes if has? 'vyr:expirationDate'
  hash[:note] = note if has? 'vyr:note'
  hash[:note_attributes] = note_attributes if has? 'vyr:note'

  hash
end