Class: Io::Flow::V0::Models::PfsInventoryCheckResponse
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PfsInventoryCheckResponse
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PfsInventoryCheckResponse
constructor
A new instance of PfsInventoryCheckResponse.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PfsInventoryCheckResponse
Returns a new instance of PfsInventoryCheckResponse.
55063 55064 55065 55066 55067 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55063 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 |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
55061 55062 55063 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55061 def items @items end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
55073 55074 55075 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55073 def copy(incoming={}) PfsInventoryCheckResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
55077 55078 55079 55080 55081 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55077 def to_hash { :items => items.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash } } end |
#to_json ⇒ Object
55069 55070 55071 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55069 def to_json JSON.dump(to_hash) end |