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

Returns a new instance of Healthcheck.



27657
27658
27659
27660
27661
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27657

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.



27655
27656
27657
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27655

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



27667
27668
27669
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27667

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

#to_hashObject



27671
27672
27673
27674
27675
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27671

def to_hash
  {
    :status => status
  }
end

#to_jsonObject



27663
27664
27665
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27663

def to_json
  JSON.dump(to_hash)
end