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.



15038
15039
15040
15041
15042
15043
15044
15045
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15038

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.



15036
15037
15038
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15036

def event_id
  @event_id
end

#organization_currency_setting_idObject (readonly)

Returns the value of attribute organization_currency_setting_id.



15036
15037
15038
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15036

def organization_currency_setting_id
  @organization_currency_setting_id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



15036
15037
15038
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15036

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



15051
15052
15053
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15051

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

#subtype_to_hashObject



15055
15056
15057
15058
15059
15060
15061
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15055

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

#to_jsonObject



15047
15048
15049
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15047

def to_json
  JSON.dump(to_hash)
end