Ibanity.PontoConnect.OnboardingDetails (ibanity v1.0.0)

Onboarding Details API wrapper

NOTE: This resource needs a client token!

See Ibanity.PontoConnect.Token.create/1 to find out how to request a client token.

Link to this section Summary

Functions

Same as create/2, but :attributes, :account_id, and :token must be set in request.

Link to this section Functions

Link to this function

create(request)

Same as create/2, but :attributes, :account_id, and :token must be set in request.

examples

Examples

Set id and token to request a BulkPayment

iex> %PontoConnect.Token{}
...> |> Request.token()
...> |> Request.attributes(attributes)
...> |> PontoConnect.BulkPayment.create()
{:ok, %PontoConnect.BulkPayment{id: "343e64e5-4882-4559-96d0-221c398288f3"}}
Link to this function

create(request_or_token, attrs)

Creates Onboarding Details.

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

example

Example

Attributes

iex> attributes = [
...>   email: "jsmith@example.com",
...>   first_name: "Jo",
...>   last_name: "Smith",
...>   organization_name: "Smith Ltd",
...>   enterprise_number: "0999999999",
...>   vat_number: "BE0999999999",
...>   address_street_address: "123 Main St",
...>   address_country: "BE",
...>   address_postal_code: "1000",
...>   address_city: "Brussels",
...>   phone_number: "+32484000000",
...>   initial_financial_institution_id: "953934eb-229a-4fd2-8675-07794078cc7d"
...> ]

With token

iex> Ibanity.PontoConnect.OnboardingDetails.create(client_token, attributes)
{:ok, %Ibanity.PontoConnect.OnboardingDetails{id: "343e64e5-4882-4559-96d0-221c398288f3"}}

With request

iex> request = Request.token(client_token)
iex> Ibanity.PontoConnect.OnboardingDetails.create(request, attributes)
{:ok, %Ibanity.PontoConnect.OnboardingDetails{id: "343e64e5-4882-4559-96d0-221c398288f3"}}