Class: Io::Flow::V0::Models::OrderQuoteSummaryTotal
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteSummaryTotal
- 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 = {}) ⇒ OrderQuoteSummaryTotal
constructor
A new instance of OrderQuoteSummaryTotal.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteSummaryTotal
Returns a new instance of OrderQuoteSummaryTotal.
47639 47640 47641 47642 47643 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47639 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:total], 'OrderQuoteSummaryTotal') @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.
47637 47638 47639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47637 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47649 47650 47651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47649 def copy(incoming={}) OrderQuoteSummaryTotal.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47653 47654 47655 47656 47657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47653 def to_hash { :total => total.to_hash } end |
#to_json ⇒ Object
47645 47646 47647 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47645 def to_json JSON.dump(to_hash) end |