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