Twilio/Rest/Api/V2010/Account/ValidationRequest.pm

filter: Statementstmt 100% 38 / 38 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 14 / 14 Podpod n/a totaltotal 100% 55 / 55 CC 2 SCAR 1.3
CC
2
Cov
100%
create
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/Video/V1/Room/RecordingRules.pm ↑ Summary Twilio/Rest/FlexApi/V1/InsightsSegments.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Api::V2010::Account::ValidationRequest;
3  
4 3 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '2.001';
8  
9 package Twilio::Rest::Api::V2010::Account::ValidationRequestList;
10  
11 3 ▶use parent 'Twilio::ListResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶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, $account_sid) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = { account_sid => $account_sid };
19 2 $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid),
20 '/OutgoingCallerIds.json';
21 2 return $self;
22 }
23  
24 2 ▶sub create {
Subroutine create: called CC=2 SCAR=6.9
25 2 my ($self, $phone_number, $options) = @_;
26 2 ▶ $options //= {};
Condition100%2/2
$options //= {}
l!l
11
MC/DC100%1/1
$options //= {}
$options
Truth table100%2/2
A
A= $options
Aresult
11
00
27  
28 my $data = {
29 PhoneNumber => $phone_number,
30 CallDelay => $options->{call_delay},
31 Extension => $options->{extension},
32 FriendlyName => $options->{friendly_name},
33 StatusCallback => $options->{status_callback},
34 StatusCallbackMethod => $options->{status_callback_method},
35 2 };
36  
37 my $response =
38 2 $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data });
39 return Twilio::Rest::Api::V2010::Account::ValidationRequestInstance->new($self->{version},
40 2 $response->get_content, $self->{solution}{account_sid});
41 }
42  
43 package Twilio::Rest::Api::V2010::Account::ValidationRequestInstance;
44  
45 3 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 3 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
50 2 my ($class, $version, $payload, $account_sid) = @_;
51 2 my $self = $class->SUPER::new($version, $payload);
52 2 $self->{solution} = { account_sid => $account_sid };
53 2 return $self;
54 }
55  
56 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
57 1 ▶sub call_sid { return $_[0]{properties}{call_sid} }
Subroutine call_sid: called CC=1 SCAR=0.0
58 1 ▶sub friendly_name { return $_[0]{properties}{friendly_name} }
Subroutine friendly_name: called CC=1 SCAR=0.0
59 1 ▶sub phone_number { return $_[0]{properties}{phone_number} }
Subroutine phone_number: called CC=1 SCAR=0.0
60 2 ▶sub validation_code { return $_[0]{properties}{validation_code} }
Subroutine validation_code: called CC=1 SCAR=0.0
61  
62 3 1;
63  
64 __END__
« Twilio/Rest/Video/V1/Room/RecordingRules.pm ↑ Summary Twilio/Rest/FlexApi/V1/InsightsSegments.pm »