mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
Remove redundant fields from service usage APIs
These are no longer used since [^1] and [^2]. [^1]: https://github.com/alphagov/notifications-admin/pull/4225 [^2]: https://github.com/alphagov/notifications-admin/pull/4229
This commit is contained in:
@@ -220,8 +220,6 @@ def fetch_billing_totals_for_year(service_id, year):
|
||||
query.c.rate.label("rate"),
|
||||
|
||||
func.sum(query.c.notifications_sent).label("notifications_sent"),
|
||||
# TEMPORARY: while we migrate away from "billing_units"
|
||||
func.sum(query.c.billable_units).label("billable_units"),
|
||||
func.sum(query.c.chargeable_units).label("chargeable_units"),
|
||||
func.sum(query.c.cost).label("cost"),
|
||||
func.sum(query.c.free_allowance_used).label("free_allowance_used"),
|
||||
@@ -280,8 +278,6 @@ def fetch_monthly_billing_for_year(service_id, year):
|
||||
func.date_trunc('month', query.c.bst_date).cast(Date).label("month"),
|
||||
|
||||
func.sum(query.c.notifications_sent).label("notifications_sent"),
|
||||
# TEMPORARY: while we migrate away from "billing_units"
|
||||
func.sum(query.c.billable_units).label("billable_units"),
|
||||
func.sum(query.c.chargeable_units).label("chargeable_units"),
|
||||
func.sum(query.c.cost).label("cost"),
|
||||
func.sum(query.c.free_allowance_used).label("free_allowance_used"),
|
||||
@@ -312,8 +308,6 @@ def query_service_email_usage_for_year(service_id, year):
|
||||
FactBilling.bst_date,
|
||||
FactBilling.postage, # should always be "none"
|
||||
FactBilling.notifications_sent,
|
||||
# TEMPORARY: while we migrate away from "billing_units"
|
||||
FactBilling.notifications_sent.label("billable_units"),
|
||||
FactBilling.billable_units.label("chargeable_units"),
|
||||
FactBilling.rate,
|
||||
FactBilling.notification_type,
|
||||
@@ -335,8 +329,6 @@ def query_service_letter_usage_for_year(service_id, year):
|
||||
FactBilling.bst_date,
|
||||
FactBilling.postage,
|
||||
FactBilling.notifications_sent,
|
||||
# TEMPORARY: while we migrate away from "billing_units"
|
||||
FactBilling.notifications_sent.label("billable_units"),
|
||||
# We can't use billable_units here as it represents the
|
||||
# sheet count for letters, which is already accounted for
|
||||
# in the rate. We actually charge per letter, not sheet.
|
||||
@@ -418,8 +410,6 @@ def query_service_sms_usage_for_year(service_id, year):
|
||||
FactBilling.bst_date,
|
||||
FactBilling.postage, # should always be "none"
|
||||
FactBilling.notifications_sent,
|
||||
# TEMPORARY: while we migrate away from "billing_units"
|
||||
chargeable_units.label("billable_units"),
|
||||
chargeable_units.label("chargeable_units"),
|
||||
FactBilling.rate,
|
||||
FactBilling.notification_type,
|
||||
|
||||
Reference in New Issue
Block a user