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