Add monthly breakdown of usage

Basically:
- shows all the months from start of given financial year to now or end
  of given financial year (whichever is earliest)
- shows a breakdown of free and paid text messages for each of these
  months

Depends on:
- [x] https://github.com/alphagov/notifications-api/pull/699
This commit is contained in:
Chris Hill-Scott
2016-09-29 18:44:10 +01:00
parent 0a0bfa9232
commit b760457ba9
7 changed files with 233 additions and 8 deletions

View File

@@ -211,6 +211,9 @@ class ServiceAPIClient(NotificationsAPIClient):
def update_whitelist(self, service_id, data):
return self.put(url='/service/{}/whitelist'.format(service_id), data=data)
def get_billable_units(self, service_id, year):
return self.get(url='/service/{}/billable-units?year={}'.format(service_id, year))
class ServicesBrowsableItem(BrowsableItem):
@property