Packages
Complete Stripe SDK for Elixir with parity to the official Ruby SDK. V1+V2 coverage (193 services, 320 resource structs, 525 documented params). Per-event modules, Finch HTTP/2, RustyJSON, automatic retries, OAuth, webhooks, telemetry, per-client config, streaming pagination.
Current section
Files
Jump to
Current section
Files
lib/stripe/services/tax_code_service.ex
# File generated from our OpenAPI spec
defmodule Stripe.Services.TaxCodeService do
@moduledoc """
TaxProductResourceTaxCode
[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
"""
alias Stripe.Client
@doc """
List all tax codes
A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
"""
@spec list(Client.t(), map(), keyword()) ::
{:ok, Stripe.ListObject.t()} | {:error, Stripe.Error.t()}
def list(client, params \\ %{}, opts \\ []) do
Client.request(client, :get, "/v1/tax_codes", Keyword.merge(opts, params: params))
end
@doc """
Retrieve a tax code
Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
"""
@spec retrieve(Client.t(), String.t(), map(), keyword()) ::
{:ok, Stripe.Resources.TaxCode.t()} | {:error, Stripe.Error.t()}
def retrieve(client, id, params \\ %{}, opts \\ []) do
Client.request(client, :get, "/v1/tax_codes/#{id}", Keyword.merge(opts, params: params))
end
end