StarlingBank.AccountHolders (StarlingBank v1.0.0)

Copy Markdown View Source

Account holder identity — type, name, individual/joint/business details, and registered address.

Required scopes: account-holder-type:read, account-holder-name:read, customer:read, address:read, address:edit, email:edit.

Summary

Functions

Gets the registered address for the account holder.

Gets who is authorised to operate the account (useful for joint/business accounts).

Gets business account holder details. Only valid for BUSINESS account holders.

Gets top-level customer details (UID, email, phone) for the authenticated holder.

Gets individual account holder details (DOB, etc). Only valid for INDIVIDUAL account holders.

Gets joint account holder details. Only valid for JOINT account holders.

Gets the account holder's name.

Gets the account holder type (INDIVIDUAL, BUSINESS, SOLE_TRADER, ...).

Updates the account holder's registered current address (and optionally previous addresses).

Updates the account holder's email address.

Functions

address(client \\ nil)

@spec address(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets the registered address for the account holder.

authorising_individual(client \\ nil)

@spec authorising_individual(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets who is authorised to operate the account (useful for joint/business accounts).

business(client \\ nil)

@spec business(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets business account holder details. Only valid for BUSINESS account holders.

customer(client \\ nil)

@spec customer(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets top-level customer details (UID, email, phone) for the authenticated holder.

individual(client \\ nil)

@spec individual(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets individual account holder details (DOB, etc). Only valid for INDIVIDUAL account holders.

joint(client \\ nil)

@spec joint(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets joint account holder details. Only valid for JOINT account holders.

name(client \\ nil)

@spec name(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets the account holder's name.

type(client \\ nil)

@spec type(StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, map()} | {:error, StarlingBank.Error.t()}

Gets the account holder type (INDIVIDUAL, BUSINESS, SOLE_TRADER, ...).

update_address(attrs, client \\ nil)

@spec update_address(map(), StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, nil} | {:error, StarlingBank.Error.t()}

Updates the account holder's registered current address (and optionally previous addresses).

update_email(email, client \\ nil)

@spec update_email(String.t(), StarlingBank.Client.t() | keyword() | nil) ::
  {:ok, nil} | {:error, StarlingBank.Error.t()}

Updates the account holder's email address.