Class: Stripe::TaxCodeService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/tax_code_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#list(params = {}, opts = {}) ⇒ Object

A list of [all tax codes available](stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.



7
8
9
# File 'lib/stripe/services/tax_code_service.rb', line 7

def list(params = {}, opts = {})
  request(method: :get, path: "/v1/tax_codes", params: params, opts: opts, base_address: :api)
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.



12
13
14
15
16
17
18
19
20
# File 'lib/stripe/services/tax_code_service.rb', line 12

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/tax_codes/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end