Class: Io::Flow::V0::Clients::Allocations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::Allocations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#get(organization, number) ⇒ Object
Order-level price details allocated using a strategy among individual order item units.
-
#initialize(client) ⇒ Allocations
constructor
A new instance of Allocations.
Constructor Details
#initialize(client) ⇒ Allocations
Returns a new instance of Allocations.
452 453 454 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 452 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.
458 459 460 461 462 463 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 458 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 |