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
39097 39098 39099 39100 39101 39102 39103 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39097 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.
39095 39096 39097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39095 def ats @ats end |
#in_stock ⇒ Object (readonly)
Returns the value of attribute in_stock.
39095 39096 39097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39095 def in_stock @in_stock end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
39095 39096 39097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39095 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
39109 39110 39111 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39109 def copy(incoming={}) PfsInventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
39113 39114 39115 39116 39117 39118 39119 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39113 def to_hash { :number => number, :ats => ats, :in_stock => in_stock } end |
#to_json ⇒ Object
39105 39106 39107 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39105 def to_json JSON.dump(to_hash) end |