Sha256: dc79389b5e692058ed73fc4efae1316491c7ed3306d26607b28efd6bb8362114

Contents?: true

Size: 695 Bytes

Versions: 13

Compression:

Stored size: 695 Bytes

Contents

module Comee
  module Core
    class NewOrderNotification < Noticed::Base
      deliver_by :database
      deliver_by :email, mailer: "Comee::Core::SupplierMailer", method: :new_order_notification

      param :back_order

      def message
        back_order = params[:back_order]
        title = "New Order Notification"
        date = Date.current
        content = <<~CONTENT
          A new purchase order with the following details has been sent to you:
            order number: #{back_order.order_number}
            order date: #{back_order.order_date}
            delivery date: #{back_order.delivery_date}
        CONTENT
        {title:, date:, content:}
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
comee_core-0.1.22 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.21 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.20 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.19 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.18 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.17 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.16 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.15 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.14 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.13 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.12 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.11 app/notifications/comee/core/new_order_notification.rb
comee_core-0.1.10 app/notifications/comee/core/new_order_notification.rb