Class: Apiddress::HealthResponse

Inherits:
Data
  • Object
show all
Defined in:
lib/apiddress/models.rb

Overview

Service health payload.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



171
172
173
# File 'lib/apiddress/models.rb', line 171

def status
  @status
end

#timestampObject (readonly)

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



171
172
173
# File 'lib/apiddress/models.rb', line 171

def timestamp
  @timestamp
end

#versionObject (readonly)

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



171
172
173
# File 'lib/apiddress/models.rb', line 171

def version
  @version
end

Class Method Details

.from_hash(data) ⇒ Object



172
173
174
175
176
177
178
# File 'lib/apiddress/models.rb', line 172

def self.from_hash(data)
  new(
    status:    data["status"],
    timestamp: data["timestamp"],
    version:   data["version"],
  )
end