line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::List; |
2
|
|
|
|
|
|
|
$Net::Stripe::List::VERSION = '0.42'; |
3
|
2
|
|
|
2
|
|
46
|
use Moose; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
16
|
|
4
|
2
|
|
|
2
|
|
9998
|
use Kavorka; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
14
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: represent a list of objects from Stripe |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'count' => (is => 'ro', isa => 'Maybe[Int]'); # no longer included by default, see note below |
9
|
|
|
|
|
|
|
has 'url' => (is => 'ro', isa => 'Str', required => 1); |
10
|
|
|
|
|
|
|
has 'has_more' => (is => 'ro', isa => 'Bool|Object', required => 1); |
11
|
|
|
|
|
|
|
has 'data' => (traits => ['Array'], |
12
|
|
|
|
|
|
|
is => 'ro', |
13
|
|
|
|
|
|
|
isa => 'ArrayRef', |
14
|
|
|
|
|
|
|
required => 1, |
15
|
|
|
|
|
|
|
handles => { |
16
|
|
|
|
|
|
|
elements => 'elements', |
17
|
|
|
|
|
|
|
map => 'map', |
18
|
|
|
|
|
|
|
grep => 'grep', |
19
|
|
|
|
|
|
|
first => 'first', |
20
|
|
|
|
|
|
|
get => 'get', |
21
|
|
|
|
|
|
|
join => 'join', |
22
|
|
|
|
|
|
|
is_empty => 'is_empty', |
23
|
|
|
|
|
|
|
sort => 'sort', |
24
|
|
|
|
|
|
|
}); |
25
|
|
|
|
|
|
|
|
26
|
2
|
0
|
|
2
|
|
4753
|
method last { |
|
2
|
|
|
0
|
|
5
|
|
|
2
|
|
|
|
|
262
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
27
|
0
|
|
|
|
|
0
|
return $self->get(scalar($self->elements)-1); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
2
|
|
2569
|
method _next_page_args() { |
|
2
|
50
|
|
1
|
|
4
|
|
|
2
|
|
|
|
|
252
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
31
|
|
|
|
|
|
|
return ( |
32
|
1
|
|
|
|
|
51
|
starting_after => $self->get(-1)->id, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
2
|
50
|
|
2
|
|
2372
|
method _previous_page_args() { |
|
2
|
50
|
|
1
|
|
24
|
|
|
2
|
|
|
|
|
247
|
|
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
13
|
|
37
|
|
|
|
|
|
|
return ( |
38
|
1
|
|
|
|
|
44
|
ending_before => $self->get(0)->id, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
fun _merge_lists( |
43
|
|
|
|
|
|
|
ArrayRef[Net::Stripe::List] :$lists!, |
44
|
2
|
50
|
33
|
2
|
|
24632
|
) { |
|
2
|
50
|
33
|
2
|
|
7
|
|
|
2
|
50
|
|
2
|
|
115
|
|
|
2
|
50
|
|
2
|
|
13
|
|
|
2
|
50
|
|
2
|
|
5
|
|
|
2
|
|
|
1
|
|
115
|
|
|
2
|
|
|
|
|
1259
|
|
|
2
|
|
|
|
|
8560
|
|
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
381
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
701
|
|
|
2
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
638
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1
|
|
45
|
1
|
|
|
|
|
48
|
my $has_count = defined( $lists->[-1]->count ); |
46
|
1
|
|
|
|
|
26
|
my $url = $lists->[-1]->url; |
47
|
|
|
|
|
|
|
my %list_args = ( |
48
|
2
|
|
|
|
|
66
|
count => $has_count ? scalar( map { $_->elements } @$lists ) : undef, |
49
|
1
|
50
|
|
|
|
6
|
data => [ map { $_->elements } @$lists ], |
|
2
|
|
|
|
|
62
|
|
50
|
|
|
|
|
|
|
has_more => 0, |
51
|
|
|
|
|
|
|
url => $url, |
52
|
|
|
|
|
|
|
); |
53
|
1
|
|
|
|
|
29
|
return Net::Stripe::List->new( %list_args ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Net::Stripe::List - represent a list of objects from Stripe |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 VERSION |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
version 0.42 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 count |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Reader: count |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Type: Maybe[Int] |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 data |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Reader: data |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Type: ArrayRef |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This attribute is required. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 has_more |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Reader: has_more |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Type: Bool|Object |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This attribute is required. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 url |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Reader: url |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Type: Str |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This attribute is required. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHORS |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=over 4 |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Luke Closs |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Rusty Conover |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=back |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Prime Radiant, Inc., (c) copyright 2014 Lucky Dinosaur LLC. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
122
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |