module Koudoku

guides.rubyonrails.org/generators.html rdoc.info/github/wycats/thor/master/Thor/Actions.html

guides.rubyonrails.org/generators.html rdoc.info/github/wycats/thor/master/Thor/Actions.html

Constants

VERSION

Public Class Methods

all(callable = Proc.new) click to toggle source
# File lib/koudoku.rb, line 88
def self.all(callable = Proc.new)
  StripeEvent.all(callable)
end
free_trial?() click to toggle source
# File lib/koudoku.rb, line 72
def self.free_trial?
  free_trial_length.to_i > 0
end
instrument(name, object) click to toggle source
# File lib/koudoku.rb, line 84
def self.instrument(name, object)
  StripeEvent.backend.instrument(StripeEvent.namespace.call(name), object)
end
layout() click to toggle source
# File lib/koudoku.rb, line 33
def self.layout
  @@layout || 'application'
end
layout=(layout) click to toggle source
# File lib/koudoku.rb, line 37
def self.layout=(layout)
  @@layout = layout
end
owner_assignment_sym() click to toggle source

e.g. :user=

# File lib/koudoku.rb, line 63
def self.owner_assignment_sym
  :"#{Koudoku.subscriptions_owned_by}="
end
owner_class() click to toggle source

e.g. User

# File lib/koudoku.rb, line 68
def self.owner_class
  Koudoku.subscriptions_owned_by.to_s.classify.constantize
end
owner_id_sym() click to toggle source

e.g. :user_id

# File lib/koudoku.rb, line 58
def self.owner_id_sym
  :"#{Koudoku.subscriptions_owned_by}_id"
end
owner_resource() click to toggle source

e.g. :users

# File lib/koudoku.rb, line 53
def self.owner_resource
  subscriptions_owned_by.to_s.pluralize.to_sym
end
setup() { |self| ... } click to toggle source
# File lib/koudoku.rb, line 45
def self.setup
  yield self

  # Configure the Stripe gem.
  Stripe.api_key = stripe_secret_key
end
subscribe(name, callable = Proc.new) click to toggle source

STRIPE_EVENT section

# File lib/koudoku.rb, line 80
def self.subscribe(name, callable = Proc.new)
  StripeEvent.subscribe(name, callable)
end
subscriptions_owned_through_or_by() click to toggle source
# File lib/koudoku.rb, line 14
def self.subscriptions_owned_through_or_by
  @@subscriptions_owned_through || @@subscriptions_owned_by
end
webhooks_api_key=(key) click to toggle source
# File lib/koudoku.rb, line 41
def self.webhooks_api_key=(key)
  raise "Koudoku no longer uses an API key to secure webhooks, please delete the line from \"config/initializers/koudoku.rb\""
end