class Pohoda::Parsers::Idp::SetPricesType

Public Instance Methods

price_groups() click to toggle source
# File lib/pohoda/parsers/idp/set_prices_type.rb, line 11
def price_groups
  array_of_at(Idp::PriceGroupItemType, ['idp:priceGroups', 'idp:priceGroupItem'])
end
stocks() click to toggle source
# File lib/pohoda/parsers/idp/set_prices_type.rb, line 7
def stocks
  array_of_at(Idp::StockItemType, ['idp:stocks', 'idp:stockItem'])
end
to_h() click to toggle source
# File lib/pohoda/parsers/idp/set_prices_type.rb, line 15
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:stocks] = stocks.map(&:to_h) if has? 'idp:stocks'
  hash[:price_groups] = price_groups.map(&:to_h) if has? 'idp:priceGroups'

  hash
end