Skip to content

Add list() to transactions - #8

Merged
ubcodes merged 6 commits into
blnkfinance:mainfrom
chidoziemfrancis:feat/list-transactions
Sep 23, 2026
Merged

ubcodes merged 6 commits into
blnkfinance:mainfrom
chidoziemfrancis:feat/list-transactions

Conversation

@chidoziemfrancis

Copy link
Copy Markdown
Contributor

Summary

Adds transactions().list(), wrapping GET /transactions. It takes the same optional ListOptions (limit, offset) introduced for ledgers and balances, sent as query parameters. Unset fields fall back to Core's defaults, which for this route are limit=20 and offset=0.

import com.blnkfinance.blnk.types.ListOptions;

ApiResponse<JsonNode> recent = blnk.transactions().list();
ApiResponse<JsonNode> page = blnk.transactions().list(
    ListOptions.create().limit(100).offset(200));   // GET /transactions?limit=100&offset=200

Core's GetAllTransactions handler silently falls back to its defaults on an invalid limit or offset rather than returning 400. The SDK rejects those values client-side with a 400 instead, so caller mistakes stay visible.

Builds on #, which introduces ListOptions and ListValidators. Once that merges, this PR reduces to a single commit.

Changes

  • Transactions: list() and list(ListOptions).
  • TransactionsTest: new GET all transactions group with four cases (plain call, query rendering, validation rejection, error handling).
  • README.md: paging example extended to transactions, with the differing default noted.
  • CHANGELOG.md: bullet under Unreleased.

Test plan

  • mvn test offline: 560 run, 0 failures, 57 skipped (live suites gated on BLNK_E2E).

ListOptions is on main after the ledgers/balances list work; this keeps transactions().list() building on that copy.
A newly created row can sit on page one, so inclusion alone would not catch Core ignoring offset.
Keep both changelog entries: transactions list from this PR and
listByBalanceId from main after blnkfinance#11.
@ubcodes
ubcodes merged commit d967aa9 into blnkfinance:main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants