Class: Io::Flow::V0::Clients::TaxDutyQuotes
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::TaxDutyQuotes
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ TaxDutyQuotes
constructor
A new instance of TaxDutyQuotes.
-
#post_channel_and_organization_and_levy_and_quotes_by_channel_id_and_organization_id(channel_id, organization_id, tax_duty_quote_form) ⇒ Object
Create and return a new tax duty quote.
-
#post_levy_and_quotes_by_organization(organization, tax_duty_quote_form) ⇒ Object
Create and return a new tax duty quote.
Constructor Details
#initialize(client) ⇒ TaxDutyQuotes
Returns a new instance of TaxDutyQuotes.
5633 5634 5635 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5633 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#post_channel_and_organization_and_levy_and_quotes_by_channel_id_and_organization_id(channel_id, organization_id, tax_duty_quote_form) ⇒ Object
Create and return a new tax duty quote.
5638 5639 5640 5641 5642 5643 5644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5638 def post_channel_and_organization_and_levy_and_quotes_by_channel_id_and_organization_id(channel_id, organization_id, tax_duty_quote_form) HttpClient::Preconditions.assert_class('channel_id', channel_id, String) HttpClient::Preconditions.assert_class('organization_id', organization_id, String) (x = tax_duty_quote_form; x.is_a?(::Io::Flow::V0::Models::TaxDutyQuoteForm) ? x : ::Io::Flow::V0::Models::TaxDutyQuoteForm.new(x)) r = @client.request("/channel/#{CGI.escape(channel_id)}/organization/#{CGI.escape(organization_id)}/levy/quotes").with_json(tax_duty_quote_form.to_json).post ::Io::Flow::V0::Models::TaxDutyQuote.new(r) end |
#post_levy_and_quotes_by_organization(organization, tax_duty_quote_form) ⇒ Object
Create and return a new tax duty quote.
5647 5648 5649 5650 5651 5652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 5647 def post_levy_and_quotes_by_organization(organization, tax_duty_quote_form) HttpClient::Preconditions.assert_class('organization', organization, String) (x = tax_duty_quote_form; x.is_a?(::Io::Flow::V0::Models::TaxDutyQuoteForm) ? x : ::Io::Flow::V0::Models::TaxDutyQuoteForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/levy/quotes").with_json(tax_duty_quote_form.to_json).post ::Io::Flow::V0::Models::TaxDutyQuote.new(r) end |