« Twilio/Rest/Taskrouter/V1/Workspace/Event.pm
↑ Summary
Twilio/Rest/Insights/V1/Conference/ConferenceParticipant.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Memory::V1::Revision; | ||||||||||||
| 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::Memory::V1::RevisionList; | ||||||||||||
| 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, $store_id, $profile_id, $observation_id) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | $self->{solution} = | ||||||||||||
| 19 | 1 | { store_id => $store_id, profile_id => $profile_id, observation_id => $observation_id }; | |||||||||||
| 20 | 1 | $self->{uri} = join q{}, '/Stores/', Twilio::Serialize::path_segment($store_id), '/Profiles/', | |||||||||||
| 21 | Twilio::Serialize::path_segment($profile_id), '/Observations/', | ||||||||||||
| 22 | Twilio::Serialize::path_segment($observation_id), '/Revisions'; | ||||||||||||
| 23 | 1 | return $self; | |||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 27 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 28 | 0 | return $self->read_records(@arguments); | |||||||||||
| 29 | } | ||||||||||||
| 30 | |||||||||||||
| 31 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 32 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 33 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 34 | } | ||||||||||||
| 35 | |||||||||||||
| 36 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 37 | 1 | my ($self, $options, $page_size, $page_token) = @_; | |||||||||||
| 38 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 39 | |||||||||||||
| 40 | 1 | my $params = { | |||||||||||
| 41 | pageSize => $page_size, | ||||||||||||
| 42 | pageToken => $page_token, | ||||||||||||
| 43 | }; | ||||||||||||
| 44 | |||||||||||||
| 45 | my $response = $self->{version}->page( | ||||||||||||
| 46 | 'GET', | ||||||||||||
| 47 | $self->{uri}, | ||||||||||||
| 48 | { | ||||||||||||
| 49 | params => $params, | ||||||||||||
| 50 | headers => { 'Accept-Encoding' => $options->{accept_encoding}, } | ||||||||||||
| 51 | } | ||||||||||||
| 52 | 1 | ); | |||||||||||
| 53 | 1 | return $self->_build_page($response); | |||||||||||
| 54 | } | ||||||||||||
| 55 | |||||||||||||
| 56 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 57 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 58 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 59 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 60 | } | ||||||||||||
| 61 | |||||||||||||
| 62 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 63 | 1 | my ($self, $response) = @_; | |||||||||||
| 64 | return Twilio::Rest::Memory::V1::RevisionPage->new($self->{version}, $response, | ||||||||||||
| 65 | 1 | $self->{solution}); | |||||||||||
| 66 | } | ||||||||||||
| 67 | |||||||||||||
| 68 | package Twilio::Rest::Memory::V1::RevisionPage; | ||||||||||||
| 69 | |||||||||||||
| 70 | 2 | ▶ | use parent 'Twilio::TokenPaginationPage'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | |||||||||||||
| 72 | 1 | ▶ | sub records_key { return 'revisions' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 73 | |||||||||||||
| 74 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 75 | 1 | my ($self, $payload) = @_; | |||||||||||
| 76 | return Twilio::Rest::Memory::V1::RevisionInstance->new( | ||||||||||||
| 77 | $self->{version}, $payload, | ||||||||||||
| 78 | $self->{solution}{store_id}, | ||||||||||||
| 79 | $self->{solution}{profile_id}, | ||||||||||||
| 80 | $self->{solution}{observation_id} | ||||||||||||
| 81 | 1 | ); | |||||||||||
| 82 | } | ||||||||||||
| 83 | |||||||||||||
| 84 | package Twilio::Rest::Memory::V1::RevisionInstance; | ||||||||||||
| 85 | |||||||||||||
| 86 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 87 | |||||||||||||
| 88 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 89 | |||||||||||||
| 90 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 91 | 1 | my ($class, $version, $payload, $store_id, $profile_id, $observation_id) = @_; | |||||||||||
| 92 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 93 | $self->{solution} = | ||||||||||||
| 94 | 1 | { store_id => $store_id, profile_id => $profile_id, observation_id => $observation_id }; | |||||||||||
| 95 | 1 | return $self; | |||||||||||
| 96 | } | ||||||||||||
| 97 | |||||||||||||
| 98 | 1 | ▶ | sub content { return $_[0]{properties}{content} } | ||||||||||
|
Subroutine
content: called CC=1 SCAR=0.0
| |||||||||||||
| 99 | 1 | ▶ | sub conversation_ids { return $_[0]{properties}{conversationIds} } | ||||||||||
|
Subroutine
conversation_ids: called CC=1 SCAR=0.0
| |||||||||||||
| 100 | 1 | ▶ | sub created_at { return Twilio::Deserialize::date_time($_[0]{properties}{createdAt}) } | ||||||||||
|
Subroutine
created_at: called CC=1 SCAR=0.0
| |||||||||||||
| 101 | 1 | ▶ | sub id { return $_[0]{properties}{id} } | ||||||||||
|
Subroutine
id: called CC=1 SCAR=0.0
| |||||||||||||
| 102 | 1 | ▶ | sub occurred_at { return Twilio::Deserialize::date_time($_[0]{properties}{occurredAt}) } | ||||||||||
|
Subroutine
occurred_at: called CC=1 SCAR=0.0
| |||||||||||||
| 103 | 1 | ▶ | sub source { return $_[0]{properties}{source} } | ||||||||||
|
Subroutine
source: called CC=1 SCAR=0.0
| |||||||||||||
| 104 | 1 | ▶ | sub updated_at { return Twilio::Deserialize::date_time($_[0]{properties}{updatedAt}) } | ||||||||||
|
Subroutine
updated_at: called CC=1 SCAR=0.0
| |||||||||||||
| 105 | |||||||||||||
| 106 | 2 | 1; | |||||||||||
| 107 | |||||||||||||
| 108 | __END__ | ||||||||||||