Class: Io::Flow::V0::Models::SnapshotDeleted
- 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.
-
#snapshot_id ⇒ Object
readonly
Returns the value of attribute snapshot_id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SnapshotDeleted
constructor
A new instance of SnapshotDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ SnapshotDeleted
Returns a new instance of SnapshotDeleted.
52423 52424 52425 52426 52427 52428 52429 52430 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52423 def initialize(incoming={}) super(:discriminator => Event::Types::SNAPSHOT_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :snapshot_id], 'SnapshotDeleted') @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) @snapshot_id = HttpClient::Preconditions.assert_class('snapshot_id', opts.delete(:snapshot_id), String) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
52421 52422 52423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52421 def event_id @event_id end |
#snapshot_id ⇒ Object (readonly)
Returns the value of attribute snapshot_id.
52421 52422 52423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52421 def snapshot_id @snapshot_id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
52421 52422 52423 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52421 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52436 52437 52438 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52436 def copy(incoming={}) SnapshotDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
52440 52441 52442 52443 52444 52445 52446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52440 def subtype_to_hash { :event_id => event_id, :timestamp => , :snapshot_id => snapshot_id } end |
#to_json ⇒ Object
52432 52433 52434 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52432 def to_json JSON.dump(to_hash) end |