« Twilio/Rest/Memory/V1/Recall.pm
↑ Summary
Twilio/Rest/Trusthub/V1/TrustProductsProvisionalCopy.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Trusthub::V1::CustomerProfilesProvisionalCopy; | ||
| 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::Trusthub::V1::CustomerProfilesProvisionalCopyContext; | ||
| 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, $customer_profile_sid) = @_; | |
| 17 | 2 | my $self = $class->SUPER::new($version); | |
| 18 | 2 | $self->{solution} = { customer_profile_sid => $customer_profile_sid }; | |
| 19 | 2 | $self->{uri} = join q{}, '/CustomerProfiles/', | |
| 20 | Twilio::Serialize::path_segment($customer_profile_sid), '/ProvisionalCopy'; | ||
| 21 | 2 | return $self; | |
| 22 | } | ||
| 23 | |||
| 24 | 1 | ▶ | sub create { |
|
Subroutine
create: called CC=1 SCAR=0.0
| |||
| 25 | 1 | my ($self) = @_; | |
| 26 | |||
| 27 | 1 | my $data = {}; | |
| 28 | |||
| 29 | my $response = | ||
| 30 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |
| 31 | 1 | return $self->_build_instance($response); | |
| 32 | } | ||
| 33 | |||
| 34 | 1 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 35 | 1 | my ($self) = @_; | |
| 36 | |||
| 37 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |
| 38 | 1 | return $self->_build_instance($response); | |
| 39 | } | ||
| 40 | |||
| 41 | 2 | ▶ | sub _build_instance { |
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||
| 42 | 2 | my ($self, $response) = @_; | |
| 43 | return Twilio::Rest::Trusthub::V1::CustomerProfilesProvisionalCopyInstance->new($self->{version}, | ||
| 44 | 2 | $response->get_content, $self->{solution}{customer_profile_sid}); | |
| 45 | } | ||
| 46 | |||
| 47 | package Twilio::Rest::Trusthub::V1::CustomerProfilesProvisionalCopyInstance; | ||
| 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 | 2 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 54 | 2 | my ($class, $version, $payload, $customer_profile_sid) = @_; | |
| 55 | 2 | my $self = $class->SUPER::new($version, $payload); | |
| 56 | 2 | $self->{solution} = { customer_profile_sid => $customer_profile_sid }; | |
| 57 | 2 | 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 fetch { |
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||
| 66 | 0 | my ($self, @arguments) = @_; | |
| 67 | 0 | return $self->_context->fetch(@arguments); | |
| 68 | } | ||
| 69 | |||
| 70 | 0 | ▶ | sub _context { |
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||
| 71 | 0 | my ($self) = @_; | |
| 72 | return Twilio::Rest::Trusthub::V1::CustomerProfilesProvisionalCopyContext->new($self->{version}, | ||
| 73 | 0 | $self->{solution}{customer_profile_sid}); | |
| 74 | } | ||
| 75 | |||
| 76 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 77 | 2 | ▶ | sub customer_profile_sid { return $_[0]{properties}{customer_profile_sid} } |
|
Subroutine
customer_profile_sid: called CC=1 SCAR=0.0
| |||
| 78 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } |
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||
| 79 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } |
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||
| 80 | 2 | ▶ | sub email { return $_[0]{properties}{email} } |
|
Subroutine
email: called CC=1 SCAR=0.0
| |||
| 81 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } |
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||
| 82 | 2 | ▶ | sub policy_sid { return $_[0]{properties}{policy_sid} } |
|
Subroutine
policy_sid: called CC=1 SCAR=0.0
| |||
| 83 | 2 | ▶ | sub status { return $_[0]{properties}{status} } |
|
Subroutine
status: called CC=1 SCAR=0.0
| |||
| 84 | 2 | ▶ | sub status_callback { return $_[0]{properties}{status_callback} } |
|
Subroutine
status_callback: called CC=1 SCAR=0.0
| |||
| 85 | 2 | ▶ | sub url { return $_[0]{properties}{url} } |
|
Subroutine
url: called CC=1 SCAR=0.0
| |||
| 86 | 2 | ▶ | sub valid_until { return Twilio::Deserialize::date_time($_[0]{properties}{valid_until}) } |
|
Subroutine
valid_until: called CC=1 SCAR=0.0
| |||
| 87 | |||
| 88 | 2 | 1; | |
| 89 | |||
| 90 | __END__ | ||