Class: DuodealerAPI::ApiVersion::NullVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/duodealer_api/api_version.rb

Class Method Summary collapse

Class Method Details

.matches?(version) ⇒ Boolean

Returns:

  • (Boolean)


182
183
184
# File 'lib/duodealer_api/api_version.rb', line 182

def matches?(version)
  version.nil? || version == self
end

.new(*_args) ⇒ Object

Raises:

  • (NoMethodError)


178
179
180
# File 'lib/duodealer_api/api_version.rb', line 178

def new(*_args)
  raise NoMethodError, "NullVersion is an abstract class and cannot be instantiated."
end

.raise_not_set_error(*_args) ⇒ Object Also known as: stable?, construct_api_path, construct_graphql_path, latest_supported?, supported?, verified?, unstable?, handle, display_name, supported, verified, latest_supported, name



186
187
188
# File 'lib/duodealer_api/api_version.rb', line 186

def raise_not_set_error(*_args)
  raise ApiVersionNotSetError, "You must set DuodealerAPI::Base.api_version before making a request."
end