module SampleCard class JasperPdfGenerator def initialize(jasper_url) @jasper_url = jasper_url end def call response = HTTParty.get(@jasper_url) card_pdf = CombinePDF.parse(response.body) # todays_date = Date.today.strftime("%m-%d-%Y") # card_pdf.save("tmp/service_test_member_id_card_#{todays_date}.pdf") card_pdf end end end