Class: Io::Flow::V0::Models::OrderDeleted
- 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.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderDeleted
constructor
A new instance of OrderDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ OrderDeleted
Returns a new instance of OrderDeleted.
12891 12892 12893 12894 12895 12896 12897 12898 12899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12891 def initialize(incoming={}) super(:name => Event::Types::ORDER_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number], 'OrderDeleted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) = 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) @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
12889 12890 12891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12889 def event_id @event_id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
12889 12890 12891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12889 def number @number end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
12889 12890 12891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12889 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
12889 12890 12891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12889 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
12905 12906 12907 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12905 def copy(incoming={}) OrderDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
12909 12910 12911 12912 12913 12914 12915 12916 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12909 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :number => number } end |
#to_json ⇒ Object
12901 12902 12903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12901 def to_json JSON.dump(to_hash) end |