Sha256: b38df4b1aa5ed21d4e23691b2bb1c3766906fe7be65ff8af93bae533c8849ae1

Contents?: true

Size: 1.88 KB

Versions: 2

Compression:

Stored size: 1.88 KB

Contents

module EfoNelfo
  module V40
    class VL < EfoNelfo::PostType
      property :post_type,         alias: :PostType,      limit: 2,  default: post_type, required: true
      property :product_type,      alias: :VareMrk,       limit: 1,  type: :integer, required: true
      property :product_number,    alias: :VareNr,        limit: 14, required: true
      property :name,              alias: :VaBetg,        limit: 30, required: true
      property :description,       alias: :VaBetg2,       limit: 30
      property :unit,              alias: :MåleEnhet,     limit: 1,  type: :integer, required: true
      property :price_unit,        alias: :PrisEnhet,     limit: 3,  required: true
      property :price_unit_desc,   alias: :PrisEnhetTxt,  limit: 8
      property :price,             alias: :Pris,          limit: 10, type: :integer, required: true
      property :amount,            alias: :Mengde,        limit: 9,  type: :integer, required: true
      property :price_date,        alias: :PrisDato,      limit: 8,  type: :date, required: true
      property :status,            alias: :Status,        limit: 1,  type: :integer, required: true
      property :block_number,      alias: :BlokkNummer,   limit: 6,  type: :integer
      property :discount_group,    alias: :RabattGruppe,  limit: 14
      property :fabrication,       alias: :Fabrikat,      limit: 10
      property :type,              alias: :Type,          limit: 10
      property :stocked,           alias: :Lagerført,     type: :boolean
      property :sales_package,     alias: :SalgsPakning,  limit: 9,  type: :integer
      property :discount,          alias: :Rabatt,        limit: 4,  type: :integer
      property :price_type,        alias: :Pristype,      limit: 1

      has_many :info, post_type: "VX"
      has_many :alternatives, post_type: "VA"

      def nrf_id
        product_type == 4 ? product_number : nil
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
efo_nelfo-1.1.0 lib/efo_nelfo/v40/vl.rb
efo_nelfo-1.0.0 lib/efo_nelfo/v40/vl.rb