| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::ValidSign::API::Account; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.002'; |
|
4
|
2
|
|
|
2
|
|
1883
|
use Moo; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
12
|
|
|
5
|
2
|
|
|
2
|
|
692
|
use namespace::autoclean; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: A REST API client for ValidSign |
|
8
|
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
172
|
use WebService::ValidSign::Object::Sender; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
583
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has action_endpoint => ( |
|
12
|
|
|
|
|
|
|
is => 'ro', |
|
13
|
|
|
|
|
|
|
default => 'account' |
|
14
|
|
|
|
|
|
|
); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub details { |
|
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
18
|
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
my $uri = $self->get_endpoint($self->action_endpoint); |
|
20
|
0
|
|
|
|
|
|
my $request = HTTP::Request->new( |
|
21
|
|
|
|
|
|
|
GET => $uri, |
|
22
|
|
|
|
|
|
|
[ |
|
23
|
|
|
|
|
|
|
'Content-Type' => 'application/json', |
|
24
|
|
|
|
|
|
|
Accept => 'application/json', |
|
25
|
|
|
|
|
|
|
] |
|
26
|
|
|
|
|
|
|
); |
|
27
|
0
|
|
|
|
|
|
return $self->call_api($request); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub senders { |
|
32
|
0
|
|
|
0
|
0
|
|
my ($self, %params) = @_; |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my $uri = $self->get_endpoint($self->action_endpoint, 'senders'); |
|
35
|
0
|
0
|
|
|
|
|
$uri->query_form(%params) if %params; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
my $request = HTTP::Request->new( |
|
38
|
|
|
|
|
|
|
GET => $uri, |
|
39
|
|
|
|
|
|
|
[ |
|
40
|
|
|
|
|
|
|
'Content-Type' => 'application/json', |
|
41
|
|
|
|
|
|
|
Accept => 'application/json', |
|
42
|
|
|
|
|
|
|
] |
|
43
|
|
|
|
|
|
|
); |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
my $response = $self->call_api($request); |
|
46
|
0
|
|
|
|
|
|
my @senders; |
|
47
|
0
|
|
|
|
|
|
foreach (@{$response->{results}}) { |
|
|
0
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
push(@senders, WebService::ValidSign::Object::Sender->new(%{$_})); |
|
|
0
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
return \@senders; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
with "WebService::ValidSign::API"; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=encoding UTF-8 |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
WebService::ValidSign::API::Account - A REST API client for ValidSign |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
version 0.002 |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 METHODS |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Wesley Schwengle <waterkip@cpan.org> |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This software is Copyright (c) 2019 by Wesley Schwengle. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is free software, licensed under: |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The (three-clause) BSD License |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |