| 1 | package Apertur::SDK::Resource::Destinations; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use JSON qw(encode_json); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 9 | 3 | my ($class, %args) = @_; | |
| 10 | 3 | return bless { http => $args{http} }, $class; | |
| 11 | } | ||
| 12 | |||
| 13 | 0 | ▶ | sub list { |
|
Subroutine
list: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 14 | 0 | my ($self, $project_id) = @_; | |
| 15 | 0 | return $self->{http}->request('GET', "/api/v1/projects/$project_id/destinations"); | |
| 16 | } | ||
| 17 | |||
| 18 | 0 | ▶ | sub create { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 19 | 0 | my ($self, $project_id, %config) = @_; | |
| 20 | return $self->{http}->request( | ||
| 21 | 0 | 'POST', "/api/v1/projects/$project_id/destinations", | |
| 22 | body => encode_json(\%config), | ||
| 23 | ); | ||
| 24 | } | ||
| 25 | |||
| 26 | 0 | ▶ | sub update { |
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | 0 | my ($self, $project_id, $dest_id, %config) = @_; | |
| 28 | return $self->{http}->request( | ||
| 29 | 0 | 'PATCH', "/api/v1/projects/$project_id/destinations/$dest_id", | |
| 30 | body => encode_json(\%config), | ||
| 31 | ); | ||
| 32 | } | ||
| 33 | |||
| 34 | 0 | ▶ | sub delete { |
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 35 | 0 | my ($self, $project_id, $dest_id) = @_; | |
| 36 | return $self->{http}->request( | ||
| 37 | 0 | 'DELETE', "/api/v1/projects/$project_id/destinations/$dest_id", | |
| 38 | ); | ||
| 39 | } | ||
| 40 | |||
| 41 | 0 | ▶ | sub test { |
|
Subroutine
test: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 42 | 0 | my ($self, $project_id, $dest_id) = @_; | |
| 43 | return $self->{http}->request( | ||
| 44 | 0 | 'POST', "/api/v1/projects/$project_id/destinations/$dest_id/test", | |
| 45 | ); | ||
| 46 | } | ||
| 47 | |||
| 48 | 1 | 1; | |
| 49 | |||
| 50 | __END__ | ||