Command to list funding sources currently linked to a group
Closed this issue · 0 comments
thekaveman commented
Building on the API from #28 and the existing groups
command (i.e. take into account filtering).
Usage
$ littlepay groups [-f GROUP_TERMS] funding_sources
Acceptance criteria
- A new sub command for
groups
is defined calledfunding_sources
(or similar) - The new sub command lists the funding sources currently linked to one or more groups
- The new sub command builds on the groups filter, listing funding sources for group(s) that match the given filter if any
- The new sub command uses the
get_concession_group_linked_funding_sources()
API endpoint implementation to get its data - The new sub command prints the resulting
GroupFundingSourceResponse
tostdout
(don't worry aboutcsv
output) - Tests are written to cover the new sub command
Background
We define CLI commands in the littlepay/commands
subdirectory: https://github.com/cal-itp/littlepay/tree/main/littlepay/commands
Each command has its own module/file in that directory:
The littlepay/main.py
module/file sets up the CLI argument parsing and is the entrypoint for the CLI.
This is blocked by the fix for #42, which should be done first. #42 is done