django-flexible-subscriptions
django-flexible-subscriptions copied to clipboard
Link a subscription to an entity other than the user
For common scenarios, a subscription is normally linked to a subscriber, and the subscriber is commonly a user. However, there are scenarios where the subscriber is not a user, but another entity. This is a very common scenario when the user is the payment responsible in a large account structure: an entity dependent on the user is the subscriber, but the user is the one who pays for all subscriptions under his structure.
Since the large account structure is not previously known, billing it should be subject of a custom account traversal, which can be accomplished by a custom callback as part of its customization.
Sounds very reasonable in theory. I will be honest that I probably won't be able to get to this in the near future given other commitments. I would be happy to review/discuss some thoughts on implementation +/- review any PRs. Otherwise we can keep this issue open and when I finally get some time to do some dedicated maintenance to this library I can take a stab at it.
In fact, this is how telecom billing software works. I was the maintainer of BSCS, a German billing solution for mobile platforms (today owned by Ericsson). I´ll try to analyze your solution and structure a way to give it support to large accounting structure and hierarchical billing, which is a neat feature of BSCS.
For instance, only to illustrate with a practical scenario: in Telecom´s it is common to have a company to buy corporate plans to lend corporate cell phones to its employees. The company is responsible to pay all call usage. But each employee is billed separately, loading all costs to the company itself.
In fact the software I´m current developing aimed for digital marketing agencies uses a similar approach. After analyzing several projects in Github I found yours which is pretty complete but lacks large account structures.
Please, leave this issue opened. As soon as possible I´ll provide a PR or even more comments to help you out with this.
Hello @studybuffalo @ronflima
First of all, thank you so much for this nice project and appreciate your efforts . We need to use this project for the subscribers to get them subscribe/purchase services from telecom operators these services are called MUCs(Marketing use cases) such CUG(closed user group) ,FnF(friend and family) ,,etc and for the payment need to use the API provided by the OCS(ONLINE CHARGING SYSTEM) which the subscribers's account/balance exists there on OCS for the direct debit the subscription fees or the periodic fees,,etc..
Kindly help with the below: Can we use Subscribers instead of users, and use the API provided by the OCS for the payment/direct/online charge?
Thank you a lot in advance Waled
Hello @studybuffalo @ronflima
First of all, thank you so much for this nice project and appreciate your efforts . We need to use this project for the subscribers to get them subscribe/purchase services from telecom operators these services are called MUCs(Marketing use cases) such CUG(closed user group) ,FnF(friend and family) ,,etc and for the payment need to use the API provided by the OCS(ONLINE CHARGING SYSTEM) which the subscribers's account/balance exists there on OCS for the direct debit the subscription fees or the periodic fees,,etc..
Kindly help with the below: Can we use Subscribers instead of users, and use the API provided by the OCS for the payment/direct/online charge?
Thank you a lot in advance Waled
Hi, Waled!
I'm away from this project for a long time and now I have the time to go through it. I'm about to fork this repo and start analyzing it. When the time comes, I'll contact you to gather more details on your use case and try to generalize it in a way we can implement it as a general customizable solution.
Cheers,
Ronaldo
Thank you Ronaldo for your response .. Could please tell me by when we can work together on this ?
REgards, Waled
Thank you Ronaldo for your response .. Could please tell me by when we can work together on this ?
REgards, Waled
I'm already on it. But I can't say when it will be available. Need to think well about how to deal with backward compatibility.
Just for the record: I have created this issue in order to upgrade the support to the latest python version.
Hello Ronaldo.
Kindly have you got time to work on this case,and in case you need more info about the flow of the desired solution I am here!
Thank you in advance Waled
Hi, Waled. No, I haven't. I'm about to start a new project using django, and I'll be tackling this starting this week. Last year was a mess. I got laid off and my end of year was a little messy. But things are quite right now.
Cheers,
Ronaldo
Thank you Ronaldo for your feedback,, PLease let me know so I might here here with any information,
Thank you Ronaldo for your feedback,, PLease let me know so I might here here with any information,
I'm slow for this, my friend. These days I'm very busy at work. But I'm working it during the weekends, when possible. I'm on it right now.
I'm studying this possibility:
- Rename
UserSubscription
toPlanSubscription
, so it will make the model more general with better semantics. - Rename the foreign key
user
tosubscriber
, because we are generalizing the subscriber to something else than a user. - Add a new key to settings, which points to a model that should replace the
User
model. It will defaults toUser
model throughget_user_model
function. If set, it will use whatever is the model that is configured.
It is just a possibility right now because I still need to go deeper in the code to be sure.