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.



59677
59678
59679
59680
59681
59682
59683
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59677

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.



59675
59676
59677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59675

def ats
  @ats
end

#in_stockObject (readonly)

Returns the value of attribute in_stock.



59675
59676
59677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59675

def in_stock
  @in_stock
end

#numberObject (readonly)

Returns the value of attribute number.



59675
59676
59677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59675

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



59689
59690
59691
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59689

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

#to_hashObject



59693
59694
59695
59696
59697
59698
59699
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59693

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

#to_jsonObject



59685
59686
59687
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59685

def to_json
  JSON.dump(to_hash)
end