View Source Ibanity.Consent.Consent (ibanity v1.1.0)
Summary
Functions
[Creates a consent].
Returns {:ok, consent}
if successful, {:error, reason}
otherwise.
Example
iex> [
...> action_type: "checkbox",
...> displayed_text: "Your consent text.",
...> ...
...> ]
...> |> Request.attributes
...> |> Consent.create
{:ok, %Ibanity.Consent.Consent{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}
[Finds a consent].
Returns {:ok, consent}
if successful, {:error, reason}
otherwise.
Example
iex> "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"
...> |> Request.id
...> |> Consent.find
{:ok, %Ibanity.Consent.Consent{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}
[Revokes a consent].
Returns {:ok, consent}
if successful, {:error, reason}
otherwise.
Example
iex> [
...> consent_id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"
...> ]
...> |> Request.ids
...> |> Consent.revoke
{:ok, %Ibanity.Consent.Consent{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}
[Validates a consent].
Returns {:ok, consent}
if successful, {:error, reason}
otherwise.
Example
iex> [
...> consent_id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"
...> ]
...> |> Request.ids
...> |> Consent.validate
{:ok, %Ibanity.Consent.Consent{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}