Class: BillingMailer

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

Instance Method Summary collapse

Instance Method Details

#completed_trial(account) ⇒ Object



44
45
46
47
48
49
50
51
52
# File 'app/mailers/billing_mailer.rb', line 44

def completed_trial()
  @account = 
  mail(:to       => .admin_emails,
       :subject  => I18n.t(:subject,
                          :scope   => [:billing_mailer, :completed_trial],
                          :default => "Your trial has ended"),
       :reply_to => Saucy::Configuration.support_email_address,
       :from     => Saucy::Configuration.manager_email_address)
end

#expiring_trial(account) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'app/mailers/billing_mailer.rb', line 23

def expiring_trial()
  @account = 
  mail(:to       => .admin_emails,
       :subject  => I18n.t(:subject,
                          :scope   => [:billing_mailer, :expiring_trial],
                          :default => "Your trial is expiring soon"),
       :reply_to => Saucy::Configuration.support_email_address,
       :from     => Saucy::Configuration.manager_email_address)
end

#new_unactivated(account) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'app/mailers/billing_mailer.rb', line 33

def new_unactivated()
  @account = 
  mail(:to       => .admin_emails,
       :subject  => I18n.t(:subject,
                          :scope    => [:billing_mailer, :new_unactivated],
                          :default  => "A check in from %{app_name}",
                          :app_name => t("app_name")),
       :reply_to => Saucy::Configuration.support_email_address,
       :from     => Saucy::Configuration.manager_email_address)
end

#problem(account, transaction) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'app/mailers/billing_mailer.rb', line 13

def problem(, transaction)
  @account = 
  mail(:to       => .customer.email,
       :subject  => I18n.t(:subject,
                           :scope   => [:saucy, :mailers, :billing_mailer, :problem],
                           :default => "Problem with subscription billing"),
       :reply_to => Saucy::Configuration.support_email_address,
       :from     => Saucy::Configuration.support_email_address)
end

#receipt(account, transaction) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'app/mailers/billing_mailer.rb', line 2

def receipt(, transaction)
  @account = 
  @transaction = transaction
  mail(:to       => .customer.email,
       :subject  => I18n.t(:subject,
                           :scope   => [:saucy, :mailers, :billing_mailer, :receipt],
                           :default => "Subscription receipt"),
       :reply_to => Saucy::Configuration.support_email_address,
       :from     => Saucy::Configuration.support_email_address)
end