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
« lib/WebService/Async/Onfido/Base/Applicant.pm ↑ Summary 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.007'; # VERSION
9  
10 =head1 NAME
11  
12 WebService::Async::Onfido::Applicant - represents data for Onfido
13  
14 =head1 DESCRIPTION
15  
16 =cut
17  
18 2 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod undocumented
19 2 my ($self) = @_;
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 0 ▶sub documents {
Subroutine documents: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ($self, %args) = @_;
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 0 ▶sub photos {
Subroutine photos: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my ($self, %args) = @_;
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 0 ▶sub checks {
Subroutine checks: not called CC=1 SCAR=6.9
Pod undocumented
42 0 my ($self, %args) = @_;
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 0 ▶sub delete : method {
Subroutine delete: not called CC=1 SCAR=6.9
Pod undocumented
51 0 my ($self, %args) = @_;
52 0 return $self->onfido->applicant_delete(
53 applicant_id => $self->id,
54 %args
55 );
56 }
57  
58 0 ▶sub check {
Subroutine check: not called CC=1 SCAR=6.9
Pod undocumented
59 0 my ($self, %args) = @_;
60 return $self->onfido->applicant_check(
61 applicant_id => $self->id,
62 %args,
63 )->on_done(
64 0 ▶ sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
65 0 shift->{applicant} = $self;
66 0 });
67 }
68  
69 0 ▶sub get : method {
Subroutine get: not called CC=1 SCAR=6.9
Pod undocumented
70 0 my ($self) = @_;
71 0 return $self->onfido->applicant_get(
72 applicant_id => $self->id,
73 );
74 }
75  
76 4 1;
77  
78 __END__
« lib/WebService/Async/Onfido/Base/Applicant.pm ↑ Summary lib/WebService/Async/Onfido/Base/Document.pm »