Class: Io::Flow::V0::Models::ProductRestrictionResultDeleted
- 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.
-
#product_restriction_result ⇒ Object
readonly
Returns the value of attribute product_restriction_result.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ProductRestrictionResultDeleted
constructor
A new instance of ProductRestrictionResultDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ProductRestrictionResultDeleted
Returns a new instance of ProductRestrictionResultDeleted.
60910 60911 60912 60913 60914 60915 60916 60917 60918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60910 def initialize(incoming={}) super(:discriminator => Event::Types::PRODUCT_RESTRICTION_RESULT_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :product_restriction_result], 'ProductRestrictionResultDeleted') @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) @product_restriction_result = (x = opts.delete(:product_restriction_result); x.is_a?(::Io::Flow::V0::Models::ProductRestrictionResult) ? x : ::Io::Flow::V0::Models::ProductRestrictionResult.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
60908 60909 60910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60908 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
60908 60909 60910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60908 def organization @organization end |
#product_restriction_result ⇒ Object (readonly)
Returns the value of attribute product_restriction_result.
60908 60909 60910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60908 def product_restriction_result @product_restriction_result end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
60908 60909 60910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60908 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
60924 60925 60926 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60924 def copy(incoming={}) ProductRestrictionResultDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
60928 60929 60930 60931 60932 60933 60934 60935 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60928 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :product_restriction_result => product_restriction_result.to_hash } end |
#to_json ⇒ Object
60920 60921 60922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 60920 def to_json JSON.dump(to_hash) end |