View Source Stripe.FileLink (stripity_stripe v3.2.0)
To share the contents of a File
object with non-Stripe users, you can
create a FileLink
. FileLink
s contain a URL that you can use to
retrieve the contents of the file without authentication.
Summary
Functions
Creates a new file link object.
Returns a list of file links.
Retrieves the file link with the given ID.
Updates an existing file link object. Expired links can no longer be updated.
Types
@type t() :: %Stripe.FileLink{ created: integer(), expired: boolean(), expires_at: integer() | nil, file: binary() | Stripe.File.t(), id: binary(), livemode: boolean(), metadata: term(), object: binary(), url: binary() | nil }
The file_link
type.
created
Time at which the object was created. Measured in seconds since the Unix epoch.expired
Returns if the link is already expired.expires_at
Time that the link expires.file
The file object this link points to.id
Unique identifier for the object.livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
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.object
String representing the object's type. Objects of the same type share the same value.url
The publicly accessible URL to download the file.
Functions
@spec create( params :: %{ optional(:expand) => [binary()], optional(:expires_at) => integer(), optional(:file) => binary(), optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Creates a new file link object.
Details
- Method:
post
- Path:
/v1/file_links
@spec list( params :: %{ optional(:created) => created() | integer(), optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:expired) => boolean(), optional(:file) => binary(), optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of file links.
Details
- Method:
get
- Path:
/v1/file_links
@spec retrieve( link :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the file link with the given ID.
Details
- Method:
get
- Path:
/v1/file_links/{link}
@spec update( link :: binary(), params :: %{ optional(:expand) => [binary()], optional(:expires_at) => :now | integer() | binary(), optional(:metadata) => %{optional(binary()) => binary()} | binary() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Updates an existing file link object. Expired links can no longer be updated.
Details
- Method:
post
- Path:
/v1/file_links/{link}