Class: Io::Flow::V0::Models::LocalizedItemSnapshot
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#subcatalog_id ⇒ Object
readonly
Returns the value of attribute subcatalog_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LocalizedItemSnapshot
constructor
A new instance of LocalizedItemSnapshot.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ LocalizedItemSnapshot
19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19680 def initialize(incoming={}) super(:discriminator => Event::Types::LOCALIZED_ITEM_SNAPSHOT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :subcatalog_id, :url], 'LocalizedItemSnapshot') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String) @subcatalog_id = HttpClient::Preconditions.assert_class('subcatalog_id', opts.delete(:subcatalog_id), String) @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
19678 19679 19680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19678 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
19678 19679 19680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19678 def organization @organization end |
#subcatalog_id ⇒ Object (readonly)
Returns the value of attribute subcatalog_id.
19678 19679 19680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19678 def subcatalog_id @subcatalog_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
19678 19679 19680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19678 def end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
19678 19679 19680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19678 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
19695 19696 19697 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19695 def copy(incoming={}) LocalizedItemSnapshot.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
19699 19700 19701 19702 19703 19704 19705 19706 19707 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19699 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :subcatalog_id => subcatalog_id, :url => url } end |
#to_json ⇒ Object
19691 19692 19693 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19691 def to_json JSON.dump(to_hash) end |