BotBotMe/botbot-me — pull request #3 by yml (2014-09-10 12:00:54+00:00)
Title: WIP: Features/stripe integration

Foundation for the stripe integration
This change set add a payments app with 2 models:

* Plan
* Customer

`sync_stripe_plans` is management command that pull the plans from stripe
to update their local copy.
`sync_stripe_customers` is a management command that update the
subscriptions in stripe based on the current usage, and it also update
the local Customer record to mirror what is in stripe.

We have also added few more endpoints:

* /payments/plans/ -- list of plan
* /payments/ -- detail page for the plan
* /payments/customer/add/ -- collect payment information (No plan
assigned yet)
* /payments/billing-info/ -- detail page about the billing information

There is few TODOs but the big missing part is the method to calculate usage for each user something like:

```
user.get_usage()

usage = [
{"plan": Plan.objects.get(id=1), "quantity": 1},
{"plan": Plan.objects.get(id=2), "quantity": 2},
]
```