Class: Io::Flow::V0::Models::FlowItemIndexMetadata

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 = {}) ⇒ FlowItemIndexMetadata

Returns a new instance of FlowItemIndexMetadata.



23428
23429
23430
23431
23432
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23428

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:status], 'FlowItemIndexMetadata')
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SubcatalogItemStatus) ? x : ::Io::Flow::V0::Models::SubcatalogItemStatus.apply(x))
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



23426
23427
23428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23426

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



23438
23439
23440
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23438

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

#to_hashObject



23442
23443
23444
23445
23446
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23442

def to_hash
  {
    :status => status.value
  }
end

#to_jsonObject



23434
23435
23436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23434

def to_json
  JSON.dump(to_hash)
end