| 1 | package WWW::VastAI::Template; | ||
| 2 | 11 | our $VERSION = '0.001'; | |
| 3 | # ABSTRACT: Template wrapper with update and delete helpers | ||
| 4 | |||
| 5 | 11 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 11 | extends 'WWW::VastAI::Object'; | |
| 7 | |||
| 8 | 1 | ▶ | sub name { shift->data->{name} } |
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||
| 9 | 3 | ▶ | sub hash_id { shift->data->{hash_id} } |
|
Subroutine
hash_id: called CC=1 SCAR=0.0
Pod
documented
| |||
| 10 | 2 | ▶ | sub image { shift->data->{image} } |
|
Subroutine
image: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | |||
| 12 | 1 | ▶ | sub update { |
|
Subroutine
update: called CC=1 SCAR=0.0
Pod
documented
| |||
| 13 | 1 | my ($self, %params) = @_; | |
| 14 | 1 | return $self->_replace_data($self->_client->templates->update($self->hash_id, %params)->raw); | |
| 15 | } | ||
| 16 | |||
| 17 | 1 | ▶ | sub delete { |
|
Subroutine
delete: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 1 | my ($self) = @_; | |
| 19 | 1 | return $self->_client->templates->delete($self->id); | |
| 20 | } | ||
| 21 | |||
| 22 | 11 | 1; | |
| 23 | |||
| 24 | __END__ | ||