« Twilio/Rest/Video/V1/Room/Participant/PublishedTrack.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Message/Media.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Numbers::V2::HostedNumberOrder; | ||||||||||||||||||||
| 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::Numbers::V2::HostedNumberOrderList; | ||||||||||||||||||||
| 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 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 5 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 5 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 5 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 5 | $self->{uri} = '/HostedNumber/Orders'; | |||||||||||||||||||
| 20 | 5 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $phone_number, $contact_phone_number, $address_sid, $email, $options) = @_; | |||||||||||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | my $data = { | ||||||||||||||||||||
| 28 | PhoneNumber => $phone_number, | ||||||||||||||||||||
| 29 | ContactPhoneNumber => $contact_phone_number, | ||||||||||||||||||||
| 30 | AddressSid => $address_sid, | ||||||||||||||||||||
| 31 | Email => $email, | ||||||||||||||||||||
| 32 | AccountSid => $options->{account_sid}, | ||||||||||||||||||||
| 33 | CcEmails => $options->{cc_emails}, | ||||||||||||||||||||
| 34 | ContactTitle => $options->{contact_title}, | ||||||||||||||||||||
| 35 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 36 | SmsApplicationSid => $options->{sms_application_sid}, | ||||||||||||||||||||
| 37 | SmsCapability => Twilio::Serialize::boolean_to_string($options->{sms_capability}), | ||||||||||||||||||||
| 38 | SmsFallbackMethod => $options->{sms_fallback_method}, | ||||||||||||||||||||
| 39 | SmsFallbackUrl => $options->{sms_fallback_url}, | ||||||||||||||||||||
| 40 | SmsMethod => $options->{sms_method}, | ||||||||||||||||||||
| 41 | SmsUrl => $options->{sms_url}, | ||||||||||||||||||||
| 42 | StatusCallbackMethod => $options->{status_callback_method}, | ||||||||||||||||||||
| 43 | StatusCallbackUrl => $options->{status_callback_url}, | ||||||||||||||||||||
| 44 | 1 | }; | |||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | my $response = | ||||||||||||||||||||
| 47 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 48 | return Twilio::Rest::Numbers::V2::HostedNumberOrderInstance->new($self->{version}, | ||||||||||||||||||||
| 49 | 1 | $response->get_content); | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 53 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 54 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 58 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 59 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 63 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 64 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | my $params = { | ||||||||||||||||||||
| 67 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 68 | IncomingPhoneNumberSid => $options->{incoming_phone_number_sid}, | ||||||||||||||||||||
| 69 | PhoneNumber => $options->{phone_number}, | ||||||||||||||||||||
| 70 | SmsCapability => Twilio::Serialize::boolean_to_string($options->{sms_capability}), | ||||||||||||||||||||
| 71 | Status => $options->{status}, | ||||||||||||||||||||
| 72 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 73 | Page => $page_number, | ||||||||||||||||||||
| 74 | PageSize => $page_size, | ||||||||||||||||||||
| 75 | }; | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 78 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 79 | } | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 82 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 83 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 84 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 85 | } | ||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 88 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 89 | return Twilio::Rest::Numbers::V2::HostedNumberOrderPage->new($self->{version}, $response, | ||||||||||||||||||||
| 90 | 1 | $self->{solution}); | |||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 3 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 94 | 3 | my ($self, $sid) = @_; | |||||||||||||||||||
| 95 | 3 | return Twilio::Rest::Numbers::V2::HostedNumberOrderContext->new($self->{version}, $sid); | |||||||||||||||||||
| 96 | } | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | package Twilio::Rest::Numbers::V2::HostedNumberOrderPage; | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 1 | ▶ | sub records_key { return 'items' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 106 | 1 | return Twilio::Rest::Numbers::V2::HostedNumberOrderInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 107 | } | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | package Twilio::Rest::Numbers::V2::HostedNumberOrderContext; | ||||||||||||||||||||
| 110 | |||||||||||||||||||||
| 111 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | |||||||||||||||||||||
| 115 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 116 | 3 | my ($class, $version, $sid) = @_; | |||||||||||||||||||
| 117 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 118 | 3 | $self->{solution} = { sid => $sid }; | |||||||||||||||||||
| 119 | 3 | $self->{uri} = join q{}, '/HostedNumber/Orders/', Twilio::Serialize::path_segment($sid); | |||||||||||||||||||
| 120 | 3 | return $self; | |||||||||||||||||||
| 121 | } | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 124 | 1 | my ($self) = @_; | |||||||||||||||||||
| 125 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 126 | 1 | return 1; | |||||||||||||||||||
| 127 | } | ||||||||||||||||||||
| 128 | |||||||||||||||||||||
| 129 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 130 | 1 | my ($self) = @_; | |||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 133 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 134 | } | ||||||||||||||||||||
| 135 | |||||||||||||||||||||
| 136 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 137 | 1 | my ($self, $status, $options) = @_; | |||||||||||||||||||
| 138 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 139 | |||||||||||||||||||||
| 140 | my $data = { | ||||||||||||||||||||
| 141 | Status => $status, | ||||||||||||||||||||
| 142 | VerificationCallDelay => $options->{verification_call_delay}, | ||||||||||||||||||||
| 143 | VerificationCallExtension => $options->{verification_call_extension}, | ||||||||||||||||||||
| 144 | 1 | }; | |||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | my $response = | ||||||||||||||||||||
| 147 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 148 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 149 | } | ||||||||||||||||||||
| 150 | |||||||||||||||||||||
| 151 | 2 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | 2 | my ($self, $response) = @_; | |||||||||||||||||||
| 153 | return Twilio::Rest::Numbers::V2::HostedNumberOrderInstance->new($self->{version}, | ||||||||||||||||||||
| 154 | 2 | $response->get_content, $self->{solution}{sid}); | |||||||||||||||||||
| 155 | } | ||||||||||||||||||||
| 156 | |||||||||||||||||||||
| 157 | package Twilio::Rest::Numbers::V2::HostedNumberOrderInstance; | ||||||||||||||||||||
| 158 | |||||||||||||||||||||
| 159 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 160 | |||||||||||||||||||||
| 161 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 162 | |||||||||||||||||||||
| 163 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 164 | 4 | my ($class, $version, $payload, $sid) = @_; | |||||||||||||||||||
| 165 | 4 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 166 | 4 | ▶ | $self->{solution} = { sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
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"}
| |||||||||||||||||||||
| 167 | 4 | return $self; | |||||||||||||||||||
| 168 | } | ||||||||||||||||||||
| 169 | |||||||||||||||||||||
| 170 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 171 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 172 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 173 | } | ||||||||||||||||||||
| 174 | |||||||||||||||||||||
| 175 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 176 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 177 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 178 | } | ||||||||||||||||||||
| 179 | |||||||||||||||||||||
| 180 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 181 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 182 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 183 | } | ||||||||||||||||||||
| 184 | |||||||||||||||||||||
| 185 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 186 | 0 | my ($self) = @_; | |||||||||||||||||||
| 187 | return Twilio::Rest::Numbers::V2::HostedNumberOrderContext->new($self->{version}, | ||||||||||||||||||||
| 188 | 0 | $self->{solution}{sid}); | |||||||||||||||||||
| 189 | } | ||||||||||||||||||||
| 190 | |||||||||||||||||||||
| 191 | 4 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 192 | 4 | ▶ | sub address_sid { return $_[0]{properties}{address_sid} } | ||||||||||||||||||
|
Subroutine
address_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 193 | 4 | ▶ | sub bulk_hosting_request_sid { return $_[0]{properties}{bulk_hosting_request_sid} } | ||||||||||||||||||
|
Subroutine
bulk_hosting_request_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 194 | |||||||||||||||||||||
| 195 | 4 | ▶ | sub capabilities { | ||||||||||||||||||
|
Subroutine
capabilities: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 196 | 4 | return Twilio::Deserialize::phone_number_capabilities($_[0]{properties}{capabilities}); | |||||||||||||||||||
| 197 | } | ||||||||||||||||||||
| 198 | 4 | ▶ | sub cc_emails { return $_[0]{properties}{cc_emails} } | ||||||||||||||||||
|
Subroutine
cc_emails: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 199 | 4 | ▶ | sub contact_phone_number { return $_[0]{properties}{contact_phone_number} } | ||||||||||||||||||
|
Subroutine
contact_phone_number: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 200 | 4 | ▶ | sub contact_title { return $_[0]{properties}{contact_title} } | ||||||||||||||||||
|
Subroutine
contact_title: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 201 | 4 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 202 | 4 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 203 | 4 | ▶ | sub email { return $_[0]{properties}{email} } | ||||||||||||||||||
|
Subroutine
email: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 204 | 4 | ▶ | sub failure_reason { return $_[0]{properties}{failure_reason} } | ||||||||||||||||||
|
Subroutine
failure_reason: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 205 | 4 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 206 | 4 | ▶ | sub incoming_phone_number_sid { return $_[0]{properties}{incoming_phone_number_sid} } | ||||||||||||||||||
|
Subroutine
incoming_phone_number_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 207 | 4 | ▶ | sub next_step { return $_[0]{properties}{next_step} } | ||||||||||||||||||
|
Subroutine
next_step: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 208 | 4 | ▶ | sub phone_number { return $_[0]{properties}{phone_number} } | ||||||||||||||||||
|
Subroutine
phone_number: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 209 | 4 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 210 | 4 | ▶ | sub signing_document_sid { return $_[0]{properties}{signing_document_sid} } | ||||||||||||||||||
|
Subroutine
signing_document_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 211 | 4 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 212 | 4 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 213 | 4 | ▶ | sub verification_attempts { return $_[0]{properties}{verification_attempts} } | ||||||||||||||||||
|
Subroutine
verification_attempts: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 214 | 4 | ▶ | sub verification_call_delay { return $_[0]{properties}{verification_call_delay} } | ||||||||||||||||||
|
Subroutine
verification_call_delay: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 215 | 4 | ▶ | sub verification_call_extension { return $_[0]{properties}{verification_call_extension} } | ||||||||||||||||||
|
Subroutine
verification_call_extension: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 216 | 4 | ▶ | sub verification_call_sids { return $_[0]{properties}{verification_call_sids} } | ||||||||||||||||||
|
Subroutine
verification_call_sids: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 217 | 4 | ▶ | sub verification_code { return $_[0]{properties}{verification_code} } | ||||||||||||||||||
|
Subroutine
verification_code: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 218 | 4 | ▶ | sub verification_type { return $_[0]{properties}{verification_type} } | ||||||||||||||||||
|
Subroutine
verification_type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 219 | |||||||||||||||||||||
| 220 | 2 | 1; | |||||||||||||||||||
| 221 | |||||||||||||||||||||
| 222 | __END__ | ||||||||||||||||||||