Twilio/Rest/Verify/V2/Form.pm

filter: Statementstmt 92.5% 50 / 54 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 90.0% 18 / 20 Podpod n/a totaltotal 87.3% 69 / 79 CC 2 SCAR 1.8
CC
2
Cov
89%
new
2.1
fetch
2.0
_context
2.0
CRAP 1.2
« Twilio/Rest/Insights/V1/Call/Annotation.pm ↑ Summary Twilio/Rest/FlexApi/V1/PluginConfigurationArchive.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Verify::V2::Form;
3  
4 2 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '2.001';
8  
9 package Twilio::Rest::Verify::V2::FormList;
10  
11 2 ▶use parent 'Twilio::ListResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 1 my ($class, $version) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = {};
19 1 $self->{uri} = '/Forms';
20 1 return $self;
21 }
22  
23 1 ▶sub get_context {
Subroutine get_context: called CC=1 SCAR=0.0
24 1 my ($self, $form_type) = @_;
25 1 return Twilio::Rest::Verify::V2::FormContext->new($self->{version}, $form_type);
26 }
27  
28 package Twilio::Rest::Verify::V2::FormContext;
29  
30 2 ▶use parent 'Twilio::InstanceContext';
Subroutine BEGIN: called CC=1 SCAR=0.0
31  
32 2 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
35 1 my ($class, $version, $form_type) = @_;
36 1 my $self = $class->SUPER::new($version);
37 1 $self->{solution} = { form_type => $form_type };
38 1 $self->{uri} = join q{}, '/Forms/', Twilio::Serialize::path_segment($form_type);
39 1 return $self;
40 }
41  
42 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
43 1 my ($self) = @_;
44  
45 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
46 1 return $self->_build_instance($response);
47 }
48  
49 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
50 1 my ($self, $response) = @_;
51 return Twilio::Rest::Verify::V2::FormInstance->new($self->{version}, $response->get_content,
52 1 $self->{solution}{form_type});
53 }
54  
55 package Twilio::Rest::Verify::V2::FormInstance;
56  
57 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
58  
59 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
60  
61 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
62 1 my ($class, $version, $payload, $form_type) = @_;
63 1 my $self = $class->SUPER::new($version, $payload);
64 1 ▶ $self->{solution} = { form_type => $form_type // $self->{properties}{form_type} };
Condition33%1/3
$form_type // $self->{"properties"}{"form_type"}
l!l&&r!l&&!r
100
MC/DC0%0/2
$form_type // $self->{"properties"}{"form_type"}
$form_type $self->{"properties"}{"form_type"}
Truth table33%1/3
A // B
A= $form_typeB= $self->{"properties"}{"form_type"}
ABresult
1X1
011
000
65 1 return $self;
66 }
67  
68 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
69 0 my ($self, @arguments) = @_;
70 0 return $self->_context->fetch(@arguments);
71 }
72  
73 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
74 0 my ($self) = @_;
75 0 return Twilio::Rest::Verify::V2::FormContext->new($self->{version}, $self->{solution}{form_type});
76 }
77  
78 1 ▶sub form_meta { return $_[0]{properties}{form_meta} }
Subroutine form_meta: called CC=1 SCAR=0.0
79 1 ▶sub form_type { return $_[0]{properties}{form_type} }
Subroutine form_type: called CC=1 SCAR=0.0
80 1 ▶sub forms { return $_[0]{properties}{forms} }
Subroutine forms: called CC=1 SCAR=0.0
81 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
82  
83 2 1;
84  
85 __END__
« Twilio/Rest/Insights/V1/Call/Annotation.pm ↑ Summary Twilio/Rest/FlexApi/V1/PluginConfigurationArchive.pm »