Files
baclight/app/services/id_card_printer/employer_cards_generator.rb
T
2026-03-16 12:09:45 -04:00

18 lines
473 B
Ruby

module IdCardPrinter
class EmployerCardsGenerator
def initialize(pl_plan_key, layout, zip=false)
@pl_plan_key = pl_plan_key
@layout = layout
@zip = zip
end
def call
IdCard::PrintData.where(pl_plan_key: @pl_plan_key).destroy_all
EmployerCards::DataFormatter.new(@pl_plan_key).call
IdCardPrinter::PdfProcessor.new(@pl_plan_key, @layout, @zip).call
end
end
end