Sha256: f1ce0c2015a20bfb5236d9c24ba747720b383bb1b8acce56639050be58f33440

Contents?: true

Size: 1.53 KB

Versions: 36

Compression:

Stored size: 1.53 KB

Contents

class BillingMailer < ActionMailer::Base
  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"),
         :from     => Saucy::Configuration.mailer_sender)
  end

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

  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"),
         :from    => Saucy::Configuration.mailer_sender)
  end

  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")),
         :from    => Saucy::Configuration.mailer_sender)
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
saucy-0.6.1 app/mailers/billing_mailer.rb
saucy-0.6.0 app/mailers/billing_mailer.rb
saucy-0.5.5 app/mailers/billing_mailer.rb
saucy-0.5.4 app/mailers/billing_mailer.rb
saucy-0.5.3 app/mailers/billing_mailer.rb
saucy-0.5.2 app/mailers/billing_mailer.rb
saucy-0.5.1 app/mailers/billing_mailer.rb
saucy-0.5.0 app/mailers/billing_mailer.rb
saucy-0.4.10 app/mailers/billing_mailer.rb
saucy-0.4.9 app/mailers/billing_mailer.rb
saucy-0.4.8 app/mailers/billing_mailer.rb
saucy-0.4.7 app/mailers/billing_mailer.rb
saucy-0.4.6 app/mailers/billing_mailer.rb
saucy-0.4.5 app/mailers/billing_mailer.rb
saucy-0.4.4 app/mailers/billing_mailer.rb
saucy-0.4.3 app/mailers/billing_mailer.rb
saucy-0.4.2 app/mailers/billing_mailer.rb
saucy-0.4.1 app/mailers/billing_mailer.rb
saucy-0.3.4.1 app/mailers/billing_mailer.rb
saucy-0.4.0 app/mailers/billing_mailer.rb