class Io::Flow::V0::Clients::HarmonizedLandedCosts
Public Class Methods
new(client)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 3182 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end
Public Instance Methods
post(organization, harmonized_landed_cost_form)
click to toggle source
Single operation that provides harmonization landed costs (i.e. duties and taxes) for 1 or more items. This method is designed to enable a single call from applications that need it (like checkout) to get all data for a collection of items
# File lib/flow_commerce/flow_api_v0_client.rb, line 3190 def post(organization, harmonized_landed_cost_form) HttpClient::Preconditions.assert_class('organization', organization, String) (x = harmonized_landed_cost_form; x.is_a?(::Io::Flow::V0::Models::HarmonizedLandedCostForm) ? x : ::Io::Flow::V0::Models::HarmonizedLandedCostForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/harmonization/landed-costs").with_json(harmonized_landed_cost_form.to_json).post ::Io::Flow::V0::Models::HarmonizedLandedCost.new(r) end