Class: Spree::WebhookMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/spree/webhook_mailer.rb

Instance Method Summary collapse

Methods inherited from BaseMailer

#current_store, #from_address, #mail, #money, #render_in_email_layout, #reply_to_address, #with_store_locale

Instance Method Details

#endpoint_disabled(webhook_endpoint) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/mailers/spree/webhook_mailer.rb', line 5

def endpoint_disabled(webhook_endpoint)
  @endpoint = webhook_endpoint
  @current_store = webhook_endpoint.store

  with_store_locale(webhook_endpoint.store) do
    mail_template(
      { endpoint: email_data(@endpoint, Spree::Emails::WebhookEndpointSerializer) },
      to: @current_store.new_order_notifications_email.presence || @current_store.mail_from_address,
      store_url: @current_store.formatted_url
    )
  end
end