class Io::Flow::V0::Clients::OrderQuotes

Public Class Methods

new(client) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7572
def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Public Instance Methods

get_by_id(organization, id) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7583
def get_by_id(organization, id)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('id', id, String)
  r = @client.request("/#{CGI.escape(organization)}/order/quotes/#{CGI.escape(id)}").get
  ::Io::Flow::V0::Models::OrderQuote.new(r)
end
post(organization, order_quote_put_form) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7576
def post(organization, order_quote_put_form)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  (x = order_quote_put_form; x.is_a?(::Io::Flow::V0::Models::OrderQuotePutForm) ? x : ::Io::Flow::V0::Models::OrderQuotePutForm.new(x))
  r = @client.request("/#{CGI.escape(organization)}/order/quotes").with_json(order_quote_put_form.to_json).post
  ::Io::Flow::V0::Models::OrderQuote.new(r)
end
put_by_id(organization, id, order_quote_put_form) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 7590
def put_by_id(organization, id, order_quote_put_form)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('id', id, String)
  (x = order_quote_put_form; x.is_a?(::Io::Flow::V0::Models::OrderQuotePutForm) ? x : ::Io::Flow::V0::Models::OrderQuotePutForm.new(x))
  r = @client.request("/#{CGI.escape(organization)}/order/quotes/#{CGI.escape(id)}").with_json(order_quote_put_form.to_json).put
  ::Io::Flow::V0::Models::OrderQuote.new(r)
end