Class: Io::Flow::V0::Models::SessionReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SessionReference
- 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 = {}) ⇒ SessionReference
constructor
A new instance of SessionReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SessionReference
Returns a new instance of SessionReference.
40113 40114 40115 40116 40117 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40113 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'SessionReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
40111 40112 40113 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40111 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40123 40124 40125 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40123 def copy(incoming={}) SessionReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
40127 40128 40129 40130 40131 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40127 def to_hash { :id => id } end |
#to_json ⇒ Object
40119 40120 40121 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40119 def to_json JSON.dump(to_hash) end |