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

Instance Method Details

#endpoint_disabled(webhook_endpoint) ⇒ Object



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

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

  mail(
    to: @current_store.new_order_notifications_email.presence || @current_store.mail_from_address,
    from: from_address,
    subject: Spree.t('webhook_mailer.endpoint_disabled.subject', endpoint_name: @endpoint.name || @endpoint.url),
    store_url: @current_store.formatted_url
  )
end