Class: StatementOfAccountGenerationWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/workers/statement_of_account_generation_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(customer_id) ⇒ Object



6
7
8
9
10
11
12
# File 'app/workers/statement_of_account_generation_worker.rb', line 6

def perform(customer_id)
  @job_name = "Statement of account generation for customer id: #{customer_id}"
  logger.info @job_name
  customer = Customer.find(customer_id)
  soa = StatementOfAccount.generate_pdf(customer)
  soa&.queue_for_transmission
end