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

      attr_reader :segment_type

      def initialize(
        tag: nil,
        control_total_type_code_quantifier:,
        control_total_value:,
        measurment_unit_code: nil
      )
        @tag = tag
        @control_total_type_code_quantifier = control_total_type_code_quantifier
        @control_total_value = control_total_value
        @measurment_unit_code = measurment_unit_code

        super(tag: tag || TAG)
      end

      def to_json_hash
        {}
      end

      def segment_type
        TYPE
      end

    end
  end
end