ibanity v0.6.0 Ibanity.Consent.ProcessingOperation

Link to this section Summary

Functions

[Creates a processing operation].

[Lists all processing operations belonging to a consent].

[Revokes a processing operation].

Link to this section Functions

Link to this function

create(request)

[Creates a processing operation].

Returns {:ok, processing_operation} if successful, {:error, reason} otherwise.

Example

iex> [
...>   business_domain: "Legal",
...>   recurrent: true,
...>   ...
...> ]
...> |> Request.attributes
...> |> Request.id(:consent_id, "b5d6c5f9-e1d2-4cd1-a2aa-7baf964f7bf7")
...> |> ProcessingOperation.create
{:ok, %Ibanity.Consent.ProcessingOperation{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}

[Lists all processing operations belonging to a consent].

Returns {:ok, collection} where collection is a Ibanity.Collection where items are of type Ibanity.Consent.ProcessingOperation, otherwise it returns {:error, reason}.

Example

iex> ProcessingOperation.list
{:ok, %Ibanity.Collection{items: [%Ibanity.Consent.ProcessingOperation{...}], ...}
Link to this function

revoke(request)

[Revokes a processing operation].

Returns {:ok, processing_operation} if successful, {:error, reason} otherwise.

Example

iex> [
...>   consent_id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"
...>   id: "55c09df6-0bdd-46ef-8e66-e5297e0e8a7f"
...> ]
...> |> Request.ids
...> |> ProcessingOperation.revoke
{:ok, %Ibanity.Consent.ProcessingOperation{id: "55c09df6-0bdd-46ef-8e66-e5297e0e8a7f"}}