Class: Io::Flow::V0::Models::ManifestedLabelUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#carrier_tracking_number ⇒ Object
readonly
Returns the value of attribute carrier_tracking_number.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#flow_tracking_number ⇒ Object
readonly
Returns the value of attribute flow_tracking_number.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label_id ⇒ Object
readonly
Returns the value of attribute label_id.
-
#manifest_id ⇒ Object
readonly
Returns the value of attribute manifest_id.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ManifestedLabelUpserted
constructor
A new instance of ManifestedLabelUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ManifestedLabelUpserted
Returns a new instance of ManifestedLabelUpserted.
20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20578 def initialize(incoming={}) super(:discriminator => Event::Types::MANIFESTED_LABEL_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :manifest_id, :label_id, :flow_tracking_number, :carrier_tracking_number], 'ManifestedLabelUpserted') @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) @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @manifest_id = HttpClient::Preconditions.assert_class('manifest_id', opts.delete(:manifest_id), String) @label_id = HttpClient::Preconditions.assert_class('label_id', opts.delete(:label_id), String) @flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String) @carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String) end |
Instance Attribute Details
#carrier_tracking_number ⇒ Object (readonly)
Returns the value of attribute carrier_tracking_number.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def carrier_tracking_number @carrier_tracking_number end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def event_id @event_id end |
#flow_tracking_number ⇒ Object (readonly)
Returns the value of attribute flow_tracking_number.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def flow_tracking_number @flow_tracking_number end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def id @id end |
#label_id ⇒ Object (readonly)
Returns the value of attribute label_id.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def label_id @label_id end |
#manifest_id ⇒ Object (readonly)
Returns the value of attribute manifest_id.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def manifest_id @manifest_id end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
20576 20577 20578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20576 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
20596 20597 20598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20596 def copy(incoming={}) ManifestedLabelUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20600 def subtype_to_hash { :event_id => event_id, :timestamp => , :organization => organization, :id => id, :manifest_id => manifest_id, :label_id => label_id, :flow_tracking_number => flow_tracking_number, :carrier_tracking_number => carrier_tracking_number } end |
#to_json ⇒ Object
20592 20593 20594 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20592 def to_json JSON.dump(to_hash) end |