File Coverage

blib/lib/Paymill/REST/Operations/List.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 9 14 64.2


line stmt bran cond sub pod time code
1             package Paymill::REST::Operations::List;
2              
3 9     9   5208 use Moose::Role;
  9         24  
  9         62  
4              
5             sub list {
6 0     0 1   my ($self, $filter_and_sort) = @_;
7              
8 0           my $uri = $self->base_url . $self->type . 's';
9 0           my $item_attrs = $self->_get_response({ uri => $uri, query => $filter_and_sort });
10              
11 0           return $self->_build_items($item_attrs);
12             }
13              
14 9     9   47419 no Moose::Role;
  9         30  
  9         84  
15             1;
16              
17             __END__
18              
19             =encoding utf-8
20              
21             =head1 NAME
22              
23             Paymill::REST::Operations::List — List operation for L<Paymill::REST> as Moose Role
24              
25             =head1 FUNCTIONS
26              
27             =head2 list
28              
29             To fetch a list of items, eg. transactions or clients, via the PAYMILL
30             REST API, use this method.
31              
32             Expects an hash ref as parameter which defines the filter and sort
33             conditions. Please refer to PAYMILL's API reference and use filters as
34             key and their values as the key's values.
35              
36             =head1 AUTHOR
37              
38             Matthias Dietrich E<lt>perl@rainboxx.deE<gt>
39              
40             =head1 COPYRIGHT
41              
42             Copyright 2013 - Matthias Dietrich
43              
44             =head1 LICENSE
45              
46             This library is free software; you can redistribute it and/or modify
47             it under the same terms as Perl itself.