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.
49739 49740 49741 49742 49743 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49739 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.
49737 49738 49739 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49737 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49749 49750 49751 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49749 def copy(incoming={}) OrderQuoteSummaryTotal.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49753 49754 49755 49756 49757 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49753 def to_hash { :total => total.to_hash } end |
#to_json ⇒ Object
49745 49746 49747 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49745 def to_json JSON.dump(to_hash) end |