Class: Io::Flow::V0::Models::OrderQuoteReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteReference
constructor
A new instance of OrderQuoteReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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
#id ⇒ Object (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_hash ⇒ Object
49525 49526 49527 49528 49529 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49525 def to_hash { :id => id } end |
#to_json ⇒ Object
49517 49518 49519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49517 def to_json JSON.dump(to_hash) end |