Stripe/Connect/Person.pm

filter: Statementstmt 22.9% 49 / 214 Branchbran 0.5% 1 / 198 Conditioncond 0.0% 0 / 70 MC/DCmcdc 0.0% 0 / 35 Subroutinesub 34.8% 15 / 43 Podpod 100% 24 / 24 totaltotal 15.2% 89 / 584 CC 125 SCAR 87.5
CC
125
Cov
10%
dob
9998.2
__ANON__
270.4
__ANON__
11.0
CRAP 6314.5
« Stripe.pm ↑ Summary Stripe/Generic.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Connect/Person.pm
3 ## Version v0.200.1
4 ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp>
6 ## Created 2019/11/02
7 ## Modified 2020/05/21
8 ##
9 ##----------------------------------------------------------------------------
10 package Net::API::Stripe::Connect::Person;
11 BEGIN
12 {
13 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ use DateTime;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶ use DateTime::Format::Strptime;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶ use Nice::Try;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶ our( $VERSION ) = 'v0.200.1';
Subroutine BEGIN: called CC=1 SCAR=0.0
19 };
20  
21 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
22  
23 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
24  
25 0 ▶sub account { return( shift->_set_get_scalar_or_object( 'account', 'Net::API::Stripe::Connect::Account', @_ ) ); }
Subroutine account: not called CC=1 SCAR=6.9
Pod documented
26  
27 0 ▶sub address { return( shift->_set_get_object( 'address', 'Net::API::Stripe::Address', @_ ) ); }
Subroutine address: not called CC=1 SCAR=6.9
Pod documented
28  
29 0 ▶sub address_kana { return( shift->_set_get_object( 'address_kana', 'Net::API::Stripe::Address', @_ ) ); }
Subroutine address_kana: not called CC=1 SCAR=6.9
Pod documented
30  
31 0 ▶sub address_kanji { return( shift->_set_get_object( 'address_kanji', 'Net::API::Stripe::Address', @_ ) ); }
Subroutine address_kanji: not called CC=1 SCAR=6.9
Pod documented
32  
33 0 ▶sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
34  
35 sub dob
36 {
37 0 ▶ my $self = shift( @_ );
Subroutine dob: not called CC=105 SCAR=92.1
Pod documented
38 0 ▶ if( @_ )
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
39 {
40 ## There may be a hash provided with undefined values for each of the properties, so we need to check that
41 0 my $ref = shift( @_ );
42 0 my $dt;
43 0 ▶ if( $self->_is_object( $ref ) && $ref->isa( 'DateTime' ) )
Branch: 2 branches
BranchTrueFalseTotal
if ($self->_is_object($ref) and $ref->isa('DateTime')) { } 0 0 0
elsif ($self->_is_hash($ref)) { } 0 0 0
Condition0%0/3
$self->_is_object($ref) and $ref->isa("DateTime")
!ll&&!rl&&r
000
MC/DC0%0/2
$self->_is_object($ref) and $ref->isa("DateTime")
$self->_is_object($ref) $ref->isa("DateTime")
Truth table0%0/3
A and B
A= $self->_is_object($ref)B= $ref->isa("DateTime")
ABresult
0X0
100
111
44 {
45 0 $dt = $ref;
46 }
47 elsif( $self->_is_hash( $ref ) )
48 {
49 0 ▶ return if( !length( $ref->{year} ) && !length( $ref->{month} ) && !length( $ref->{day} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length $ref->{"year"} or length $ref->{"month"} or length $ref->{"day"} 0 0 0
Condition0%0/6
length $ref->{"year"} or length $ref->{"month"} or length $ref->{"day"}
l!l&&r!l&&!r
000
length $ref->{"year"} or length $ref->{"month"}
l!l&&r!l&&!r
000
MC/DC0%0/3
length $ref->{"year"} or length $ref->{"month"} or length $ref->{"day"}
length $ref->{"year"} length $ref->{"month"} length $ref->{"day"}
Truth table0%0/4
A or B or C
A= length $ref->{"year"}B= length $ref->{"month"}C= length $ref->{"day"}
ABCresult
1XX1
01X1
0011
0000
50
51 0 foreach my $k ( qw( year month day ) )
52 {
53 0 ▶ return( $self->error( "Hash provided for person date of birth is missing the $k property" ) ) if( !$ref->{ $k } );
Branch: 1 branch
BranchTrueFalseTotal
unless $ref->{$k} 0 0 0
54 }
55 0 @$ref{ qw( hour minute second ) } = ( 0, 0, 0 );
56 0 ▶ try
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 3 branches
BranchTrueFalseTotal
unless defined $Nice::Try::NEED_TO_RETURN 0 0 0
if ($INC{"threads.pm"} and not exists $INC{"forks.pm"}) 0 0 0
wantarray ? : 0 0 0
Condition0%0/3
$INC{"threads.pm"} and not exists $INC{"forks.pm"}
!ll&&!rl&&r
000
MC/DC0%0/2
$INC{"threads.pm"} and not exists $INC{"forks.pm"}
$INC{"threads.pm"} not exists $INC{"forks.pm"}
Truth table0%0/3
A and not(B)
A= $INC{"threads.pm"}B= not exists $INC{"forks.pm"}
ABresult
0X0
100
111
57 0 ▶ {
Subroutine __ANON__: not called CC=17 SCAR=56.0
58 0 $dt = DateTime->new( %$ref );
59 }
60 1 ▶ catch( $e )
Subroutine BEGIN: called CC=1 SCAR=6.3
Subroutine BEGIN: called CC=1 SCAR=6.3
Subroutine __ANON__: not called CC=1 SCAR=6.3
Branch: 34 branches
BranchTrueFalseTotal
if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { } 0 0 0
if ($Nice::Try::WANT eq 'OBJECT') { } 0 0 0
elsif ($Nice::Try::WANT eq 'CODE') { } 0 0 0
elsif ($Nice::Try::WANT eq 'HASH') { } 0 0 0
elsif ($Nice::Try::WANT eq 'ARRAY') { } 0 0 0
elsif ($Nice::Try::WANT eq 'REFSCALAR') { } 0 0 0
elsif ($Nice::Try::WANT eq 'GLOB') { } 0 0 0
elsif ($Nice::Try::WANT eq 'LIST') { } 0 0 0
elsif ($Nice::Try::WANT eq 'BOOLEAN') { } 0 0 0
elsif ($Nice::Try::WANT eq 'VOID') { } 0 0 0
elsif ($Nice::Try::WANT eq 'SCALAR') { } 0 0 0
&$Nice::Try::TRY ? : 0 0 0
if scalar @Nice::Try::VOID 0 0 0
if ($Nice::Try::WANTARRAY) { } 0 0 0
elsif (defined $Nice::Try::WANTARRAY) { } 0 0 0
if defined $Nice::Try::LAST_VAL 0 0 0
length $@ ? : 0 0 0
unless builtin::blessed($@) 0 0 0
if ($Nice::Try::DIED) 0 0 0
if ($Nice::Try::HAS_CATCH) 0 0 0
if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL 0 0 0
if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { } 0 0 0
if ($Nice::Try::WANT eq 'OBJECT') { } 0 0 0
elsif ($Nice::Try::WANT eq 'CODE') { } 0 0 0
elsif ($Nice::Try::WANT eq 'HASH') { } 0 0 0
elsif ($Nice::Try::WANT eq 'ARRAY') { } 0 0 0
elsif ($Nice::Try::WANT eq 'REFSCALAR') { } 0 0 0
elsif ($Nice::Try::WANT eq 'GLOB') { } 0 0 0
elsif ($Nice::Try::WANT eq 'LIST') { } 0 0 0
elsif ($Nice::Try::WANT eq 'BOOLEAN') { } 0 0 0
elsif ($Nice::Try::WANT eq 'VOID') { } 0 0 0
elsif ($Nice::Try::WANT eq 'SCALAR') { } 0 0 0
if ($Nice::Try::WANTARRAY) { } 0 0 0
elsif (defined $Nice::Try::WANTARRAY) { } 0 0 0
Condition0%0/8
defined $Nice::Try::WANT and length $Nice::Try::WANT
!ll&&!rl&&r
000
not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
!ll
00
defined $Nice::Try::WANT and length $Nice::Try::WANT
!ll&&!rl&&r
000
MC/DC0%0/2
defined $Nice::Try::WANT and length $Nice::Try::WANT
defined $Nice::Try::WANT length $Nice::Try::WANT
MC/DC0%0/1
not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
not defined $Nice::Try::WANTARRAY
MC/DC0%0/2
defined $Nice::Try::WANT and length $Nice::Try::WANT
defined $Nice::Try::WANT length $Nice::Try::WANT
Truth table0%0/3
A and B
A= defined $Nice::Try::WANTB= length $Nice::Try::WANT
ABresult
0X0
100
111
Truth table0%0/2
not(A)
A= not defined $Nice::Try::WANTARRAY
Aresult
00
11
Truth table0%0/3
A and B
A= defined $Nice::Try::WANTB= length $Nice::Try::WANT
ABresult
0X0
100
111
61 0 ▶ {
Subroutine __ANON__: not called CC=3 SCAR=24.0
62 0 return( $self->error( "An error occurred while trying to create a datetime object from this person's date of birth (year = '$ref->{year}', month = '$ref->{month}', day = '$ref->{day}'." ) );
63 1 ▶ }
Subroutine BEGIN: called CC=1 SCAR=6.3
Subroutine BEGIN: called CC=1 SCAR=6.3
Subroutine BEGIN: called CC=1 SCAR=6.3
Branch: 56 branches
BranchTrueFalseTotal
if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { } 0 0 0
if ($Nice::Try::WANT eq 'OBJECT') { } 0 0 0
elsif ($Nice::Try::WANT eq 'CODE') { } 0 0 0
elsif ($Nice::Try::WANT eq 'HASH') { } 0 0 0
elsif ($Nice::Try::WANT eq 'ARRAY') { } 0 0 0
elsif ($Nice::Try::WANT eq 'REFSCALAR') { } 0 0 0
elsif ($Nice::Try::WANT eq 'GLOB') { } 0 0 0
elsif ($Nice::Try::WANT eq 'LIST') { } 0 0 0
elsif ($Nice::Try::WANT eq 'BOOLEAN') { } 0 0 0
elsif ($Nice::Try::WANT eq 'VOID') { } 0 0 0
elsif ($Nice::Try::WANT eq 'SCALAR') { } 0 0 0
&$Nice::Try::CATCH ? : 0 0 0
if scalar @Nice::Try::VOID 0 0 0
if ($Nice::Try::WANTARRAY) { } 0 0 0
elsif (defined $Nice::Try::WANTARRAY) { } 0 0 0
if $@ 0 0 0
if (defined $Nice::Try::CATCH_DIED) 0 0 0
if (defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !builtin::blessed($Nice::Try::RETVAL[0]) || builtin::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')) { } 0 0 0
elsif (scalar @Nice::Try::VOID and !builtin::blessed($Nice::Try::VOID[0]) || builtin::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')) { } 0 0 0
if defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return" 0 0 0
if (not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return") 0 0 0
if (defined $Nice::Try::WANT and length $Nice::Try::WANT) { } 0 0 0
if ($Nice::Try::WANT eq 'LIST') { } 0 0 0
elsif ($Nice::Try::WANT eq 'VOID') { } 0 0 0
elsif ($Nice::Try::WANT eq 'OBJECT') { } 0 0 0
elsif ($Nice::Try::WANT eq 'REFSCALAR') { } 0 0 0
elsif ($Nice::Try::WANT eq 'SCALAR') { } 0 0 0
elsif ($Nice::Try::WANT eq 'BOOLEAN') { } 0 0 0
elsif ($Nice::Try::WANT eq 'CODE') { } 0 0 0
elsif ($Nice::Try::WANT eq 'HASH') { } 0 0 0
elsif ($Nice::Try::WANT eq 'ARRAY') { } 0 0 0
elsif ($Nice::Try::WANT eq 'GLOB') { } 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
if (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__NEXT__') { } 0 0 0
elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__LAST__') { } 0 0 0
elsif (defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq '__REDO__') { } 0 0 0
elsif (defined $Nice::Try::BREAK and $Nice::Try::BREAK eq 'return') { } 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::NEED_TO_RETURN ? : 0 0 0
$Nice::Try::WANTARRAY ? : 0 0 0
$Nice::Try::WANTARRAY ? : 0 0 0
scalar @Nice::Try::VOID > 1 ? : 0 0 0
if (defined $Nice::Try::BREAK) 0 0 0
if ($Nice::Try::BREAK eq 'next') { } 0 0 0
elsif ($Nice::Try::BREAK eq 'last') { } 0 0 0
elsif ($Nice::Try::BREAK eq 'redo') { } 0 0 0
scalar @Nice::Try::LAST_VAL > 1 ? : 0 0 0
if not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL 0 0 0
Condition0%0/50
defined $Nice::Try::WANT and length $Nice::Try::WANT
!ll&&!rl&&r
000
defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq "return" and !builtin::blessed($Nice::Try::RETVAL[0]) || builtin::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
!ll&&!rl&&r
000
defined $Nice::Try::WANTARRAY or defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
l!l&&r!l&&!r
000
defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
!ll&&!rl&&r
000
not builtin::blessed($Nice::Try::RETVAL[0]) or builtin::blessed($Nice::Try::RETVAL[0]) and not $Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
l!l&&r!l&&!r
000
builtin::blessed($Nice::Try::RETVAL[0]) and not $Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
!ll&&!rl&&r
000
defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
!ll&&!rl&&r
000
not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
l!l&&r!l&&!r
000
defined $Nice::Try::WANT and length $Nice::Try::WANT
!ll&&!rl&&r
000
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
!ll&&!rl&&r
000
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
!ll&&!rl&&r
000
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
!ll&&!rl&&r
000
defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
!ll&&!rl&&r
000
scalar @Nice::Try::VOID and !builtin::blessed($Nice::Try::VOID[0]) || builtin::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
!ll&&!rl&&r
000
not builtin::blessed($Nice::Try::VOID[0]) or builtin::blessed($Nice::Try::VOID[0]) and not $Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
l!l&&r!l&&!r
000
builtin::blessed($Nice::Try::VOID[0]) and not $Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
!ll&&!rl&&r
000
not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
!ll
00
MC/DC0%0/2
defined $Nice::Try::WANT and length $Nice::Try::WANT
defined $Nice::Try::WANT length $Nice::Try::WANT
MC/DC0%0/6
defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq "return" and !builtin::blessed($Nice::Try::RETVAL[0]) || builtin::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
defined $Nice::Try::WANTARRAY defined $Nice::Try::BREAK $Nice::Try::BREAK eq "return" not builtin::blessed($Nice::Try::RETVAL[0]) builtin::blessed($Nice::Try::RETVAL[0]) not $Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
MC/DC0%0/2
not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
not defined $Nice::Try::BREAK $Nice::Try::BREAK eq "return"
MC/DC0%0/2
defined $Nice::Try::WANT and length $Nice::Try::WANT
defined $Nice::Try::WANT length $Nice::Try::WANT
MC/DC0%0/2
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
defined $Nice::Try::RETVAL[0] $Nice::Try::RETVAL[0] eq "__NEXT__"
MC/DC0%0/2
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
defined $Nice::Try::RETVAL[0] $Nice::Try::RETVAL[0] eq "__LAST__"
MC/DC0%0/2
defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
defined $Nice::Try::RETVAL[0] $Nice::Try::RETVAL[0] eq "__REDO__"
MC/DC0%0/4
scalar @Nice::Try::VOID and !builtin::blessed($Nice::Try::VOID[0]) || builtin::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
scalar @Nice::Try::VOID not builtin::blessed($Nice::Try::VOID[0]) builtin::blessed($Nice::Try::VOID[0]) not $Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
MC/DC0%0/1
not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
not defined $Nice::Try::WANTARRAY
Truth table0%0/3
A and B
A= defined $Nice::Try::WANTB= length $Nice::Try::WANT
ABresult
0X0
100
111
Truth table0%0/10
A or B and C and not(D) or E and not(F)
A= defined $Nice::Try::WANTARRAYB= defined $Nice::Try::BREAKC= $Nice::Try::BREAK eq "return"D= not builtin::blessed($Nice::Try::RETVAL[0])E= builtin::blessed($Nice::Try::RETVAL[0])F= not $Nice::Try::RETVAL[0]->isa("Nice::Try::SENTINEL")
ABCDEFresult
00XXXX0
010XXX0
1XX00X0
1XX0100
01100X0
0110100
1XX1XX1
1XX0111
0111XX1
0110111
Truth table0%0/3
not(A) or B
A= not defined $Nice::Try::BREAKB= $Nice::Try::BREAK eq "return"
ABresult
1X1
011
000
Truth table0%0/3
A and B
A= defined $Nice::Try::WANTB= length $Nice::Try::WANT
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $Nice::Try::RETVAL[0]B= $Nice::Try::RETVAL[0] eq "__NEXT__"
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $Nice::Try::RETVAL[0]B= $Nice::Try::RETVAL[0] eq "__LAST__"
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $Nice::Try::RETVAL[0]B= $Nice::Try::RETVAL[0] eq "__REDO__"
ABresult
0X0
100
111
Truth table0%0/5
A and not(B) or C and not(D)
A= scalar @Nice::Try::VOIDB= not builtin::blessed($Nice::Try::VOID[0])C= builtin::blessed($Nice::Try::VOID[0])D= not $Nice::Try::VOID[0]->isa("Nice::Try::SENTINEL")
ABCDresult
0XXX0
100X0
10100
11XX1
10111
Truth table0%0/2
not(A)
A= not defined $Nice::Try::WANTARRAY
Aresult
00
11
64 }
65 0 my $fmt = DateTime::Format::Strptime->new(
66 pattern => '%Y-%m-%d',
67 locale => 'en_GB',
68 time_zone => 'local',
69 );
70 0 $dt->set_formatter( $fmt );
71 0 $self->{dob} = $dt;
72 }
73 0 return( $self->{dob} );
74 }
75  
76 0 ▶sub email { return( shift->_set_get_scalar( 'email', @_ ) ); }
Subroutine email: not called CC=1 SCAR=6.9
Pod documented
77  
78 0 ▶sub first_name { return( shift->_set_get_scalar( 'first_name', @_ ) ); }
Subroutine first_name: not called CC=1 SCAR=6.9
Pod documented
79  
80 0 ▶sub first_name_kana { return( shift->_set_get_scalar( 'first_name_kana', @_ ) ); }
Subroutine first_name_kana: not called CC=1 SCAR=6.9
Pod documented
81  
82 0 ▶sub first_name_kanji { return( shift->_set_get_scalar( 'first_name_kanji', @_ ) ); }
Subroutine first_name_kanji: not called CC=1 SCAR=6.9
Pod documented
83  
84 0 ▶sub gender { return( shift->_set_get_scalar( 'gender', @_ ) ); }
Subroutine gender: not called CC=1 SCAR=6.9
Pod documented
85  
86 0 ▶sub id_number_provided { return( shift->_set_get_boolean( 'id_number_provided', @_ ) ); }
Subroutine id_number_provided: not called CC=1 SCAR=6.9
Pod documented
87  
88 0 ▶sub last_name { return( shift->_set_get_scalar( 'last_name', @_ ) ); }
Subroutine last_name: not called CC=1 SCAR=6.9
Pod documented
89  
90 0 ▶sub last_name_kana { return( shift->_set_get_scalar( 'last_name_kana', @_ ) ); }
Subroutine last_name_kana: not called CC=1 SCAR=6.9
Pod documented
91  
92 0 ▶sub last_name_kanji { return( shift->_set_get_scalar( 'last_name_kanji', @_ ) ); }
Subroutine last_name_kanji: not called CC=1 SCAR=6.9
Pod documented
93  
94 0 ▶sub maiden_name { return( shift->_set_get_scalar( 'maiden_name', @_ ) ); }
Subroutine maiden_name: not called CC=1 SCAR=6.9
Pod documented
95  
96 0 ▶sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); }
Subroutine metadata: not called CC=1 SCAR=6.9
Pod documented
97  
98 0 ▶sub phone { return( shift->_set_get_scalar( 'phone', @_ ) ); }
Subroutine phone: not called CC=1 SCAR=6.9
Pod documented
99  
100 0 ▶sub relationship { return( shift->_set_get_object( 'relationship', 'Net::API::Stripe::Connect::Account::Relationship', @_ ) ); }
Subroutine relationship: not called CC=1 SCAR=6.9
Pod documented
101  
102 0 ▶sub requirements { return( shift->_set_get_object( 'requirements', 'Net::API::Stripe::Connect::Account::Requirements', @_ ) ); }
Subroutine requirements: not called CC=1 SCAR=6.9
Pod documented
103  
104 0 ▶sub ssn_last_4_provided { return( shift->_set_get_boolean( 'ssn_last_4_provided', @_ ) ); }
Subroutine ssn_last_4_provided: not called CC=1 SCAR=6.9
Pod documented
105  
106 0 ▶sub verification { return( shift->_set_get_object( 'verification', 'Net::API::Stripe::Connect::Account::Verification', @_ ) ); }
Subroutine verification: not called CC=1 SCAR=6.9
Pod documented
107  
108 1 1;
109  
110 __END__
111 1 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
112 =encoding utf8
113  
114 1 ▶=head1 NAME
Subroutine CHECK: called CC=2 SCAR=6.9
115  
116 Net::API::Stripe::Connect::Person - A Stripe Person Object
117  
118 1 =head1 SYNOPSIS
119 1  
120 1 ▶ my $pers = $stripe->person({
Branch: 1 branch
BranchTrueFalseTotal
open $fh, "<:scalar", \$nice_try_data_block_str or die $! 0 1 1
121 1 ▶ account => $account_object,
Subroutine BEGIN: called CC=1 SCAR=0.0
122 1 ▶ address => $address_object,
Subroutine BEGIN: called CC=1 SCAR=0.0
123 1 address_kana => $address_kana_object,
124 address_kanji => $address_kanji_object,
125 # or:
126 # dob => DateTime->new( year => 1985, month => 8, day => 15 )
127 1 dob =>
128 {
129 day => 15
130 month => 8,
131 year => 1985,
132 },
133 email => 'nadeshiko.yamato@example.com',
134 first_name => 'Nadeshiko',
135 last_name => 'Yamato',
136 first_name_kana => 'なでしこ',
137 last_name_kana => 'やまと',
138 first_name_kanji => '撫子',
139 last_name_kanji => '大和',
140 gender => 'female',
141 metadata => { transaction_id => 123, customer_id => 456 },
142 phone => '+81-(0)90-1234-5678',
143 });
144  
145 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
146  
147 =head1 VERSION
148  
149 v0.200.1
150  
151 =head1 DESCRIPTION
152  
153 This is an object representing a person associated with a Stripe account.
154  
155 =head1 CONSTRUCTOR
156  
157 =over 4
158  
159 =item B<new>( %ARG )
160  
161 Creates a new L<Net::API::Stripe::Connect::Person> object.
162 It may also take an hash like arguments, that also are method of the same name.
163  
164 =back
165  
166 =head1 METHODS
167  
168 =over 4
169  
170 =item B<id> string
171  
172 Unique identifier for the object.
173  
174 =item B<object> string, value is "person"
175  
176 String representing the object’s type. Objects of the same type share the same value.
177  
178 =item B<account> string
179  
180 The account the person is associated with. If expanded (currently not implemented in Stripe API), this will be a L<Net::API::Stripe::Connect::Account> object.
181  
182 =item B<address> hash
183  
184 The person’s address.
185  
186 This is L<Net::API::Stripe::Address> object.
187  
188 =item B<address_kana> hash
189  
190 The Kana variation of the person’s address (Japan only).
191  
192 This is L<Net::API::Stripe::Address> object.
193  
194 =item B<address_kanji> hash
195  
196 The Kanji variation of the person’s address (Japan only).
197  
198 This is L<Net::API::Stripe::Address> object.
199  
200 =item B<created> timestamp
201  
202 Time at which the object was created. Measured in seconds since the Unix epoch.
203  
204 =item B<dob> L<DateTime> object or hash
205  
206 The person’s date of birth.
207  
208 This returns a C<DateTime> object. It can take either a L<DateTime> object or an hash with the following properties:
209  
210 =over 8
211  
212 =item I<day> positive integer
213  
214 The day of birth, between 1 and 31.
215  
216 =item I<month> positive integer
217  
218 The month of birth, between 1 and 12.
219  
220 =item I<year> positive integer
221  
222 The four-digit year of birth.
223  
224 =back
225  
226 =item B<email> string
227  
228 The person’s email address.
229  
230 =item B<first_name> string
231  
232 The person’s first name.
233  
234 =item B<first_name_kana> string
235  
236 The Kana variation of the person’s first name (Japan only).
237  
238 =item B<first_name_kanji> string
239  
240 The Kanji variation of the person’s first name (Japan only).
241  
242 =item B<gender> string
243  
244 The person’s gender (International regulations require either “male” or “female”).
245  
246 =item B<id_number_provided> boolean
247  
248 Whether the person’s id_number was provided.
249  
250 =item B<last_name> string
251  
252 The person’s last name.
253  
254 =item B<last_name_kana> string
255  
256 The Kana variation of the person’s last name (Japan only).
257  
258 =item B<last_name_kanji> string
259  
260 The Kanji variation of the person’s last name (Japan only).
261  
262 =item B<maiden_name> string
263  
264 The person’s maiden name.
265  
266 =item B<metadata> hash
267  
268 Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
269  
270 =item B<phone> string
271  
272 The person’s phone number.
273  
274 =item B<relationship> hash
275  
276 Describes the person’s relationship to the account.
277  
278 This is a L<Net::API::Stripe::Connect::Account::Relationship> object.
279  
280 =item B<requirements> hash
281  
282 Information about the requirements for this person, including what information needs to be collected, and by when.
283  
284 This is a L<Net::API::Stripe::Connect::Account::Requirements> object.
285  
286 =item B<ssn_last_4_provided> boolean
287  
288 Whether the last 4 digits of this person’s SSN have been provided.
289  
290 =item B<verification> hash
291  
292 The persons’s verification status.
293  
294 This is a L<Net::API::Stripe::Connect::Account::Verification> object.
295  
296 =back
297  
298 =head1 API SAMPLE
299  
300 {
301 "id": "person_fake123456789",
302 "object": "person",
303 "account": "acct_fake123456789",
304 "created": 1571602397,
305 "dob": {
306 "day": null,
307 "month": null,
308 "year": null
309 },
310 "first_name_kana": null,
311 "first_name_kanji": null,
312 "gender": null,
313 "last_name_kana": null,
314 "last_name_kanji": null,
315 "metadata": {},
316 "relationship": {
317 "director": false,
318 "executive": false,
319 "owner": false,
320 "percent_ownership": null,
321 "representative": false,
322 "title": null
323 },
324 "requirements": {
325 "currently_due": [],
326 "eventually_due": [],
327 "past_due": [],
328 "pending_verification": []
329 },
330 "verification": {
331 "additional_document": {
332 "back": null,
333 "details": null,
334 "details_code": null,
335 "front": null
336 },
337 "details": null,
338 "details_code": null,
339 "document": {
340 "back": null,
341 "details": null,
342 "details_code": null,
343 "front": null
344 },
345 "status": "unverified"
346 }
347 }
348  
349 =head1 HISTORY
350  
351 =head2 v0.1
352  
353 Initial version
354  
355 =head2 v0.2
356  
357 Update the method B<dob> to accept L<DateTime> objects
358  
359 =head1 AUTHOR
360  
361 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
362  
363 =head1 SEE ALSO
364  
365 Stripe API documentation:
366  
367 L<https://stripe.com/docs/api/persons/object>, L<https://stripe.com/docs/connect/identity-verification-api#person-information>
368  
369 =head1 COPYRIGHT & LICENSE
370  
371 Copyright (c) 2020-2020 DEGUEST Pte. Ltd.
372  
373 You can use, copy, modify and redistribute this package and associated
374 files under the same terms as Perl itself.
375  
376 =cut
« Stripe.pm ↑ Summary Stripe/Generic.pm »