Class: Io::Flow::V0::Models::OrderQuoteSummaryDuty
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteSummaryDuty
- 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 = {}) ⇒ OrderQuoteSummaryDuty
constructor
A new instance of OrderQuoteSummaryDuty.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteSummaryDuty
Returns a new instance of OrderQuoteSummaryDuty.
49573 49574 49575 49576 49577 49578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49573 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name, :total], 'OrderQuoteSummaryDuty') @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.
49571 49572 49573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49571 def name @name end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
49571 49572 49573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49571 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49584 49585 49586 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49584 def copy(incoming={}) OrderQuoteSummaryDuty.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49588 49589 49590 49591 49592 49593 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49588 def to_hash { :name => name, :total => total.to_hash } end |
#to_json ⇒ Object
49580 49581 49582 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49580 def to_json JSON.dump(to_hash) end |