| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Memory::V1::Bulk; | ||
| 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::Memory::V1::BulkList; | ||
| 10 | |||
| 11 | 2 | ▶ | use parent 'Twilio::ListResource'; |
|
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, $store_id) = @_; | |
| 17 | 1 | my $self = $class->SUPER::new($version); | |
| 18 | 1 | $self->{solution} = { store_id => $store_id }; | |
| 19 | 1 | $self->{uri} = join q{}, '/Stores/', Twilio::Serialize::path_segment($store_id), '/Profiles/Bulk'; | |
| 20 | 1 | return $self; | |
| 21 | } | ||
| 22 | |||
| 23 | 1 | ▶ | sub update { |
|
Subroutine
update: called CC=1 SCAR=0.0
| |||
| 24 | 1 | my ($self, $body) = @_; | |
| 25 | |||
| 26 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |
| 27 | |||
| 28 | my $response = $self->{version}->handle_request( | ||
| 29 | 'PUT', | ||
| 30 | $self->{uri}, | ||
| 31 | 1 | 'update', | |
| 32 | { | ||
| 33 | data => $data, | ||
| 34 | headers => { 'Content-Type' => 'application/json', } | ||
| 35 | } | ||
| 36 | ); | ||
| 37 | return Twilio::Rest::Memory::V1::BulkInstance->new($self->{version}, $response->get_content, | ||
| 38 | 1 | $self->{solution}{store_id}); | |
| 39 | } | ||
| 40 | |||
| 41 | package Twilio::Rest::Memory::V1::BulkInstance; | ||
| 42 | |||
| 43 | 2 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | |||
| 45 | 2 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 46 | |||
| 47 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 48 | 1 | my ($class, $version, $payload, $store_id) = @_; | |
| 49 | 1 | my $self = $class->SUPER::new($version, $payload); | |
| 50 | 1 | $self->{solution} = { store_id => $store_id }; | |
| 51 | 1 | return $self; | |
| 52 | } | ||
| 53 | |||
| 54 | 1 | ▶ | sub created_at { return Twilio::Deserialize::date_time($_[0]{properties}{createdAt}) } |
|
Subroutine
created_at: called CC=1 SCAR=0.0
| |||
| 55 | 1 | ▶ | sub message { return $_[0]{properties}{message} } |
|
Subroutine
message: called CC=1 SCAR=0.0
| |||
| 56 | 1 | ▶ | sub operation_id { return $_[0]{properties}{operationId} } |
|
Subroutine
operation_id: called CC=1 SCAR=0.0
| |||
| 57 | 1 | ▶ | sub status_url { return $_[0]{properties}{statusUrl} } |
|
Subroutine
status_url: called CC=1 SCAR=0.0
| |||
| 58 | |||
| 59 | 2 | 1; | |
| 60 | |||
| 61 | __END__ | ||