lib/ads_common/api.rb
def validate_service_request(environment, version, service)
      # Check if the current environment supports the requested version.
      unless api_config.environment_has_version(environment, version)
        raise AdsCommon::Errors::Error,
            "Environment '%s' does not support version '%s'" %
            [environment.to_s, 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.
Auxiliary method to test parameters correctness for the service request .
def validate_service_request(environment, version, service)
      unless api_config.environment_has_version(environment, version)
        raise AdsCommon::Errors::Error,
            "Environment '%s' does not support version '%s'" %
            [environment.to_s, version.to_s]
      end
      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 ( environment , version , service ) unless api_config . environment_has_version ( environment , version ) raise AdsCommon :: Errors :: Error , "Environment '%s' does not support version '%s'" % [ environment . to_s , version . to_s ] end 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 .
# Check if the current environment supports the requested version. # Check if the specified version has the requested service.
environment
version
service