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.
-
#fulfillment_key ⇒ Object
readonly
Returns the value of attribute fulfillment_key.
-
#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.
-
#order_identifier ⇒ Object
readonly
Returns the value of attribute order_identifier.
-
#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.
29892 29893 29894 29895 29896 29897 29898 29899 29900 29901 29902 29903 29904 29905 29906 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29892 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) @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) @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) @order_identifier = (x = opts.delete(:order_identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_identifier', x, String)) @fulfillment_key = (x = opts.delete(:fulfillment_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('fulfillment_key', x, String)) end |
Instance Attribute Details
#carrier_tracking_number ⇒ Object (readonly)
Returns the value of attribute carrier_tracking_number.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def carrier_tracking_number @carrier_tracking_number end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def event_id @event_id end |
#flow_tracking_number ⇒ Object (readonly)
Returns the value of attribute flow_tracking_number.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def flow_tracking_number @flow_tracking_number end |
#fulfillment_key ⇒ Object (readonly)
Returns the value of attribute fulfillment_key.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def fulfillment_key @fulfillment_key end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def id @id end |
#label_id ⇒ Object (readonly)
Returns the value of attribute label_id.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def label_id @label_id end |
#manifest_id ⇒ Object (readonly)
Returns the value of attribute manifest_id.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def manifest_id @manifest_id end |
#order_identifier ⇒ Object (readonly)
Returns the value of attribute order_identifier.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def order_identifier @order_identifier end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def organization @organization end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
29890 29891 29892 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29890 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29912 29913 29914 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29912 def copy(incoming={}) ManifestedLabelUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29916 29917 29918 29919 29920 29921 29922 29923 29924 29925 29926 29927 29928 29929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29916 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, :order_identifier => order_identifier, :fulfillment_key => fulfillment_key } end |
#to_json ⇒ Object
29908 29909 29910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29908 def to_json JSON.dump(to_hash) end |