class Io::Flow::V0::Models::ManifestedLabelUpserted
Attributes
carrier_tracking_number[R]
event_id[R]
flow_tracking_number[R]
fulfillment_key[R]
id[R]
label_id[R]
manifest_id[R]
order_identifier[R]
organization[R]
timestamp[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::Event::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 49561 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
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49581 def copy(incoming={}) ManifestedLabelUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49585 def subtype_to_hash { :event_id => event_id, :timestamp => 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()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 49577 def to_json JSON.dump(to_hash) end