« Twilio/Rest/Api/V2010/Account/Balance.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Api::V2010::Account::Recording::AddOnResult::Payload::Data; | ||
| 3 | |||
| 4 | 3 | ▶ | use 5.016; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 3 | our $VERSION = '2.001'; | |
| 8 | |||
| 9 | package Twilio::Rest::Api::V2010::Account::Recording::AddOnResult::Payload::DataContext; | ||
| 10 | |||
| 11 | 3 | ▶ | use parent 'Twilio::InstanceContext'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 3 | ▶ | use Twilio::Serialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 4 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 16 | 4 | my ($class, $version, $account_sid, $reference_sid, $add_on_result_sid, $payload_sid) = @_; | |
| 17 | 4 | my $self = $class->SUPER::new($version); | |
| 18 | $self->{solution} = { | ||
| 19 | 4 | account_sid => $account_sid, | |
| 20 | reference_sid => $reference_sid, | ||
| 21 | add_on_result_sid => $add_on_result_sid, | ||
| 22 | payload_sid => $payload_sid | ||
| 23 | }; | ||
| 24 | 4 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |
| 25 | '/Recordings/', Twilio::Serialize::path_segment($reference_sid), '/AddOnResults/', | ||
| 26 | Twilio::Serialize::path_segment($add_on_result_sid), '/Payloads/', | ||
| 27 | Twilio::Serialize::path_segment($payload_sid), '/Data.json'; | ||
| 28 | 4 | return $self; | |
| 29 | } | ||
| 30 | |||
| 31 | 4 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 32 | 4 | my ($self) = @_; | |
| 33 | |||
| 34 | 4 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |
| 35 | 4 | return $self->_build_instance($response); | |
| 36 | } | ||
| 37 | |||
| 38 | 4 | ▶ | sub _build_instance { |
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||
| 39 | 4 | my ($self, $response) = @_; | |
| 40 | return Twilio::Rest::Api::V2010::Account::Recording::AddOnResult::Payload::DataInstance->new( | ||
| 41 | $self->{version}, $response->get_content, | ||
| 42 | $self->{solution}{account_sid}, | ||
| 43 | $self->{solution}{reference_sid}, | ||
| 44 | $self->{solution}{add_on_result_sid}, | ||
| 45 | $self->{solution}{payload_sid} | ||
| 46 | 4 | ); | |
| 47 | } | ||
| 48 | |||
| 49 | package Twilio::Rest::Api::V2010::Account::Recording::AddOnResult::Payload::DataInstance; | ||
| 50 | |||
| 51 | 3 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 52 | |||
| 53 | 3 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 54 | |||
| 55 | 4 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 56 | 4 | my ($class, $version, $payload, $account_sid, $reference_sid, $add_on_result_sid, $payload_sid) = | |
| 57 | @_; | ||
| 58 | 4 | my $self = $class->SUPER::new($version, $payload); | |
| 59 | $self->{solution} = { | ||
| 60 | 4 | account_sid => $account_sid, | |
| 61 | reference_sid => $reference_sid, | ||
| 62 | add_on_result_sid => $add_on_result_sid, | ||
| 63 | payload_sid => $payload_sid | ||
| 64 | }; | ||
| 65 | 4 | return $self; | |
| 66 | } | ||
| 67 | |||
| 68 | 1 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 69 | 1 | my ($self, @arguments) = @_; | |
| 70 | 1 | return $self->_context->fetch(@arguments); | |
| 71 | } | ||
| 72 | |||
| 73 | 1 | ▶ | sub _context { |
|
Subroutine
_context: called CC=1 SCAR=0.0
| |||
| 74 | 1 | my ($self) = @_; | |
| 75 | return Twilio::Rest::Api::V2010::Account::Recording::AddOnResult::Payload::DataContext->new( | ||
| 76 | $self->{version}, | ||
| 77 | $self->{solution}{account_sid}, | ||
| 78 | $self->{solution}{reference_sid}, | ||
| 79 | $self->{solution}{add_on_result_sid}, | ||
| 80 | $self->{solution}{payload_sid} | ||
| 81 | 1 | ); | |
| 82 | } | ||
| 83 | |||
| 84 | 4 | ▶ | sub redirect_to { return $_[0]{properties}{redirect_to} } |
|
Subroutine
redirect_to: called CC=1 SCAR=0.0
| |||
| 85 | |||
| 86 | 3 | 1; | |
| 87 | |||
| 88 | __END__ | ||