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.



49511
49512
49513
49514
49515
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49511

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.



49509
49510
49511
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49509

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49521
49522
49523
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49521

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

#to_hashObject



49525
49526
49527
49528
49529
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49525

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



49517
49518
49519
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49517

def to_json
  JSON.dump(to_hash)
end