Class: Spina::Shop::PaymentsReportJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Spina::Shop::PaymentsReportJob
- Defined in:
- app/jobs/spina/shop/payments_report_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(order_ids, email) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/jobs/spina/shop/payments_report_job.rb', line 4 def perform(order_ids, email) # Generate password password = rand(36**6).to_s(36) # Create zipfile excel_file = PaymentsExcelExporter.export(order_ids, password) # Upload zipfile uploader = ExportsUploader.new uploader.store!(excel_file) # Send URL in email ExportMailer.exported(uploader.url, email).deliver_later end |