Class: Io::Flow::V0::Models::ReservationOrderReference

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

Returns a new instance of ReservationOrderReference.



56673
56674
56675
56676
56677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56673

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

Instance Attribute Details

#numberObject (readonly)

Returns the value of attribute number.



56671
56672
56673
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56671

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



56683
56684
56685
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56683

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

#to_hashObject



56687
56688
56689
56690
56691
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56687

def to_hash
  {
    :number => number
  }
end

#to_jsonObject



56679
56680
56681
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56679

def to_json
  JSON.dump(to_hash)
end