« Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumber.pm
↑ Summary
Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContext.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Serverless::V1::Service::Function::FunctionVersion::FunctionVersionContent; | ||
| 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::Serverless::V1::Service::Function::FunctionVersion::FunctionVersionContentContext; | ||
| 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, $service_sid, $function_sid, $sid) = @_; | |
| 17 | 1 | my $self = $class->SUPER::new($version); | |
| 18 | 1 | $self->{solution} = { service_sid => $service_sid, function_sid => $function_sid, sid => $sid }; | |
| 19 | 1 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), | |
| 20 | '/Functions/', Twilio::Serialize::path_segment($function_sid), '/Versions/', | ||
| 21 | Twilio::Serialize::path_segment($sid), '/Content'; | ||
| 22 | 1 | return $self; | |
| 23 | } | ||
| 24 | |||
| 25 | 1 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 26 | 1 | my ($self) = @_; | |
| 27 | |||
| 28 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |
| 29 | 1 | return $self->_build_instance($response); | |
| 30 | } | ||
| 31 | |||
| 32 | 1 | ▶ | sub _build_instance { |
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||
| 33 | 1 | my ($self, $response) = @_; | |
| 34 | return | ||
| 35 | Twilio::Rest::Serverless::V1::Service::Function::FunctionVersion::FunctionVersionContentInstance | ||
| 36 | ->new( | ||
| 37 | $self->{version}, $response->get_content, | ||
| 38 | $self->{solution}{service_sid}, | ||
| 39 | $self->{solution}{function_sid}, | ||
| 40 | $self->{solution}{sid} | ||
| 41 | 1 | ); | |
| 42 | } | ||
| 43 | |||
| 44 | package Twilio::Rest::Serverless::V1::Service::Function::FunctionVersion::FunctionVersionContentInstance; | ||
| 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, $service_sid, $function_sid, $sid) = @_; | |
| 52 | 1 | my $self = $class->SUPER::new($version, $payload); | |
| 53 | 1 | $self->{solution} = { service_sid => $service_sid, function_sid => $function_sid, sid => $sid }; | |
| 54 | 1 | return $self; | |
| 55 | } | ||
| 56 | |||
| 57 | 0 | ▶ | sub fetch { |
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||
| 58 | 0 | my ($self, @arguments) = @_; | |
| 59 | 0 | return $self->_context->fetch(@arguments); | |
| 60 | } | ||
| 61 | |||
| 62 | 0 | ▶ | sub _context { |
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||
| 63 | 0 | my ($self) = @_; | |
| 64 | return | ||
| 65 | Twilio::Rest::Serverless::V1::Service::Function::FunctionVersion::FunctionVersionContentContext | ||
| 66 | ->new( | ||
| 67 | $self->{version}, | ||
| 68 | $self->{solution}{service_sid}, | ||
| 69 | $self->{solution}{function_sid}, | ||
| 70 | $self->{solution}{sid} | ||
| 71 | 0 | ); | |
| 72 | } | ||
| 73 | |||
| 74 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 75 | 1 | ▶ | sub content { return $_[0]{properties}{content} } |
|
Subroutine
content: called CC=1 SCAR=0.0
| |||
| 76 | 1 | ▶ | sub function_sid { return $_[0]{properties}{function_sid} } |
|
Subroutine
function_sid: called CC=1 SCAR=0.0
| |||
| 77 | 1 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } |
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||
| 78 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } |
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||
| 79 | 1 | ▶ | sub url { return $_[0]{properties}{url} } |
|
Subroutine
url: called CC=1 SCAR=0.0
| |||
| 80 | |||
| 81 | 2 | 1; | |
| 82 | |||
| 83 | __END__ | ||