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
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#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.
18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18663 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) @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)) @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)) @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)) end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def country @country end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def key @key end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18661 18662 18663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18661 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
18678 18679 18680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18678 def copy(incoming={}) ExperienceSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18682 def to_hash { :id => id, :key => key, :name => name, :country => country, :currency => currency, :language => language } end |
#to_json ⇒ Object
18674 18675 18676 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18674 def to_json JSON.dump(to_hash) end |