« Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Conference/Recording.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Voice::V1::DialingPermissions::Country; | ||||||||||||||||||||
| 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::Voice::V1::DialingPermissions::CountryList; | ||||||||||||||||||||
| 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 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 3 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = '/DialingPermissions/Countries'; | |||||||||||||||||||
| 20 | 3 | 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 | Continent => $options->{continent}, | ||||||||||||||||||||
| 39 | CountryCode => $options->{country_code}, | ||||||||||||||||||||
| 40 | HighRiskSpecialNumbersEnabled => | ||||||||||||||||||||
| 41 | Twilio::Serialize::boolean_to_string($options->{high_risk_special_numbers_enabled}), | ||||||||||||||||||||
| 42 | HighRiskTollfraudNumbersEnabled => | ||||||||||||||||||||
| 43 | Twilio::Serialize::boolean_to_string($options->{high_risk_tollfraud_numbers_enabled}), | ||||||||||||||||||||
| 44 | IsoCode => $options->{iso_code}, | ||||||||||||||||||||
| 45 | LowRiskNumbersEnabled => | ||||||||||||||||||||
| 46 | 1 | Twilio::Serialize::boolean_to_string($options->{low_risk_numbers_enabled}), | |||||||||||||||||||
| 47 | PageToken => $page_token, | ||||||||||||||||||||
| 48 | Page => $page_number, | ||||||||||||||||||||
| 49 | PageSize => $page_size, | ||||||||||||||||||||
| 50 | }; | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 53 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 57 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 58 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 59 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 63 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 64 | return Twilio::Rest::Voice::V1::DialingPermissions::CountryPage->new($self->{version}, $response, | ||||||||||||||||||||
| 65 | 1 | $self->{solution}); | |||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 69 | 2 | my ($self, $iso_code) = @_; | |||||||||||||||||||
| 70 | return Twilio::Rest::Voice::V1::DialingPermissions::CountryContext->new($self->{version}, | ||||||||||||||||||||
| 71 | 2 | $iso_code); | |||||||||||||||||||
| 72 | } | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | package Twilio::Rest::Voice::V1::DialingPermissions::CountryPage; | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | 1 | ▶ | sub records_key { return 'content' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 82 | return Twilio::Rest::Voice::V1::DialingPermissions::CountryInstance->new($self->{version}, | ||||||||||||||||||||
| 83 | 1 | $payload); | |||||||||||||||||||
| 84 | } | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | package Twilio::Rest::Voice::V1::DialingPermissions::CountryContext; | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 93 | 2 | my ($class, $version, $iso_code) = @_; | |||||||||||||||||||
| 94 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 95 | 2 | $self->{solution} = { iso_code => $iso_code }; | |||||||||||||||||||
| 96 | 2 | $self->{uri} = join q{}, '/DialingPermissions/Countries/', | |||||||||||||||||||
| 97 | Twilio::Serialize::path_segment($iso_code); | ||||||||||||||||||||
| 98 | 2 | return $self; | |||||||||||||||||||
| 99 | } | ||||||||||||||||||||
| 100 | |||||||||||||||||||||
| 101 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 102 | 1 | my ($self) = @_; | |||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 105 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 106 | } | ||||||||||||||||||||
| 107 | |||||||||||||||||||||
| 108 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 110 | return Twilio::Rest::Voice::V1::DialingPermissions::CountryInstance->new($self->{version}, | ||||||||||||||||||||
| 111 | 1 | $response->get_content, $self->{solution}{iso_code}); | |||||||||||||||||||
| 112 | } | ||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 1 | ▶ | sub highrisk_special_prefixes { | ||||||||||||||||||
|
Subroutine
highrisk_special_prefixes: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | 1 | my ($self) = @_; | |||||||||||||||||||
| 116 | 1 | require Twilio::Rest::Voice::V1::DialingPermissions::Country::HighriskSpecialPrefix; | |||||||||||||||||||
| 117 | return Twilio::Rest::Voice::V1::DialingPermissions::Country::HighriskSpecialPrefixList->new( | ||||||||||||||||||||
| 118 | 1 | $self->{version}, $self->{solution}{iso_code}); | |||||||||||||||||||
| 119 | } | ||||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | package Twilio::Rest::Voice::V1::DialingPermissions::CountryInstance; | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 126 | |||||||||||||||||||||
| 127 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 128 | 2 | my ($class, $version, $payload, $iso_code) = @_; | |||||||||||||||||||
| 129 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 130 | 2 | ▶ | $self->{solution} = { iso_code => $iso_code // $self->{properties}{iso_code} }; | ||||||||||||||||||
|
Condition66%2/3
$iso_code // $self->{"properties"}{"iso_code"}
MC/DC0%0/2
$iso_code // $self->{"properties"}{"iso_code"}
$iso_code
$self->{"properties"}{"iso_code"}
Truth table66%2/3
A // B
A= $iso_codeB= $self->{"properties"}{"iso_code"}
| |||||||||||||||||||||
| 131 | 2 | return $self; | |||||||||||||||||||
| 132 | } | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 135 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 136 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 137 | } | ||||||||||||||||||||
| 138 | |||||||||||||||||||||
| 139 | 0 | ▶ | sub highrisk_special_prefixes { | ||||||||||||||||||
|
Subroutine
highrisk_special_prefixes: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 140 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 141 | 0 | return $self->_context->highrisk_special_prefixes(@arguments); | |||||||||||||||||||
| 142 | } | ||||||||||||||||||||
| 143 | |||||||||||||||||||||
| 144 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 145 | 0 | my ($self) = @_; | |||||||||||||||||||
| 146 | return Twilio::Rest::Voice::V1::DialingPermissions::CountryContext->new($self->{version}, | ||||||||||||||||||||
| 147 | 0 | $self->{solution}{iso_code}); | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | 2 | ▶ | sub continent { return $_[0]{properties}{continent} } | ||||||||||||||||||
|
Subroutine
continent: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 151 | 2 | ▶ | sub country_codes { return $_[0]{properties}{country_codes} } | ||||||||||||||||||
|
Subroutine
country_codes: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | |||||||||||||||||||||
| 153 | 2 | ▶ | sub high_risk_special_numbers_enabled { | ||||||||||||||||||
|
Subroutine
high_risk_special_numbers_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 154 | 2 | return $_[0]{properties}{high_risk_special_numbers_enabled}; | |||||||||||||||||||
| 155 | } | ||||||||||||||||||||
| 156 | |||||||||||||||||||||
| 157 | 2 | ▶ | sub high_risk_tollfraud_numbers_enabled { | ||||||||||||||||||
|
Subroutine
high_risk_tollfraud_numbers_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | 2 | return $_[0]{properties}{high_risk_tollfraud_numbers_enabled}; | |||||||||||||||||||
| 159 | } | ||||||||||||||||||||
| 160 | 2 | ▶ | sub iso_code { return $_[0]{properties}{iso_code} } | ||||||||||||||||||
|
Subroutine
iso_code: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 161 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 162 | 2 | ▶ | sub low_risk_numbers_enabled { return $_[0]{properties}{low_risk_numbers_enabled} } | ||||||||||||||||||
|
Subroutine
low_risk_numbers_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 163 | 2 | ▶ | sub name { return $_[0]{properties}{name} } | ||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 164 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 165 | |||||||||||||||||||||
| 166 | 2 | 1; | |||||||||||||||||||
| 167 | |||||||||||||||||||||
| 168 | __END__ | ||||||||||||||||||||