Created
December 9, 2013 21:31
-
-
Save mikez/7881317 to your computer and use it in GitHub Desktop.
Proposed Stripe Python syntax for multiple subscriptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a new subscription | |
customer.subscriptions.create(plan='basic') | |
# delete a subscription | |
customer.subscriptions.retrieve(subscription_id).delete() | |
# update a subscription | |
subscription = customer.subscriptions.retrieve(subscription_id) | |
subscription.trial_end = modified_trial_end | |
subscription.plan = subscription.plan.id # if possible, change API to make this superfluous. | |
subscription.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment