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
42621 42622 42623 42624 42625 42626 42627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42621 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.
42619 42620 42621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42619 def ats @ats end |
#in_stock ⇒ Object (readonly)
Returns the value of attribute in_stock.
42619 42620 42621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42619 def in_stock @in_stock end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
42619 42620 42621 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42619 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42633 42634 42635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42633 def copy(incoming={}) PfsInventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42637 42638 42639 42640 42641 42642 42643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42637 def to_hash { :number => number, :ats => ats, :in_stock => in_stock } end |
#to_json ⇒ Object
42629 42630 42631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42629 def to_json JSON.dump(to_hash) end |