Class: Io::Flow::V0::Models::ShippingLaneDeleted
- 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.
-
#shipping_lane ⇒ Object
readonly
Returns the value of attribute shipping_lane.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingLaneDeleted
constructor
A new instance of ShippingLaneDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ShippingLaneDeleted
Returns a new instance of ShippingLaneDeleted.
39458 39459 39460 39461 39462 39463 39464 39465 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39458 def initialize(incoming={}) super(:discriminator => Event::Types::SHIPPING_LANE_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :shipping_lane], 'ShippingLaneDeleted') @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) @shipping_lane = (x = opts.delete(:shipping_lane); x.is_a?(::Io::Flow::V0::Models::ShippingLane) ? x : ::Io::Flow::V0::Models::ShippingLane.new(x)) end |
Instance Attribute Details
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
39456 39457 39458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39456 def event_id @event_id end |
#shipping_lane ⇒ Object (readonly)
Returns the value of attribute shipping_lane.
39456 39457 39458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39456 def shipping_lane @shipping_lane end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
39456 39457 39458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39456 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
39471 39472 39473 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39471 def copy(incoming={}) ShippingLaneDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
39475 39476 39477 39478 39479 39480 39481 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39475 def subtype_to_hash { :event_id => event_id, :timestamp => , :shipping_lane => shipping_lane.to_hash } end |
#to_json ⇒ Object
39467 39468 39469 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39467 def to_json JSON.dump(to_hash) end |