Class: BillingMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- BillingMailer
- Defined in:
- app/mailers/billing_mailer.rb
Instance Method Summary collapse
- #cancelation_notification(canceled_account) ⇒ Object
- #completed_trial(account) ⇒ Object
- #expiring_trial(account) ⇒ Object
- #new_unactivated(account) ⇒ Object
- #problem(account) ⇒ Object
- #receipt(account, transaction) ⇒ Object
Instance Method Details
#cancelation_notification(canceled_account) ⇒ Object
54 55 56 57 58 59 60 |
# File 'app/mailers/billing_mailer.rb', line 54 def cancelation_notification(canceled_account) @canceled_account = canceled_account mail(:to => Saucy::Configuration.support_email_address, :subject => "#{t("app_name")} Account Canceled", :reply_to => Saucy::Configuration.support_email_address, :from => Saucy::Configuration.support_email_address) end |
#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) @account = account mail(:to => account.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) @account = account mail(:to => account.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) @account = account mail(:to => account.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) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/mailers/billing_mailer.rb', line 13 def problem(account) @account = account mail(:to => account.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(account, transaction) @account = account @transaction = transaction mail(:to => account.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 |