def connection
      @connection ||= build_connection

      unless @connection.builder.handlers.include?(FaradayMiddleware::FollowRedirects)
        @connection.builder.insert(-2, FaradayMiddleware::FollowRedirects)
      end

      return @connection
    end
def connection
      @connection ||= build_connection

      unless @connection.builder.handlers.include?(FaradayMiddleware::FollowRedirects)
        @connection.builder.insert(-2, FaradayMiddleware::FollowRedirects)
      end

      return @connection
    end
overwrite to follow redirections
 https://github.com/zendesk/zendesk_api_client_rb/blob/master/lib/zendesk_api/client.rb