Class: Io::Flow::V0::Models::ShippingLabelLaneSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingLabelLaneSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ratecard ⇒ Object
readonly
Returns the value of attribute ratecard.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingLabelLaneSummary
constructor
A new instance of ShippingLabelLaneSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingLabelLaneSummary
Returns a new instance of ShippingLabelLaneSummary.
61681 61682 61683 61684 61685 61686 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61681 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :ratecard], 'ShippingLabelLaneSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @ratecard = (x = opts.delete(:ratecard); x.is_a?(::Io::Flow::V0::Models::ShippingLabelRatecardSummary) ? x : ::Io::Flow::V0::Models::ShippingLabelRatecardSummary.new(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
61679 61680 61681 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61679 def id @id end |
#ratecard ⇒ Object (readonly)
Returns the value of attribute ratecard.
61679 61680 61681 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61679 def ratecard @ratecard end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
61692 61693 61694 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61692 def copy(incoming={}) ShippingLabelLaneSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
61696 61697 61698 61699 61700 61701 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61696 def to_hash { :id => id, :ratecard => ratecard.to_hash } end |
#to_json ⇒ Object
61688 61689 61690 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61688 def to_json JSON.dump(to_hash) end |