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.
53446 53447 53448 53449 53450 53451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53446 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.
53444 53445 53446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53444 def name @name end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
53444 53445 53446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53444 def total @total end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53457 53458 53459 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53457 def copy(incoming={}) OrderQuoteSummaryDuty.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53461 53462 53463 53464 53465 53466 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53461 def to_hash { :name => name, :total => total.to_hash } end |
#to_json ⇒ Object
53453 53454 53455 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53453 def to_json JSON.dump(to_hash) end |