ibanity v0.6.0 Ibanity.Xs2a.PeriodicPaymentInitiationRequest

Payment initiation requests API wrapper

Link to this section Summary

Functions

Convenience function for creating a payment initiation request for a financial institution.

Retrieves a payment initiation request based on its id and the id of the financial institution.

Link to this section Functions

Link to this function

create(request)

Creates a payment initiation request for a financial institution.

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

Example

iex> [
...>   redirect_uri: "https://fake-tpp.com/payment-initiated",
...>   consent_reference: "b57cca6b-74d6-4ac8-ba5d-4e28160d8dde",
...>   ...
...> ]
...> |> Request.attributes
...> |> Request.id(:financial_institution_id, "b2c76f6b-ab34-4843-8ef3-84300ef98a09")
...> |> PeriodicPaymentInitiationRequest.create
{:ok, %Ibanity.PeriodicPaymentInitiationRequest{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}
Link to this function

create(request, financial_institution_id)

Convenience function for creating a payment initiation request for a financial institution.

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

See create/1

Link to this function

delete(request)

Retrieves a payment initiation request based on its id and the id of the financial institution.

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

Example

iex> Request.id(:financial_institution_id, "b2c76f6b-ab34-4843-8ef3-84300ef98a09")
...> |> Request.id(:id, "270141aa-0c93-42a5-9adf-e2b9a8ab4cea")
...> |> PeriodicPaymentInitiationRequest.find
{:ok, %Ibanity.Xs2a.PeriodicPaymentInitiationRequest{id: "270141aa-0c93-42a5-9adf-e2b9a8ab4cea"}}
Link to this function

find(request, financial_institution_id, initiation_request_id)

Retrieves a payment initiation request based on its id and the id of the financial institution.

See find/1