« Twilio/Rest/Numbers/V1/PortingPortIn.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFree.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::Mobile; | ||||||||||||
| 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::IncomingPhoneNumber::MobileList; | ||||||||||||
| 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 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 2 | my ($class, $version, $account_sid) = @_; | |||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 2 | $self->{solution} = { account_sid => $account_sid }; | |||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||
| 20 | '/IncomingPhoneNumbers/Mobile.json'; | ||||||||||||
| 21 | 2 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 25 | 1 | my ($self, $phone_number, $options) = @_; | |||||||||||
| 26 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 27 | |||||||||||||
| 28 | my $data = { | ||||||||||||
| 29 | PhoneNumber => $phone_number, | ||||||||||||
| 30 | AddressSid => $options->{address_sid}, | ||||||||||||
| 31 | ApiVersion => $options->{api_version}, | ||||||||||||
| 32 | BundleSid => $options->{bundle_sid}, | ||||||||||||
| 33 | EmergencyAddressSid => $options->{emergency_address_sid}, | ||||||||||||
| 34 | EmergencyStatus => $options->{emergency_status}, | ||||||||||||
| 35 | FriendlyName => $options->{friendly_name}, | ||||||||||||
| 36 | IdentitySid => $options->{identity_sid}, | ||||||||||||
| 37 | SmsApplicationSid => $options->{sms_application_sid}, | ||||||||||||
| 38 | SmsFallbackMethod => $options->{sms_fallback_method}, | ||||||||||||
| 39 | SmsFallbackUrl => $options->{sms_fallback_url}, | ||||||||||||
| 40 | SmsMethod => $options->{sms_method}, | ||||||||||||
| 41 | SmsUrl => $options->{sms_url}, | ||||||||||||
| 42 | StatusCallback => $options->{status_callback}, | ||||||||||||
| 43 | StatusCallbackMethod => $options->{status_callback_method}, | ||||||||||||
| 44 | TrunkSid => $options->{trunk_sid}, | ||||||||||||
| 45 | VoiceApplicationSid => $options->{voice_application_sid}, | ||||||||||||
| 46 | VoiceCallerIdLookup => Twilio::Serialize::boolean_to_string($options->{voice_caller_id_lookup}), | ||||||||||||
| 47 | VoiceFallbackMethod => $options->{voice_fallback_method}, | ||||||||||||
| 48 | VoiceFallbackUrl => $options->{voice_fallback_url}, | ||||||||||||
| 49 | VoiceMethod => $options->{voice_method}, | ||||||||||||
| 50 | VoiceReceiveMode => $options->{voice_receive_mode}, | ||||||||||||
| 51 | VoiceUrl => $options->{voice_url}, | ||||||||||||
| 52 | 1 | }; | |||||||||||
| 53 | |||||||||||||
| 54 | my $response = | ||||||||||||
| 55 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 56 | return Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::MobileInstance->new( | ||||||||||||
| 57 | 1 | $self->{version}, $response->get_content, $self->{solution}{account_sid}); | |||||||||||
| 58 | } | ||||||||||||
| 59 | |||||||||||||
| 60 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 61 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 62 | 0 | return $self->read_records(@arguments); | |||||||||||
| 63 | } | ||||||||||||
| 64 | |||||||||||||
| 65 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 66 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 67 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 68 | } | ||||||||||||
| 69 | |||||||||||||
| 70 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 71 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 72 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 73 | |||||||||||||
| 74 | my $params = { | ||||||||||||
| 75 | Beta => Twilio::Serialize::boolean_to_string($options->{beta}), | ||||||||||||
| 76 | FriendlyName => $options->{friendly_name}, | ||||||||||||
| 77 | Origin => $options->{origin}, | ||||||||||||
| 78 | PhoneNumber => $options->{phone_number}, | ||||||||||||
| 79 | 1 | PageToken => $page_token, | |||||||||||
| 80 | Page => $page_number, | ||||||||||||
| 81 | PageSize => $page_size, | ||||||||||||
| 82 | }; | ||||||||||||
| 83 | |||||||||||||
| 84 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 85 | 1 | return $self->_build_page($response); | |||||||||||
| 86 | } | ||||||||||||
| 87 | |||||||||||||
| 88 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 89 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 90 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 91 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 92 | } | ||||||||||||
| 93 | |||||||||||||
| 94 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 95 | 1 | my ($self, $response) = @_; | |||||||||||
| 96 | return Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::MobilePage->new($self->{version}, | ||||||||||||
| 97 | 1 | $response, $self->{solution}); | |||||||||||
| 98 | } | ||||||||||||
| 99 | |||||||||||||
| 100 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::MobilePage; | ||||||||||||
| 101 | |||||||||||||
| 102 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 103 | |||||||||||||
| 104 | 1 | ▶ | sub records_key { return 'incoming_phone_numbers' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 105 | |||||||||||||
| 106 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 107 | 1 | my ($self, $payload) = @_; | |||||||||||
| 108 | return Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::MobileInstance->new( | ||||||||||||
| 109 | 1 | $self->{version}, $payload, $self->{solution}{account_sid}); | |||||||||||
| 110 | } | ||||||||||||
| 111 | |||||||||||||
| 112 | package Twilio::Rest::Api::V2010::Account::IncomingPhoneNumber::MobileInstance; | ||||||||||||
| 113 | |||||||||||||
| 114 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 115 | |||||||||||||
| 116 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 117 | |||||||||||||
| 118 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 119 | 2 | my ($class, $version, $payload, $account_sid) = @_; | |||||||||||
| 120 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 121 | 2 | $self->{solution} = { account_sid => $account_sid }; | |||||||||||
| 122 | 2 | return $self; | |||||||||||
| 123 | } | ||||||||||||
| 124 | |||||||||||||
| 125 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 126 | 2 | ▶ | sub address_requirements { return $_[0]{properties}{address_requirements} } | ||||||||||
|
Subroutine
address_requirements: called CC=1 SCAR=0.0
| |||||||||||||
| 127 | 2 | ▶ | sub address_sid { return $_[0]{properties}{address_sid} } | ||||||||||
|
Subroutine
address_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 128 | 2 | ▶ | sub api_version { return $_[0]{properties}{api_version} } | ||||||||||
|
Subroutine
api_version: called CC=1 SCAR=0.0
| |||||||||||||
| 129 | 2 | ▶ | sub beta { return $_[0]{properties}{beta} } | ||||||||||
|
Subroutine
beta: called CC=1 SCAR=0.0
| |||||||||||||
| 130 | 2 | ▶ | sub bundle_sid { return $_[0]{properties}{bundle_sid} } | ||||||||||
|
Subroutine
bundle_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 131 | |||||||||||||
| 132 | 2 | ▶ | sub capabilities { | ||||||||||
|
Subroutine
capabilities: called CC=1 SCAR=0.0
| |||||||||||||
| 133 | 2 | return Twilio::Deserialize::phone_number_capabilities($_[0]{properties}{capabilities}); | |||||||||||
| 134 | } | ||||||||||||
| 135 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 136 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||
| 137 | 2 | ▶ | sub emergency_address_sid { return $_[0]{properties}{emergency_address_sid} } | ||||||||||
|
Subroutine
emergency_address_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 138 | 2 | ▶ | sub emergency_address_status { return $_[0]{properties}{emergency_address_status} } | ||||||||||
|
Subroutine
emergency_address_status: called CC=1 SCAR=0.0
| |||||||||||||
| 139 | 2 | ▶ | sub emergency_status { return $_[0]{properties}{emergency_status} } | ||||||||||
|
Subroutine
emergency_status: called CC=1 SCAR=0.0
| |||||||||||||
| 140 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 141 | 2 | ▶ | sub identity_sid { return $_[0]{properties}{identity_sid} } | ||||||||||
|
Subroutine
identity_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 142 | 2 | ▶ | sub origin { return $_[0]{properties}{origin} } | ||||||||||
|
Subroutine
origin: called CC=1 SCAR=0.0
| |||||||||||||
| 143 | 2 | ▶ | sub phone_number { return $_[0]{properties}{phone_number} } | ||||||||||
|
Subroutine
phone_number: called CC=1 SCAR=0.0
| |||||||||||||
| 144 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 145 | 2 | ▶ | sub sms_application_sid { return $_[0]{properties}{sms_application_sid} } | ||||||||||
|
Subroutine
sms_application_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 146 | 2 | ▶ | sub sms_fallback_method { return $_[0]{properties}{sms_fallback_method} } | ||||||||||
|
Subroutine
sms_fallback_method: called CC=1 SCAR=0.0
| |||||||||||||
| 147 | 2 | ▶ | sub sms_fallback_url { return $_[0]{properties}{sms_fallback_url} } | ||||||||||
|
Subroutine
sms_fallback_url: called CC=1 SCAR=0.0
| |||||||||||||
| 148 | 2 | ▶ | sub sms_method { return $_[0]{properties}{sms_method} } | ||||||||||
|
Subroutine
sms_method: called CC=1 SCAR=0.0
| |||||||||||||
| 149 | 2 | ▶ | sub sms_url { return $_[0]{properties}{sms_url} } | ||||||||||
|
Subroutine
sms_url: called CC=1 SCAR=0.0
| |||||||||||||
| 150 | 2 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||
| 151 | 2 | ▶ | sub status_callback { return $_[0]{properties}{status_callback} } | ||||||||||
|
Subroutine
status_callback: called CC=1 SCAR=0.0
| |||||||||||||
| 152 | 2 | ▶ | sub status_callback_method { return $_[0]{properties}{status_callback_method} } | ||||||||||
|
Subroutine
status_callback_method: called CC=1 SCAR=0.0
| |||||||||||||
| 153 | 2 | ▶ | sub trunk_sid { return $_[0]{properties}{trunk_sid} } | ||||||||||
|
Subroutine
trunk_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 154 | 2 | ▶ | sub uri { return $_[0]{properties}{uri} } | ||||||||||
|
Subroutine
uri: called CC=1 SCAR=0.0
| |||||||||||||
| 155 | 2 | ▶ | sub voice_application_sid { return $_[0]{properties}{voice_application_sid} } | ||||||||||
|
Subroutine
voice_application_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 156 | 2 | ▶ | sub voice_caller_id_lookup { return $_[0]{properties}{voice_caller_id_lookup} } | ||||||||||
|
Subroutine
voice_caller_id_lookup: called CC=1 SCAR=0.0
| |||||||||||||
| 157 | 2 | ▶ | sub voice_fallback_method { return $_[0]{properties}{voice_fallback_method} } | ||||||||||
|
Subroutine
voice_fallback_method: called CC=1 SCAR=0.0
| |||||||||||||
| 158 | 2 | ▶ | sub voice_fallback_url { return $_[0]{properties}{voice_fallback_url} } | ||||||||||
|
Subroutine
voice_fallback_url: called CC=1 SCAR=0.0
| |||||||||||||
| 159 | 2 | ▶ | sub voice_method { return $_[0]{properties}{voice_method} } | ||||||||||
|
Subroutine
voice_method: called CC=1 SCAR=0.0
| |||||||||||||
| 160 | 2 | ▶ | sub voice_receive_mode { return $_[0]{properties}{voice_receive_mode} } | ||||||||||
|
Subroutine
voice_receive_mode: called CC=1 SCAR=0.0
| |||||||||||||
| 161 | 2 | ▶ | sub voice_url { return $_[0]{properties}{voice_url} } | ||||||||||
|
Subroutine
voice_url: called CC=1 SCAR=0.0
| |||||||||||||
| 162 | |||||||||||||
| 163 | 2 | 1; | |||||||||||
| 164 | |||||||||||||
| 165 | __END__ | ||||||||||||