Twilio/Rest/Bulkexports/V1/Export/Job.pm

filter: Statementstmt 91.0% 61 / 67 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 90.0% 27 / 30 Podpod n/a totaltotal 87.2% 89 / 102 CC 2 SCAR 1.5
CC
2
Cov
89%
new
2.1
delete
2.0
fetch
2.0
CRAP 1.2
« Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/Voip.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Usage/Record/AllTime.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Bulkexports::V1::Export::Job;
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::Bulkexports::V1::Export::JobList;
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 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} = '/Exports/Jobs';
20 2 return $self;
21 }
22  
23 2 ▶sub get_context {
Subroutine get_context: called CC=1 SCAR=0.0
24 2 my ($self, $job_sid) = @_;
25 2 return Twilio::Rest::Bulkexports::V1::Export::JobContext->new($self->{version}, $job_sid);
26 }
27  
28 package Twilio::Rest::Bulkexports::V1::Export::JobContext;
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 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
35 2 my ($class, $version, $job_sid) = @_;
36 2 my $self = $class->SUPER::new($version);
37 2 $self->{solution} = { job_sid => $job_sid };
38 2 $self->{uri} = join q{}, '/Exports/Jobs/', Twilio::Serialize::path_segment($job_sid);
39 2 return $self;
40 }
41  
42 1 ▶sub delete {
Subroutine delete: called CC=1 SCAR=0.0
43 1 my ($self) = @_;
44 1 $self->{version}->handle_request('DELETE', $self->{uri}, 'delete');
45 1 return 1;
46 }
47  
48 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
49 1 my ($self) = @_;
50  
51 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
52 1 return $self->_build_instance($response);
53 }
54  
55 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
56 1 my ($self, $response) = @_;
57 return Twilio::Rest::Bulkexports::V1::Export::JobInstance->new($self->{version},
58 1 $response->get_content, $self->{solution}{job_sid});
59 }
60  
61 package Twilio::Rest::Bulkexports::V1::Export::JobInstance;
62  
63 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
64  
65 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
66  
67 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
68 1 my ($class, $version, $payload, $job_sid) = @_;
69 1 my $self = $class->SUPER::new($version, $payload);
70 1 ▶ $self->{solution} = { job_sid => $job_sid // $self->{properties}{job_sid} };
Condition33%1/3
$job_sid // $self->{"properties"}{"job_sid"}
l!l&&r!l&&!r
100
MC/DC0%0/2
$job_sid // $self->{"properties"}{"job_sid"}
$job_sid $self->{"properties"}{"job_sid"}
Truth table33%1/3
A // B
A= $job_sidB= $self->{"properties"}{"job_sid"}
ABresult
1X1
011
000
71 1 return $self;
72 }
73  
74 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
75 0 my ($self, @arguments) = @_;
76 0 return $self->_context->delete(@arguments);
77 }
78  
79 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
80 0 my ($self, @arguments) = @_;
81 0 return $self->_context->fetch(@arguments);
82 }
83  
84 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
85 0 my ($self) = @_;
86 return Twilio::Rest::Bulkexports::V1::Export::JobContext->new($self->{version},
87 0 $self->{solution}{job_sid});
88 }
89  
90 1 ▶sub details { return $_[0]{properties}{details} }
Subroutine details: called CC=1 SCAR=0.0
91 1 ▶sub email { return $_[0]{properties}{email} }
Subroutine email: called CC=1 SCAR=0.0
92 1 ▶sub end_day { return $_[0]{properties}{end_day} }
Subroutine end_day: called CC=1 SCAR=0.0
93 1 ▶sub estimated_completion_time { return $_[0]{properties}{estimated_completion_time} }
Subroutine estimated_completion_time: called CC=1 SCAR=0.0
94 1 ▶sub friendly_name { return $_[0]{properties}{friendly_name} }
Subroutine friendly_name: called CC=1 SCAR=0.0
95 1 ▶sub job_queue_position { return $_[0]{properties}{job_queue_position} }
Subroutine job_queue_position: called CC=1 SCAR=0.0
96 1 ▶sub job_sid { return $_[0]{properties}{job_sid} }
Subroutine job_sid: called CC=1 SCAR=0.0
97 1 ▶sub resource_type { return $_[0]{properties}{resource_type} }
Subroutine resource_type: called CC=1 SCAR=0.0
98 1 ▶sub start_day { return $_[0]{properties}{start_day} }
Subroutine start_day: called CC=1 SCAR=0.0
99 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
100 1 ▶sub webhook_method { return $_[0]{properties}{webhook_method} }
Subroutine webhook_method: called CC=1 SCAR=0.0
101 1 ▶sub webhook_url { return $_[0]{properties}{webhook_url} }
Subroutine webhook_url: called CC=1 SCAR=0.0
102  
103 2 1;
104  
105 __END__
« Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/Voip.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Usage/Record/AllTime.pm »