File: search-transactions.pl

package info (click to toggle)
libbusiness-paypal-api-perl 0.77-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 488 kB
  • sloc: perl: 2,503; makefile: 9
file content (27 lines) | stat: -rwxr-xr-x 489 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;
use feature qw( say );

use Data::Printer;

use lib 'eg/lib';

use Example::TransactionSearcher;

my $searcher = Example::TransactionSearcher->new_with_options();
my $txns     = $searcher->search;
unless ( @{$txns} ) {
    say 'no results';
    exit;
}

foreach my $txn ( @{$txns} ) {

    # remove undef values
    for my $field ( keys %{$txn} ) {
        delete $txn->{$field} unless $txn->{$field};
    }
    p $txn;
}

say scalar @{$txns} . ' results found';