Class: Gemgento::SalesMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Gemgento::SalesMailer
- Defined in:
- app/mailers/gemgento/sales_mailer.rb
Instance Method Summary collapse
- #credit_memo_email(recipients, from, order_source, credit_memo_source) ⇒ Object
- #credit_memo_email_subject ⇒ Object
- #invoice_email(recipients, from, order_source, invoice_source) ⇒ Object
- #invoice_email_subject ⇒ Object
- #order_email(recipients, from, order_source) ⇒ Object
- #order_email_subject ⇒ Object
- #shipment_email(recipients, from, order, shipment) ⇒ Object
- #shipment_email_subject ⇒ Object
Instance Method Details
#credit_memo_email(recipients, from, order_source, credit_memo_source) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 49 def credit_memo_email(recipients, from, order_source, credit_memo_source) @order = Gemgento::Magento::OrderAdapter.find(order_source[:increment_id]).import @order_source = order_source @credit_memo_source = credit_memo_source mail( to: recipients[:to], cc: recipients[:cc], bcc: recipients[:bcc], from: from, subject: credit_memo_email_subject ) end |
#credit_memo_email_subject ⇒ Object
75 76 77 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 75 def credit_memo_email_subject "Credit Memo for Order #{@order.increment_id}" end |
#invoice_email(recipients, from, order_source, invoice_source) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 18 def invoice_email(recipients, from, order_source, invoice_source) @order = Gemgento::Magento::OrderAdapter.find(order_source[:increment_id]).import @order_source = order_source @invoice_source = invoice_source mail( to: recipients[:to], cc: recipients[:cc], bcc: recipients[:bcc], from: from, subject: invoice_email_subject ) end |
#invoice_email_subject ⇒ Object
67 68 69 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 67 def invoice_email_subject "Invoice for Order #{@order.increment_id}" end |
#order_email(recipients, from, order_source) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 5 def order_email(recipients, from, order_source) @order = Gemgento::Magento::OrderAdapter.find(order_source[:increment_id]).import @order_source = order_source mail( to: recipients[:to], cc: recipients[:cc], bcc: recipients[:bcc], from: from, subject: order_email_subject ) end |
#order_email_subject ⇒ Object
63 64 65 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 63 def order_email_subject "Confirmation for Order #{@order.increment_id}" end |
#shipment_email(recipients, from, order, shipment) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 36 def shipment_email(recipients, from, order, shipment) @order = order @shipment = shipment mail( to: recipients[:to], cc: recipients[:cc], bcc: recipients[:bcc], from: from, subject: shipment_email_subject ) end |
#shipment_email_subject ⇒ Object
71 72 73 |
# File 'app/mailers/gemgento/sales_mailer.rb', line 71 def shipment_email_subject "Shipment for Order #{@order.increment_id}" end |