Class: Io::Flow::V0::Models::ChannelReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ChannelReference
- 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 = {}) ⇒ ChannelReference
constructor
A new instance of ChannelReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ChannelReference
Returns a new instance of ChannelReference.
35418 35419 35420 35421 35422 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35418 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'ChannelReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
35416 35417 35418 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35416 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35428 35429 35430 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35428 def copy(incoming={}) ChannelReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35432 35433 35434 35435 35436 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35432 def to_hash { :id => id } end |
#to_json ⇒ Object
35424 35425 35426 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35424 def to_json JSON.dump(to_hash) end |