List bank books
Lists the code and name of all bank books of the company, or of those matching a pattern.
bankBooks()->search() searches with the Finder type BNK and option banktype=0, so cash books are left out. all() goes through all pages for you. The search has the same methods as the activity search: inCode(), inName(), modifiedSince(), limit() and offset().
Each result is a BankBookSummary with code and name. Use get() for the bank account and other settings (see Read bank book).
$twinfield = Example::twinfield();
foreach ($twinfield->bankBooks()->search($argv[1] ?? '*')->all() as $bankBook) { echo $bankBook->code, ' ', $bankBook->name, PHP_EOL;}php examples/bank-books/list-bank-books/example.phpphp examples/bank-books/list-bank-books/example.php 'R*'BNK Standaard bankING ING 3255112RABO Rabobank 123456789Source
Section titled “Source”View examples/bank-books/list-bank-books/example.php on GitHub.