stripity_stripe v2.7.0 Stripe.TaxRate View Source

Work with Stripe TaxRate objects.

Link to this section Summary

Functions

Create a tax rate.

List all tax rates.

Retrieve a tax rate.

Update a tax rate.

Link to this section Types

Link to this type

t() View Source
t() :: %Stripe.TaxRate{
  active: boolean(),
  created: Stripe.timestamp(),
  description: String.t() | nil,
  display_name: String.t(),
  id: Stripe.id(),
  inclusive: boolean(),
  jurisdiction: String.t() | nil,
  livemode: boolean(),
  metadata: Stripe.Types.metadata(),
  object: String.t(),
  percentage: integer()
}

Link to this section Functions

Link to this function

create(params, opts \\ []) View Source
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params:
       %{
         :percentage => number(),
         :display_name => String.t(),
         :inclusive => boolean(),
         optional(:active) => boolean(),
         optional(:description) => String.t(),
         optional(:metadata) => Stripe.Types.metadata(),
         optional(:jurisdiction) => String.t()
       }
       | %{}

Create a tax rate.

Link to this function

list(params \\ %{}, opts \\ []) View Source
list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:active) => boolean(),
         optional(:created) => Stripe.date_query(),
         optional(:ending_before) => t() | Stripe.id(),
         optional(:limit) => 1..100,
         optional(:inclusive) => boolean(),
         optional(:percentage) => number(),
         optional(:starting_after) => t() | Stripe.id()
       }
       | %{}

List all tax rates.

Link to this function

retrieve(id, opts \\ []) View Source
retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}

Retrieve a tax rate.

Link to this function

update(id, params, opts \\ []) View Source
update(Stripe.id() | t(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params:
       %{
         optional(:percentage) => number(),
         optional(:display_name) => String.t(),
         optional(:inclusive) => boolean(),
         optional(:active) => boolean(),
         optional(:description) => String.t(),
         optional(:metadata) => Stripe.Types.metadata(),
         optional(:jurisdiction) => String.t()
       }
       | %{}

Update a tax rate.

Takes the id and a map of changes.