godreams/admin-server

View on GitHub
app/jobs/donations/receipt_job.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Donations
  class ReceiptJob < ApplicationJob
    def perform(donation)
      # Send the receipt via email.
      DonationsMailer.receipt(donation.id).deliver_now

      # Send an SMS as notification.
      sms_service = SmsService.new(donation.phone, :donation_receipt, name: donation.name, email: donation.email)
      sms_service.execute
    end
  end
end