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