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.
30792 30793 30794 30795 30796 30797 30798 30799 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30792 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) = 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.
30790 30791 30792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30790 def channel_organization @channel_organization end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
30790 30791 30792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30790 def event_id @event_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
30790 30791 30792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30790 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30805 30806 30807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30805 def copy(incoming={}) ChannelOrganizationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
30809 30810 30811 30812 30813 30814 30815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30809 def subtype_to_hash { :event_id => event_id, :timestamp => , :channel_organization => channel_organization.to_hash } end |
#to_json ⇒ Object
30801 30802 30803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30801 def to_json JSON.dump(to_hash) end |