class Pohoda::Parsers::Grs::VariantsItemType

Public Instance Methods

action_type() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 7
def action_type
  submodel_at(Typ::ActionTypeItemAddDelete, 'grs:actionType')
end
name() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 23
def name
  at 'grs:name'
end
name_attributes() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 27
def name_attributes
  attributes_at 'grs:name'
end
order() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 15
def order
  at 'grs:order'
end
order_attributes() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 19
def order_attributes
  attributes_at 'grs:order'
end
quantity() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 31
def quantity
  at 'grs:quantity'
end
quantity_attributes() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 35
def quantity_attributes
  attributes_at 'grs:quantity'
end
stock_item() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 11
def stock_item
  submodel_at(Typ::StockItemType, 'grs:stockItem')
end
to_h() click to toggle source
# File lib/pohoda/parsers/grs/variants_item_type.rb, line 39
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:action_type] = action_type.to_h if has? 'grs:actionType'
  hash[:stock_item] = stock_item.to_h if has? 'grs:stockItem'
  hash[:order] = order if has? 'grs:order'
  hash[:order_attributes] = order_attributes if has? 'grs:order'
  hash[:name] = name if has? 'grs:name'
  hash[:name_attributes] = name_attributes if has? 'grs:name'
  hash[:quantity] = quantity if has? 'grs:quantity'
  hash[:quantity_attributes] = quantity_attributes if has? 'grs:quantity'

  hash
end