Added SubscribersWithBalanceDueAPIView that returns a list of subscribers with non-zero balances due for subscription to self.provider.
Added BalanceDueMixin that deals with the logic of the API view.
Added BalanceDueSerializer to include balance details.
Notes:
BalanceDueSerializer: Inherits from OrganizationSerializer. Adds a new field, balances_due.
BalanceDueMixin: Uses get_statement_balances for each subscriber to a provider, finds their balances, checks whether each balance is related to the provider(by checking if the plan's organization is self.provider.) There's room for optimization here because we're currently calling get_statement_balances on every single subscriber, whether they have a balance due or not.
Notes:
BalanceDueSerializer: Inherits from OrganizationSerializer. Adds a new field, balances_due.
BalanceDueMixin: Uses get_statement_balances for each subscriber to a provider, finds their balances, checks whether each balance is related to the provider(by checking if the plan's organization is self.provider.) There's room for optimization here because we're currently calling get_statement_balances on every single subscriber, whether they have a balance due or not.