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