@classmethod
def from_api_data(cls, data):
    """Creates a new Address object from API data from ticketswitch.

        Args:
            data (dict): the part of the response from a ticketswitch API call
                that concerns an address.

        Returns:
            :class:`Address <pyticketswitch.address.Address>`: a new
            :class:`Address <pyticketswitch.address.Address>` object
            populated with the data from the api.

        """
    kwargs = {'country_code': data.get('country_code'), 'county': data.get(
        'county'), 'email': data.get('email_address'), 'home_phone': data.
        get('home_phone'), 'post_code': data.get('postcode'), 'town': data.
        get('town'), 'work_phone': data.get('work_phone'), 'lines': [data.
        get('address_line_one'), data.get('address_line_two')]}
    return cls(**kwargs)
