Class: Io::Flow::V0::Models::ShippingConfigurationUpserted
- 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.
-
#shipping_configuration ⇒ Object
readonly
Returns the value of attribute shipping_configuration.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingConfigurationUpserted
constructor
A new instance of ShippingConfigurationUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ShippingConfigurationUpserted
Returns a new instance of ShippingConfigurationUpserted.
44627 44628 44629 44630 44631 44632 44633 44634 44635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44627 def initialize(incoming={}) super(:discriminator => Event::Types::SHIPPING_CONFIGURATION_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :shipping_configuration], 'ShippingConfigurationUpserted') @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) @shipping_configuration = (x = opts.delete(:shipping_configuration); x.is_a?(::Io::Flow::V0::Models::ShippingConfiguration) ? x : ::Io::Flow::V0::Models::ShippingConfiguration.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
44625 44626 44627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44625 def event_id @event_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
44625 44626 44627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44625 def organization @organization end |
#shipping_configuration ⇒ Object (readonly)
Returns the value of attribute shipping_configuration.
44625 44626 44627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44625 def shipping_configuration @shipping_configuration end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
44625 44626 44627 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44625 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
44641 44642 44643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44641 def copy(incoming={}) ShippingConfigurationUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
44645 44646 44647 44648 44649 44650 44651 44652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44645 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :shipping_configuration => shipping_configuration.to_hash } end |
#to_json ⇒ Object
44637 44638 44639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44637 def to_json JSON.dump(to_hash) end |