« Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContext.pm
↑ Summary
Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatistics.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Studio::V2::Flow::Execution::ExecutionStep::ExecutionStepContext; | ||
| 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::Studio::V2::Flow::Execution::ExecutionStep::ExecutionStepContextContext; | ||
| 10 | |||
| 11 | 2 | ▶ | use parent 'Twilio::InstanceContext'; |
|
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, $flow_sid, $execution_sid, $step_sid) = @_; | |
| 17 | 1 | my $self = $class->SUPER::new($version); | |
| 18 | $self->{solution} = | ||
| 19 | 1 | { flow_sid => $flow_sid, execution_sid => $execution_sid, step_sid => $step_sid }; | |
| 20 | 1 | $self->{uri} = join q{}, '/Flows/', Twilio::Serialize::path_segment($flow_sid), '/Executions/', | |
| 21 | Twilio::Serialize::path_segment($execution_sid), '/Steps/', | ||
| 22 | Twilio::Serialize::path_segment($step_sid), '/Context'; | ||
| 23 | 1 | return $self; | |
| 24 | } | ||
| 25 | |||
| 26 | 1 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 27 | 1 | my ($self) = @_; | |
| 28 | |||
| 29 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |
| 30 | 1 | return $self->_build_instance($response); | |
| 31 | } | ||
| 32 | |||
| 33 | 1 | ▶ | sub _build_instance { |
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||
| 34 | 1 | my ($self, $response) = @_; | |
| 35 | return | ||
| 36 | Twilio::Rest::Studio::V2::Flow::Execution::ExecutionStep::ExecutionStepContextInstance->new( | ||
| 37 | $self->{version}, $response->get_content, | ||
| 38 | $self->{solution}{flow_sid}, | ||
| 39 | $self->{solution}{execution_sid}, | ||
| 40 | $self->{solution}{step_sid} | ||
| 41 | 1 | ); | |
| 42 | } | ||
| 43 | |||
| 44 | package Twilio::Rest::Studio::V2::Flow::Execution::ExecutionStep::ExecutionStepContextInstance; | ||
| 45 | |||
| 46 | 2 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | |||
| 48 | 2 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | |||
| 50 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 51 | 1 | my ($class, $version, $payload, $flow_sid, $execution_sid, $step_sid) = @_; | |
| 52 | 1 | my $self = $class->SUPER::new($version, $payload); | |
| 53 | $self->{solution} = | ||
| 54 | 1 | { flow_sid => $flow_sid, execution_sid => $execution_sid, step_sid => $step_sid }; | |
| 55 | 1 | return $self; | |
| 56 | } | ||
| 57 | |||
| 58 | 0 | ▶ | sub fetch { |
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||
| 59 | 0 | my ($self, @arguments) = @_; | |
| 60 | 0 | return $self->_context->fetch(@arguments); | |
| 61 | } | ||
| 62 | |||
| 63 | 0 | ▶ | sub _context { |
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||
| 64 | 0 | my ($self) = @_; | |
| 65 | return | ||
| 66 | Twilio::Rest::Studio::V2::Flow::Execution::ExecutionStep::ExecutionStepContextContext->new( | ||
| 67 | $self->{version}, $self->{solution}{flow_sid}, | ||
| 68 | $self->{solution}{execution_sid}, $self->{solution}{step_sid} | ||
| 69 | 0 | ); | |
| 70 | } | ||
| 71 | |||
| 72 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 73 | 1 | ▶ | sub context { return $_[0]{properties}{context} } |
|
Subroutine
context: called CC=1 SCAR=0.0
| |||
| 74 | 1 | ▶ | sub execution_sid { return $_[0]{properties}{execution_sid} } |
|
Subroutine
execution_sid: called CC=1 SCAR=0.0
| |||
| 75 | 1 | ▶ | sub flow_sid { return $_[0]{properties}{flow_sid} } |
|
Subroutine
flow_sid: called CC=1 SCAR=0.0
| |||
| 76 | 1 | ▶ | sub step_sid { return $_[0]{properties}{step_sid} } |
|
Subroutine
step_sid: called CC=1 SCAR=0.0
| |||
| 77 | 1 | ▶ | sub url { return $_[0]{properties}{url} } |
|
Subroutine
url: called CC=1 SCAR=0.0
| |||
| 78 | |||
| 79 | 2 | 1; | |
| 80 | |||
| 81 | __END__ | ||