Sha256: 1d1896ea1327bbe9fb722c49a68781ca838ab94afb558593a54f931b637057b7

Contents?: true

Size: 802 Bytes

Versions: 14

Compression:

Stored size: 802 Bytes

Contents

module EfoNelfo
  module V40
    class VA < PostType
      property :post_type,      alias: :PostType,     limit: 2, required: true, default: post_type
      property :product_type,   alias: :VareMrk,      limit: 1, type: :integer, required: true
      property :product_number, alias: :VareNr,       limit: 14, required: true
      property :type,           alias: :VaType,       limit: 1, required: true
      property :sales_package,  alias: :SalgsPakning, limit: 9, type: :integer

      def nrf_id
        product_type == 4 && product_number.strip
      end

      def replacement?
        type == 'E'
      end

      def alternative?
        type == 'A'
      end

      def alternative_id?
        type == 'V'
      end

      def package_size?
        type == 'P'
      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
efo_nelfo-2.0.0 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.7.0 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.6.2 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.6.1 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.6.0 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.5 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.4 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.3 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.2 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.1 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.5.0 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.4.0 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.3.2 lib/efo_nelfo/v40/va.rb
efo_nelfo-1.3.1 lib/efo_nelfo/v40/va.rb