lib/pay/stripe/billable.rb
# Handles Billable#subscribe
#
# Returns Pay::Subscription
Handles Billable#subscribe
Returns Pay::Subscription
Handles Billable#subscribe Returns Pay :: Subscription
def create_stripe_subscription(name, plan, options={})
        opts = { plan: plan, trial_from_plan: true }.merge(options)
        stripe_sub   = customer.subscriptions.create(opts)
        subscription = create_subscription(stripe_sub, 'stripe', name, plan)
        subscription
      rescue ::Stripe::StripeError => e
        raise Error, e.message
      end
def create_stripe_subscription ( name , plan , options = { } ) opts = { plan : plan , trial_from_plan : true } . merge ( options ) stripe_sub = customer . subscriptions . create ( opts ) subscription = create_subscription ( stripe_sub , 'stripe' , name , plan ) subscription rescue :: Stripe :: StripeError => e raise Error , e . message end
Handles Billable#subscribe
Returns Pay::Subscription
Handles Billable#subscribe Returns Pay :: Subscription
name
plan
options