lib/onix/apa_product.rb
def sales_restriction_type=(type)
      composite = product.sales_restrictions.first
      if composite.nil?
        composite =  ONIX::SalesRestriction.new
        product.sales_restrictions << composite
      end
      composite.sales_restriction_type = type
    end
def sales_restriction_type=(type)
      composite = product.sales_restrictions.first
      if composite.nil?
        composite =  ONIX::SalesRestriction.new
        product.sales_restrictions << composite
      end
      composite.sales_restriction_type = type
    end
def sales_restriction_type = ( type ) composite = product . sales_restrictions . first if composite . nil? composite = ONIX :: SalesRestriction . new product . sales_restrictions << composite end composite . sales_restriction_type = type end
set a new sales restriction type
set a new sales restriction type