View Source Stripe.Tax.Settings (stripity_stripe v3.2.0)

You can use Tax Settings to manage configurations used by Stripe Tax calculations.

Related guide: Using the Settings API

Summary

Types

The location of the business for tax purposes.

Default configuration to be used on Stripe Tax calculations.

The place where your business is located.

t()

The tax.settings type.

Functions

Retrieves Tax Settings for a merchant.

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

Types

@type address() :: %{
  optional(:city) => binary(),
  optional(:country) => binary(),
  optional(:line1) => binary(),
  optional(:line2) => binary(),
  optional(:postal_code) => binary(),
  optional(:state) => binary()
}

The location of the business for tax purposes.

@type defaults() :: %{
  optional(:tax_behavior) => :exclusive | :inclusive | :inferred_by_currency,
  optional(:tax_code) => binary()
}

Default configuration to be used on Stripe Tax calculations.

@type head_office() :: %{optional(:address) => address()}

The place where your business is located.

@type t() :: %Stripe.Tax.Settings{
  defaults: term(),
  head_office: term() | nil,
  livemode: boolean(),
  object: binary(),
  status: binary(),
  status_details: term()
}

The tax.settings type.

  • defaults
  • head_office The place where your business is located.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.
  • status The active status indicates you have all required settings to calculate tax. A status can transition out of active when new required settings are introduced.
  • status_details

Functions

Link to this function

retrieve(params \\ %{}, opts \\ [])

View Source
@spec retrieve(params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t()) ::
  {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves Tax Settings for a merchant.

Details

  • Method: get
  • Path: /v1/tax/settings
Link to this function

update(params \\ %{}, opts \\ [])

View Source
@spec update(
  params :: %{
    optional(:defaults) => defaults(),
    optional(:expand) => [binary()],
    optional(:head_office) => head_office()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

Details

  • Method: post
  • Path: /v1/tax/settings