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.
47611 47612 47613 47614 47615 47616 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47611 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.
47609 47610 47611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47609 def name @name end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
47609 47610 47611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47609 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47622 47623 47624 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47622 def copy(incoming={}) OrderQuoteSummaryTax.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47626 47627 47628 47629 47630 47631 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47626 def to_hash { :name => name, :total => total.to_hash } end |
#to_json ⇒ Object
47618 47619 47620 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47618 def to_json JSON.dump(to_hash) end |