« Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatistics.pm
↑ Summary
Twilio/Rest/Numbers/V2/AuthorizationDocument/DependentHostedNumberOrder.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Conversations::V2::Action; | ||||||||||||||||||||
| 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::Conversations::V2::ActionList; | ||||||||||||||||||||
| 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, $conversation_id) = @_; | |||||||||||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 2 | $self->{solution} = { conversation_id => $conversation_id }; | |||||||||||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Conversations/', Twilio::Serialize::path_segment($conversation_id), | |||||||||||||||||||
| 20 | '/Actions'; | ||||||||||||||||||||
| 21 | 2 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 25 | 1 | my ($self, $body) = @_; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 30 | 'POST', | ||||||||||||||||||||
| 31 | $self->{uri}, | ||||||||||||||||||||
| 32 | 1 | 'create', | |||||||||||||||||||
| 33 | { | ||||||||||||||||||||
| 34 | data => $data, | ||||||||||||||||||||
| 35 | headers => { 'Content-Type' => 'application/json', } | ||||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | ); | ||||||||||||||||||||
| 38 | return Twilio::Rest::Conversations::V2::ActionInstance->new($self->{version}, | ||||||||||||||||||||
| 39 | 1 | $response->get_content, $self->{solution}{conversation_id}); | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 43 | 1 | my ($self, $action_id) = @_; | |||||||||||||||||||
| 44 | return Twilio::Rest::Conversations::V2::ActionContext->new($self->{version}, | ||||||||||||||||||||
| 45 | 1 | $self->{solution}{conversation_id}, $action_id); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | package Twilio::Rest::Conversations::V2::ActionContext; | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 55 | 1 | my ($class, $version, $conversation_id, $action_id) = @_; | |||||||||||||||||||
| 56 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 57 | 1 | $self->{solution} = { conversation_id => $conversation_id, action_id => $action_id }; | |||||||||||||||||||
| 58 | 1 | $self->{uri} = join q{}, '/Conversations/', Twilio::Serialize::path_segment($conversation_id), | |||||||||||||||||||
| 59 | '/Actions/', Twilio::Serialize::path_segment($action_id); | ||||||||||||||||||||
| 60 | 1 | return $self; | |||||||||||||||||||
| 61 | } | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 64 | 1 | my ($self) = @_; | |||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 67 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 68 | } | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 71 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 72 | return Twilio::Rest::Conversations::V2::ActionInstance->new( | ||||||||||||||||||||
| 73 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 74 | $self->{solution}{conversation_id}, | ||||||||||||||||||||
| 75 | $self->{solution}{action_id} | ||||||||||||||||||||
| 76 | 1 | ); | |||||||||||||||||||
| 77 | } | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | package Twilio::Rest::Conversations::V2::ActionInstance; | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 86 | 2 | my ($class, $version, $payload, $conversation_id, $action_id) = @_; | |||||||||||||||||||
| 87 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 88 | $self->{solution} = | ||||||||||||||||||||
| 89 | 2 | ▶ | { conversation_id => $conversation_id, action_id => $action_id // $self->{properties}{id} }; | ||||||||||||||||||
|
Condition66%2/3
$action_id // $self->{"properties"}{"id"}
MC/DC0%0/2
$action_id // $self->{"properties"}{"id"}
$action_id
$self->{"properties"}{"id"}
Truth table66%2/3
A // B
A= $action_idB= $self->{"properties"}{"id"}
| |||||||||||||||||||||
| 90 | 2 | return $self; | |||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 94 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 95 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 96 | } | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 99 | 0 | my ($self) = @_; | |||||||||||||||||||
| 100 | return Twilio::Rest::Conversations::V2::ActionContext->new( | ||||||||||||||||||||
| 101 | $self->{version}, | ||||||||||||||||||||
| 102 | $self->{solution}{conversation_id}, | ||||||||||||||||||||
| 103 | $self->{solution}{action_id} | ||||||||||||||||||||
| 104 | 0 | ); | |||||||||||||||||||
| 105 | } | ||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 2 | ▶ | sub completed_at { return Twilio::Deserialize::date_time($_[0]{properties}{completedAt}) } | ||||||||||||||||||
|
Subroutine
completed_at: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | 2 | ▶ | sub conversation_id { return $_[0]{properties}{conversationId} } | ||||||||||||||||||
|
Subroutine
conversation_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | 2 | ▶ | sub created_at { return Twilio::Deserialize::date_time($_[0]{properties}{createdAt}) } | ||||||||||||||||||
|
Subroutine
created_at: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 2 | ▶ | sub failure_reason { return $_[0]{properties}{failureReason} } | ||||||||||||||||||
|
Subroutine
failure_reason: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 2 | ▶ | sub id { return $_[0]{properties}{id} } | ||||||||||||||||||
|
Subroutine
id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 2 | ▶ | sub related { return $_[0]{properties}{related} } | ||||||||||||||||||
|
Subroutine
related: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | 2 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | 2 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | 2 | ▶ | sub updated_at { return Twilio::Deserialize::date_time($_[0]{properties}{updatedAt}) } | ||||||||||||||||||
|
Subroutine
updated_at: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | 2 | 1; | |||||||||||||||||||
| 118 | |||||||||||||||||||||
| 119 | __END__ | ||||||||||||||||||||