« Twilio/Rest/Notify/V1/Service/Notification.pm
↑ Summary
Twilio/Rest/Numbers/V3/HostedNumberOrder.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Verify::V2::Service::NewChallenge; | ||
| 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::Verify::V2::Service::NewChallengeContext; | ||
| 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) = @_; | |
| 17 | 1 | my $self = $class->SUPER::new($version); | |
| 18 | 1 | $self->{solution} = { service_sid => $service_sid }; | |
| 19 | 1 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), | |
| 20 | '/Passkeys/Challenges'; | ||
| 21 | 1 | return $self; | |
| 22 | } | ||
| 23 | |||
| 24 | 1 | ▶ | sub create { |
|
Subroutine
create: called CC=1 SCAR=0.0
| |||
| 25 | 1 | my ($self, $body) = @_; | |
| 26 | |||
| 27 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |
| 28 | |||
| 29 | my $response = $self->{version}->handle_request( | ||
| 30 | 'POST', | ||
| 31 | $self->{uri}, | ||
| 32 | 1 | 'create', | |
| 33 | { | ||
| 34 | data => $data, | ||
| 35 | headers => { 'Content-Type' => 'application/json', } | ||
| 36 | } | ||
| 37 | ); | ||
| 38 | 1 | return $self->_build_instance($response); | |
| 39 | } | ||
| 40 | |||
| 41 | 1 | ▶ | sub _build_instance { |
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||
| 42 | 1 | my ($self, $response) = @_; | |
| 43 | return Twilio::Rest::Verify::V2::Service::NewChallengeInstance->new($self->{version}, | ||
| 44 | 1 | $response->get_content, $self->{solution}{service_sid}); | |
| 45 | } | ||
| 46 | |||
| 47 | package Twilio::Rest::Verify::V2::Service::NewChallengeInstance; | ||
| 48 | |||
| 49 | 2 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 50 | |||
| 51 | 2 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 52 | |||
| 53 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 54 | 1 | my ($class, $version, $payload, $service_sid) = @_; | |
| 55 | 1 | my $self = $class->SUPER::new($version, $payload); | |
| 56 | 1 | $self->{solution} = { service_sid => $service_sid }; | |
| 57 | 1 | return $self; | |
| 58 | } | ||
| 59 | |||
| 60 | 0 | ▶ | sub create { |
|
Subroutine
create: not called CC=1 SCAR=6.9
| |||
| 61 | 0 | my ($self, @arguments) = @_; | |
| 62 | 0 | return $self->_context->create(@arguments); | |
| 63 | } | ||
| 64 | |||
| 65 | 0 | ▶ | sub _context { |
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||
| 66 | 0 | my ($self) = @_; | |
| 67 | return Twilio::Rest::Verify::V2::Service::NewChallengeContext->new($self->{version}, | ||
| 68 | 0 | $self->{solution}{service_sid}); | |
| 69 | } | ||
| 70 | |||
| 71 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 72 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } |
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||
| 73 | 1 | ▶ | sub date_responded { return Twilio::Deserialize::date_time($_[0]{properties}{date_responded}) } |
|
Subroutine
date_responded: called CC=1 SCAR=0.0
| |||
| 74 | 1 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } |
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||
| 75 | 1 | ▶ | sub details { return $_[0]{properties}{details} } |
|
Subroutine
details: called CC=1 SCAR=0.0
| |||
| 76 | 1 | ▶ | sub entity_sid { return $_[0]{properties}{entity_sid} } |
|
Subroutine
entity_sid: called CC=1 SCAR=0.0
| |||
| 77 | 1 | ▶ | sub expiration_date { return Twilio::Deserialize::date_time($_[0]{properties}{expiration_date}) } |
|
Subroutine
expiration_date: called CC=1 SCAR=0.0
| |||
| 78 | 1 | ▶ | sub factor_sid { return $_[0]{properties}{factor_sid} } |
|
Subroutine
factor_sid: called CC=1 SCAR=0.0
| |||
| 79 | 1 | ▶ | sub factor_type { return $_[0]{properties}{factor_type} } |
|
Subroutine
factor_type: called CC=1 SCAR=0.0
| |||
| 80 | 1 | ▶ | sub hidden_details { return $_[0]{properties}{hidden_details} } |
|
Subroutine
hidden_details: called CC=1 SCAR=0.0
| |||
| 81 | 1 | ▶ | sub identity { return $_[0]{properties}{identity} } |
|
Subroutine
identity: called CC=1 SCAR=0.0
| |||
| 82 | 1 | ▶ | sub links { return $_[0]{properties}{links} } |
|
Subroutine
links: called CC=1 SCAR=0.0
| |||
| 83 | 1 | ▶ | sub metadata { return $_[0]{properties}{metadata} } |
|
Subroutine
metadata: called CC=1 SCAR=0.0
| |||
| 84 | 1 | ▶ | sub options { return $_[0]{properties}{options} } |
|
Subroutine
options: called CC=1 SCAR=0.0
| |||
| 85 | 1 | ▶ | sub responded_reason { return $_[0]{properties}{responded_reason} } |
|
Subroutine
responded_reason: called CC=1 SCAR=0.0
| |||
| 86 | 1 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } |
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||
| 87 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } |
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||
| 88 | 1 | ▶ | sub status { return $_[0]{properties}{status} } |
|
Subroutine
status: called CC=1 SCAR=0.0
| |||
| 89 | 1 | ▶ | sub url { return $_[0]{properties}{url} } |
|
Subroutine
url: called CC=1 SCAR=0.0
| |||
| 90 | |||
| 91 | 2 | 1; | |
| 92 | |||
| 93 | __END__ | ||