Class: Io::Flow::V0::Models::ShippingConfigurationItemShippingPricingUpserted

Inherits:
Event
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from Event

#discriminator

Instance Method Summary collapse

Methods inherited from Event

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ShippingConfigurationItemShippingPricingUpserted

Returns a new instance of ShippingConfigurationItemShippingPricingUpserted.



61392
61393
61394
61395
61396
61397
61398
61399
61400
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61392

def initialize(incoming={})
  super(:discriminator => Event::Types::SHIPPING_CONFIGURATION_ITEM_SHIPPING_PRICING_UPSERTED)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_id, :shipping_configuration_item_shipping_pricing], 'ShippingConfigurationItemShippingPricingUpserted')
  @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_shipping_pricing = (x = opts.delete(:shipping_configuration_item_shipping_pricing); x.is_a?(::Io::Flow::V0::Models::ShippingConfigurationItemShippingPricing) ? x : ::Io::Flow::V0::Models::ShippingConfigurationItemShippingPricing.new(x))
end

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



61390
61391
61392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61390

def event_id
  @event_id
end

#organization_idObject (readonly)

Returns the value of attribute organization_id.



61390
61391
61392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61390

def organization_id
  @organization_id
end

#shipping_configuration_item_shipping_pricingObject (readonly)

Returns the value of attribute shipping_configuration_item_shipping_pricing.



61390
61391
61392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61390

def shipping_configuration_item_shipping_pricing
  @shipping_configuration_item_shipping_pricing
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



61390
61391
61392
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61390

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



61406
61407
61408
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61406

def copy(incoming={})
  ShippingConfigurationItemShippingPricingUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



61410
61411
61412
61413
61414
61415
61416
61417
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61410

def subtype_to_hash
  {
    :event_id => event_id,
    :timestamp => timestamp,
    :organization_id => organization_id,
    :shipping_configuration_item_shipping_pricing => shipping_configuration_item_shipping_pricing.to_hash
  }
end

#to_jsonObject



61402
61403
61404
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61402

def to_json
  JSON.dump(to_hash)
end