Update one or more items for this employee. Specifying an empty value will
    clear it for that employee.

    CLI Examples:

        salt myminion bamboohr.update_employee 1138 nickname Curly
        salt myminion bamboohr.update_employee 1138 nickname ''
        salt myminion bamboohr.update_employee 1138 items='{"nickname": "Curly"}
        salt myminion bamboohr.update_employee 1138 items='{"nickname": ""}

def update_employee(emp_id, key=None, value=None, items=None):
    '''
    Update one or more items for this employee. Specifying an empty value will
    clear it for that employee.

    CLI Examples:

        salt myminion bamboohr.update_employee 1138 nickname Curly
        salt myminion bamboohr.update_employee 1138 nickname ''
        salt myminion bamboohr.update_employee 1138 items='{"nickname": "Curly"}
        salt myminion bamboohr.update_employee 1138 items='{"nickname": ""}
    '''
    if items is None:
        if key is None or value is None:
            return {'Error': 'At least one key/value pair is required'}
        items = {key: value}
    elif isinstance(items, six.string_types):
        items = salt.utils.yaml.safe_load(items)

    xml_items = ''
    for pair in items:
        xml_items += '<field id="{0}">{1}</field>'.format(pair, items[pair])
    xml_items = '<employee>{0}</employee>'.format(xml_items)

    status, result = _query(
        action='employees',
        command=emp_id,
        data=xml_items,
        method='POST',
    )

    return show_employee(emp_id, ','.join(items.keys()))