Class: Io::Flow::V0::Models::OrganizationCurrencySettingDeleted

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Event

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ OrganizationCurrencySettingDeleted

Returns a new instance of OrganizationCurrencySettingDeleted.



13386
13387
13388
13389
13390
13391
13392
13393
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13386

def initialize(incoming={})
  super(:name => Event::Types::ORGANIZATION_CURRENCY_SETTING_DELETED)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_currency_setting_id], 'OrganizationCurrencySettingDeleted')
  @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_currency_setting_id = HttpClient::Preconditions.assert_class('organization_currency_setting_id', opts.delete(:organization_currency_setting_id), String)
end

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



13384
13385
13386
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13384

def event_id
  @event_id
end

#organization_currency_setting_idObject (readonly)

Returns the value of attribute organization_currency_setting_id.



13384
13385
13386
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13384

def organization_currency_setting_id
  @organization_currency_setting_id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



13384
13385
13386
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13384

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



13399
13400
13401
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13399

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

#subtype_to_hashObject



13403
13404
13405
13406
13407
13408
13409
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13403

def subtype_to_hash
  {
    :event_id => event_id,
    :timestamp => timestamp,
    :organization_currency_setting_id => organization_currency_setting_id
  }
end

#to_jsonObject



13395
13396
13397
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13395

def to_json
  JSON.dump(to_hash)
end