Class: Io::Flow::V0::Models::PfsInventoryCheckResponseItem
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PfsInventoryCheckResponseItem
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#ats ⇒ Object
readonly
Returns the value of attribute ats.
-
#in_stock ⇒ Object
readonly
Returns the value of attribute in_stock.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PfsInventoryCheckResponseItem
constructor
A new instance of PfsInventoryCheckResponseItem.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PfsInventoryCheckResponseItem
41359 41360 41361 41362 41363 41364 41365 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41359 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number, :ats, :in_stock], 'PfsInventoryCheckResponseItem') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @ats = HttpClient::Preconditions.assert_class('ats', opts.delete(:ats), Integer) @in_stock = HttpClient::Preconditions.assert_boolean('in_stock', opts.delete(:in_stock)) end |
Instance Attribute Details
#ats ⇒ Object (readonly)
Returns the value of attribute ats.
41357 41358 41359 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41357 def ats @ats end |
#in_stock ⇒ Object (readonly)
Returns the value of attribute in_stock.
41357 41358 41359 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41357 def in_stock @in_stock end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
41357 41358 41359 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41357 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41371 41372 41373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41371 def copy(incoming={}) PfsInventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
41375 41376 41377 41378 41379 41380 41381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41375 def to_hash { :number => number, :ats => ats, :in_stock => in_stock } end |
#to_json ⇒ Object
41367 41368 41369 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41367 def to_json JSON.dump(to_hash) end |