line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Stripe::List; |
2
|
|
|
|
|
|
|
$Net::Stripe::List::VERSION = '0.41'; |
3
|
2
|
|
|
2
|
|
16
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
4
|
2
|
|
|
2
|
|
9796
|
use Kavorka; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
18
|
|
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
|
|
4539
|
method last { |
|
2
|
|
|
0
|
|
5
|
|
|
2
|
|
|
|
|
252
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
27
|
0
|
|
|
|
|
0
|
return $self->get(scalar($self->elements)-1); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
50
|
|
2
|
|
2614
|
method _next_page_args() { |
|
2
|
50
|
|
1
|
|
6
|
|
|
2
|
|
|
|
|
236
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
3
|
|
31
|
|
|
|
|
|
|
return ( |
32
|
1
|
|
|
|
|
41
|
starting_after => $self->get(-1)->id, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
2
|
50
|
|
2
|
|
2426
|
method _previous_page_args() { |
|
2
|
50
|
|
1
|
|
13
|
|
|
2
|
|
|
|
|
231
|
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
37
|
|
|
|
|
|
|
return ( |
38
|
1
|
|
|
|
|
38
|
ending_before => $self->get(0)->id, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
fun _merge_lists( |
43
|
|
|
|
|
|
|
ArrayRef[Net::Stripe::List] :$lists!, |
44
|
2
|
50
|
33
|
2
|
|
23551
|
) { |
|
2
|
50
|
33
|
2
|
|
6
|
|
|
2
|
50
|
|
2
|
|
113
|
|
|
2
|
50
|
|
2
|
|
12
|
|
|
2
|
50
|
|
2
|
|
4
|
|
|
2
|
|
|
1
|
|
105
|
|
|
2
|
|
|
|
|
1150
|
|
|
2
|
|
|
|
|
8807
|
|
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
363
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
667
|
|
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
658
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
45
|
1
|
|
|
|
|
37
|
my $has_count = defined( $lists->[-1]->count ); |
46
|
1
|
|
|
|
|
28
|
my $url = $lists->[-1]->url; |
47
|
|
|
|
|
|
|
my %list_args = ( |
48
|
2
|
|
|
|
|
63
|
count => $has_count ? scalar( map { $_->elements } @$lists ) : undef, |
49
|
1
|
50
|
|
|
|
6
|
data => [ map { $_->elements } @$lists ], |
|
2
|
|
|
|
|
61
|
|
50
|
|
|
|
|
|
|
has_more => 0, |
51
|
|
|
|
|
|
|
url => $url, |
52
|
|
|
|
|
|
|
); |
53
|
1
|
|
|
|
|
30
|
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.41 |
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 |