Class: Io::Flow::V0::Models::OrganizationOnboardingStateUpserted

Inherits:
Event
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#discriminator

Instance Method Summary collapse

Methods inherited from Event

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ OrganizationOnboardingStateUpserted

Returns a new instance of OrganizationOnboardingStateUpserted.



55113
55114
55115
55116
55117
55118
55119
55120
55121
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55113

def initialize(incoming={})
  super(:discriminator => Event::Types::ORGANIZATION_ONBOARDING_STATE_UPSERTED)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :organization_onboarding_state], 'OrganizationOnboardingStateUpserted')
  @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)
  @organization_onboarding_state = (x = opts.delete(:organization_onboarding_state); x.is_a?(::Io::Flow::V0::Models::OrganizationOnboardingState) ? x : ::Io::Flow::V0::Models::OrganizationOnboardingState.new(x))
end

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



55111
55112
55113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55111

def event_id
  @event_id
end

#organizationObject (readonly)

Returns the value of attribute organization.



55111
55112
55113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55111

def organization
  @organization
end

#organization_onboarding_stateObject (readonly)

Returns the value of attribute organization_onboarding_state.



55111
55112
55113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55111

def organization_onboarding_state
  @organization_onboarding_state
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



55111
55112
55113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55111

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



55127
55128
55129
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55127

def copy(incoming={})
  OrganizationOnboardingStateUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



55131
55132
55133
55134
55135
55136
55137
55138
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55131

def subtype_to_hash
  {
    :event_id => event_id,
    :timestamp => timestamp,
    :organization => organization,
    :organization_onboarding_state => organization_onboarding_state.to_hash
  }
end

#to_jsonObject



55123
55124
55125
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55123

def to_json
  JSON.dump(to_hash)
end