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

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

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

        """
    kwargs = {'first_name': data.get('first_name'), 'first_name_latin':
        data.get('first_name_latin'), 'last_name': data.get('last_name'),
        'last_name_latin': data.get('last_name_latin'), 'title': data.get(
        'title'), 'title_latin': data.get('title_latin'), 'initials': data.
        get('initials'), 'initials_latin': data.get('initials_latin'),
        'suffix': data.get('suffix'), 'suffix_latin': data.get(
        'suffix_latin'), 'country_code': data.get('country_code'),
        'post_code': data.get('postcode'), 'post_code_latin': data.get(
        'postcode_latin'), 'town': data.get('town'), 'town_latin': data.get
        ('town_latin'), 'county': data.get('county'), 'county_latin': data.
        get('county_latin'), 'country': data.get('country'),
        'country_latin': data.get('country_latin'), 'email': data.get(
        'email_addr'), 'phone': data.get('phone'), 'home_phone': data.get(
        'home_phone'), 'work_phone': data.get('work_phone'),
        'agent_reference': data.get('agent_ref'), 'supplier_can_use_data':
        data.get('dp_supplier'), 'user_can_use_data': data.get('dp_user'),
        'world_can_use_data': data.get('dp_world')}
    address_line_one = data.get('addr_line_one')
    address_line_two = data.get('addr_line_two')
    address_line_one_latin = data.get('addr_line_one_latin')
    address_line_two_latin = data.get('addr_line_two_latin')
    address_lines = []
    if address_line_one:
        address_lines.append(address_line_one)
    if address_line_two:
        address_lines.append(address_line_two)
    address_lines_latin = []
    if address_line_one_latin:
        address_lines_latin.append(address_line_one_latin)
    if address_line_two_latin:
        address_lines_latin.append(address_line_two_latin)
    kwargs.update(address_lines=address_lines, address_lines_latin=
        address_lines_latin)
    return cls(**kwargs)
