Class: Io::Flow::V0::Clients::HarmonizedLandedCosts
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::HarmonizedLandedCosts
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ HarmonizedLandedCosts
constructor
A new instance of HarmonizedLandedCosts.
-
#post(organization, harmonized_landed_cost_form) ⇒ Object
Single operation that provides harmonization landed costs (i.e. duties and taxes) for 1 or more items.
Constructor Details
#initialize(client) ⇒ HarmonizedLandedCosts
Returns a new instance of HarmonizedLandedCosts.
3182 3183 3184 |
# 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 |
Instance Method Details
#post(organization, harmonized_landed_cost_form) ⇒ Object
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
3190 3191 3192 3193 3194 3195 |
# 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 |