mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 17:45:41 -04:00
Localize notification_utils to the API
This changeset pulls in all of the notification_utils code directly into the API and removes it as an external dependency. We are doing this to cut down on operational maintenance of the project and will begin removing parts of it no longer needed for the API. Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
31
notifications_utils/international_billing_rates.py
Normal file
31
notifications_utils/international_billing_rates.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
Format of the yaml file looks like:
|
||||
|
||||
1:
|
||||
attributes:
|
||||
alpha: 'NO'
|
||||
comment: null
|
||||
dlr: Carrier DLR
|
||||
generic_sender: ''
|
||||
numeric: LIMITED
|
||||
sc: 'NO'
|
||||
sender_and_registration_info: All senders CONVERTED into random long numeric senders
|
||||
text_restrictions: Bulk/marketing traffic NOT allowed
|
||||
billable_units: 1
|
||||
names:
|
||||
- Canada
|
||||
- United States
|
||||
- Dominican Republic
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
with open("{}/international_billing_rates.yml".format(dir_path)) as f:
|
||||
INTERNATIONAL_BILLING_RATES = yaml.safe_load(f)
|
||||
COUNTRY_PREFIXES = list(
|
||||
reversed(sorted(INTERNATIONAL_BILLING_RATES.keys(), key=len))
|
||||
)
|
||||
Reference in New Issue
Block a user