Class: Io::Flow::V0::Models::ChannelOrganizationUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#channel_organization ⇒ Object
readonly
Returns the value of attribute channel_organization.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ChannelOrganizationUpserted
constructor
A new instance of ChannelOrganizationUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ChannelOrganizationUpserted
Returns a new instance of ChannelOrganizationUpserted.
35256 35257 35258 35259 35260 35261 35262 35263 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35256 def initialize(incoming={}) super(:discriminator => Event::Types::CHANNEL_ORGANIZATION_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :channel_organization], 'ChannelOrganizationUpserted') @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) @channel_organization = (x = opts.delete(:channel_organization); x.is_a?(::Io::Flow::V0::Models::ChannelOrganization) ? x : ::Io::Flow::V0::Models::ChannelOrganization.new(x)) end |
Instance Attribute Details
#channel_organization ⇒ Object (readonly)
Returns the value of attribute channel_organization.
35254 35255 35256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35254 def channel_organization @channel_organization end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
35254 35255 35256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35254 def event_id @event_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
35254 35255 35256 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35254 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35269 35270 35271 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35269 def copy(incoming={}) ChannelOrganizationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
35273 35274 35275 35276 35277 35278 35279 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35273 def subtype_to_hash { :event_id => event_id, :timestamp => , :channel_organization => channel_organization.to_hash } end |
#to_json ⇒ Object
35265 35266 35267 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35265 def to_json JSON.dump(to_hash) end |