Class: Io::Flow::V0::Models::PfsInventoryCheckResponseItem

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ PfsInventoryCheckResponseItem

Returns a new instance of PfsInventoryCheckResponseItem.



55089
55090
55091
55092
55093
55094
55095
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55089

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

#atsObject (readonly)

Returns the value of attribute ats.



55087
55088
55089
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55087

def ats
  @ats
end

#in_stockObject (readonly)

Returns the value of attribute in_stock.



55087
55088
55089
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55087

def in_stock
  @in_stock
end

#numberObject (readonly)

Returns the value of attribute number.



55087
55088
55089
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55087

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



55101
55102
55103
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55101

def copy(incoming={})
  PfsInventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



55105
55106
55107
55108
55109
55110
55111
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55105

def to_hash
  {
    :number => number,
    :ats => ats,
    :in_stock => in_stock
  }
end

#to_jsonObject



55097
55098
55099
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55097

def to_json
  JSON.dump(to_hash)
end