ads_common/lib/ads_common/api.rb
def validate_service_request(version, service)
      # Check if the current config supports the requested version.
      unless api_config.has_version(version)
        raise AdsCommon::Errors::Error,
            "Version '%s' not recognized" % version.to_s
      end

      # Check if the specified version has the requested service.
      unless api_config.version_has_service(version, service)
        raise AdsCommon::Errors::Error,
            "Version '%s' does not contain service '%s'" %
            [version.to_s, service.to_s]
      end
    end
def validate_service_request(version, service)
      # Check if the current config supports the requested version.
      unless api_config.has_version(version)
        raise AdsCommon::Errors::Error,
            "Version '%s' not recognized" % version.to_s
      end

      # Check if the specified version has the requested service.
      unless api_config.version_has_service(version, service)
        raise AdsCommon::Errors::Error,
            "Version '%s' does not contain service '%s'" %
            [version.to_s, service.to_s]
      end
    end
def validate_service_request ( version , service ) # Check if the current config supports the requested version. unless api_config . has_version ( version ) raise AdsCommon :: Errors :: Error , "Version '%s' not recognized" % version . to_s end # Check if the specified version has the requested service. unless api_config . version_has_service ( version , service ) raise AdsCommon :: Errors :: Error , "Version '%s' does not contain service '%s'" % [ version . to_s , service . to_s ] end end
Auxiliary method to test parameters correctness for the service request.
Auxiliary method to test parameters correctness for the service request .