Skip to content

Instantly share code, notes, and snippets.

@jamesdaniels
Created February 8, 2010 05:51
Show Gist options
  • Save jamesdaniels/297921 to your computer and use it in GitHub Desktop.
Save jamesdaniels/297921 to your computer and use it in GitHub Desktop.
# flushed out
has_a_braintree_customer do
attribute_map :firstname => :first_name, :lastname => :last_name
end
has_a_subscription do
plans {:mild => {:price => 0}, :medium => {:price => 500}, :spicy => {:price => 1000}}
default_plan :mild # default: plan with lowest price
billing_frequency 30.days, :grace_period => 5.days # default: 30.days, :grace_period => 5.days
free_trial 30.days, :on => :signup_only # default: 30.days, :on => :signup_only, :reminder => 5.days
end
# minimal options
has_a_braintree_customer
has_a_subscription do
plans {:mild => {:price => 0}, :medium => {:price => 500}, :spicy => {:price => 1000}}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment