Class: Io::Flow::V0::Models::BrowseOptinResponsesUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#browse_optin_responses ⇒ Object
readonly
Returns the value of attribute browse_optin_responses.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ BrowseOptinResponsesUpserted
constructor
A new instance of BrowseOptinResponsesUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ BrowseOptinResponsesUpserted
Returns a new instance of BrowseOptinResponsesUpserted.
32603 32604 32605 32606 32607 32608 32609 32610 32611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32603 def initialize(incoming={}) super(:discriminator => Event::Types::BROWSE_OPTIN_RESPONSES_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :browse_optin_responses], 'BrowseOptinResponsesUpserted') @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) @browse_optin_responses = (x = opts.delete(:browse_optin_responses); x.is_a?(::Io::Flow::V0::Models::BrowseOptinResponses) ? x : ::Io::Flow::V0::Models::BrowseOptinResponses.new(x)) end |
Instance Attribute Details
#browse_optin_responses ⇒ Object (readonly)
Returns the value of attribute browse_optin_responses.
32601 32602 32603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32601 def browse_optin_responses @browse_optin_responses end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
32601 32602 32603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32601 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
32601 32602 32603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32601 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
32601 32602 32603 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32601 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32617 32618 32619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32617 def copy(incoming={}) BrowseOptinResponsesUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
32621 32622 32623 32624 32625 32626 32627 32628 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32621 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :browse_optin_responses => browse_optin_responses.to_hash } end |
#to_json ⇒ Object
32613 32614 32615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32613 def to_json JSON.dump(to_hash) end |