Class: Io::Flow::V0::Models::ShippingConfigurationItemAvailabilityUpserted
- Inherits:
-
Event
- Object
- Event
- Io::Flow::V0::Models::ShippingConfigurationItemAvailabilityUpserted
- 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_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#shipping_configuration_item_availability ⇒ Object
readonly
Returns the value of attribute shipping_configuration_item_availability.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingConfigurationItemAvailabilityUpserted
constructor
A new instance of ShippingConfigurationItemAvailabilityUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ShippingConfigurationItemAvailabilityUpserted
Returns a new instance of ShippingConfigurationItemAvailabilityUpserted.
66156 66157 66158 66159 66160 66161 66162 66163 66164 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66156 def initialize(incoming={}) super(:discriminator => Event::Types::SHIPPING_CONFIGURATION_ITEM_AVAILABILITY_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_id, :shipping_configuration_item_availability], 'ShippingConfigurationItemAvailabilityUpserted') @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_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String) @shipping_configuration_item_availability = (x = opts.delete(:shipping_configuration_item_availability); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationItemAvailability) ? x : ::Io::Flow::V0::Models::ShippingConfigurationItemAvailability.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
66154 66155 66156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66154 def event_id @event_id end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
66154 66155 66156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66154 def organization_id @organization_id end |
#shipping_configuration_item_availability ⇒ Object (readonly)
Returns the value of attribute shipping_configuration_item_availability.
66154 66155 66156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66154 def shipping_configuration_item_availability @shipping_configuration_item_availability end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
66154 66155 66156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66154 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
66170 66171 66172 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66170 def copy(incoming={}) ShippingConfigurationItemAvailabilityUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
66174 66175 66176 66177 66178 66179 66180 66181 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66174 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization_id => organization_id, :shipping_configuration_item_availability => shipping_configuration_item_availability.to_hash } end |
#to_json ⇒ Object
66166 66167 66168 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 66166 def to_json JSON.dump(to_hash) end |