Sha256: c17d3995a268117b65ce62bc818effb31918e214cf0cfdb4fecf952da624e512

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

# coding: utf-8

class Cacofonix::Stock < Cacofonix::Element
  xml_name "Stock"
  onix_composite :location_identifier, Cacofonix::LocationIdentifier, :singular => true
  xml_accessor :location_name, :from => "LocationName"
  onix_composite :stock_quantity_coded, Cacofonix::StockQuantityCoded, :singular => true

  # NOTE: these *should* be numeric fields according to the spec,
  #       but heaps of ONIX files in the wild use text
  xml_accessor :on_hand, :from => "OnHand"
  xml_accessor :on_order, :from => "OnOrder"

  xml_accessor :cbo, :from => "CBO"
  onix_composite :on_order_detail, Cacofonix::OnOrderDetail, :singular => true
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cacofonix-0.10.3 lib/cacofonix/elements/stock.rb
cacofonix-0.10.2 lib/cacofonix/elements/stock.rb
cacofonix-0.10.1 lib/cacofonix/elements/stock.rb
cacofonix-0.10.0 lib/cacofonix/elements/stock.rb