lib/google_directory/user_commands.rb
def user_exists?( attributes: )
      begin
        response = service.get_user( attributes[:primary_email] )
        return {response: true, attributes: attributes[:primary_email], command: :user_exists?}
      rescue Google::Apis::ClientError => error
        if error.message.include? 'notFound'
          return {response: false, attributes: attributes[:primary_email], command: :user_exists?}
        else
          raise error
        end
      end
    end
def user_exists?( attributes: )
      begin
        response = service.get_user( attributes[:primary_email] )
        return {response: true, attributes: attributes[:primary_email], command: :user_exists?}
      rescue Google::Apis::ClientError => error
        if error.message.include? 'notFound'
          return {response: false, attributes: attributes[:primary_email], command: :user_exists?}
        else
          raise error
        end
      end
    end
@note Test if user exists in Google Directory

 @param attributes [Hash] this attribute MUST include: { primary_email: "username@domain.com" }
 @return [Hash] formatted as {success: {command: :user_exists?, attributes: {primary_email: "user@domain"}, response: Boolean } }