« Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtension.pm
↑ Summary
Twilio/Rest/Video/V1/Room/Participant/PublishedTrack.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Events::V1::EventType; | ||||||||||||||||||||
| 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::Events::V1::EventTypeList; | ||||||||||||||||||||
| 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} = '/Types'; | |||||||||||||||||||
| 20 | 2 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 24 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 25 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 29 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 30 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 34 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 35 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | my $params = { | ||||||||||||||||||||
| 38 | SchemaId => $options->{schema_id}, | ||||||||||||||||||||
| 39 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 40 | Page => $page_number, | ||||||||||||||||||||
| 41 | PageSize => $page_size, | ||||||||||||||||||||
| 42 | }; | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 45 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 49 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 50 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 51 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 55 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 56 | return Twilio::Rest::Events::V1::EventTypePage->new($self->{version}, $response, | ||||||||||||||||||||
| 57 | 1 | $self->{solution}); | |||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 61 | 1 | my ($self, $type) = @_; | |||||||||||||||||||
| 62 | 1 | return Twilio::Rest::Events::V1::EventTypeContext->new($self->{version}, $type); | |||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | package Twilio::Rest::Events::V1::EventTypePage; | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | 1 | ▶ | sub records_key { return 'types' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 72 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 73 | 1 | return Twilio::Rest::Events::V1::EventTypeInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 74 | } | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | package Twilio::Rest::Events::V1::EventTypeContext; | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 83 | 1 | my ($class, $version, $type) = @_; | |||||||||||||||||||
| 84 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 85 | 1 | $self->{solution} = { type => $type }; | |||||||||||||||||||
| 86 | 1 | $self->{uri} = join q{}, '/Types/', Twilio::Serialize::path_segment($type); | |||||||||||||||||||
| 87 | 1 | return $self; | |||||||||||||||||||
| 88 | } | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 91 | 1 | my ($self) = @_; | |||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 94 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 95 | } | ||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 98 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 99 | return Twilio::Rest::Events::V1::EventTypeInstance->new($self->{version}, $response->get_content, | ||||||||||||||||||||
| 100 | 1 | $self->{solution}{type}); | |||||||||||||||||||
| 101 | } | ||||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | package Twilio::Rest::Events::V1::EventTypeInstance; | ||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 110 | 2 | my ($class, $version, $payload, $type) = @_; | |||||||||||||||||||
| 111 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 112 | 2 | ▶ | $self->{solution} = { type => $type // $self->{properties}{type} }; | ||||||||||||||||||
|
Condition66%2/3
$type // $self->{"properties"}{"type"}
MC/DC0%0/2
$type // $self->{"properties"}{"type"}
$type
$self->{"properties"}{"type"}
Truth table66%2/3
A // B
A= $typeB= $self->{"properties"}{"type"}
| |||||||||||||||||||||
| 113 | 2 | return $self; | |||||||||||||||||||
| 114 | } | ||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 117 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 118 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 119 | } | ||||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 122 | 0 | my ($self) = @_; | |||||||||||||||||||
| 123 | 0 | return Twilio::Rest::Events::V1::EventTypeContext->new($self->{version}, $self->{solution}{type}); | |||||||||||||||||||
| 124 | } | ||||||||||||||||||||
| 125 | |||||||||||||||||||||
| 126 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 127 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 128 | 2 | ▶ | sub description { return $_[0]{properties}{description} } | ||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 129 | 2 | ▶ | sub documentation_url { return $_[0]{properties}{documentation_url} } | ||||||||||||||||||
|
Subroutine
documentation_url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 130 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 131 | 2 | ▶ | sub schema_id { return $_[0]{properties}{schema_id} } | ||||||||||||||||||
|
Subroutine
schema_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 132 | 2 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 133 | 2 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 134 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 135 | |||||||||||||||||||||
| 136 | 2 | 1; | |||||||||||||||||||
| 137 | |||||||||||||||||||||
| 138 | __END__ | ||||||||||||||||||||