Rename billing API methods to be recognisable

I struggled to distinguish which was which as neither mentioned if
the data they returned was monthly or annual.
This commit is contained in:
Ben Thorner
2022-04-29 16:25:58 +01:00
parent 3a1ac189ff
commit 4ab7e3ceec
7 changed files with 78 additions and 78 deletions

View File

@@ -3,13 +3,13 @@ from app.notify_client import NotifyAdminAPIClient
class BillingAPIClient(NotifyAdminAPIClient):
def get_billable_units(self, service_id, year):
def get_monthly_usage_for_service(self, service_id, year):
return self.get(
'/service/{0}/billing/monthly-usage'.format(service_id),
params=dict(year=year)
)
def get_service_usage(self, service_id, year=None):
def get_annual_usage_for_service(self, service_id, year=None):
return self.get(
'/service/{0}/billing/yearly-usage-summary'.format(service_id),
params=dict(year=year)