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