Class: Io::Flow::V0::Models::OrderQuotePutForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuotePutForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#geo ⇒ Object
readonly
Returns the value of attribute geo.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuotePutForm
constructor
A new instance of OrderQuotePutForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuotePutForm
Returns a new instance of OrderQuotePutForm.
49482 49483 49484 49485 49486 49487 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49482 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @line_items = (x = opts.delete(:line_items); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_items', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }) @session = (x = opts.delete(:session); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SessionReference) ? x : ::Io::Flow::V0::Models::SessionReference.new(x))) @geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderQuoteGeoPutForm) ? x : ::Io::Flow::V0::Models::OrderQuoteGeoPutForm.new(x))) end |
Instance Attribute Details
#geo ⇒ Object (readonly)
Returns the value of attribute geo.
49480 49481 49482 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49480 def geo @geo end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items.
49480 49481 49482 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49480 def line_items @line_items end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
49480 49481 49482 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49480 def session @session end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49493 49494 49495 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49493 def copy(incoming={}) OrderQuotePutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49497 49498 49499 49500 49501 49502 49503 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49497 def to_hash { :line_items => line_items.nil? ? nil : line_items.map { |o| o.to_hash }, :session => session.nil? ? nil : session.to_hash, :geo => geo.nil? ? nil : geo.to_hash } end |
#to_json ⇒ Object
49489 49490 49491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49489 def to_json JSON.dump(to_hash) end |