Fastly/DictionaryInfoApi.pm untested

filter: Statementstmt 0.0% 0 / 74 Branchbran 0.0% 0 / 18 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 114 CC 10 SCAR 37.4
CC
10
Cov
0%
get_dictionary_info
90.0
new
6.0
BEGIN
2.0
CRAP 42.0
1 =begin comment
2  
3 Fastly API
4  
5 Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
6  
7 The version of the API Spec document: 1.0.0
8 Contact: oss@fastly.com
9  
10 =end comment
11  
12 =cut
13  
14 #
15 # NOTE: This class is auto generated.
16 # Do not edit the class manually.
17 #
18 package WebService::Fastly::DictionaryInfoApi;
19  
20 require 5.6.0;
21 use strict;
22 use warnings;
23 use utf8;
24 use Exporter;
25 use Carp qw( croak );
26 use Log::Any qw($log);
27  
28 use WebService::Fastly::ApiClient;
29  
30 use base "Class::Data::Inheritable";
31  
32 __PACKAGE__->mk_classdata('method_documentation' => {});
33  
34 sub new {
35 my $class = shift;
36 my $api_client;
37  
38 if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) {
39 $api_client = $_[0];
40 } else {
41 $api_client = WebService::Fastly::ApiClient->new(@_);
42 }
43  
44 bless { api_client => $api_client }, $class;
45  
46 }
47  
48  
49 #
50 # get_dictionary_info
51 #
52 # Get dictionary metadata
53 #
54 # @param string $service_id Alphanumeric string identifying the service. (required)
55 # @param int $version_id Integer identifying a service version. (required)
56 # @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required)
57 {
58 my $params = {
59 'service_id' => {
60 data_type => 'string',
61 description => 'Alphanumeric string identifying the service.',
62 required => '1',
63 },
64 'version_id' => {
65 data_type => 'int',
66 description => 'Integer identifying a service version.',
67 required => '1',
68 },
69 'dictionary_id' => {
70 data_type => 'string',
71 description => 'Alphanumeric string identifying a Dictionary.',
72 required => '1',
73 },
74 };
75 __PACKAGE__->method_documentation->{ 'get_dictionary_info' } = {
76 summary => 'Get dictionary metadata',
77 params => $params,
78 returns => 'DictionaryInfoResponse',
79 };
80 }
81 # @return DictionaryInfoResponse
82 #
83 sub get_dictionary_info {
84 my ($self, %args) = @_;
85  
86 # verify the required parameter 'service_id' is set
87 unless (exists $args{'service_id'}) {
88 croak("Missing the required parameter 'service_id' when calling get_dictionary_info");
89 }
90  
91 # verify the required parameter 'version_id' is set
92 unless (exists $args{'version_id'}) {
93 croak("Missing the required parameter 'version_id' when calling get_dictionary_info");
94 }
95  
96 # verify the required parameter 'dictionary_id' is set
97 unless (exists $args{'dictionary_id'}) {
98 croak("Missing the required parameter 'dictionary_id' when calling get_dictionary_info");
99 }
100  
101 # parse inputs
102 my $_resource_path = '/service/{service_id}/version/{version_id}/dictionary/{dictionary_id}/info';
103  
104 my $_method = 'GET';
105 my $query_params = {};
106 my $header_params = {};
107 my $form_params = {};
108  
109 # 'Accept' and 'Content-Type' header
110 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
111 if ($_header_accept) {
112 $header_params->{'Accept'} = $_header_accept;
113 }
114 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
115  
116 # path params
117 if ( exists $args{'service_id'}) {
118 my $_base_variable = "{" . "service_id" . "}";
119 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
120 $_resource_path =~ s/$_base_variable/$_base_value/g;
121 }
122  
123 # path params
124 if ( exists $args{'version_id'}) {
125 my $_base_variable = "{" . "version_id" . "}";
126 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
127 $_resource_path =~ s/$_base_variable/$_base_value/g;
128 }
129  
130 # path params
131 if ( exists $args{'dictionary_id'}) {
132 my $_base_variable = "{" . "dictionary_id" . "}";
133 my $_base_value = $self->{api_client}->to_path_value($args{'dictionary_id'});
134 $_resource_path =~ s/$_base_variable/$_base_value/g;
135 }
136  
137 my $_body_data;
138 # authentication setting, if any
139 my $auth_settings = [qw(token )];
140  
141 # make the API Call
142 my $response = $self->{api_client}->call_api($_resource_path, $_method,
143 $query_params, $form_params,
144 $header_params, $_body_data, $auth_settings);
145 if (!$response) {
146 return;
147 }
148 my $_response_object = $self->{api_client}->deserialize('DictionaryInfoResponse', $response);
149 return $_response_object;
150 }
151  
152 1;