class Pohoda::Parsers::Typ::StockRefType

Public Instance Methods

ean() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 27
def ean
  at 'typ:EAN'
end
ean_attributes() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 31
def ean_attributes
  attributes_at 'typ:EAN'
end
ext_id() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 23
def ext_id
  submodel_at(Typ::ExtIdType, 'typ:extId')
end
id() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 7
def id
  at 'typ:id'
end
id_attributes() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 11
def id_attributes
  attributes_at 'typ:id'
end
ids() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 15
def ids
  at 'typ:ids'
end
ids_attributes() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 19
def ids_attributes
  attributes_at 'typ:ids'
end
plu() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 35
def plu
  at 'typ:PLU'
end
plu_attributes() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 39
def plu_attributes
  attributes_at 'typ:PLU'
end
to_h() click to toggle source
# File lib/pohoda/parsers/typ/stock_ref_type.rb, line 43
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:id] = id if has? 'typ:id'
  hash[:id_attributes] = id_attributes if has? 'typ:id'
  hash[:ids] = ids if has? 'typ:ids'
  hash[:ids_attributes] = ids_attributes if has? 'typ:ids'
  hash[:ext_id] = ext_id.to_h if has? 'typ:extId'
  hash[:ean] = ean if has? 'typ:EAN'
  hash[:ean_attributes] = ean_attributes if has? 'typ:EAN'
  hash[:plu] = plu if has? 'typ:PLU'
  hash[:plu_attributes] = plu_attributes if has? 'typ:PLU'

  hash
end