Class: Io::Flow::V0::Clients::OrderSummaries

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrderSummaries

Returns a new instance of OrderSummaries.



2662
2663
2664
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2662

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#get_by_number(organization, number) ⇒ Object



2666
2667
2668
2669
2670
2671
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 2666

def get_by_number(organization, number)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('number', number, String)
  r = @client.request("/#{CGI.escape(organization)}/order/summaries/#{CGI.escape(number)}").get
  ::Io::Flow::V0::Models::OrderSummary.new(r)
end