Class: Saasaparilla::Notifier

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/saasaparilla/notifier.rb

Instance Method Summary collapse

Instance Method Details

#billing_failed(subscription) ⇒ Object



21
22
23
24
25
# File 'app/mailers/saasaparilla/notifier.rb', line 21

def billing_failed(subscription)
  @subscription = subscription
  @url = edit_subscription_credit_card_url
  mail(:to => subscription.contact_info.email, :subject => "Account Billing Failed")
end

#billing_successful(subscription, amount) ⇒ Object



15
16
17
18
19
# File 'app/mailers/saasaparilla/notifier.rb', line 15

def billing_successful(subscription, amount)
  @subscription = subscription
  @amount = amount
  mail(:to => subscription.contact_info.email, :subject => "Account Billing Successful")
end

#invoice_created(subscription, invoice) ⇒ Object



9
10
11
12
13
# File 'app/mailers/saasaparilla/notifier.rb', line 9

def invoice_created(subscription, invoice)
  @subscription = subscription
  @invoice = invoice
  mail(:to => subscription.contact_info.email, :subject => "Invoice Created")
end

#pending_cancellation_notice(subscription) ⇒ Object



27
28
29
30
31
# File 'app/mailers/saasaparilla/notifier.rb', line 27

def pending_cancellation_notice(subscription)
  @subscription = subscription
  @url = edit_subscription_credit_card_url
  mail(:to => subscription.contact_info.email, :subject => "Your subscription will be canceled soon")
end

#subscription_canceled(subscription) ⇒ Object



33
34
35
36
# File 'app/mailers/saasaparilla/notifier.rb', line 33

def subscription_canceled(subscription)
  @subscription = subscription
  mail(:to => subscription.contact_info.email, :subject => "Your subscription has been canceled")
end

#subscription_created(subscription) ⇒ Object



4
5
6
7
# File 'app/mailers/saasaparilla/notifier.rb', line 4

def subscription_created(subscription)
  @subscription = subscription
  mail(:to => subscription.contact_info.email, :subject => "Subscription Created")
end