Shared behaviour implemented by every resource struct in StarlingBank.Resources.*.
Each resource module defines a typed struct mirroring the relevant Starling
JSON object, and a cast/1 function that converts a raw decoded JSON map
(with camelCase string keys, as Starling returns them) into that struct
(with idiomatic snake_case atom keys).
Summary
Callbacks
Functions
@spec cast_datetime(String.t() | nil) :: DateTime.t() | nil
Casts an ISO8601 date-time string to a DateTime, tolerating nil/invalid input.
Casts a list of raw maps using the given resource module's cast/1.
Helper used by resource modules to camelCase-key-fetch and snake_case-assign
in one step, e.g. field(map, :account_uid, "accountUid").