Class: Io::Flow::V0::Models::Ference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::Ference
- 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 = {}) ⇒ Ference
constructor
A new instance of Ference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ Ference
Returns a new instance of Ference.
12584 12585 12586 12587 12588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12584 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'Ference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
12582 12583 12584 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12582 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
12594 12595 12596 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12594 def copy(incoming={}) Ference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
12598 12599 12600 12601 12602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12598 def to_hash { :id => id } end |
#to_json ⇒ Object
12590 12591 12592 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12590 def to_json JSON.dump(to_hash) end |