Class: Io::Flow::V0::Models::EcommercePlatformDeleted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#ecommerce_platform ⇒ Object
readonly
Returns the value of attribute ecommerce_platform.
-
#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 = {}) ⇒ EcommercePlatformDeleted
constructor
A new instance of EcommercePlatformDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ EcommercePlatformDeleted
Returns a new instance of EcommercePlatformDeleted.
29124 29125 29126 29127 29128 29129 29130 29131 29132 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29124 def initialize(incoming={}) super(:discriminator => Event::Types::ECOMMERCE_PLATFORM_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :ecommerce_platform], 'EcommercePlatformDeleted') @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) @ecommerce_platform = (x = opts.delete(:ecommerce_platform); x.is_a?(::Io::Flow::V0::Models::EcommercePlatform) ? x : ::Io::Flow::V0::Models::EcommercePlatform.new(x)) end |
Instance Attribute Details
#ecommerce_platform ⇒ Object (readonly)
Returns the value of attribute ecommerce_platform.
29122 29123 29124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29122 def ecommerce_platform @ecommerce_platform end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
29122 29123 29124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29122 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
29122 29123 29124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29122 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
29122 29123 29124 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29122 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29138 29139 29140 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29138 def copy(incoming={}) EcommercePlatformDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29142 29143 29144 29145 29146 29147 29148 29149 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29142 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :ecommerce_platform => ecommerce_platform.to_hash } end |
#to_json ⇒ Object
29134 29135 29136 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29134 def to_json JSON.dump(to_hash) end |