Permalink
Browse files

fixed borked mixins

  • Loading branch information...
1 parent 953877d commit 01307c8542c2fb9d1683dadfdf1b7abdfbe15b12 @leetrout leetrout committed Feb 29, 2012
Showing with 9 additions and 14 deletions.
  1. +1 −0 AUTHORS
  2. +1 −1 setup.py
  3. +7 −13 zebra/mixins.py
View
@@ -12,3 +12,4 @@ Lee Trout, http://www.leetrout.com
Pulls from:
Minor cleanups - mixmastamyk: https://github.com/mixmastamyk
Implementation of v2 webhooks from stripe - sivy: https://github.com/sivy
+Mixins fix - danawoodman: https://github.com/danawoodman
View
@@ -11,7 +11,7 @@
author = "Steven Skoczen",
author_email = "steven@agoodcloud.com",
url = "https://github.com/GoodCloud/django-zebra",
- version = "0.4.2",
+ version = "0.4.3",
packages = find_packages(),
zip_safe = False,
include_package_data=True,
View
@@ -81,8 +81,7 @@ def _get_stripe_customer(self):
class StripeSubscriptionMixin(object):
"""
- Provides a property `stripe` that returns an instance of the Stripe module &
- additionally adds a property `stripe_subscription` that returns a stripe
+ Provides a property `stripe_subscription` that returns a stripe
subscription instance.
Your class must have an attribute `stripe_customer` (method or property)
@@ -99,8 +98,7 @@ def _get_stripe_subscription(self):
class StripePlanMixin(object):
"""
- Provides a property `stripe` that returns an instance of the Stripe module &
- additionally adds a property `stripe_plan` that returns a stripe plan
+ Provides a property `stripe_plan` that returns a stripe plan
instance.
Your class must have an attribute `stripe_plan_id` (method or property)
@@ -113,8 +111,7 @@ def _get_stripe_plan(self):
class StripeInvoiceMixin(object):
"""
- Provides a property `stripe` that returns an instance of the Stripe module &
- additionally adds a property `stripe_invoice` that returns a stripe invoice
+ Provides a property `stripe_invoice` that returns a stripe invoice
instance.
Your class must have an attribute `stripe_invoice_id` (method or property)
@@ -128,24 +125,21 @@ def _get_stripe_invoice(self):
class StripeInvoiceItemMixin(object):
"""
- Provides a property `stripe` that returns an instance of the Stripe module &
- additionally adds a property `stripe_invoice` that returns a stripe
+ Provides a property `stripe_invoice_item` that returns a stripe
invoice item instance.
Your class must have an attribute `stripe_invoice_item_id` (method or
property) to provide the invoice id for the returned instance.
"""
- def _get_stripe_invoice(self):
+ def _get_stripe_invoice_item(self):
return stripe.Invoice.retrieve(_get_attr_value(self,
'stripe_invoice_item_id'))
- stripe_invoice = property(_get_stripe_invoice)
+ stripe_invoice_item = property(_get_stripe_invoice_item)
class StripeChargeMixin(object):
"""
- Provides a property `stripe` that returns an instance of the Stripe module &
- additionally adds a property `stripe_charge` that returns a stripe
- invoice item instance.
+ Provides a property `stripe_charge` that returns a stripe charge instance.
Your class must have an attribute `stripe_charge_id` (method or
property) to provide the invoice id for the returned instance.

0 comments on commit 01307c8

Please sign in to comment.