Sha256: 5aa1fee0d90f0a981c1160460a54be6f68cb40139067f2eaa59969c615f64d2f

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

module Eancom
  module Edifact
    class AJT < Segment
      TAG = 'AJT'.freeze
      TYPE = :body.freeze

      attr_reader :segment_type

      def initialize(
        tag: nil,
        adjustment_reason_description:
      )
        @tag = tag
        @adjustment_reason_description = adjustment_reason_description

        super(tag: tag || TAG)
      end

      def to_json_hash
        hash = {}
        if @adjustment_reason_description
          hash.merge!(adjustment_reason_description: find_identifier(:adjustment_reason_description))
        end
        hash
      end

      def segment_type
        TYPE
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eancom-2.0.0 lib/eancom/edifact/segments/ajt.rb