class Pohoda::Parsers::Typ::OrderStockItemType

Public Instance Methods

action_type() click to toggle source
# File lib/pohoda/parsers/typ/order_stock_item_type.rb, line 7
def action_type
  submodel_at(Typ::ActionTypeStockItem, 'typ:actionType')
end
stock_item() click to toggle source
# File lib/pohoda/parsers/typ/order_stock_item_type.rb, line 19
def stock_item
  submodel_at(Typ::StockRefType, 'typ:stockItem')
end
stock_order() click to toggle source
# File lib/pohoda/parsers/typ/order_stock_item_type.rb, line 11
def stock_order
  at 'typ:stockOrder'
end
stock_order_attributes() click to toggle source
# File lib/pohoda/parsers/typ/order_stock_item_type.rb, line 15
def stock_order_attributes
  attributes_at 'typ:stockOrder'
end
to_h() click to toggle source
# File lib/pohoda/parsers/typ/order_stock_item_type.rb, line 23
def to_h
  hash = {}
  hash[:attributes] = attributes

  hash[:action_type] = action_type.to_h if has? 'typ:actionType'
  hash[:stock_order] = stock_order if has? 'typ:stockOrder'
  hash[:stock_order_attributes] = stock_order_attributes if has? 'typ:stockOrder'
  hash[:stock_item] = stock_item.to_h if has? 'typ:stockItem'

  hash
end