class Io::Flow::V0::Models::PfsInventoryCheckResponse

Attributes

items[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59651
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:items], 'PfsInventoryCheckResponse')
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::PfsInventoryCheckResponseItem) ? x : ::Io::Flow::V0::Models::PfsInventoryCheckResponseItem.new(x)); h }
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59661
def copy(incoming={})
  PfsInventoryCheckResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59665
def to_hash
  {
    :items => items.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 59657
def to_json
  JSON.dump(to_hash)
end