westernmilling/agris.rb

View on GitHub
lib/agris/api/messages/query_delivery_ticket_documents.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
module Agris
  module Api
    module Messages
      class QueryDeliveryTicketDocuments < DocumentQueryBase
        def message_number
          80_600
        end

        protected

        def xml_hash
          xml_base_hash
            .merge(
              deliveryticket: @document_references.map(&:to_xml_hash),
              lineitemdetail: true,
              componentdetail: true,
              remarkdetail: true,
              lineremarkdetail: true,
              trancodedetail: true,
              specificationdetail: true
            )
        end
      end
    end
  end
end