Class: Caboose::InvoicesMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Caboose::InvoicesMailer
- Defined in:
- app/mailers/caboose/invoices_mailer.rb
Instance Method Summary collapse
-
#customer_new_invoice(invoice) ⇒ Object
Sends a confirmation email to the customer about a new invoice.
-
#customer_payment_authorization(invoice) ⇒ Object
Sends an email to the customer telling them they need to authorize payment on an invoice.
-
#customer_status_updated(invoice) ⇒ Object
Sends a notification email to the customer that the status of the invoice has been changed.
-
#fulfillment_new_invoice(invoice) ⇒ Object
Sends a notification email to the fulfillment dept about a new invoice.
-
#shipping_invoice_ready(invoice) ⇒ Object
Sends a notification email to the shipping dept that an invoice is ready to be shipped.
Instance Method Details
#customer_new_invoice(invoice) ⇒ Object
Sends a confirmation email to the customer about a new invoice
22 23 24 25 |
# File 'app/mailers/caboose/invoices_mailer.rb', line 22 def customer_new_invoice(invoice) @invoice = invoice mail(:to => invoice.customer.email, :subject => 'Thank you for your invoice!') end |
#customer_payment_authorization(invoice) ⇒ Object
Sends an email to the customer telling them they need to authorize payment on an invoice
48 49 50 51 |
# File 'app/mailers/caboose/invoices_mailer.rb', line 48 def (invoice) @invoice = invoice mail(:to => invoice.customer.email, :subject => "Order #{@invoice.invoice_number} ready for payment") end |
#customer_status_updated(invoice) ⇒ Object
Sends a notification email to the customer that the status of the invoice has been changed
42 43 44 45 |
# File 'app/mailers/caboose/invoices_mailer.rb', line 42 def customer_status_updated(invoice) @invoice = invoice mail(:to => invoice.customer.email, :subject => 'Order status update') end |
#fulfillment_new_invoice(invoice) ⇒ Object
Sends a notification email to the fulfillment dept about a new invoice
28 29 30 31 32 |
# File 'app/mailers/caboose/invoices_mailer.rb', line 28 def fulfillment_new_invoice(invoice) @invoice = invoice sc = invoice.site.store_config mail(:to => sc.fulfillment_email, :subject => 'New Order') end |
#shipping_invoice_ready(invoice) ⇒ Object
Sends a notification email to the shipping dept that an invoice is ready to be shipped
35 36 37 38 39 |
# File 'app/mailers/caboose/invoices_mailer.rb', line 35 def shipping_invoice_ready(invoice) @invoice = invoice sc = invoice.site.store_config mail(:to => sc.shipping_email, :subject => 'Order ready for shipping') end |