Class: Io::Flow::V0::Models::Healthcheck

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ Healthcheck



17729
17730
17731
17732
17733
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17729

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:status], 'Healthcheck')
  @status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String)
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



17727
17728
17729
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17727

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



17739
17740
17741
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17739

def copy(incoming={})
  Healthcheck.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



17743
17744
17745
17746
17747
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17743

def to_hash
  {
    :status => status
  }
end

#to_jsonObject



17735
17736
17737
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17735

def to_json
  JSON.dump(to_hash)
end