Class: Io::Flow::V0::Models::ExperienceSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Some important fields related to experiences used in various APIs
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperienceSummary
constructor
A new instance of ExperienceSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperienceSummary
Returns a new instance of ExperienceSummary.
15283 15284 15285 15286 15287 15288 15289 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15283 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :key, :name], 'ExperienceSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
15281 15282 15283 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15281 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
15281 15282 15283 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15281 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15281 15282 15283 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15281 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
15295 15296 15297 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15295 def copy(incoming={}) ExperienceSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
15299 15300 15301 15302 15303 15304 15305 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15299 def to_hash { :id => id, :key => key, :name => name } end |
#to_json ⇒ Object
15291 15292 15293 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15291 def to_json JSON.dump(to_hash) end |