Class: Io::Flow::V0::Models::CheckoutOptinResponsesUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#checkout_optin_responses ⇒ Object
readonly
Returns the value of attribute checkout_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 = {}) ⇒ CheckoutOptinResponsesUpserted
constructor
A new instance of CheckoutOptinResponsesUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ CheckoutOptinResponsesUpserted
Returns a new instance of CheckoutOptinResponsesUpserted.
23757 23758 23759 23760 23761 23762 23763 23764 23765 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23757 def initialize(incoming={}) super(:discriminator => Event::Types::CHECKOUT_OPTIN_RESPONSES_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :checkout_optin_responses], 'CheckoutOptinResponsesUpserted') @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) @checkout_optin_responses = (x = opts.delete(:checkout_optin_responses); x.is_a?(::Io::Flow::V0::Models::CheckoutOptinResponses) ? x : ::Io::Flow::V0::Models::CheckoutOptinResponses.new(x)) end |
Instance Attribute Details
#checkout_optin_responses ⇒ Object (readonly)
Returns the value of attribute checkout_optin_responses.
23755 23756 23757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23755 def checkout_optin_responses @checkout_optin_responses end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
23755 23756 23757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23755 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
23755 23756 23757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23755 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
23755 23756 23757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23755 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
23771 23772 23773 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23771 def copy(incoming={}) CheckoutOptinResponsesUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
23775 23776 23777 23778 23779 23780 23781 23782 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23775 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :checkout_optin_responses => checkout_optin_responses.to_hash } end |
#to_json ⇒ Object
23767 23768 23769 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23767 def to_json JSON.dump(to_hash) end |