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.
53467 53468 53469 53470 53471 53472 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53467 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.
53465 53466 53467 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53465 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
53465 53466 53467 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53465 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53478 53479 53480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53478 def copy(incoming={}) SyncStreamReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53482 53483 53484 53485 53486 53487 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53482 def to_hash { :id => id, :key => key } end |
#to_json ⇒ Object
53474 53475 53476 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53474 def to_json JSON.dump(to_hash) end |