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.



31641
31642
31643
31644
31645
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31641

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.



31639
31640
31641
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31639

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31651
31652
31653
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31651

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

#to_hashObject



31655
31656
31657
31658
31659
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31655

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

#to_jsonObject



31647
31648
31649
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31647

def to_json
  JSON.dump(to_hash)
end