def proceed(raise_errors = true)
      # Empty requests?
      if requests.empty?
        if raise_errors
          fail ::ArgumentError, 'At least one message is required!'
        else
          return false
        end
      end

      # Headers
      options = { headers: batch_headers, url: self.class.batch_notification_url, method: :post }

      # Create array!
      options[:payload] = { channels: requests.map { |i| i.to_json(true)[:payload] } }.to_json

      # Send
      RestClient::Request.execute(options) do |response, request, result, &block|
        begin
          case response.code
          when 200, 201
            Response::Batch.new response, options
          when 301, 302, 307
            response.follow_redirection(request, result, &block)
          when 400
            fail Error::InvalidAttributes, response
          when 401
            fail Error::UnauthorizedRequest, response
          when 404
            fail Error::ChannelNotFound, response
          else
            fail Error::InvalidReturn, response
          end
        rescue => e
          if raise_errors
            raise e
          else
            false
          end
        end
      end # RestClient
    end
def proceed(raise_errors = true)
      # Empty requests?
      if requests.empty?
        if raise_errors
          fail ::ArgumentError, 'At least one message is required!'
        else
          return false
        end
      end

      # Headers
      options = { headers: batch_headers, url: self.class.batch_notification_url, method: :post }

      # Create array!
      options[:payload] = { channels: requests.map { |i| i.to_json(true)[:payload] } }.to_json

      # Send
      RestClient::Request.execute(options) do |response, request, result, &block|
        begin
          case response.code
          when 200, 201
            Response::Batch.new response, options
          when 301, 302, 307
            response.follow_redirection(request, result, &block)
          when 400
            fail Error::InvalidAttributes, response
          when 401
            fail Error::UnauthorizedRequest, response
          when 404
            fail Error::ChannelNotFound, response
          else
            fail Error::InvalidReturn, response
          end
        rescue => e
          if raise_errors
            raise e
          else
            false
          end
        end
      end # RestClient
    end
Method actually sends created request to server
 [Can be refactored, with request class]
 @param raise_errors [Boolean] Raise errors if error?
 @return [Object] Raise an exception or return Response::Notification