A Fee for a given Plan.
Attr plan: | ForeignKey(Plan) |
---|---|
Attr name: | CharField(max_length=100) |
Attr group: | ForeignKey(FeeGroup) |
Attr default_amount: | |
DecimalField(default=0) |
add a fee to the given user, with description and amount. if amount is not passed, then it will use default_amount if it is greater than 0.
if 404 or 422 are returned, the default action is not to save the line item to the db, this can be overriden with the setting SPREEDLY_SAVE_ON_FAIL, but it is not recomended as who knows what will happen.
Parameters: |
|
---|---|
Raises : | ValueError if the user is not subscribed to the plan or is subscribed to a different plan. |
Raises : | Http404 if spreedly can’t find the plan, user, etc. |
Raises : | HttpUnprocessableEntity if spreedly raised 422 for some reason. |
Subscription plan
Manager that handles syncing plans and finding enabled plans
Class that manages the details for a specific auth.User‘s subscription to a plan. Since a user can only have one subscription, this is sometimes treated as a user profile class.
Add a fee to the subscription
Parameters: |
|
---|---|
Returns: | None |
Raises : | Http404 if incorrect subscriber, HttpUnprocessableEntity for any other 422 error |
Allow a free Trial
Returns: | Subscription |
---|---|
Raises : | Exception (of some kind) if bad juju |