Ibanity.Xs2a.Synchronization (ibanity v0.12.0)

Synchronization API wrapper

Link to this section Summary

Link to this section Functions

Link to this function

create(request)

Creates a new synchronization resource.

Note that at this moment it only supports account as resource type.

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

example

Example

iex> [
...>   resource_type: "account",
...>   resource_id: "88099509-ce43-4a49-ba98-115af962d96d",
...>   subtype: "accountDetails"
...> ]
...> |> Request.attributes
...> |> Request.customer_access_token("...")
...> |> Synchronization.create
{:ok, %Ibanity.Xs2a.Synchronization{id: "f92fc927-7c39-48c1-aa4b-2820efbfed00", ...}}

Retrieves a synchronization resource.

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

example

Example

iex> Request.id("0516f501-4a1c-4e37-8716-758f2bff8e37")
...> |> Request.customer_access_token("...")
...> |> Synchronization.find
{:ok, %Ibanity.Xs2a.Synchronization{id: "0516f501-4a1c-4e37-8716-758f2bff8e37"}}

Lists account's transactions synchronizations for a specific account information access request authorization.

Returns {:ok, collection} where collection is a Ibanity.Collection where items are of type Ibanity.Xs2a.Synchronization.

example

Example

iex> Request.id(:financial_institution_id, "0f88f06c-3cfe-4b8f-9338-69981c0c4632")
...> |> Request.id(:account_information_access_request_id, "ce3893cd-fff5-435a-bdfc-d55a7e98df6f")
...> |> Synchronization.list
{:ok, %Ibanity.Collection{items: [%Ibanity.Synchronization{...}], ...}}