StrawHat.Mailer v1.0.0 StrawHat.Mailer.Partials View Source
Defines functionality for partial management.
A Partial is just a chunk of email content that you could reuse cross multiple emails.
Link to this section Summary
Functions
Returns an %Ecto.Changeset{}
for tracking partial changes
Creates a partial
Destroys a partial
Gets a partial by id
Returns a list of partials that belongs to the owner_id
Gets a partial by id
Returns the list of partials
Updates a partial
Link to this section Functions
Link to this function
change_partial(partial)
View Source
change_partial(StrawHat.Mailer.Partial.t()) :: Ecto.Changeset.t()
Returns an %Ecto.Changeset{}
for tracking partial changes.
Link to this function
create_partial(partial_attrs)
View Source
create_partial(StrawHat.Mailer.Partial.partial_attrs()) :: {:ok, StrawHat.Mailer.Partial.t()} | {:error, Ecto.Changeset.t()}
Creates a partial.
Link to this function
destroy_partial(partial)
View Source
destroy_partial(StrawHat.Mailer.Partial.t()) :: {:ok, StrawHat.Mailer.Partial.t()} | {:error, Ecto.Changeset.t()}
Destroys a partial.
Link to this function
find_partial(partial_id)
View Source
find_partial(String.t()) :: {:ok, StrawHat.Mailer.Partial.t()} | {:error, StrawHat.Error.t()}
Gets a partial by id
.
Link to this function
get_owner_partials(owner_id, pagination \\ [])
View Source
get_owner_partials(String.t(), Scrivener.Config.t()) :: Scrivener.Page.t()
Returns a list of partials that belongs to the owner_id
.
Link to this function
get_partial(partial_id)
View Source
get_partial(String.t()) :: StrawHat.Mailer.Partial.t() | nil | no_return()
Gets a partial by id
.
Link to this function
get_partials(pagination \\ [])
View Source
get_partials(Scrivener.Config.t()) :: Scrivener.Page.t()
Returns the list of partials.
Link to this function
update_partial(partial, partial_attrs)
View Source
update_partial( StrawHat.Mailer.Partial.t(), StrawHat.Mailer.Partial.partial_attrs() ) :: {:ok, StrawHat.Mailer.Partial.t()} | {:error, Ecto.Changeset.t()}
Updates a partial.