« Twilio/Rest/Pricing/V1/Voice/Number.pm
↑ Summary
Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatistics.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Lookups::V2::PhoneNumber; | ||||||||||||||||||||
| 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::Lookups::V2::PhoneNumberList; | ||||||||||||||||||||
| 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 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 1 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 1 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 1 | $self->{uri} = '/PhoneNumbers'; | |||||||||||||||||||
| 20 | 1 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $phone_number) = @_; | |||||||||||||||||||
| 25 | 1 | return Twilio::Rest::Lookups::V2::PhoneNumberContext->new($self->{version}, $phone_number); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | package Twilio::Rest::Lookups::V2::PhoneNumberContext; | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 35 | 1 | my ($class, $version, $phone_number) = @_; | |||||||||||||||||||
| 36 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 37 | 1 | $self->{solution} = { phone_number => $phone_number }; | |||||||||||||||||||
| 38 | 1 | $self->{uri} = join q{}, '/PhoneNumbers/', Twilio::Serialize::path_segment($phone_number); | |||||||||||||||||||
| 39 | 1 | return $self; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 43 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 44 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 47 | 'GET', | ||||||||||||||||||||
| 48 | $self->{uri}, | ||||||||||||||||||||
| 49 | 'fetch', | ||||||||||||||||||||
| 50 | { | ||||||||||||||||||||
| 51 | params => { | ||||||||||||||||||||
| 52 | AddressCountryCode => $options->{address_country_code}, | ||||||||||||||||||||
| 53 | AddressLine1 => $options->{address_line1}, | ||||||||||||||||||||
| 54 | AddressLine2 => $options->{address_line2}, | ||||||||||||||||||||
| 55 | City => $options->{city}, | ||||||||||||||||||||
| 56 | CountryCode => $options->{country_code}, | ||||||||||||||||||||
| 57 | DateOfBirth => $options->{date_of_birth}, | ||||||||||||||||||||
| 58 | Fields => $options->{fields}, | ||||||||||||||||||||
| 59 | FirstName => $options->{first_name}, | ||||||||||||||||||||
| 60 | LastName => $options->{last_name}, | ||||||||||||||||||||
| 61 | LastVerifiedDate => $options->{last_verified_date}, | ||||||||||||||||||||
| 62 | NationalId => $options->{national_id}, | ||||||||||||||||||||
| 63 | PartnerSubId => $options->{partner_sub_id}, | ||||||||||||||||||||
| 64 | PostalCode => $options->{postal_code}, | ||||||||||||||||||||
| 65 | State => $options->{state}, | ||||||||||||||||||||
| 66 | VerificationSid => $options->{verification_sid}, | ||||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | } | ||||||||||||||||||||
| 69 | 1 | ); | |||||||||||||||||||
| 70 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 71 | } | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 74 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 75 | return Twilio::Rest::Lookups::V2::PhoneNumberInstance->new($self->{version}, | ||||||||||||||||||||
| 76 | 1 | $response->get_content, $self->{solution}{phone_number}); | |||||||||||||||||||
| 77 | } | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | package Twilio::Rest::Lookups::V2::PhoneNumberInstance; | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
| |||||||||||||||||||||
| 86 | 1 | my ($class, $version, $payload, $phone_number) = @_; | |||||||||||||||||||
| 87 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 88 | 1 | ▶ | $self->{solution} = { phone_number => $phone_number // $self->{properties}{phone_number} }; | ||||||||||||||||||
|
Condition33%1/3
$phone_number // $self->{"properties"}{"phone_number"}
MC/DC0%0/2
$phone_number // $self->{"properties"}{"phone_number"}
$phone_number
$self->{"properties"}{"phone_number"}
Truth table33%1/3
A // B
A= $phone_numberB= $self->{"properties"}{"phone_number"}
| |||||||||||||||||||||
| 89 | 1 | return $self; | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 93 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 94 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 95 | } | ||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 98 | 0 | my ($self) = @_; | |||||||||||||||||||
| 99 | return Twilio::Rest::Lookups::V2::PhoneNumberContext->new($self->{version}, | ||||||||||||||||||||
| 100 | 0 | $self->{solution}{phone_number}); | |||||||||||||||||||
| 101 | } | ||||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | 1 | ▶ | sub call_forwarding { return $_[0]{properties}{call_forwarding} } | ||||||||||||||||||
|
Subroutine
call_forwarding: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 104 | 1 | ▶ | sub caller_name { return $_[0]{properties}{caller_name} } | ||||||||||||||||||
|
Subroutine
caller_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | ▶ | sub calling_country_code { return $_[0]{properties}{calling_country_code} } | ||||||||||||||||||
|
Subroutine
calling_country_code: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 106 | 1 | ▶ | sub country_code { return $_[0]{properties}{country_code} } | ||||||||||||||||||
|
Subroutine
country_code: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | 1 | ▶ | sub identity_match { return $_[0]{properties}{identity_match} } | ||||||||||||||||||
|
Subroutine
identity_match: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | 1 | ▶ | sub line_status { return $_[0]{properties}{line_status} } | ||||||||||||||||||
|
Subroutine
line_status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | 1 | ▶ | sub line_type_intelligence { return $_[0]{properties}{line_type_intelligence} } | ||||||||||||||||||
|
Subroutine
line_type_intelligence: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 1 | ▶ | sub national_format { return $_[0]{properties}{national_format} } | ||||||||||||||||||
|
Subroutine
national_format: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 1 | ▶ | sub phone_number { return $_[0]{properties}{phone_number} } | ||||||||||||||||||
|
Subroutine
phone_number: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 1 | ▶ | sub phone_number_quality_score { return $_[0]{properties}{phone_number_quality_score} } | ||||||||||||||||||
|
Subroutine
phone_number_quality_score: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | 1 | ▶ | sub pre_fill { return $_[0]{properties}{pre_fill} } | ||||||||||||||||||
|
Subroutine
pre_fill: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | 1 | ▶ | sub reassigned_number { return $_[0]{properties}{reassigned_number} } | ||||||||||||||||||
|
Subroutine
reassigned_number: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | 1 | ▶ | sub sim_swap { return $_[0]{properties}{sim_swap} } | ||||||||||||||||||
|
Subroutine
sim_swap: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 116 | 1 | ▶ | sub sms_pumping_risk { return $_[0]{properties}{sms_pumping_risk} } | ||||||||||||||||||
|
Subroutine
sms_pumping_risk: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 117 | 1 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 118 | 1 | ▶ | sub valid { return $_[0]{properties}{valid} } | ||||||||||||||||||
|
Subroutine
valid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 119 | 1 | ▶ | sub validation_errors { return $_[0]{properties}{validation_errors} } | ||||||||||||||||||
|
Subroutine
validation_errors: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | 2 | 1; | |||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | __END__ | ||||||||||||||||||||