TransactionsAPIService.ReadTransaction (GET /users/{user_guid}/transactions/{transaction_guid}) is typed to return TransactionsResponseBodyIncludes, but the endpoint responds with a singular transaction object. The SDK unmarshals into a struct that only maps the plural transactions key, so the payload is silently dropped and the returned value is always empty — with no error.
Version
v1.13.0 (latest). Also present on master HEAD.
Actual API response
{
"transaction": {
"guid": "TRN-...",
...
}
}
SDK type used
ReadTransactionExecute returns *TransactionsResponseBodyIncludes (api_transactions.go#L1834), whose only relevant field is:
Transactions []TransactionIncludesResponse json:"transactions,omitempty"
json.Unmarshal ignores the unknown transaction key, leaves Transactions nil, and returns no error. Callers see an empty list for a transaction that actually exists.
Reproduce
resp, httpResp, err := client.TransactionsAPI.
ReadTransaction(ctx, userGUID, transactionGUID).
Includes("merchants,classifications,geolocations,repeating_transactions").
Execute()
// err == nil, httpResp.StatusCode == 200
// resp.GetTransactions() -> [] (empty), despite the transaction existing
Expected
ReadTransaction should deserialize the transaction object and expose it.
TransactionsAPIService.ReadTransaction(GET /users/{user_guid}/transactions/{transaction_guid}) is typed to returnTransactionsResponseBodyIncludes, but the endpoint responds with a singulartransactionobject. The SDK unmarshals into a struct that only maps the pluraltransactionskey, so the payload is silently dropped and the returned value is always empty — with no error.Version
v1.13.0(latest). Also present onmasterHEAD.Actual API response
{ "transaction": { "guid": "TRN-...", ... } }SDK type used
ReadTransactionExecute returns *TransactionsResponseBodyIncludes (api_transactions.go#L1834), whose only relevant field is:
Transactions []TransactionIncludesResponse
json:"transactions,omitempty"json.Unmarshal ignores the unknown transaction key, leaves Transactions nil, and returns no error. Callers see an empty list for a transaction that actually exists.
Reproduce
Expected
ReadTransaction should deserialize the transaction object and expose it.