« Twilio/Rest/IpMessaging/V1/Service/User.pm
↑ Summary
Twilio/Rest/Serverless/V1/Service/Environment/Variable.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Numbers::V2::AuthorizationDocument; | ||||||||||||||||||||
| 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::AuthorizationDocumentList; | ||||||||||||||||||||
| 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/AuthorizationDocuments'; | |||||||||||||||||||
| 20 | 5 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $address_sid, $email, $contact_phone_number, $hosted_number_order_sids, $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 | AddressSid => $address_sid, | ||||||||||||||||||||
| 29 | Email => $email, | ||||||||||||||||||||
| 30 | ContactPhoneNumber => $contact_phone_number, | ||||||||||||||||||||
| 31 | HostedNumberOrderSids => $hosted_number_order_sids, | ||||||||||||||||||||
| 32 | CcEmails => $options->{cc_emails}, | ||||||||||||||||||||
| 33 | ContactTitle => $options->{contact_title}, | ||||||||||||||||||||
| 34 | 1 | }; | |||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | my $response = | ||||||||||||||||||||
| 37 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 38 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentInstance->new($self->{version}, | ||||||||||||||||||||
| 39 | 1 | $response->get_content); | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 43 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 44 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 48 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 49 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 53 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 54 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | my $params = { | ||||||||||||||||||||
| 57 | Email => $options->{email}, | ||||||||||||||||||||
| 58 | Status => $options->{status}, | ||||||||||||||||||||
| 59 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 60 | Page => $page_number, | ||||||||||||||||||||
| 61 | PageSize => $page_size, | ||||||||||||||||||||
| 62 | }; | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 65 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 69 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 70 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 71 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 72 | } | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 75 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 76 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentPage->new($self->{version}, $response, | ||||||||||||||||||||
| 77 | 1 | $self->{solution}); | |||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 3 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | 3 | my ($self, $sid) = @_; | |||||||||||||||||||
| 82 | 3 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentContext->new($self->{version}, $sid); | |||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | package Twilio::Rest::Numbers::V2::AuthorizationDocumentPage; | ||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 1 | ▶ | sub records_key { return 'items' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 92 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 93 | 1 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 94 | } | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | package Twilio::Rest::Numbers::V2::AuthorizationDocumentContext; | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | 3 | my ($class, $version, $sid) = @_; | |||||||||||||||||||
| 104 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 105 | 3 | $self->{solution} = { sid => $sid }; | |||||||||||||||||||
| 106 | 3 | $self->{uri} = join q{}, '/HostedNumber/AuthorizationDocuments/', | |||||||||||||||||||
| 107 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 108 | 3 | return $self; | |||||||||||||||||||
| 109 | } | ||||||||||||||||||||
| 110 | |||||||||||||||||||||
| 111 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 1 | my ($self) = @_; | |||||||||||||||||||
| 113 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 114 | 1 | return 1; | |||||||||||||||||||
| 115 | } | ||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 118 | 1 | my ($self) = @_; | |||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 121 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 122 | } | ||||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 125 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 126 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentInstance->new($self->{version}, | ||||||||||||||||||||
| 127 | 1 | $response->get_content, $self->{solution}{sid}); | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 1 | ▶ | sub dependent_hosted_number_orders { | ||||||||||||||||||
|
Subroutine
dependent_hosted_number_orders: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 131 | 1 | my ($self) = @_; | |||||||||||||||||||
| 132 | 1 | require Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrder; | |||||||||||||||||||
| 133 | return Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrderList->new( | ||||||||||||||||||||
| 134 | 1 | $self->{version}, $self->{solution}{sid}); | |||||||||||||||||||
| 135 | } | ||||||||||||||||||||
| 136 | |||||||||||||||||||||
| 137 | package Twilio::Rest::Numbers::V2::AuthorizationDocumentInstance; | ||||||||||||||||||||
| 138 | |||||||||||||||||||||
| 139 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 140 | |||||||||||||||||||||
| 141 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 144 | 3 | my ($class, $version, $payload, $sid) = @_; | |||||||||||||||||||
| 145 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 146 | 3 | ▶ | $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"}
| |||||||||||||||||||||
| 147 | 3 | return $self; | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 151 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 152 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 153 | } | ||||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 156 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 157 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 158 | } | ||||||||||||||||||||
| 159 | |||||||||||||||||||||
| 160 | 0 | ▶ | sub dependent_hosted_number_orders { | ||||||||||||||||||
|
Subroutine
dependent_hosted_number_orders: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 161 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 162 | 0 | return $self->_context->dependent_hosted_number_orders(@arguments); | |||||||||||||||||||
| 163 | } | ||||||||||||||||||||
| 164 | |||||||||||||||||||||
| 165 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 166 | 0 | my ($self) = @_; | |||||||||||||||||||
| 167 | return Twilio::Rest::Numbers::V2::AuthorizationDocumentContext->new($self->{version}, | ||||||||||||||||||||
| 168 | 0 | $self->{solution}{sid}); | |||||||||||||||||||
| 169 | } | ||||||||||||||||||||
| 170 | |||||||||||||||||||||
| 171 | 3 | ▶ | sub address_sid { return $_[0]{properties}{address_sid} } | ||||||||||||||||||
|
Subroutine
address_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 172 | 3 | ▶ | sub cc_emails { return $_[0]{properties}{cc_emails} } | ||||||||||||||||||
|
Subroutine
cc_emails: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 173 | 3 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 174 | 3 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 175 | 3 | ▶ | sub email { return $_[0]{properties}{email} } | ||||||||||||||||||
|
Subroutine
email: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 176 | 3 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 177 | 3 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 178 | 3 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 179 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 180 | |||||||||||||||||||||
| 181 | 2 | 1; | |||||||||||||||||||
| 182 | |||||||||||||||||||||
| 183 | __END__ | ||||||||||||||||||||