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.



812
813
814
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 812

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.



818
819
820
821
822
823
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 818

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