Class: Spree::OrderInventoryCancellationMailerSubscriber
- Inherits:
-
Object
- Object
- Spree::OrderInventoryCancellationMailerSubscriber
- Includes:
- Omnes::Subscriber
- Defined in:
- app/subscribers/spree/order_inventory_cancellation_mailer_subscriber.rb
Overview
Mailing after inventory units have been cancelled from a Order
Instance Method Summary collapse
-
#send_inventory_cancellation_email(event) ⇒ Object
Sends inventory cancellation email to the user.
Instance Method Details
#send_inventory_cancellation_email(event) ⇒ Object
Sends inventory cancellation email to the user.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/subscribers/spree/order_inventory_cancellation_mailer_subscriber.rb', line 15 def send_inventory_cancellation_email(event) return unless Spree::OrderCancellations.send_cancellation_mailer order = event[:order] inventory_units = event[:inventory_units] Spree::Config .order_mailer_class .inventory_cancellation_email(order, inventory_units.to_a) .deliver_later end |