Class: Gold::BillingMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- Gold::BillingMailer
- Defined in:
- app/mailers/gold/billing_mailer.rb
Overview
Sends billing-related emails to merchants.
Instance Method Summary collapse
- #affiliate_to_paid(billing, confirmation_url) ⇒ Object
-
#delinquent(billing) ⇒ Object
Inform a merchant about their non-payment.
-
#suspension(billing) ⇒ Object
Inform a merchant about their account becoming suspended.
Instance Method Details
#affiliate_to_paid(billing, confirmation_url) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'app/mailers/gold/billing_mailer.rb', line 25 def affiliate_to_paid(billing, confirmation_url) billing.shop.with_shopify_session do @shop = ShopifyAPI::Shop.current @confirmation_url = confirmation_url app_name = Gold.configuration.app_name mail(to: @shop.email, subject: "[Action Required] Charge needed for #{app_name}") end end |
#delinquent(billing) ⇒ Object
Inform a merchant about their non-payment.
16 17 18 19 20 21 22 23 |
# File 'app/mailers/gold/billing_mailer.rb', line 16 def delinquent(billing) billing.shop.with_shopify_session do @shop = ShopifyAPI::Shop.current mail(to: @shop.email, subject: "We need you to approve a charge for " \ "#{Gold.configuration.app_name}") end end |
#suspension(billing) ⇒ Object
Inform a merchant about their account becoming suspended.
7 8 9 10 11 12 13 |
# File 'app/mailers/gold/billing_mailer.rb', line 7 def suspension(billing) billing.shop.with_shopify_session do @shop = ShopifyAPI::Shop.current mail(to: @shop.email, subject: "We have suspended your access to #{Gold.configuration.app_name}") end end |