Class: Io::Flow::V0::Models::StatementDeleted
- 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.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ StatementDeleted
constructor
A new instance of StatementDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ StatementDeleted
Returns a new instance of StatementDeleted.
68724 68725 68726 68727 68728 68729 68730 68731 68732 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68724 def initialize(incoming={}) super(:discriminator => Event::Types::STATEMENT_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :statement], 'StatementDeleted') @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 = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String) @statement = (x = opts.delete(:statement); x.is_a?(::Io::Flow::V0::Models::Statement) ? x : ::Io::Flow::V0::Models::Statement.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
68722 68723 68724 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68722 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
68722 68723 68724 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68722 def organization @organization end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
68722 68723 68724 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68722 def statement @statement end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
68722 68723 68724 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68722 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
68738 68739 68740 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68738 def copy(incoming={}) StatementDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
68742 68743 68744 68745 68746 68747 68748 68749 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68742 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :statement => statement.to_hash } end |
#to_json ⇒ Object
68734 68735 68736 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 68734 def to_json JSON.dump(to_hash) end |