| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Bulkexports::V1::Export; | ||||||||||||||||||||
| 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::ExportList; | ||||||||||||||||||||
| 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 | 7 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 7 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 7 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 7 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 7 | $self->{uri} = '/Exports'; | |||||||||||||||||||
| 20 | 7 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 5 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | 5 | my ($self, $resource_type) = @_; | |||||||||||||||||||
| 25 | 5 | return Twilio::Rest::Bulkexports::V1::ExportContext->new($self->{version}, $resource_type); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 2 | ▶ | sub jobs { | ||||||||||||||||||
|
Subroutine
jobs: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 29 | 2 | my ($self, $job_sid) = @_; | |||||||||||||||||||
| 30 | 2 | require Twilio::Rest::Bulkexports::V1::Export::Job; | |||||||||||||||||||
| 31 | 2 | my $list = Twilio::Rest::Bulkexports::V1::Export::JobList->new($self->{version}); | |||||||||||||||||||
| 32 | 2 | ▶ | return defined $job_sid ? $list->get_context($job_sid) : $list; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | package Twilio::Rest::Bulkexports::V1::ExportContext; | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 42 | 5 | my ($class, $version, $resource_type) = @_; | |||||||||||||||||||
| 43 | 5 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 44 | 5 | $self->{solution} = { resource_type => $resource_type }; | |||||||||||||||||||
| 45 | 5 | $self->{uri} = join q{}, '/Exports/', Twilio::Serialize::path_segment($resource_type); | |||||||||||||||||||
| 46 | 5 | return $self; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 50 | 1 | my ($self) = @_; | |||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 53 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 57 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 58 | return Twilio::Rest::Bulkexports::V1::ExportInstance->new($self->{version}, | ||||||||||||||||||||
| 59 | 1 | $response->get_content, $self->{solution}{resource_type}); | |||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 2 | ▶ | sub days { | ||||||||||||||||||
|
Subroutine
days: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 63 | 2 | my ($self, $day) = @_; | |||||||||||||||||||
| 64 | 2 | require Twilio::Rest::Bulkexports::V1::Export::Day; | |||||||||||||||||||
| 65 | my $list = Twilio::Rest::Bulkexports::V1::Export::DayList->new($self->{version}, | ||||||||||||||||||||
| 66 | 2 | $self->{solution}{resource_type}); | |||||||||||||||||||
| 67 | 2 | ▶ | return defined $day ? $list->get_context($day) : $list; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 68 | } | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | 2 | ▶ | sub export_custom_jobs { | ||||||||||||||||||
|
Subroutine
export_custom_jobs: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 71 | 2 | my ($self) = @_; | |||||||||||||||||||
| 72 | 2 | require Twilio::Rest::Bulkexports::V1::Export::ExportCustomJob; | |||||||||||||||||||
| 73 | return Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobList->new($self->{version}, | ||||||||||||||||||||
| 74 | 2 | $self->{solution}{resource_type}); | |||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | package Twilio::Rest::Bulkexports::V1::ExportInstance; | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
| |||||||||||||||||||||
| 84 | 1 | my ($class, $version, $payload, $resource_type) = @_; | |||||||||||||||||||
| 85 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 86 | 1 | ▶ | $self->{solution} = { resource_type => $resource_type // $self->{properties}{resource_type} }; | ||||||||||||||||||
|
Condition33%1/3
$resource_type // $self->{"properties"}{"resource_type"}
MC/DC0%0/2
$resource_type // $self->{"properties"}{"resource_type"}
$resource_type
$self->{"properties"}{"resource_type"}
Truth table33%1/3
A // B
A= $resource_typeB= $self->{"properties"}{"resource_type"}
| |||||||||||||||||||||
| 87 | 1 | return $self; | |||||||||||||||||||
| 88 | } | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 91 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 92 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 93 | } | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 0 | ▶ | sub days { | ||||||||||||||||||
|
Subroutine
days: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 96 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 97 | 0 | return $self->_context->days(@arguments); | |||||||||||||||||||
| 98 | } | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 0 | ▶ | sub export_custom_jobs { | ||||||||||||||||||
|
Subroutine
export_custom_jobs: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 101 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 102 | 0 | return $self->_context->export_custom_jobs(@arguments); | |||||||||||||||||||
| 103 | } | ||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 106 | 0 | my ($self) = @_; | |||||||||||||||||||
| 107 | return Twilio::Rest::Bulkexports::V1::ExportContext->new($self->{version}, | ||||||||||||||||||||
| 108 | 0 | $self->{solution}{resource_type}); | |||||||||||||||||||
| 109 | } | ||||||||||||||||||||
| 110 | |||||||||||||||||||||
| 111 | 1 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 1 | ▶ | sub resource_type { return $_[0]{properties}{resource_type} } | ||||||||||||||||||
|
Subroutine
resource_type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | 1 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | |||||||||||||||||||||
| 115 | 2 | 1; | |||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | __END__ | ||||||||||||||||||||