Class: Io::Flow::V0::Models::OrderQuoteReference

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

Returns a new instance of OrderQuoteReference.



53384
53385
53386
53387
53388
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53384

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



53382
53383
53384
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53382

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53394
53395
53396
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53394

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

#to_hashObject



53398
53399
53400
53401
53402
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53398

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



53390
53391
53392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53390

def to_json
  JSON.dump(to_hash)
end