Stripe/Event/Data.pm

filter: Statementstmt 68.9% 20 / 29 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 70.0% 7 / 10 Podpod 100% 2 / 2 totaltotal 59.1% 29 / 49 CC 4 SCAR 19.5
CC
4
Cov
57%
object
20.0
__ANON__
2.0
previous_attributes
2.0
CRAP 7.0
« Stripe/Product/PackageDimension.pm ↑ Summary Stripe/TimeZone.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Event/Data.pm
3 ## Version v0.100.0
4 ## Copyright(c) 2019 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2019/11/02
7 ## Modified 2020/05/15
8 ##
9 ##----------------------------------------------------------------------------
10 ## Object of the resources relevant to the event, e.g. balance, or invoice
11 ## This must be processed by callbacks to set the right object
12 package Net::API::Stripe::Event::Data;
13 BEGIN
14 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 our( $VERSION ) = 'v0.100.0';
20 };
21  
22 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 sub object
26 0 ▶{
Subroutine object: not called CC=4 SCAR=30.0
Pod documented
27 0 my $self = shift( @_ );
28 0 ▶ if( @_ )
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
29 {
30 0 my $ref = shift( @_ );
31 ## This is not a type, there is an object property that contains a hash
32 0 ▶ my $type = $ref->{object} || return( $self->error( "No object type could be found for field $self->{_field} in hash: ", sub{ $self->dumper( $ref ) } ) );
Subroutine __ANON__: not called CC=1 SCAR=6.9
Condition0%0/2
$ref->{'object'} || (return $self->error("No object type could be found for field $self->{'_field'} in hash: ", sub { $self->dumper($ref); } ))
l!l
00
MC/DC0%0/1
$ref->{'object'} || (return $self->error("No object type could be found for field $self->{'_field'} in hash: ", sub { $self->dumper($ref); } ))
$ref->{'object'}
Truth table0%0/2
A
A= $ref->{'object'}
Aresult
11
00
33 0 ▶ my $class = $self->_object_type_to_class( $type ) ||
Condition0%0/2
$self->_object_type_to_class($type) || (return $self->error("No class found for object type $type"))
l!l
00
MC/DC0%0/1
$self->_object_type_to_class($type) || (return $self->error("No class found for object type $type"))
$self->_object_type_to_class($type)
Truth table0%0/2
A
A= $self->_object_type_to_class($type)
Aresult
11
00
34 return( $self->error( "No class found for object type $type" ) );
35 0 return( $self->_set_get_object( 'object', $class, $ref ) );
36 }
37 0 return( $self->{object} );
38 }
39  
40 0 ▶sub previous_attributes { return( shift->_set_get_hash( 'previous_attributes', @_ ) ); }
Subroutine previous_attributes: not called CC=1 SCAR=6.9
Pod documented
41  
42 2 1;
43  
44 __END__
« Stripe/Product/PackageDimension.pm ↑ Summary Stripe/TimeZone.pm »