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