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, #frontend_available?, #mail, #money, #reply_to_address, #set_email_locale, #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(
      to: @current_store.new_order_notifications_email.presence || @current_store.mail_from_address,
      subject: Spree.t('webhook_mailer.endpoint_disabled.subject', endpoint_name: @endpoint.name || @endpoint.url),
      store_url: @current_store.formatted_url
    )
  end
end