Class: Io::Flow::V0::Models::ShippingLabelSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingLabelSummary
- 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.
-
#flow_tracking_number ⇒ Object
readonly
Returns the value of attribute flow_tracking_number.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingLabelSummary
constructor
A new instance of ShippingLabelSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingLabelSummary
Returns a new instance of ShippingLabelSummary.
50770 50771 50772 50773 50774 50775 50776 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50770 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :flow_tracking_number, :carrier_tracking_number], 'ShippingLabelSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(: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.
50768 50769 50770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50768 def carrier_tracking_number @carrier_tracking_number end |
#flow_tracking_number ⇒ Object (readonly)
Returns the value of attribute flow_tracking_number.
50768 50769 50770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50768 def flow_tracking_number @flow_tracking_number end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
50768 50769 50770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50768 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50782 50783 50784 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50782 def copy(incoming={}) ShippingLabelSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50786 50787 50788 50789 50790 50791 50792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50786 def to_hash { :id => id, :flow_tracking_number => flow_tracking_number, :carrier_tracking_number => carrier_tracking_number } end |
#to_json ⇒ Object
50778 50779 50780 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50778 def to_json JSON.dump(to_hash) end |