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.



38692
38693
38694
38695
38696
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38692

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.



38690
38691
38692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38690

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



38702
38703
38704
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38702

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

#to_hashObject



38706
38707
38708
38709
38710
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38706

def to_hash
  {
    :number => number
  }
end

#to_jsonObject



38698
38699
38700
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38698

def to_json
  JSON.dump(to_hash)
end