« Twilio/Rest/Trusthub/V1/TrustProductsProvisionalCopy.pm
↑ Summary
Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContext.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Serverless::V1::Service::Build::BuildStatus; | ||
| 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::Build::BuildStatusContext; | ||
| 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, $sid) = @_; | |
| 17 | 1 | my $self = $class->SUPER::new($version); | |
| 18 | 1 | $self->{solution} = { service_sid => $service_sid, sid => $sid }; | |
| 19 | 1 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), '/Builds/', | |
| 20 | Twilio::Serialize::path_segment($sid), '/Status'; | ||
| 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::Serverless::V1::Service::Build::BuildStatusInstance->new( | ||
| 34 | $self->{version}, $response->get_content, | ||
| 35 | $self->{solution}{service_sid}, $self->{solution}{sid} | ||
| 36 | 1 | ); | |
| 37 | } | ||
| 38 | |||
| 39 | package Twilio::Rest::Serverless::V1::Service::Build::BuildStatusInstance; | ||
| 40 | |||
| 41 | 2 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 42 | |||
| 43 | 2 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | |||
| 45 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 46 | 1 | my ($class, $version, $payload, $service_sid, $sid) = @_; | |
| 47 | 1 | my $self = $class->SUPER::new($version, $payload); | |
| 48 | 1 | $self->{solution} = { service_sid => $service_sid, sid => $sid }; | |
| 49 | 1 | return $self; | |
| 50 | } | ||
| 51 | |||
| 52 | 0 | ▶ | sub fetch { |
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||
| 53 | 0 | my ($self, @arguments) = @_; | |
| 54 | 0 | return $self->_context->fetch(@arguments); | |
| 55 | } | ||
| 56 | |||
| 57 | 0 | ▶ | sub _context { |
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||
| 58 | 0 | my ($self) = @_; | |
| 59 | return Twilio::Rest::Serverless::V1::Service::Build::BuildStatusContext->new( | ||
| 60 | $self->{version}, | ||
| 61 | $self->{solution}{service_sid}, | ||
| 62 | $self->{solution}{sid} | ||
| 63 | 0 | ); | |
| 64 | } | ||
| 65 | |||
| 66 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 67 | 1 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } |
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||
| 68 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } |
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||
| 69 | 1 | ▶ | sub status { return $_[0]{properties}{status} } |
|
Subroutine
status: called CC=1 SCAR=0.0
| |||
| 70 | 1 | ▶ | sub url { return $_[0]{properties}{url} } |
|
Subroutine
url: called CC=1 SCAR=0.0
| |||
| 71 | |||
| 72 | 2 | 1; | |
| 73 | |||
| 74 | __END__ | ||