View Source Stripe.InvoiceRenderingTemplate (stripity_stripe v3.3.1)

Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates can be created from within the Dashboard, and they can be used over the API when creating invoices.

Summary

Types

t()

The invoice_rendering_template type.

Functions

Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.

List all templates, ordered by creation date, with the most recently created template appearing first.

Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

Types

@type t() :: %Stripe.InvoiceRenderingTemplate{
  created: integer(),
  id: binary(),
  livemode: boolean(),
  metadata: term() | nil,
  nickname: binary() | nil,
  object: binary(),
  status: binary(),
  version: integer()
}

The invoice_rendering_template type.

  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • nickname A brief description of the template, hidden from customers
  • object String representing the object's type. Objects of the same type share the same value.
  • status The status of the template, one of active or archived.
  • version Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering

Functions

Link to this function

archive(template, params \\ %{}, opts \\ [])

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

Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.

Details

  • Method: post
  • Path: /v1/invoice_rendering_templates/{template}/archive
Link to this function

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

View Source
@spec list(
  params :: %{
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary(),
    optional(:status) => :active | :archived
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

List all templates, ordered by creation date, with the most recently created template appearing first.

Details

  • Method: get
  • Path: /v1/invoice_rendering_templates
Link to this function

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

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

Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.

Details

  • Method: get
  • Path: /v1/invoice_rendering_templates/{template}
Link to this function

unarchive(template, params \\ %{}, opts \\ [])

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

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

Details

  • Method: post
  • Path: /v1/invoice_rendering_templates/{template}/unarchive