View Source ExOAPI.Stripe.SDK.TaxRates (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.</p>

description: <p>Retrieves a tax rate with the given ID</p>

description: <p>Creates a new tax rate.</p>

description: <p>Updates an existing tax rate.</p>

Link to this section Types

@type get_tax_rates_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:inclusive, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:created, String.t()}
  | {:active, String.t()}
Link to this type

get_tax_rates_tax_rate_opts()

View Source
@type get_tax_rates_tax_rate_opts() :: {:expand, String.t()}

Link to this section Functions

Link to this function

get_tax_rates(client, opts \\ [])

View Source
@spec get_tax_rates(client :: ExOAPI.Client.t(), [get_tax_rates_opts()]) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.TaxRate.t()]
     }
   | map()}
  | {:error, any()}

description: <p>Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.</p>

Link to this function

get_tax_rates_tax_rate(client, tax_rate, opts \\ [])

View Source
@spec get_tax_rates_tax_rate(
  client :: ExOAPI.Client.t(),
  tax_rate :: String.t(),
  [get_tax_rates_tax_rate_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.TaxRate.t() | map()}
  | {:error, any()}

description: <p>Retrieves a tax rate with the given ID</p>

Link to this function

post_tax_rates(client, body)

View Source
@spec post_tax_rates(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      tax_type:
        String.t() | :gst | :hst | :jct | :pst | :qst | :rst | :sales_tax | :vat,
      state: String.t(),
      percentage: number(),
      metadata: map(),
      jurisdiction: String.t(),
      inclusive: boolean(),
      expand: [String.t()],
      display_name: String.t(),
      description: String.t(),
      country: String.t(),
      active: boolean()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.TaxRate.t() | map()}
  | {:error, any()}

description: <p>Creates a new tax rate.</p>

Link to this function

post_tax_rates_tax_rate(client, body, tax_rate)

View Source
@spec post_tax_rates_tax_rate(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      tax_type:
        String.t() | :gst | :hst | :jct | :pst | :qst | :rst | :sales_tax | :vat,
      state: String.t(),
      metadata: String.t() | map(),
      jurisdiction: String.t(),
      expand: [String.t()],
      display_name: String.t(),
      description: String.t(),
      country: String.t(),
      active: boolean()
    }
    | map(),
  tax_rate :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.TaxRate.t() | map()}
  | {:error, any()}

description: <p>Updates an existing tax rate.</p>