Class: Io::Flow::V0::Models::CountryStatusDeleted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#country_status ⇒ Object
readonly
Returns the value of attribute country_status.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CountryStatusDeleted
constructor
A new instance of CountryStatusDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ CountryStatusDeleted
Returns a new instance of CountryStatusDeleted.
28027 28028 28029 28030 28031 28032 28033 28034 28035 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28027 def initialize(incoming={}) super(:discriminator => Event::Types::COUNTRY_STATUS_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :country_status], 'CountryStatusDeleted') @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) @country_status = (x = opts.delete(:country_status); x.is_a?(::Io::Flow::V0::Models::CountryStatus) ? x : ::Io::Flow::V0::Models::CountryStatus.new(x)) end |
Instance Attribute Details
#country_status ⇒ Object (readonly)
Returns the value of attribute country_status.
28025 28026 28027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28025 def country_status @country_status end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
28025 28026 28027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28025 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
28025 28026 28027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28025 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
28025 28026 28027 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28025 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28041 28042 28043 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28041 def copy(incoming={}) CountryStatusDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
28045 28046 28047 28048 28049 28050 28051 28052 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28045 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :country_status => country_status.to_hash } end |
#to_json ⇒ Object
28037 28038 28039 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28037 def to_json JSON.dump(to_hash) end |