diff --git a/plivo/utils/template.py b/plivo/utils/template.py index 8570ac5a..f3b58229 100644 --- a/plivo/utils/template.py +++ b/plivo/utils/template.py @@ -1,5 +1,5 @@ from plivo.utils.validators import * -from location import Location +from plivo.utils.location import * class Parameter: @validate_args( @@ -9,7 +9,7 @@ class Parameter: payload=[optional(of_type_exact(str))], currency=[optional(of_type_exact(dict))], date_time=[optional(of_type_exact(dict))], - location=[optional(of_type_exact(dict))], + location=[optional(validate_dict_items(Location))] ) def __init__(self, type, text=None, media=None, payload=None, currency=None, date_time=None, location=None): self.type = type @@ -18,7 +18,7 @@ def __init__(self, type, text=None, media=None, payload=None, currency=None, dat self.payload = payload self.currency = Currency(**currency) if currency else None self.date_time = DateTime(**date_time) if date_time else None - self.location = Location(**location) if location else None + self.location = location class Component: @validate_args(