Class: Io::Flow::V0::Models::ExperienceUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#delivered_duty ⇒ Object
readonly
Returns the value of attribute delivered_duty.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#measurement_system ⇒ Object
readonly
Returns the value of attribute measurement_system.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#region_id ⇒ Object
readonly
Returns the value of attribute region_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#subcatalog_id ⇒ Object
readonly
Returns the value of attribute subcatalog_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperienceUpserted
constructor
A new instance of ExperienceUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ExperienceUpserted
Returns a new instance of ExperienceUpserted.
25514 25515 25516 25517 25518 25519 25520 25521 25522 25523 25524 25525 25526 25527 25528 25529 25530 25531 25532 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25514 def initialize(incoming={}) super(:discriminator => Event::Types::EXPERIENCE_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :name, :delivered_duty, :subcatalog_id, :region_id, :country, :currency, :language, :measurement_system, :position], 'ExperienceUpserted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) @timestamp = 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) @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @delivered_duty = HttpClient::Preconditions.assert_class('delivered_duty', opts.delete(:delivered_duty), String) @subcatalog_id = HttpClient::Preconditions.assert_class('subcatalog_id', opts.delete(:subcatalog_id), String) @region_id = HttpClient::Preconditions.assert_class('region_id', opts.delete(:region_id), String) @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String) @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String) @language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String) @measurement_system = HttpClient::Preconditions.assert_class('measurement_system', opts.delete(:measurement_system), String) @position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer) @status = (x = opts.delete(:status); x.nil? ? nil : HttpClient::Preconditions.assert_class('status', x, String)) end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def country @country end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def currency @currency end |
#delivered_duty ⇒ Object (readonly)
Returns the value of attribute delivered_duty.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def delivered_duty @delivered_duty end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def event_id @event_id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def key @key end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def language @language end |
#measurement_system ⇒ Object (readonly)
Returns the value of attribute measurement_system.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def measurement_system @measurement_system end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def name @name end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def organization @organization end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def position @position end |
#region_id ⇒ Object (readonly)
Returns the value of attribute region_id.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def region_id @region_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def status @status end |
#subcatalog_id ⇒ Object (readonly)
Returns the value of attribute subcatalog_id.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def subcatalog_id @subcatalog_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
25512 25513 25514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25512 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25538 25539 25540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25538 def copy(incoming={}) ExperienceUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
25542 25543 25544 25545 25546 25547 25548 25549 25550 25551 25552 25553 25554 25555 25556 25557 25558 25559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25542 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :key => key, :name => name, :delivered_duty => delivered_duty, :subcatalog_id => subcatalog_id, :region_id => region_id, :country => country, :currency => currency, :language => language, :measurement_system => measurement_system, :position => position, :status => status } end |
#to_json ⇒ Object
25534 25535 25536 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25534 def to_json JSON.dump(to_hash) end |