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