Module: Tang

Defined in:
lib/tang.rb,
lib/tang/engine.rb,
lib/tang/version.rb,
app/models/tang/card.rb,
app/models/tang/plan.rb,
app/models/tang/charge.rb,
app/models/tang/coupon.rb,
app/models/tang/invoice.rb,
app/services/tang/save_card.rb,
app/models/tang/invoice_item.rb,
app/models/tang/subscription.rb,
app/services/tang/create_plan.rb,
app/services/tang/delete_card.rb,
app/services/tang/delete_plan.rb,
app/services/tang/pay_invoice.rb,
app/services/tang/update_plan.rb,
app/jobs/tang/import_plans_job.rb,
app/mailers/tang/stripe_mailer.rb,
app/models/tang/stripe_webhook.rb,
app/services/tang/fail_invoice.rb,
app/jobs/tang/import_stripe_job.rb,
app/services/tang/create_coupon.rb,
app/services/tang/delete_coupon.rb,
app/services/tang/update_coupon.rb,
app/jobs/tang/import_charges_job.rb,
app/jobs/tang/import_coupons_job.rb,
app/services/tang/create_invoice.rb,
app/jobs/tang/import_invoices_job.rb,
app/models/concerns/tang/customer.rb,
app/services/tang/delete_customer.rb,
app/services/tang/update_customer.rb,
app/jobs/tang/import_customers_job.rb,
app/helpers/tang/application_helper.rb,
app/mailers/tang/subscription_mailer.rb,
app/controllers/tang/plans_controller.rb,
app/services/tang/cancel_subscription.rb,
app/services/tang/change_subscription.rb,
app/services/tang/create_subscription.rb,
app/services/tang/update_subscription.rb,
lib/generators/tang/install_generator.rb,
app/jobs/tang/import_subscriptions_job.rb,
app/services/tang/apply_customer_discount.rb,
app/services/tang/remove_customer_discount.rb,
app/controllers/tang/admin/plans_controller.rb,
app/controllers/tang/application_controller.rb,
app/controllers/tang/admin/search_controller.rb,
app/controllers/tang/account/cards_controller.rb,
app/controllers/tang/admin/coupons_controller.rb,
app/services/tang/apply_subscription_discount.rb,
app/controllers/tang/admin/invoices_controller.rb,
app/controllers/tang/admin/payments_controller.rb,
app/services/tang/remove_subscription_discount.rb,
app/controllers/tang/account/coupons_controller.rb,
app/controllers/tang/admin/customers_controller.rb,
app/controllers/tang/admin/dashboard_controller.rb,
app/controllers/tang/account/receipts_controller.rb,
app/controllers/tang/admin/application_controller.rb,
app/controllers/tang/account/application_controller.rb,
app/controllers/tang/admin/subscriptions_controller.rb,
app/controllers/tang/account/subscriptions_controller.rb

Overview

require ‘paranoia’

Defined Under Namespace

Modules: ApplicationHelper, Customer, Generators Classes: ApplicationController, ApplyCustomerDiscount, ApplySubscriptionDiscount, CancelSubscription, Card, ChangeSubscription, Charge, Coupon, CreateCoupon, CreateInvoice, CreatePlan, CreateSubscription, DeleteCard, DeleteCoupon, DeleteCustomer, DeletePlan, Engine, FailInvoice, ImportChargesJob, ImportCouponsJob, ImportCustomersJob, ImportInvoicesJob, ImportPlansJob, ImportStripeJob, ImportSubscriptionsJob, Invoice, InvoiceItem, PayInvoice, Plan, PlansController, RemoveCustomerDiscount, RemoveSubscriptionDiscount, SaveCard, StripeMailer, StripeWebhook, Subscription, SubscriptionMailer, UpdateCoupon, UpdateCustomer, UpdatePlan, UpdateSubscription

Constant Summary collapse

VERSION =
"0.2.2"
@@customer_class =
'User'

Class Method Summary collapse

Class Method Details

.customer_classObject



37
38
39
# File 'lib/tang.rb', line 37

def self.customer_class
  @@customer_class.constantize
end

.setup {|_self| ... } ⇒ Object

(&block)

Yields:

  • (_self)

Yield Parameters:

  • _self (Tang)

    the object that the method was called on



33
34
35
# File 'lib/tang.rb', line 33

def self.setup #(&block)
  yield self
end