I have changed the AccountBalance function to accept context, and a
string parameter of the accountUid. This will be a breaking change to
the library.
The Balance struct now contains new fields, including a nested struct
for each field as per the JSON representation from the Starling Bank
/balance v2 API endpoint.
Additionally, instead of using float64, we now use int, as Starling
return the monetary amounts as an integer, and do not use
floating-point numbers. I'm working to add further v2 API support to
this library and the Savings Goals need updating as well to use int
and the CurrencyAndAmount JSON object (this object may be represented
into a common struct in the future for reusability!).
A future commit should be made to adjust the AccountBalance test and
mock JSON response.
I have changed the
AccountBalance
function to acceptcontext
, and a string parameter of the accountUid. This will be a breaking change to the library.The
Balance
struct now contains new fields, including a nested struct for each field as per the JSON representation from the Starling Bank/balance
v2 API endpoint.Additionally, instead of using
float64
, we now useint
, as Starling return the monetary amounts as an integer, and do not use floating-point numbers. I'm working to add further v2 API support to this library and the Savings Goals need updating as well to useint
and theCurrencyAndAmount
JSON object (this object may be represented into a common struct in the future for reusability!).A future commit should be made to adjust the AccountBalance test and mock JSON response.
Signed-off-by: Dom Rodriguez shymega@shymega.org.uk