A public address of a MishkaPay.File, made with MishkaPay.file_link/4: anyone with :url
can open the file without a key, so a site can show it to a person, until :expires_at. A
guarded_struct the provider fills in.
:id: the provider's id of the link (link_...at Stripe);:file_id: the file it opens.:url: the address to show.:expires_at: when it stops working, ornilfor never;:expired: whether it has.:created_at.
Summary
Functions
A sample %MishkaPay.File.Link{} populated from defaults + type-based fallbacks.
Types
@type t() :: %MishkaPay.File.Link{ created_at: DateTime.t() | nil, expired: boolean() | nil, expires_at: DateTime.t() | nil, file_id: String.t() | nil, id: String.t(), provider: String.t(), tenant: term() | nil, url: String.t() }
The struct that builder/1 returns.
| Field | Type | Required | Default | Description | Derives |
|---|---|---|---|---|---|
:provider | String.t() | yes | validate(not_nil_value, string) | ||
:tenant | term() | nil | no | |||
:id | String.t() | yes | validate(not_nil_value, string, not_empty) | ||
:file_id | String.t() | nil | no | validate(string) | ||
:url | String.t() | yes | validate(not_nil_value, string, not_empty) | ||
:expires_at | DateTime.t() | nil | no | validate(struct) | ||
:expired | boolean() | nil | no | false | validate(boolean) | |
:created_at | DateTime.t() | nil | no | validate(struct) |