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.



25226
25227
25228
25229
25230
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25226

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.



25224
25225
25226
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25224

def status
  @status
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25236
25237
25238
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25236

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

#to_hashObject



25240
25241
25242
25243
25244
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25240

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

#to_jsonObject



25232
25233
25234
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25232

def to_json
  JSON.dump(to_hash)
end