class Io::Flow::V0::Models::OrderQuote

Attributes

form[R]
id[R]
summary[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52924
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :form], 'OrderQuote')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @form = (x = opts.delete(:form); x.is_a?(::Io::Flow::V0::Models::OrderQuotePutForm) ? x : ::Io::Flow::V0::Models::OrderQuotePutForm.new(x))
  @summary = (x = opts.delete(:summary); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderQuoteSummary) ? x : ::Io::Flow::V0::Models::OrderQuoteSummary.new(x)))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52936
def copy(incoming={})
  OrderQuote.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52940
def to_hash
  {
    :id => id,
    :form => form.to_hash,
    :summary => summary.nil? ? nil : summary.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52932
def to_json
  JSON.dump(to_hash)
end