Class: Io::Flow::V0::Models::SpotRateDeleted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#spot_rate_id ⇒ Object
readonly
Returns the value of attribute spot_rate_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SpotRateDeleted
constructor
A new instance of SpotRateDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ SpotRateDeleted
Returns a new instance of SpotRateDeleted.
16003 16004 16005 16006 16007 16008 16009 16010 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16003 def initialize(incoming={}) super(:name => Event::Types::SPOT_RATE_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :spot_rate_id], 'SpotRateDeleted') @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) @spot_rate_id = HttpClient::Preconditions.assert_class('spot_rate_id', opts.delete(:spot_rate_id), String) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
16001 16002 16003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16001 def event_id @event_id end |
#spot_rate_id ⇒ Object (readonly)
Returns the value of attribute spot_rate_id.
16001 16002 16003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16001 def spot_rate_id @spot_rate_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
16001 16002 16003 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16001 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
16016 16017 16018 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16016 def copy(incoming={}) SpotRateDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
16020 16021 16022 16023 16024 16025 16026 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16020 def subtype_to_hash { :event_id => event_id, :timestamp => , :spot_rate_id => spot_rate_id } end |
#to_json ⇒ Object
16012 16013 16014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16012 def to_json JSON.dump(to_hash) end |