Merge pull request #1288 from alphagov/add-new-rate-logic

Wire in the new API method that calculates the total cost and total billable units
This commit is contained in:
minglis
2017-06-02 09:52:19 +01:00
committed by GitHub
7 changed files with 87 additions and 4 deletions

View File

@@ -221,6 +221,12 @@ class ServiceAPIClient(NotifyAdminAPIClient):
params=dict(year=year)
)
def get_yearly_sms_unit_count_and_cost(self, service_id, year=None):
return self.get(
'/service/{0}/yearly-sms-billable-units'.format(service_id),
params=dict(year=year)
)
def get_monthly_notification_stats(self, service_id, year):
return self.get(url='/service/{}/notifications/monthly?year={}'.format(service_id, year))