Sha256: 2819223f9d8245d6a2e60dbb743487d021d92acf201e1891afe421c7a410f09a

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Fortnox
  module API
    module Mapper
      class Article < Fortnox::API::Mapper::Base
        KEY_MAP = {
          ean: 'EAN',
          eu_account: 'EUAccount',
          eu_vat_account: 'EUVATAccount',
          housework_type: 'HouseWorkType',
          vat: 'VAT'
        }.freeze
        JSON_ENTITY_WRAPPER = 'Article'
        JSON_COLLECTION_WRAPPER = 'Articles'
      end

      Registry.register(Article.canonical_name_sym, Article)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fortnox-api-0.8.2 lib/fortnox/api/mappers/article.rb
fortnox-api-0.8.1 lib/fortnox/api/mappers/article.rb
fortnox-api-0.9.0 lib/fortnox/api/mappers/article.rb