Twilio/Rest/Accounts/V1/AuthTokenPromotion.pm

filter: Statementstmt 90.9% 40 / 44 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 88.2% 15 / 17 Podpod n/a totaltotal 87.5% 56 / 64 CC 2 SCAR 2.0
CC
2
Cov
89%
update
2.0
update
2.0
_context
2.0
CRAP 1.2
« Twilio/Rest/Verify/V2/VerificationAttemptsSummary.pm ↑ Summary Twilio/Rest/FlexApi/V1/InsightsSession.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Accounts::V1::AuthTokenPromotion;
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::Accounts::V1::AuthTokenPromotionContext;
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 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} = '/AuthTokens/Promote';
20 1 return $self;
21 }
22  
23 1 ▶sub update {
Subroutine update: 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 $data = { SuppressEmailNotification =>
28 1 Twilio::Serialize::boolean_to_string($options->{suppress_email_notification}), };
29  
30 my $response =
31 1 $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data });
32 1 return $self->_build_instance($response);
33 }
34  
35 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
36 1 my ($self, $response) = @_;
37 return Twilio::Rest::Accounts::V1::AuthTokenPromotionInstance->new($self->{version},
38 1 $response->get_content);
39 }
40  
41 package Twilio::Rest::Accounts::V1::AuthTokenPromotionInstance;
42  
43 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
48 1 my ($class, $version, $payload) = @_;
49 1 my $self = $class->SUPER::new($version, $payload);
50 1 $self->{solution} = {};
51 1 return $self;
52 }
53  
54 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
55 0 my ($self, @arguments) = @_;
56 0 return $self->_context->update(@arguments);
57 }
58  
59 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
60 0 my ($self) = @_;
61 0 return Twilio::Rest::Accounts::V1::AuthTokenPromotionContext->new($self->{version});
62 }
63  
64 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
65 1 ▶sub auth_token { return $_[0]{properties}{auth_token} }
Subroutine auth_token: called CC=1 SCAR=0.0
66 1 ▶sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) }
Subroutine date_created: called CC=1 SCAR=0.0
67 1 ▶sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) }
Subroutine date_updated: called CC=1 SCAR=0.0
68 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
69  
70 2 1;
71  
72 __END__
« Twilio/Rest/Verify/V2/VerificationAttemptsSummary.pm ↑ Summary Twilio/Rest/FlexApi/V1/InsightsSession.pm »