module IdCardPrinterService
    class PdfBatchProcessor

        def initialize(card_template, jasper_batch_id, layout)
            @card_template = card_template
            @jasper_batch_id = jasper_batch_id
            @layout = layout
        end

        def call
            url = IdCardPrinterService::JasperBatchUrlGenerator.new(@card_template, @jasper_batch_id, @layout).call
            puts url
            batch_pdf = IdCardPrinterService::JasperPdfGenerator.new(url).call

            batch_pdf
        end
    end
end