mmg rates set to 1.65p

also moved a default parameter to a plain ol' local variable to reduce ambiguity about whether it is overriden by any callers (it's not)
This commit is contained in:
Leo Hemsted
2016-07-06 16:03:00 +01:00
parent dfbd6610cb
commit aac3112274
3 changed files with 6 additions and 3 deletions

View File

@@ -178,7 +178,10 @@ def get_dashboard_partials(service_id):
}
def calculate_usage(usage, sms_free_allowance=250000, sms_rate=0.018):
def calculate_usage(usage):
# TODO: Don't hardcode these - get em from the API
sms_free_allowance = 250000
sms_rate = 0.0165
sms_sent = usage.get('sms_count', 0)
emails_sent = usage.get('email_count', 0)