Class: Io::Flow::V0::Models::OrderQuoteSummaryTax
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteSummaryTax
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteSummaryTax
constructor
A new instance of OrderQuoteSummaryTax.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteSummaryTax
Returns a new instance of OrderQuoteSummaryTax.
49711 49712 49713 49714 49715 49716 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49711 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name, :total], 'OrderQuoteSummaryTax') @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @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
#name ⇒ Object (readonly)
Returns the value of attribute name.
49709 49710 49711 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49709 def name @name end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
49709 49710 49711 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49709 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49722 49723 49724 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49722 def copy(incoming={}) OrderQuoteSummaryTax.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49726 49727 49728 49729 49730 49731 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49726 def to_hash { :name => name, :total => total.to_hash } end |
#to_json ⇒ Object
49718 49719 49720 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49718 def to_json JSON.dump(to_hash) end |