Created
September 18, 2011 03:58
-
-
Save leetrout/1224712 to your computer and use it in GitHub Desktop.
sync implementation
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
class Plan(DatesModelBase, StripePlan, mixins.StripeSyncMixin): | |
stripe_sync = True | |
stripe_sync_method = 'Plan.create' | |
stripe_sync_kwargs = {'id': self.stripe_plan_id} | |
... | |
def plan_post_save(sender, **kwargs): | |
plan = kwargs['instance'] | |
created = kwargs['created'] | |
if created: | |
plan.stripe_sync() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment