Add template and theme

This commit is contained in:
Lucidiot 2019-02-03 20:56:12 +01:00
parent f4e4469e70
commit 0023cd7292
No known key found for this signature in database
GPG Key ID: AE3F7205692FA205
1 changed files with 16 additions and 0 deletions

View File

@ -179,6 +179,20 @@ class Delivery(JSONSerializable):
:type: list(urbantz.items.LogEntry)
"""
self.theme = None
"""
Front-end theming information for the delivery tracking page.
:type: urbantz.utils.DictObject or None
"""
self.template = None
"""
Front-end template information for the delivery tracking page.
:type: urbantz.utils.DictObject or None
"""
def __repr__(self):
return '{}({})'.format(
self.__class__.__name__, repr(self.tracking_code))
@ -280,6 +294,8 @@ class Delivery(JSONSerializable):
self.payload['location']['location']['geometry'])
self.recipient = DictObject(self.payload['contact'])
self.features = DictObject(self.payload['features'])
self.template = DictObject(self.payload['template'])
self.theme = DictObject(self.payload['theme'])
self.logs = list(map(LogEntry.fromJSON, self.payload['log']))
self.items = list(map(Item.fromJSON, self.payload['items']))