Class: Stripe::TaxRateService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::TaxRateService
- Defined in:
- lib/stripe/services/tax_rate_service.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new tax rate.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your tax rates.
-
#retrieve(tax_rate, params = {}, opts = {}) ⇒ Object
Retrieves a tax rate with the given ID.
-
#update(tax_rate, params = {}, opts = {}) ⇒ Object
Updates an existing tax rate.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Creates a new tax rate.
7 8 9 |
# File 'lib/stripe/services/tax_rate_service.rb', line 7 def create(params = {}, opts = {}) request(method: :post, path: "/v1/tax_rates", params: params, opts: opts, base_address: :api) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
12 13 14 |
# File 'lib/stripe/services/tax_rate_service.rb', line 12 def list(params = {}, opts = {}) request(method: :get, path: "/v1/tax_rates", params: params, opts: opts, base_address: :api) end |
#retrieve(tax_rate, params = {}, opts = {}) ⇒ Object
Retrieves a tax rate with the given ID
17 18 19 20 21 22 23 24 25 |
# File 'lib/stripe/services/tax_rate_service.rb', line 17 def retrieve(tax_rate, params = {}, opts = {}) request( method: :get, path: format("/v1/tax_rates/%<tax_rate>s", { tax_rate: CGI.escape(tax_rate) }), params: params, opts: opts, base_address: :api ) end |
#update(tax_rate, params = {}, opts = {}) ⇒ Object
Updates an existing tax rate.
28 29 30 31 32 33 34 35 36 |
# File 'lib/stripe/services/tax_rate_service.rb', line 28 def update(tax_rate, params = {}, opts = {}) request( method: :post, path: format("/v1/tax_rates/%<tax_rate>s", { tax_rate: CGI.escape(tax_rate) }), params: params, opts: opts, base_address: :api ) end |