Source code for worldline.connect.sdk.v1.domain.address_personal
# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://apireference.connect.worldline-solutions.com/
#
from worldline.connect.sdk.v1.domain.address import Address
from worldline.connect.sdk.v1.domain.personal_name import PersonalName
[docs]class AddressPersonal(Address):
__name = None
@property
def name(self):
"""
| Object that holds the name elements
Type: :class:`worldline.connect.sdk.v1.domain.personal_name.PersonalName`
"""
return self.__name
@name.setter
def name(self, value):
self.__name = value
[docs] def to_dictionary(self):
dictionary = super(AddressPersonal, self).to_dictionary()
if self.name is not None:
dictionary['name'] = self.name.to_dictionary()
return dictionary
[docs] def from_dictionary(self, dictionary):
super(AddressPersonal, self).from_dictionary(dictionary)
if 'name' in dictionary:
if not isinstance(dictionary['name'], dict):
raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['name']))
value = PersonalName()
self.name = value.from_dictionary(dictionary['name'])
return self