Class: Io::Flow::V0::Models::SyncStreamReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncStreamReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SyncStreamReference
constructor
A new instance of SyncStreamReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SyncStreamReference
Returns a new instance of SyncStreamReference.
52738 52739 52740 52741 52742 52743 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52738 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :key], 'SyncStreamReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
52736 52737 52738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52736 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
52736 52737 52738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52736 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52749 52750 52751 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52749 def copy(incoming={}) SyncStreamReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
52753 52754 52755 52756 52757 52758 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52753 def to_hash { :id => id, :key => key } end |
#to_json ⇒ Object
52745 52746 52747 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52745 def to_json JSON.dump(to_hash) end |