ibanity v0.6.0 Ibanity.Sandbox.FinancialInstitutionTransaction

Financial institution transaction API wrapper

Link to this section Summary

Link to this section Functions

Link to this function

create(request)

Creates a new financial institution transaction.

Returns {:ok, transaction} if successful, {:error, reason} otherwise

Link to this function

create(request, financial_institution_id, financial_institution_user_id, financial_institution_account_id, attributes)

Convenience function to create a new financial institution transaction.

See create/1

Example

iex> attributes = [
...>   value_date: "2017-05-22T00:00:00Z",
...>   execution_date: "2017-05-25T00:00:00Z",
...>   amount: 84.42,
...>   remittance_information_type: "NEW SHOES",
...>   remittance_information: "unstructured",
...>   ...
...> ]
...> FinancialInstitutionTransaction.create(
...>   "ad6fa583-2616-4a11-8b8d-eb98c53e2905",
...>   "740b6ae8-a631-4a32-9afc-a5548ab99d7e",
...>   "d9d60751-b741-4fa6-8524-8f9a066ca037",
...>   attributes
...> )
{:ok, %Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}}
Link to this function

delete(request)

Deletes transaction

Returns {:ok, transaction} if successful, {:error, reason} otherwise

Example

iex> %Request{}
...> |> Request.id(:financial_institution_id, "ad6fa583-2616-4a11-8b8d-eb98c53e2905")
...> |> Request.id(:financial_institution_user_id, "740b6ae8-a631-4a32-9afc-a5548ab99d7e")
...> |> Request.id(:financial_institution_account_id, "d9d60751-b741-4fa6-8524-8f9a066ca037")
...> |> Request.id("83e440d7-6bfa-4b08-92b7-c2ae7fc5c0e9")
...> |> FinancialInstitutionTransaction.delete
%{:ok, Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}}
Link to this function

delete(request, financial_institution_id, financial_institution_user_id, financial_institution_account_id, financial_institution_transaction_id)

Delete transaction

See delete/1

Example

iex> %Request{}
...> |> FinancialInstitutionTransaction.delete(
...>  "ad6fa583-2616-4a11-8b8d-eb98c53e2905",
...>  "740b6ae8-a631-4a32-9afc-a5548ab99d7e",
...>  "d9d60751-b741-4fa6-8524-8f9a066ca037",
...>  "83e440d7-6bfa-4b08-92b7-c2ae7fc5c0e9 "
...> )
%{:ok, Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}}

Retrieves transaction

Returns {:ok, transaction} if successful, {:error, reason} otherwise

Example

iex> %Request{}
...> |> Request.id(:financial_institution_id, "ad6fa583-2616-4a11-8b8d-eb98c53e2905")
...> |> Request.id(:financial_institution_user_id, "740b6ae8-a631-4a32-9afc-a5548ab99d7e")
...> |> Request.id(:financial_institution_account_id, "d9d60751-b741-4fa6-8524-8f9a066ca037")
...> |> Request.id("83e440d7-6bfa-4b08-92b7-c2ae7fc5c0e9")
...> |> FinancialInstitutionTransaction.find
%{:ok, Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}}
Link to this function

find(request, financial_institution_id, financial_institution_user_id, financial_institution_account_id, financial_institution_transaction_id)

Retrieves transaction

See find/1

Example

iex> %Request{}
...> |> FinancialInstitutionTransaction.find(
...>  "ad6fa583-2616-4a11-8b8d-eb98c53e2905",
...>  "740b6ae8-a631-4a32-9afc-a5548ab99d7e",
...>  "d9d60751-b741-4fa6-8524-8f9a066ca037"
...> )
%{:ok, Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}}

Lists transactions linked to a financial institution user account

Example

iex> %Request{}
...> |> Request.id(:financial_institution_id, "ad6fa583-2616-4a11-8b8d-eb98c53e2905")
...> |> Request.id(:financial_institution_user_id, "740b6ae8-a631-4a32-9afc-a5548ab99d7e")
...> |> Request.id(:financial_institution_account_id, "d9d60751-b741-4fa6-8524-8f9a066ca037")
...> |> FinancialInstitutionTransaction.list
%Ibanity.Collection[items: [Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}], ...]
Link to this function

list(request, financial_institution_id, financial_institution_user_id, financial_institution_account_id)

List transactions linked to a financial institution user account

## Example

iex> FinancialInstitutionTransaction.list(
...>   "ad6fa583-2616-4a11-8b8d-eb98c53e2905",
...>   "740b6ae8-a631-4a32-9afc-a5548ab99d7e",
...>   "d9d60751-b741-4fa6-8524-8f9a066ca037"
...> )
%Ibanity.Collection[items: [Ibanity.FinancialInstitutionTransaction{id: "44cd2dc8-163a-4dbe-b544-869e5f84ea54", ...}], ...]