line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Invoice |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
988
|
|
|
2
|
|
|
|
|
7
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
12
|
2
|
|
|
2
|
|
8
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
9
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
15
|
2
|
|
|
2
|
|
564
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
16
|
2
|
|
|
2
|
|
2189
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
67
|
|
17
|
2
|
|
|
2
|
|
806
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
120
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
11
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
150
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
435
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'get' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
token => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
), |
34
|
|
|
|
|
|
|
'list' => validation_for( |
35
|
|
|
|
|
|
|
params => { |
36
|
|
|
|
|
|
|
account => { type => Str, optional => 0 }, |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
}, |
39
|
|
|
|
|
|
|
), |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $validator = $validators{'get'}; |
45
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
my %opt = (); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
return $self->_request( 'account.invoice.get', \%params, \%opt ); |
50
|
|
|
|
|
|
|
} |
51
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $validator = $validators{'list'}; |
53
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
54
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
56
|
0
|
0
|
|
|
|
|
|
57
|
|
|
|
|
|
|
return $self->_request( 'account.invoice.list', \%params, \%opt ); |
58
|
0
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=pod |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=encoding UTF-8 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 NAME |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
API::MailboxOrg::API::Invoice - MailboxOrg::API::Invoice |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 VERSION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
version 1.0.1 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SYNOPSIS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
use API::MailboxOrg; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
my $user = '1234abc'; |
81
|
|
|
|
|
|
|
my $password = '1234abc'; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
84
|
|
|
|
|
|
|
user => $user, |
85
|
|
|
|
|
|
|
password => $password, |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 METHODS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 get |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
PDF binary of an invoice |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Parameters: |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * token |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
returns: array |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
$api->invoice->get(%params); |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 list |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Returns a list of downloadable invoices |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Available for admin, reseller, account |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Parameters: |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=over 4 |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * account |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=back |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
returns: array |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
$api->invoice->list(%params); |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 AUTHOR |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
This is free software, licensed under: |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |