def validate_request(request)
      validation_errors = []

      validation_errors << 'Request api method is empty'  unless request.api_method
      validation_errors << 'Request end point is empty'   unless request.end_point
      validation_errors << 'Request data is empty'        unless request.request_fields.any?

      unless Validator.validate_by_rule request.gateway_url, Validator::URL, false
        validation_errors << 'Gateway url does not valid in Request'
      end

      if validation_errors.any?
        raise ValidationError, "Some Request fields are invalid:\n#{validation_errors.join(";\n")}"
      end
    end
def validate_request(request)
      validation_errors = []

      validation_errors << 'Request api method is empty'  unless request.api_method
      validation_errors << 'Request end point is empty'   unless request.end_point
      validation_errors << 'Request data is empty'        unless request.request_fields.any?

      unless Validator.validate_by_rule request.gateway_url, Validator::URL, false
        validation_errors << 'Gateway url does not valid in Request'
      end

      if validation_errors.any?
        raise ValidationError, "Some Request fields are invalid:\n#{validation_errors.join(";\n")}"
      end
    end
Validates Request

 @param    request   [Request]           Request for validation