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.
13234 13235 13236 13237 13238 13239 13240 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13234 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.
13232 13233 13234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13232 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
13232 13233 13234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13232 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13232 13233 13234 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13232 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
13246 13247 13248 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13246 def copy(incoming={}) ExperienceSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
13250 13251 13252 13253 13254 13255 13256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13250 def to_hash { :id => id, :key => key, :name => name } end |
#to_json ⇒ Object
13242 13243 13244 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13242 def to_json JSON.dump(to_hash) end |