Class: Io::Flow::V0::Models::InventoryCheckResponse
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InventoryCheckResponse
- 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 = {}) ⇒ InventoryCheckResponse
constructor
A new instance of InventoryCheckResponse.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ InventoryCheckResponse
Returns a new instance of InventoryCheckResponse.
25814 25815 25816 25817 25818 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25814 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:items], 'InventoryCheckResponse') @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InventoryCheckResponseItem) ? x : ::Io::Flow::V0::Models::InventoryCheckResponseItem.new(x)) } end |
Instance Attribute Details
#items ⇒ Object (readonly)
Returns the value of attribute items.
25812 25813 25814 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25812 def items @items end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25824 25825 25826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25824 def copy(incoming={}) InventoryCheckResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
25828 25829 25830 25831 25832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25828 def to_hash { :items => items.map { |o| o.to_hash } } end |
#to_json ⇒ Object
25820 25821 25822 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25820 def to_json JSON.dump(to_hash) end |