| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtension; | ||||||||||||||||||||
| 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::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionList; | ||||||||||||||||||||
| 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, $account_sid, $resource_sid, $assigned_add_on_sid) = @_; | |||||||||||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | $self->{solution} = { | ||||||||||||||||||||
| 19 | 2 | account_sid => $account_sid, | |||||||||||||||||||
| 20 | resource_sid => $resource_sid, | ||||||||||||||||||||
| 21 | assigned_add_on_sid => $assigned_add_on_sid | ||||||||||||||||||||
| 22 | }; | ||||||||||||||||||||
| 23 | 2 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||||||||||
| 24 | '/IncomingPhoneNumbers/', Twilio::Serialize::path_segment($resource_sid), '/AssignedAddOns/', | ||||||||||||||||||||
| 25 | Twilio::Serialize::path_segment($assigned_add_on_sid), '/Extensions.json'; | ||||||||||||||||||||
| 26 | 2 | return $self; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 30 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 31 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 35 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 36 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 40 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 41 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 1 | my $params = { | |||||||||||||||||||
| 44 | PageToken => $page_token, | ||||||||||||||||||||
| 45 | Page => $page_number, | ||||||||||||||||||||
| 46 | PageSize => $page_size, | ||||||||||||||||||||
| 47 | }; | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 50 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 54 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 55 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 56 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 57 | } | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 60 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 61 | return | ||||||||||||||||||||
| 62 | Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionPage | ||||||||||||||||||||
| 63 | 1 | ->new($self->{version}, $response, $self->{solution}); | |||||||||||||||||||
| 64 | } | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 67 | 1 | my ($self, $sid) = @_; | |||||||||||||||||||
| 68 | return | ||||||||||||||||||||
| 69 | Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionContext | ||||||||||||||||||||
| 70 | ->new( | ||||||||||||||||||||
| 71 | $self->{version}, | ||||||||||||||||||||
| 72 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 73 | $self->{solution}{resource_sid}, | ||||||||||||||||||||
| 74 | 1 | $self->{solution}{assigned_add_on_sid}, $sid | |||||||||||||||||||
| 75 | ); | ||||||||||||||||||||
| 76 | } | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionPage; | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 1 | ▶ | sub records_key { return 'extensions' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 85 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 86 | return | ||||||||||||||||||||
| 87 | Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionInstance | ||||||||||||||||||||
| 88 | ->new( | ||||||||||||||||||||
| 89 | $self->{version}, $payload, | ||||||||||||||||||||
| 90 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 91 | $self->{solution}{resource_sid}, | ||||||||||||||||||||
| 92 | $self->{solution}{assigned_add_on_sid} | ||||||||||||||||||||
| 93 | 1 | ); | |||||||||||||||||||
| 94 | } | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionContext; | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | 1 | my ($class, $version, $account_sid, $resource_sid, $assigned_add_on_sid, $sid) = @_; | |||||||||||||||||||
| 104 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 105 | $self->{solution} = { | ||||||||||||||||||||
| 106 | 1 | account_sid => $account_sid, | |||||||||||||||||||
| 107 | resource_sid => $resource_sid, | ||||||||||||||||||||
| 108 | assigned_add_on_sid => $assigned_add_on_sid, | ||||||||||||||||||||
| 109 | sid => $sid | ||||||||||||||||||||
| 110 | }; | ||||||||||||||||||||
| 111 | 1 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||||||||||
| 112 | '/IncomingPhoneNumbers/', Twilio::Serialize::path_segment($resource_sid), '/AssignedAddOns/', | ||||||||||||||||||||
| 113 | Twilio::Serialize::path_segment($assigned_add_on_sid), '/Extensions/', | ||||||||||||||||||||
| 114 | Twilio::Serialize::path_segment($sid), '.json'; | ||||||||||||||||||||
| 115 | 1 | return $self; | |||||||||||||||||||
| 116 | } | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 119 | 1 | my ($self) = @_; | |||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 122 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 123 | } | ||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 126 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 127 | return | ||||||||||||||||||||
| 128 | Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionInstance | ||||||||||||||||||||
| 129 | ->new( | ||||||||||||||||||||
| 130 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 131 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 132 | $self->{solution}{resource_sid}, | ||||||||||||||||||||
| 133 | $self->{solution}{assigned_add_on_sid}, | ||||||||||||||||||||
| 134 | $self->{solution}{sid} | ||||||||||||||||||||
| 135 | 1 | ); | |||||||||||||||||||
| 136 | } | ||||||||||||||||||||
| 137 | |||||||||||||||||||||
| 138 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionInstance; | ||||||||||||||||||||
| 139 | |||||||||||||||||||||
| 140 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 141 | |||||||||||||||||||||
| 142 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 143 | |||||||||||||||||||||
| 144 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 145 | 2 | my ($class, $version, $payload, $account_sid, $resource_sid, $assigned_add_on_sid, $sid) = @_; | |||||||||||||||||||
| 146 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 147 | $self->{solution} = { | ||||||||||||||||||||
| 148 | account_sid => $account_sid, | ||||||||||||||||||||
| 149 | resource_sid => $resource_sid, | ||||||||||||||||||||
| 150 | assigned_add_on_sid => $assigned_add_on_sid, | ||||||||||||||||||||
| 151 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 152 | 2 | ▶ | }; | ||||||||||||||||||
|
Condition66%2/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table66%2/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 153 | 2 | return $self; | |||||||||||||||||||
| 154 | } | ||||||||||||||||||||
| 155 | |||||||||||||||||||||
| 156 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 157 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 158 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 159 | } | ||||||||||||||||||||
| 160 | |||||||||||||||||||||
| 161 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 162 | 0 | my ($self) = @_; | |||||||||||||||||||
| 163 | return | ||||||||||||||||||||
| 164 | Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::AssignedAddOn::AssignedAddOnExtensionContext | ||||||||||||||||||||
| 165 | ->new( | ||||||||||||||||||||
| 166 | $self->{version}, | ||||||||||||||||||||
| 167 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 168 | $self->{solution}{resource_sid}, | ||||||||||||||||||||
| 169 | $self->{solution}{assigned_add_on_sid}, | ||||||||||||||||||||
| 170 | $self->{solution}{sid} | ||||||||||||||||||||
| 171 | 0 | ); | |||||||||||||||||||
| 172 | } | ||||||||||||||||||||
| 173 | |||||||||||||||||||||
| 174 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 175 | 2 | ▶ | sub assigned_add_on_sid { return $_[0]{properties}{assigned_add_on_sid} } | ||||||||||||||||||
|
Subroutine
assigned_add_on_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 176 | 2 | ▶ | sub enabled { return $_[0]{properties}{enabled} } | ||||||||||||||||||
|
Subroutine
enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 177 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 178 | 2 | ▶ | sub product_name { return $_[0]{properties}{product_name} } | ||||||||||||||||||
|
Subroutine
product_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 179 | 2 | ▶ | sub resource_sid { return $_[0]{properties}{resource_sid} } | ||||||||||||||||||
|
Subroutine
resource_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 180 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 181 | 2 | ▶ | sub unique_name { return $_[0]{properties}{unique_name} } | ||||||||||||||||||
|
Subroutine
unique_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 182 | 2 | ▶ | sub uri { return $_[0]{properties}{uri} } | ||||||||||||||||||
|
Subroutine
uri: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 183 | |||||||||||||||||||||
| 184 | 2 | 1; | |||||||||||||||||||
| 185 | |||||||||||||||||||||
| 186 | __END__ | ||||||||||||||||||||