Class: Io::Flow::V0::Models::ReservationItemReference

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 = {}) ⇒ ReservationItemReference

Returns a new instance of ReservationItemReference.



36844
36845
36846
36847
36848
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36844

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:number], 'ReservationItemReference')
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
end

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



36842
36843
36844
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36842

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



36854
36855
36856
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36854

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

#to_hashObject



36858
36859
36860
36861
36862
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36858

def to_hash
  {
    :number => number
  }
end

#to_jsonObject



36850
36851
36852
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36850

def to_json
  JSON.dump(to_hash)
end