Class: Io::Flow::V0::Models::NotificationDeleted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#carrier ⇒ Object
readonly
Returns the value of attribute carrier.
-
#carrier_tracking_number ⇒ Object
readonly
Returns the value of attribute carrier_tracking_number.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#flow_tracking_number ⇒ Object
readonly
Returns the value of attribute flow_tracking_number.
-
#notification_id ⇒ Object
readonly
Returns the value of attribute notification_id.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#package ⇒ Object
readonly
Returns the value of attribute package.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ NotificationDeleted
constructor
A new instance of NotificationDeleted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ NotificationDeleted
Returns a new instance of NotificationDeleted.
27552 27553 27554 27555 27556 27557 27558 27559 27560 27561 27562 27563 27564 27565 27566 27567 27568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27552 def initialize(incoming={}) super(:discriminator => Event::Types::NOTIFICATION_DELETED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :notification_id, :carrier_tracking_number, :flow_tracking_number, :destination, :origin, :carrier, :service, :order, :package], 'NotificationDeleted') @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) @notification_id = HttpClient::Preconditions.assert_class('notification_id', opts.delete(:notification_id), String) @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String) @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String) @destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)) @origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)) @carrier = HttpClient::Preconditions.assert_class('carrier', opts.delete(:carrier), String) @service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String) @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String) @package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)) end |
Instance Attribute Details
#carrier ⇒ Object (readonly)
Returns the value of attribute carrier.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def carrier @carrier end |
#carrier_tracking_number ⇒ Object (readonly)
Returns the value of attribute carrier_tracking_number.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def carrier_tracking_number @carrier_tracking_number end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def destination @destination end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def event_id @event_id end |
#flow_tracking_number ⇒ Object (readonly)
Returns the value of attribute flow_tracking_number.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def flow_tracking_number @flow_tracking_number end |
#notification_id ⇒ Object (readonly)
Returns the value of attribute notification_id.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def notification_id @notification_id end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def order @order end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def organization @organization end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def origin @origin end |
#package ⇒ Object (readonly)
Returns the value of attribute package.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def package @package end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def service @service end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
27550 27551 27552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27550 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
27574 27575 27576 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27574 def copy(incoming={}) NotificationDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
27578 27579 27580 27581 27582 27583 27584 27585 27586 27587 27588 27589 27590 27591 27592 27593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27578 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :notification_id => notification_id, :carrier_tracking_number => carrier_tracking_number, :flow_tracking_number => flow_tracking_number, :destination => destination.to_hash, :origin => origin.to_hash, :carrier => carrier, :service => service, :order => order, :package => package.to_hash } end |
#to_json ⇒ Object
27570 27571 27572 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27570 def to_json JSON.dump(to_hash) end |