« Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionTransfer.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessage.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::Local; | ||||||||||||
| 3 | |||||||||||||
| 4 | 3 | ▶ | use 5.016; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 3 | our $VERSION = '2.001'; | |||||||||||
| 8 | |||||||||||||
| 9 | package Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::LocalList; | ||||||||||||
| 10 | |||||||||||||
| 11 | 3 | ▶ | use parent 'Twilio::ListResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | |||||||||||||
| 13 | 3 | ▶ | 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, $country_code) = @_; | |||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 2 | $self->{solution} = { account_sid => $account_sid, country_code => $country_code }; | |||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||
| 20 | '/AvailablePhoneNumbers/', Twilio::Serialize::path_segment($country_code), '/Local.json'; | ||||||||||||
| 21 | 2 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | ▶ | sub read { | ||||||||||
|
Subroutine
read: called CC=1 SCAR=0.0
| |||||||||||||
| 25 | 1 | my ($self, @arguments) = @_; | |||||||||||
| 26 | 1 | return $self->read_records(@arguments); | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 30 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 31 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 2 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 35 | 2 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 36 | 2 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 37 | |||||||||||||
| 38 | my $params = { | ||||||||||||
| 39 | AreaCode => $options->{area_code}, | ||||||||||||
| 40 | Beta => Twilio::Serialize::boolean_to_string($options->{beta}), | ||||||||||||
| 41 | Contains => $options->{contains}, | ||||||||||||
| 42 | Distance => $options->{distance}, | ||||||||||||
| 43 | ExcludeAllAddressRequired => | ||||||||||||
| 44 | Twilio::Serialize::boolean_to_string($options->{exclude_all_address_required}), | ||||||||||||
| 45 | ExcludeForeignAddressRequired => | ||||||||||||
| 46 | Twilio::Serialize::boolean_to_string($options->{exclude_foreign_address_required}), | ||||||||||||
| 47 | ExcludeLocalAddressRequired => | ||||||||||||
| 48 | Twilio::Serialize::boolean_to_string($options->{exclude_local_address_required}), | ||||||||||||
| 49 | FaxEnabled => Twilio::Serialize::boolean_to_string($options->{fax_enabled}), | ||||||||||||
| 50 | InLata => $options->{in_lata}, | ||||||||||||
| 51 | InLocality => $options->{in_locality}, | ||||||||||||
| 52 | InPostalCode => $options->{in_postal_code}, | ||||||||||||
| 53 | InRateCenter => $options->{in_rate_center}, | ||||||||||||
| 54 | InRegion => $options->{in_region}, | ||||||||||||
| 55 | MmsEnabled => Twilio::Serialize::boolean_to_string($options->{mms_enabled}), | ||||||||||||
| 56 | NearLatLong => $options->{near_lat_long}, | ||||||||||||
| 57 | NearNumber => $options->{near_number}, | ||||||||||||
| 58 | SmsEnabled => Twilio::Serialize::boolean_to_string($options->{sms_enabled}), | ||||||||||||
| 59 | 2 | VoiceEnabled => Twilio::Serialize::boolean_to_string($options->{voice_enabled}), | |||||||||||
| 60 | PageToken => $page_token, | ||||||||||||
| 61 | Page => $page_number, | ||||||||||||
| 62 | PageSize => $page_size, | ||||||||||||
| 63 | }; | ||||||||||||
| 64 | |||||||||||||
| 65 | 2 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 66 | 2 | return $self->_build_page($response); | |||||||||||
| 67 | } | ||||||||||||
| 68 | |||||||||||||
| 69 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 70 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 71 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 72 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 73 | } | ||||||||||||
| 74 | |||||||||||||
| 75 | 2 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 76 | 2 | my ($self, $response) = @_; | |||||||||||
| 77 | return Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::LocalPage->new( | ||||||||||||
| 78 | 2 | $self->{version}, $response, $self->{solution}); | |||||||||||
| 79 | } | ||||||||||||
| 80 | |||||||||||||
| 81 | package Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::LocalPage; | ||||||||||||
| 82 | |||||||||||||
| 83 | 3 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 84 | |||||||||||||
| 85 | 2 | ▶ | sub records_key { return 'available_phone_numbers' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 86 | |||||||||||||
| 87 | 2 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 88 | 2 | my ($self, $payload) = @_; | |||||||||||
| 89 | return Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::LocalInstance->new( | ||||||||||||
| 90 | $self->{version}, $payload, | ||||||||||||
| 91 | $self->{solution}{account_sid}, | ||||||||||||
| 92 | $self->{solution}{country_code} | ||||||||||||
| 93 | 2 | ); | |||||||||||
| 94 | } | ||||||||||||
| 95 | |||||||||||||
| 96 | package Twilio::Rest::Api::V2010::Account::AvailablePhoneNumberCountry::LocalInstance; | ||||||||||||
| 97 | |||||||||||||
| 98 | 3 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 99 | |||||||||||||
| 100 | 3 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 101 | |||||||||||||
| 102 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 103 | 2 | my ($class, $version, $payload, $account_sid, $country_code) = @_; | |||||||||||
| 104 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 105 | 2 | $self->{solution} = { account_sid => $account_sid, country_code => $country_code }; | |||||||||||
| 106 | 2 | return $self; | |||||||||||
| 107 | } | ||||||||||||
| 108 | |||||||||||||
| 109 | 1 | ▶ | sub address_requirements { return $_[0]{properties}{address_requirements} } | ||||||||||
|
Subroutine
address_requirements: called CC=1 SCAR=0.0
| |||||||||||||
| 110 | 1 | ▶ | sub beta { return $_[0]{properties}{beta} } | ||||||||||
|
Subroutine
beta: called CC=1 SCAR=0.0
| |||||||||||||
| 111 | |||||||||||||
| 112 | 2 | ▶ | sub capabilities { | ||||||||||
|
Subroutine
capabilities: called CC=1 SCAR=0.0
| |||||||||||||
| 113 | 2 | return Twilio::Deserialize::phone_number_capabilities($_[0]{properties}{capabilities}); | |||||||||||
| 114 | } | ||||||||||||
| 115 | 1 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 116 | 1 | ▶ | sub iso_country { return $_[0]{properties}{iso_country} } | ||||||||||
|
Subroutine
iso_country: called CC=1 SCAR=0.0
| |||||||||||||
| 117 | 1 | ▶ | sub lata { return $_[0]{properties}{lata} } | ||||||||||
|
Subroutine
lata: called CC=1 SCAR=0.0
| |||||||||||||
| 118 | 1 | ▶ | sub latitude { return $_[0]{properties}{latitude} } | ||||||||||
|
Subroutine
latitude: called CC=1 SCAR=0.0
| |||||||||||||
| 119 | 1 | ▶ | sub locality { return $_[0]{properties}{locality} } | ||||||||||
|
Subroutine
locality: called CC=1 SCAR=0.0
| |||||||||||||
| 120 | 1 | ▶ | sub longitude { return $_[0]{properties}{longitude} } | ||||||||||
|
Subroutine
longitude: called CC=1 SCAR=0.0
| |||||||||||||
| 121 | 1 | ▶ | sub phone_number { return $_[0]{properties}{phone_number} } | ||||||||||
|
Subroutine
phone_number: called CC=1 SCAR=0.0
| |||||||||||||
| 122 | 1 | ▶ | sub postal_code { return $_[0]{properties}{postal_code} } | ||||||||||
|
Subroutine
postal_code: called CC=1 SCAR=0.0
| |||||||||||||
| 123 | 1 | ▶ | sub rate_center { return $_[0]{properties}{rate_center} } | ||||||||||
|
Subroutine
rate_center: called CC=1 SCAR=0.0
| |||||||||||||
| 124 | 1 | ▶ | sub region { return $_[0]{properties}{region} } | ||||||||||
|
Subroutine
region: called CC=1 SCAR=0.0
| |||||||||||||
| 125 | |||||||||||||
| 126 | 3 | 1; | |||||||||||
| 127 | |||||||||||||
| 128 | __END__ | ||||||||||||