« Twilio/Rest/Conversations/V1/Conversation/Message/DeliveryReceipt.pm
↑ Summary
Twilio/Rest/Memory/V1/DataMapping.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Verify::V2::VerificationAttempt; | ||||||||||||||||||||
| 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::Verify::V2::VerificationAttemptList; | ||||||||||||||||||||
| 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) = @_; | |||||||||||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 2 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 2 | $self->{uri} = '/Attempts'; | |||||||||||||||||||
| 20 | 2 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 24 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 25 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 29 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 30 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 34 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 35 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | my $params = { | ||||||||||||||||||||
| 38 | Channel => $options->{channel}, | ||||||||||||||||||||
| 39 | 'ChannelData.To' => $options->{channel_data_to}, | ||||||||||||||||||||
| 40 | Country => $options->{country}, | ||||||||||||||||||||
| 41 | DateCreatedAfter => Twilio::Serialize::iso8601_date_time($options->{date_created_after}), | ||||||||||||||||||||
| 42 | DateCreatedBefore => Twilio::Serialize::iso8601_date_time($options->{date_created_before}), | ||||||||||||||||||||
| 43 | Status => $options->{status}, | ||||||||||||||||||||
| 44 | VerificationSid => $options->{verification_sid}, | ||||||||||||||||||||
| 45 | VerifyServiceSid => $options->{verify_service_sid}, | ||||||||||||||||||||
| 46 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 47 | Page => $page_number, | ||||||||||||||||||||
| 48 | PageSize => $page_size, | ||||||||||||||||||||
| 49 | }; | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 52 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 56 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 57 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 58 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 62 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 63 | return Twilio::Rest::Verify::V2::VerificationAttemptPage->new($self->{version}, $response, | ||||||||||||||||||||
| 64 | 1 | $self->{solution}); | |||||||||||||||||||
| 65 | } | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 68 | 1 | my ($self, $sid) = @_; | |||||||||||||||||||
| 69 | 1 | return Twilio::Rest::Verify::V2::VerificationAttemptContext->new($self->{version}, $sid); | |||||||||||||||||||
| 70 | } | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | package Twilio::Rest::Verify::V2::VerificationAttemptPage; | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 1 | ▶ | sub records_key { return 'attempts' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 79 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 80 | 1 | return Twilio::Rest::Verify::V2::VerificationAttemptInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 81 | } | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | package Twilio::Rest::Verify::V2::VerificationAttemptContext; | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 90 | 1 | my ($class, $version, $sid) = @_; | |||||||||||||||||||
| 91 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 92 | 1 | $self->{solution} = { sid => $sid }; | |||||||||||||||||||
| 93 | 1 | $self->{uri} = join q{}, '/Attempts/', Twilio::Serialize::path_segment($sid); | |||||||||||||||||||
| 94 | 1 | return $self; | |||||||||||||||||||
| 95 | } | ||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 98 | 1 | my ($self) = @_; | |||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 101 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 106 | return Twilio::Rest::Verify::V2::VerificationAttemptInstance->new($self->{version}, | ||||||||||||||||||||
| 107 | 1 | $response->get_content, $self->{solution}{sid}); | |||||||||||||||||||
| 108 | } | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | package Twilio::Rest::Verify::V2::VerificationAttemptInstance; | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 117 | 2 | my ($class, $version, $payload, $sid) = @_; | |||||||||||||||||||
| 118 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 119 | 2 | ▶ | $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"}
| |||||||||||||||||||||
| 120 | 2 | return $self; | |||||||||||||||||||
| 121 | } | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 124 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 125 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 126 | } | ||||||||||||||||||||
| 127 | |||||||||||||||||||||
| 128 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 129 | 0 | my ($self) = @_; | |||||||||||||||||||
| 130 | return Twilio::Rest::Verify::V2::VerificationAttemptContext->new($self->{version}, | ||||||||||||||||||||
| 131 | 0 | $self->{solution}{sid}); | |||||||||||||||||||
| 132 | } | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 135 | 2 | ▶ | sub channel { return $_[0]{properties}{channel} } | ||||||||||||||||||
|
Subroutine
channel: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 136 | 2 | ▶ | sub channel_data { return $_[0]{properties}{channel_data} } | ||||||||||||||||||
|
Subroutine
channel_data: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 137 | 2 | ▶ | sub conversion_status { return $_[0]{properties}{conversion_status} } | ||||||||||||||||||
|
Subroutine
conversion_status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 138 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 139 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 140 | 2 | ▶ | sub price { return $_[0]{properties}{price} } | ||||||||||||||||||
|
Subroutine
price: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 141 | 2 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } | ||||||||||||||||||
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 142 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 143 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 144 | 2 | ▶ | sub verification_sid { return $_[0]{properties}{verification_sid} } | ||||||||||||||||||
|
Subroutine
verification_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | 2 | 1; | |||||||||||||||||||
| 147 | |||||||||||||||||||||
| 148 | __END__ | ||||||||||||||||||||