Skip to content

Add filter method to ledger, balance and transaction #26

@rafaelcarvalhocaetano

Description

@rafaelcarvalhocaetano

Summary

Currently there's no way to filter ledgers, balances, or transactions using the SDK. The Blnk API supports filter endpoints that allow querying resources with various operators.

Proposed Solution

Add a Filter() method to the following services:

  • LedgerService
  • LedgerBalanceService
  • TransactionService

The implementation should include:

  • A Filter struct with Field, Operator, and Value fields
  • A FilterRequest struct supporting pagination (Limit, Page), sorting (SortBy, SortOrder), and count inclusion (IncludeCount)
  • Validation for filter operators (e.g., gt, gte, lt, lte require numeric/date values; like, ilike require strings)
  • Comprehensive unit tests

API Endpoints

  • POST /ledgers/filter
  • POST /balances/filter
  • POST /transactions/filter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions