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.
53612 53613 53614 53615 53616 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53612 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.
53610 53611 53612 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53610 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53622 53623 53624 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53622 def copy(incoming={}) OrderQuoteSummaryTotal.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53626 53627 53628 53629 53630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53626 def to_hash { :total => total.to_hash } end |
#to_json ⇒ Object
53618 53619 53620 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53618 def to_json JSON.dump(to_hash) end |