Class: Datacentred::Model::Version

Inherits:
Base
  • Object
show all
Defined in:
lib/datacentred/model/version.rb

Overview

An API version currently available for use.

This method does not require authentication.

An API version may be:

  • CURRENT - The latest supported version.

  • SUPPORTED - A supported older version.

  • DEPRECATED - Currently supported but soon to be retired.

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Datacentred::Model::Base

Instance Attribute Details

#idInteger

Returns the current value of id

Returns:

  • (Integer)

    the current value of id



14
15
16
# File 'lib/datacentred/model/version.rb', line 14

def id
  @id
end

#statusString

Returns the current value of status

Returns:

  • (String)

    the current value of status



14
15
16
# File 'lib/datacentred/model/version.rb', line 14

def status
  @status
end

Class Method Details

.all[Version]

List all available API versions

Returns:

  • ([Version])

    Currently available versions of the API.



18
19
20
# File 'lib/datacentred/model/version.rb', line 18

def self.all
  Request::Versions.list.map {|version| new version }
end