Receipts — attach itemized receipts (with optional photo attachments) to feed item transactions.
Required scopes: receipt:read, receipt:write, receipts:read, attachment:read.
Summary
Functions
Attaches an existing (or new) receipt to a specific feed item / transaction.
Creates a standalone receipt (not yet attached to a transaction).
Fetches a receipt by UID.
Downloads a receipt attachment's binary content by UID.
Lists receipts attached to a given feed item.
Uploads a binary attachment (e.g. photo of a receipt) and returns its attachment UID.
Functions
@spec attach_to_transaction( String.t(), map(), StarlingBank.Client.t() | keyword() | nil ) :: {:ok, nil} | {:error, StarlingBank.Error.t()}
Attaches an existing (or new) receipt to a specific feed item / transaction.
@spec create(map(), StarlingBank.Client.t() | keyword() | nil) :: {:ok, map()} | {:error, StarlingBank.Error.t()}
Creates a standalone receipt (not yet attached to a transaction).
@spec get(String.t(), StarlingBank.Client.t() | keyword() | nil) :: {:ok, map()} | {:error, StarlingBank.Error.t()}
Fetches a receipt by UID.
@spec get_attachment( String.t(), String.t(), StarlingBank.Client.t() | keyword() | nil ) :: {:ok, binary()} | {:error, StarlingBank.Error.t()}
Downloads a receipt attachment's binary content by UID.
@spec list_for_transaction(String.t(), StarlingBank.Client.t() | keyword() | nil) :: {:ok, map()} | {:error, StarlingBank.Error.t()}
Lists receipts attached to a given feed item.
@spec upload_attachment( String.t(), binary(), String.t(), StarlingBank.Client.t() | keyword() | nil ) :: {:ok, map()} | {:error, StarlingBank.Error.t()}
Uploads a binary attachment (e.g. photo of a receipt) and returns its attachment UID.