Class: Io::Flow::V0::Models::FlowCurrencySettingDeleted

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 = {}) ⇒ FlowCurrencySettingDeleted

Returns a new instance of FlowCurrencySettingDeleted.



9600
9601
9602
9603
9604
9605
9606
9607
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9600

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

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



9598
9599
9600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9598

def event_id
  @event_id
end

#flow_currency_setting_idObject (readonly)

Returns the value of attribute flow_currency_setting_id.



9598
9599
9600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9598

def flow_currency_setting_id
  @flow_currency_setting_id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



9598
9599
9600
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9598

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



9613
9614
9615
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9613

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

#subtype_to_hashObject



9617
9618
9619
9620
9621
9622
9623
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9617

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

#to_jsonObject



9609
9610
9611
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9609

def to_json
  JSON.dump(to_hash)
end