Skip to content

Instantly share code, notes, and snippets.

@leetrout
Created September 18, 2011 03:58
Show Gist options
  • Save leetrout/1224712 to your computer and use it in GitHub Desktop.
Save leetrout/1224712 to your computer and use it in GitHub Desktop.
sync implementation
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