Class: Io::Flow::V0::Models::ExperienceKeyReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceKeyReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperienceKeyReference
constructor
A new instance of ExperienceKeyReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperienceKeyReference
Returns a new instance of ExperienceKeyReference.
12329 12330 12331 12332 12333 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12329 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:key], 'ExperienceKeyReference') @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
12327 12328 12329 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12327 def key @key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
12339 12340 12341 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12339 def copy(incoming={}) ExperienceKeyReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
12343 12344 12345 12346 12347 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12343 def to_hash { :key => key } end |
#to_json ⇒ Object
12335 12336 12337 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12335 def to_json JSON.dump(to_hash) end |