Class: Io::Flow::V0::Models::OrderQuoteSummaryShippingFreight
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteSummaryShippingFreight
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteSummaryShippingFreight
constructor
A new instance of OrderQuoteSummaryShippingFreight.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteSummaryShippingFreight
Returns a new instance of OrderQuoteSummaryShippingFreight.
47559 47560 47561 47562 47563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47559 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:total], 'OrderQuoteSummaryShippingFreight') @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderQuotePrice) ? x : ::Io::Flow::V0::Models::OrderQuotePrice.from_json(x)) end |
Instance Attribute Details
#total ⇒ Object (readonly)
Returns the value of attribute total.
47557 47558 47559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47557 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47569 47570 47571 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47569 def copy(incoming={}) OrderQuoteSummaryShippingFreight.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47573 47574 47575 47576 47577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47573 def to_hash { :total => total.to_hash } end |
#to_json ⇒ Object
47565 47566 47567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47565 def to_json JSON.dump(to_hash) end |