fetchAndDisplayPaymentReceipts function
Implementation
Future<void> fetchAndDisplayPaymentReceipts(VtopClient client) async {
try {
print('Fetching payment receipts...');
final receipts = await fetchPaymentReceipts(client: client);
print('✓ Found ${receipts.length} payment receipts:');
print('\n=== PAYMENT RECEIPTS JSON ===');
final receiptsJson = receipts.map((receipt) => receipt.toJson()).toList();
print(const JsonEncoder.withIndent(' ').convert(receiptsJson));
print('');
} catch (e) {
print('Error fetching payment receipts: $e\n');
}
}