class Pohoda::Parsers::Grs::GroupStocksType

Public Instance Methods

action_type() click to toggle source
# File lib/pohoda/parsers/grs/group_stocks_type.rb, line 7
def action_type
  at 'grs:actionType'
end
action_type_attributes() click to toggle source
# File lib/pohoda/parsers/grs/group_stocks_type.rb, line 11
def action_type_attributes
  attributes_at 'grs:actionType'
end
group_stocks_detail() click to toggle source
# File lib/pohoda/parsers/grs/group_stocks_type.rb, line 19
def group_stocks_detail
  array_of_at(Gr::VariantsItemType, ['grs:groupStocksDetail', 'grs:variant'])
end
group_stocks_header() click to toggle source
# File lib/pohoda/parsers/grs/group_stocks_type.rb, line 15
def group_stocks_header
  submodel_at(Grs::GroupStocksHeaderType, 'grs:groupStocksHeader')
end
to_h() click to toggle source
# File lib/pohoda/parsers/grs/group_stocks_type.rb, line 23
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:action_type] = action_type if has? 'grs:actionType'
  hash[:action_type_attributes] = action_type_attributes if has? 'grs:actionType'
  hash[:group_stocks_header] = group_stocks_header.to_h if has? 'grs:groupStocksHeader'
  hash[:group_stocks_detail] = group_stocks_detail.map(&:to_h) if has? 'grs:groupStocksDetail'

  hash
end