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
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.
createdTime at which the object was created. Measured in seconds since the Unix epoch.idUnique identifier for the object.livemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadataSet 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.nicknameA brief description of the template, hidden from customersobjectString representing the object's type. Objects of the same type share the same value.statusThe status of the template, one ofactiveorarchived.versionVersion of this template; version increases by one when an update on the template changes any field that controls invoice rendering
Functions
@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
@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
@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}
@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