blib/lib/WebService/Async/Onfido/Applicant.pm

filter: Statementstmt 39.3% 13 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 26.6% 4 / 15 Podpod 0.0% 0 / 8 totaltotal 30.3% 17 / 56 CC 1 SCAR 5.5
CC
1
Cov
39%
onfido
2.0
documents
2.0
__ANON__
2.0
CRAP 1.7
« blib/lib/WebService/Async/Onfido/Base/Applicant.pm ↑ Summary blib/lib/WebService/Async/Onfido/Base/Document.pm »
1 package WebService::Async::Onfido::Applicant;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use parent qw(WebService::Async::Onfido::Base::Applicant);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 our $VERSION = '0.003'; # VERSION
9  
10 =head1 NAME
11  
12 WebService::Async::Onfido::Applicant - represents data for Onfido
13  
14 =head1 DESCRIPTION
15  
16 =cut
17  
18 sub as_string {
19 2 ▶ my ($self) = @_;
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
20 2 return sprintf '%s %s (ID %s)', $self->first_name, $self->last_name, $self->id;
21 }
22  
23 0 ▶sub onfido { return shift->{onfido} }
Subroutine onfido: not called CC=1 SCAR=6.9
Pod undocumented
24  
25 sub documents {
26 0 ▶ my ($self, %args) = @_;
Subroutine documents: not called CC=1 SCAR=6.9
Pod undocumented
27 return $self->onfido->document_list(
28 applicant_id => $self->id,
29 %args
30 0 ▶ )->map(sub { $_->{applicant} = $self; $_ });
Subroutine __ANON__: not called CC=1 SCAR=6.9
31 }
32  
33 sub photos {
34 0 ▶ my ($self, %args) = @_;
Subroutine photos: not called CC=1 SCAR=6.9
Pod undocumented
35 return $self->onfido->photo_list(
36 applicant_id => $self->id,
37 %args
38 0 ▶ )->map(sub { $_->{applicant} = $self; $_ });
Subroutine __ANON__: not called CC=1 SCAR=6.9
39 }
40  
41 sub checks {
42 0 ▶ my ($self, %args) = @_;
Subroutine checks: not called CC=1 SCAR=6.9
Pod undocumented
43 return $self->onfido->check_list(
44 applicant_id => $self->id,
45 %args
46 0 ▶ )->map(sub { $_->{applicant} = $self; $_ });
Subroutine __ANON__: not called CC=1 SCAR=6.9
47 }
48  
49 ## no critic (ProhibitBuiltinHomonyms)
50 sub delete : method {
51 0 ▶ my ($self, %args) = @_;
Subroutine delete: not called CC=1 SCAR=6.9
Pod undocumented
52 0 return $self->onfido->applicant_delete(
53 applicant_id => $self->id,
54 %args
55 );
56 }
57  
58 sub check {
59 0 ▶ my ($self, %args) = @_;
Subroutine check: not called CC=1 SCAR=6.9
Pod undocumented
60 return $self->onfido->applicant_check(
61 applicant_id => $self->id,
62 %args,
63 )->on_done(
64 sub {
65 0 ▶ shift->{applicant} = $self;
Subroutine __ANON__: not called CC=1 SCAR=6.9
66 0 });
67 }
68  
69 sub get : method {
70 0 ▶ my ($self) = @_;
Subroutine get: not called CC=1 SCAR=6.9
Pod undocumented
71 0 return $self->onfido->applicant_get(
72 applicant_id => $self->id,
73 );
74 }
75  
76 4 1;
77  
78 __END__
79  
80 =head1 AUTHOR
81  
82 deriv.com C<< DERIV@cpan.org >>
83  
84 =head1 LICENSE
85  
86 Copyright deriv.com 2019. Licensed under the same terms as Perl itself.
87  
« blib/lib/WebService/Async/Onfido/Base/Applicant.pm ↑ Summary blib/lib/WebService/Async/Onfido/Base/Document.pm »