Twilio/Rest/Insights/V1/Setting.pm

filter: Statementstmt 87.7% 43 / 49 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 15 / 18 Podpod n/a totaltotal 82.1% 60 / 73 CC 3 SCAR 3.0
CC
3
Cov
85%
fetch
2.0
update
2.0
fetch
2.0
CRAP 1.4
« Twilio/Rest/Api/V2010/Account/Key.pm ↑ Summary Twilio/Rest/Intelligence/V2/Transcript.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Insights::V1::Setting;
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::Insights::V1::SettingContext;
10  
11 2 ▶use parent 'Twilio::InstanceContext';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 2 my ($class, $version) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = {};
19 2 $self->{uri} = '/Voice/Settings';
20 2 return $self;
21 }
22  
23 1 ▶sub fetch {
Subroutine fetch: called CC=2 SCAR=7.0
24 1 my ($self, $options) = @_;
25 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
26  
27 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch',
28 1 { params => { SubaccountSid => $options->{subaccount_sid}, } });
29 1 return $self->_build_instance($response);
30 }
31  
32 1 ▶sub update {
Subroutine update: called CC=2 SCAR=7.0
33 1 my ($self, $options) = @_;
34 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
35  
36 my $data = {
37 AdvancedFeatures => Twilio::Serialize::boolean_to_string($options->{advanced_features}),
38 SubaccountSid => $options->{subaccount_sid},
39 1 VoiceTrace => Twilio::Serialize::boolean_to_string($options->{voice_trace}),
40 };
41  
42 my $response =
43 1 $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data });
44 1 return $self->_build_instance($response);
45 }
46  
47 2 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
48 2 my ($self, $response) = @_;
49 2 return Twilio::Rest::Insights::V1::SettingInstance->new($self->{version}, $response->get_content);
50 }
51  
52 package Twilio::Rest::Insights::V1::SettingInstance;
53  
54 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
55  
56 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
57  
58 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
59 2 my ($class, $version, $payload) = @_;
60 2 my $self = $class->SUPER::new($version, $payload);
61 2 $self->{solution} = {};
62 2 return $self;
63 }
64  
65 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
66 0 my ($self, @arguments) = @_;
67 0 return $self->_context->fetch(@arguments);
68 }
69  
70 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
71 0 my ($self, @arguments) = @_;
72 0 return $self->_context->update(@arguments);
73 }
74  
75 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
76 0 my ($self) = @_;
77 0 return Twilio::Rest::Insights::V1::SettingContext->new($self->{version});
78 }
79  
80 2 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
81 2 ▶sub advanced_features { return $_[0]{properties}{advanced_features} }
Subroutine advanced_features: called CC=1 SCAR=0.0
82 2 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
83 2 ▶sub voice_trace { return $_[0]{properties}{voice_trace} }
Subroutine voice_trace: called CC=1 SCAR=0.0
84  
85 2 1;
86  
87 __END__
« Twilio/Rest/Api/V2010/Account/Key.pm ↑ Summary Twilio/Rest/Intelligence/V2/Transcript.pm »