Class: Io::Flow::V0::Clients::Allocations

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Allocations

Returns a new instance of Allocations.



764
765
766
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 764

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

Instance Method Details

#get(organization, number) ⇒ Object

Order-level price details allocated using a strategy among individual order item units.



770
771
772
773
774
775
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 770

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