| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrder; | ||||||||||||
| 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::AuthorizationDocument::DependentHostedNumberOrderList; | ||||||||||||
| 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, $signing_document_sid) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 1 | $self->{solution} = { signing_document_sid => $signing_document_sid }; | |||||||||||
| 19 | 1 | $self->{uri} = join q{}, '/HostedNumber/AuthorizationDocuments/', | |||||||||||
| 20 | Twilio::Serialize::path_segment($signing_document_sid), '/DependentHostedNumberOrders'; | ||||||||||||
| 21 | 1 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 25 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 26 | 0 | 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 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 35 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 36 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 37 | |||||||||||||
| 38 | my $params = { | ||||||||||||
| 39 | FriendlyName => $options->{friendly_name}, | ||||||||||||
| 40 | IncomingPhoneNumberSid => $options->{incoming_phone_number_sid}, | ||||||||||||
| 41 | PhoneNumber => $options->{phone_number}, | ||||||||||||
| 42 | Status => $options->{status}, | ||||||||||||
| 43 | 1 | PageToken => $page_token, | |||||||||||
| 44 | Page => $page_number, | ||||||||||||
| 45 | PageSize => $page_size, | ||||||||||||
| 46 | }; | ||||||||||||
| 47 | |||||||||||||
| 48 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 49 | 1 | return $self->_build_page($response); | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 53 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 54 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 55 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 56 | } | ||||||||||||
| 57 | |||||||||||||
| 58 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 59 | 1 | my ($self, $response) = @_; | |||||||||||
| 60 | return Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrderPage->new( | ||||||||||||
| 61 | 1 | $self->{version}, $response, $self->{solution}); | |||||||||||
| 62 | } | ||||||||||||
| 63 | |||||||||||||
| 64 | package Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrderPage; | ||||||||||||
| 65 | |||||||||||||
| 66 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 67 | |||||||||||||
| 68 | 1 | ▶ | sub records_key { return 'items' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 69 | |||||||||||||
| 70 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | 1 | my ($self, $payload) = @_; | |||||||||||
| 72 | return Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrderInstance->new( | ||||||||||||
| 73 | 1 | $self->{version}, $payload, $self->{solution}{signing_document_sid}); | |||||||||||
| 74 | } | ||||||||||||
| 75 | |||||||||||||
| 76 | package Twilio::Rest::Numbers::V2::AuthorizationDocument::DependentHostedNumberOrderInstance; | ||||||||||||
| 77 | |||||||||||||
| 78 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 79 | |||||||||||||
| 80 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 81 | |||||||||||||
| 82 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 83 | 1 | my ($class, $version, $payload, $signing_document_sid) = @_; | |||||||||||
| 84 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 85 | 1 | $self->{solution} = { signing_document_sid => $signing_document_sid }; | |||||||||||
| 86 | 1 | return $self; | |||||||||||
| 87 | } | ||||||||||||
| 88 | |||||||||||||
| 89 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | 1 | ▶ | sub address_sid { return $_[0]{properties}{address_sid} } | ||||||||||
|
Subroutine
address_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 91 | 1 | ▶ | sub bulk_hosting_request_sid { return $_[0]{properties}{bulk_hosting_request_sid} } | ||||||||||
|
Subroutine
bulk_hosting_request_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 92 | |||||||||||||
| 93 | 1 | ▶ | sub capabilities { | ||||||||||
|
Subroutine
capabilities: called CC=1 SCAR=0.0
| |||||||||||||
| 94 | 1 | return Twilio::Deserialize::phone_number_capabilities($_[0]{properties}{capabilities}); | |||||||||||
| 95 | } | ||||||||||||
| 96 | 1 | ▶ | sub cc_emails { return $_[0]{properties}{cc_emails} } | ||||||||||
|
Subroutine
cc_emails: called CC=1 SCAR=0.0
| |||||||||||||
| 97 | 1 | ▶ | sub contact_phone_number { return $_[0]{properties}{contact_phone_number} } | ||||||||||
|
Subroutine
contact_phone_number: called CC=1 SCAR=0.0
| |||||||||||||
| 98 | 1 | ▶ | sub contact_title { return $_[0]{properties}{contact_title} } | ||||||||||
|
Subroutine
contact_title: called CC=1 SCAR=0.0
| |||||||||||||
| 99 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 100 | 1 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||
| 101 | 1 | ▶ | sub email { return $_[0]{properties}{email} } | ||||||||||
|
Subroutine
email: called CC=1 SCAR=0.0
| |||||||||||||
| 102 | 1 | ▶ | sub failure_reason { return $_[0]{properties}{failure_reason} } | ||||||||||
|
Subroutine
failure_reason: called CC=1 SCAR=0.0
| |||||||||||||
| 103 | 1 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 104 | 1 | ▶ | sub incoming_phone_number_sid { return $_[0]{properties}{incoming_phone_number_sid} } | ||||||||||
|
Subroutine
incoming_phone_number_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 105 | 1 | ▶ | sub next_step { return $_[0]{properties}{next_step} } | ||||||||||
|
Subroutine
next_step: called CC=1 SCAR=0.0
| |||||||||||||
| 106 | 1 | ▶ | sub phone_number { return $_[0]{properties}{phone_number} } | ||||||||||
|
Subroutine
phone_number: called CC=1 SCAR=0.0
| |||||||||||||
| 107 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 108 | 1 | ▶ | sub signing_document_sid { return $_[0]{properties}{signing_document_sid} } | ||||||||||
|
Subroutine
signing_document_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 109 | 1 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||
| 110 | |||||||||||||
| 111 | 2 | 1; | |||||||||||
| 112 | |||||||||||||
| 113 | __END__ | ||||||||||||