Fastly/DomainApi.pm untested

filter: Statementstmt 0.0% 0 / 304 Branchbran 0.0% 0 / 110 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 17 Podpod 0.0% 0 / 8 totaltotal 0.0% 0 / 448 CC 56 SCAR 43.4
CC
56
Cov
0%
update_domain
132.0
check_domain
90.0
create_domain
90.0
CRAP 76.5
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::DomainApi;
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 # check_domain
51 #
52 # Validate DNS configuration for a single domain on a service
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 $domain_name The name of the domain or domains associated with this service. (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 'domain_name' => {
70 data_type => 'string',
71 description => 'The name of the domain or domains associated with this service.',
72 required => '1',
73 },
74 };
75 __PACKAGE__->method_documentation->{ 'check_domain' } = {
76 summary => 'Validate DNS configuration for a single domain on a service',
77 params => $params,
78 returns => 'ARRAY[AnyType]',
79 };
80 }
81 # @return ARRAY[AnyType]
82 #
83 sub check_domain {
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 check_domain");
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 check_domain");
94 }
95  
96 # verify the required parameter 'domain_name' is set
97 unless (exists $args{'domain_name'}) {
98 croak("Missing the required parameter 'domain_name' when calling check_domain");
99 }
100  
101 # parse inputs
102 my $_resource_path = '/service/{service_id}/version/{version_id}/domain/{domain_name}/check';
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{'domain_name'}) {
132 my $_base_variable = "{" . "domain_name" . "}";
133 my $_base_value = $self->{api_client}->to_path_value($args{'domain_name'});
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('ARRAY[AnyType]', $response);
149 return $_response_object;
150 }
151  
152 #
153 # check_domains
154 #
155 # Validate DNS configuration for all domains on a service
156 #
157 # @param string $service_id Alphanumeric string identifying the service. (required)
158 # @param int $version_id Integer identifying a service version. (required)
159 {
160 my $params = {
161 'service_id' => {
162 data_type => 'string',
163 description => 'Alphanumeric string identifying the service.',
164 required => '1',
165 },
166 'version_id' => {
167 data_type => 'int',
168 description => 'Integer identifying a service version.',
169 required => '1',
170 },
171 };
172 __PACKAGE__->method_documentation->{ 'check_domains' } = {
173 summary => 'Validate DNS configuration for all domains on a service',
174 params => $params,
175 returns => 'ARRAY[ARRAY]',
176 };
177 }
178 # @return ARRAY[ARRAY]
179 #
180 sub check_domains {
181 my ($self, %args) = @_;
182  
183 # verify the required parameter 'service_id' is set
184 unless (exists $args{'service_id'}) {
185 croak("Missing the required parameter 'service_id' when calling check_domains");
186 }
187  
188 # verify the required parameter 'version_id' is set
189 unless (exists $args{'version_id'}) {
190 croak("Missing the required parameter 'version_id' when calling check_domains");
191 }
192  
193 # parse inputs
194 my $_resource_path = '/service/{service_id}/version/{version_id}/domain/check_all';
195  
196 my $_method = 'GET';
197 my $query_params = {};
198 my $header_params = {};
199 my $form_params = {};
200  
201 # 'Accept' and 'Content-Type' header
202 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
203 if ($_header_accept) {
204 $header_params->{'Accept'} = $_header_accept;
205 }
206 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
207  
208 # path params
209 if ( exists $args{'service_id'}) {
210 my $_base_variable = "{" . "service_id" . "}";
211 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
212 $_resource_path =~ s/$_base_variable/$_base_value/g;
213 }
214  
215 # path params
216 if ( exists $args{'version_id'}) {
217 my $_base_variable = "{" . "version_id" . "}";
218 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
219 $_resource_path =~ s/$_base_variable/$_base_value/g;
220 }
221  
222 my $_body_data;
223 # authentication setting, if any
224 my $auth_settings = [qw(token )];
225  
226 # make the API Call
227 my $response = $self->{api_client}->call_api($_resource_path, $_method,
228 $query_params, $form_params,
229 $header_params, $_body_data, $auth_settings);
230 if (!$response) {
231 return;
232 }
233 my $_response_object = $self->{api_client}->deserialize('ARRAY[ARRAY]', $response);
234 return $_response_object;
235 }
236  
237 #
238 # create_domain
239 #
240 # Add a domain name to a service
241 #
242 # @param string $service_id Alphanumeric string identifying the service. (required)
243 # @param int $version_id Integer identifying a service version. (required)
244 # @param string $comment A freeform descriptive note. (optional)
245 # @param string $name The name of the domain or domains associated with this service. (optional)
246 {
247 my $params = {
248 'service_id' => {
249 data_type => 'string',
250 description => 'Alphanumeric string identifying the service.',
251 required => '1',
252 },
253 'version_id' => {
254 data_type => 'int',
255 description => 'Integer identifying a service version.',
256 required => '1',
257 },
258 'comment' => {
259 data_type => 'string',
260 description => 'A freeform descriptive note.',
261 required => '0',
262 },
263 'name' => {
264 data_type => 'string',
265 description => 'The name of the domain or domains associated with this service.',
266 required => '0',
267 },
268 };
269 __PACKAGE__->method_documentation->{ 'create_domain' } = {
270 summary => 'Add a domain name to a service',
271 params => $params,
272 returns => 'DomainResponse',
273 };
274 }
275 # @return DomainResponse
276 #
277 sub create_domain {
278 my ($self, %args) = @_;
279  
280 # verify the required parameter 'service_id' is set
281 unless (exists $args{'service_id'}) {
282 croak("Missing the required parameter 'service_id' when calling create_domain");
283 }
284  
285 # verify the required parameter 'version_id' is set
286 unless (exists $args{'version_id'}) {
287 croak("Missing the required parameter 'version_id' when calling create_domain");
288 }
289  
290 # parse inputs
291 my $_resource_path = '/service/{service_id}/version/{version_id}/domain';
292  
293 my $_method = 'POST';
294 my $query_params = {};
295 my $header_params = {};
296 my $form_params = {};
297  
298 # 'Accept' and 'Content-Type' header
299 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
300 if ($_header_accept) {
301 $header_params->{'Accept'} = $_header_accept;
302 }
303 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
304  
305 # path params
306 if ( exists $args{'service_id'}) {
307 my $_base_variable = "{" . "service_id" . "}";
308 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
309 $_resource_path =~ s/$_base_variable/$_base_value/g;
310 }
311  
312 # path params
313 if ( exists $args{'version_id'}) {
314 my $_base_variable = "{" . "version_id" . "}";
315 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
316 $_resource_path =~ s/$_base_variable/$_base_value/g;
317 }
318  
319 # form params
320 if ( exists $args{'comment'} ) {
321 $form_params->{'comment'} = $self->{api_client}->to_form_value($args{'comment'});
322 }
323  
324 # form params
325 if ( exists $args{'name'} ) {
326 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
327 }
328  
329 my $_body_data;
330 # authentication setting, if any
331 my $auth_settings = [qw(token )];
332  
333 # make the API Call
334 my $response = $self->{api_client}->call_api($_resource_path, $_method,
335 $query_params, $form_params,
336 $header_params, $_body_data, $auth_settings);
337 if (!$response) {
338 return;
339 }
340 my $_response_object = $self->{api_client}->deserialize('DomainResponse', $response);
341 return $_response_object;
342 }
343  
344 #
345 # delete_domain
346 #
347 # Remove a domain from a service
348 #
349 # @param string $service_id Alphanumeric string identifying the service. (required)
350 # @param int $version_id Integer identifying a service version. (required)
351 # @param string $domain_name The name of the domain or domains associated with this service. (required)
352 {
353 my $params = {
354 'service_id' => {
355 data_type => 'string',
356 description => 'Alphanumeric string identifying the service.',
357 required => '1',
358 },
359 'version_id' => {
360 data_type => 'int',
361 description => 'Integer identifying a service version.',
362 required => '1',
363 },
364 'domain_name' => {
365 data_type => 'string',
366 description => 'The name of the domain or domains associated with this service.',
367 required => '1',
368 },
369 };
370 __PACKAGE__->method_documentation->{ 'delete_domain' } = {
371 summary => 'Remove a domain from a service',
372 params => $params,
373 returns => 'InlineResponse200',
374 };
375 }
376 # @return InlineResponse200
377 #
378 sub delete_domain {
379 my ($self, %args) = @_;
380  
381 # verify the required parameter 'service_id' is set
382 unless (exists $args{'service_id'}) {
383 croak("Missing the required parameter 'service_id' when calling delete_domain");
384 }
385  
386 # verify the required parameter 'version_id' is set
387 unless (exists $args{'version_id'}) {
388 croak("Missing the required parameter 'version_id' when calling delete_domain");
389 }
390  
391 # verify the required parameter 'domain_name' is set
392 unless (exists $args{'domain_name'}) {
393 croak("Missing the required parameter 'domain_name' when calling delete_domain");
394 }
395  
396 # parse inputs
397 my $_resource_path = '/service/{service_id}/version/{version_id}/domain/{domain_name}';
398  
399 my $_method = 'DELETE';
400 my $query_params = {};
401 my $header_params = {};
402 my $form_params = {};
403  
404 # 'Accept' and 'Content-Type' header
405 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
406 if ($_header_accept) {
407 $header_params->{'Accept'} = $_header_accept;
408 }
409 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
410  
411 # path params
412 if ( exists $args{'service_id'}) {
413 my $_base_variable = "{" . "service_id" . "}";
414 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
415 $_resource_path =~ s/$_base_variable/$_base_value/g;
416 }
417  
418 # path params
419 if ( exists $args{'version_id'}) {
420 my $_base_variable = "{" . "version_id" . "}";
421 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
422 $_resource_path =~ s/$_base_variable/$_base_value/g;
423 }
424  
425 # path params
426 if ( exists $args{'domain_name'}) {
427 my $_base_variable = "{" . "domain_name" . "}";
428 my $_base_value = $self->{api_client}->to_path_value($args{'domain_name'});
429 $_resource_path =~ s/$_base_variable/$_base_value/g;
430 }
431  
432 my $_body_data;
433 # authentication setting, if any
434 my $auth_settings = [qw(token )];
435  
436 # make the API Call
437 my $response = $self->{api_client}->call_api($_resource_path, $_method,
438 $query_params, $form_params,
439 $header_params, $_body_data, $auth_settings);
440 if (!$response) {
441 return;
442 }
443 my $_response_object = $self->{api_client}->deserialize('InlineResponse200', $response);
444 return $_response_object;
445 }
446  
447 #
448 # get_domain
449 #
450 # Describe a domain
451 #
452 # @param string $service_id Alphanumeric string identifying the service. (required)
453 # @param int $version_id Integer identifying a service version. (required)
454 # @param string $domain_name The name of the domain or domains associated with this service. (required)
455 {
456 my $params = {
457 'service_id' => {
458 data_type => 'string',
459 description => 'Alphanumeric string identifying the service.',
460 required => '1',
461 },
462 'version_id' => {
463 data_type => 'int',
464 description => 'Integer identifying a service version.',
465 required => '1',
466 },
467 'domain_name' => {
468 data_type => 'string',
469 description => 'The name of the domain or domains associated with this service.',
470 required => '1',
471 },
472 };
473 __PACKAGE__->method_documentation->{ 'get_domain' } = {
474 summary => 'Describe a domain',
475 params => $params,
476 returns => 'DomainResponse',
477 };
478 }
479 # @return DomainResponse
480 #
481 sub get_domain {
482 my ($self, %args) = @_;
483  
484 # verify the required parameter 'service_id' is set
485 unless (exists $args{'service_id'}) {
486 croak("Missing the required parameter 'service_id' when calling get_domain");
487 }
488  
489 # verify the required parameter 'version_id' is set
490 unless (exists $args{'version_id'}) {
491 croak("Missing the required parameter 'version_id' when calling get_domain");
492 }
493  
494 # verify the required parameter 'domain_name' is set
495 unless (exists $args{'domain_name'}) {
496 croak("Missing the required parameter 'domain_name' when calling get_domain");
497 }
498  
499 # parse inputs
500 my $_resource_path = '/service/{service_id}/version/{version_id}/domain/{domain_name}';
501  
502 my $_method = 'GET';
503 my $query_params = {};
504 my $header_params = {};
505 my $form_params = {};
506  
507 # 'Accept' and 'Content-Type' header
508 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
509 if ($_header_accept) {
510 $header_params->{'Accept'} = $_header_accept;
511 }
512 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
513  
514 # path params
515 if ( exists $args{'service_id'}) {
516 my $_base_variable = "{" . "service_id" . "}";
517 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
518 $_resource_path =~ s/$_base_variable/$_base_value/g;
519 }
520  
521 # path params
522 if ( exists $args{'version_id'}) {
523 my $_base_variable = "{" . "version_id" . "}";
524 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
525 $_resource_path =~ s/$_base_variable/$_base_value/g;
526 }
527  
528 # path params
529 if ( exists $args{'domain_name'}) {
530 my $_base_variable = "{" . "domain_name" . "}";
531 my $_base_value = $self->{api_client}->to_path_value($args{'domain_name'});
532 $_resource_path =~ s/$_base_variable/$_base_value/g;
533 }
534  
535 my $_body_data;
536 # authentication setting, if any
537 my $auth_settings = [qw(token )];
538  
539 # make the API Call
540 my $response = $self->{api_client}->call_api($_resource_path, $_method,
541 $query_params, $form_params,
542 $header_params, $_body_data, $auth_settings);
543 if (!$response) {
544 return;
545 }
546 my $_response_object = $self->{api_client}->deserialize('DomainResponse', $response);
547 return $_response_object;
548 }
549  
550 #
551 # list_domains
552 #
553 # List domains
554 #
555 # @param string $service_id Alphanumeric string identifying the service. (required)
556 # @param int $version_id Integer identifying a service version. (required)
557 {
558 my $params = {
559 'service_id' => {
560 data_type => 'string',
561 description => 'Alphanumeric string identifying the service.',
562 required => '1',
563 },
564 'version_id' => {
565 data_type => 'int',
566 description => 'Integer identifying a service version.',
567 required => '1',
568 },
569 };
570 __PACKAGE__->method_documentation->{ 'list_domains' } = {
571 summary => 'List domains',
572 params => $params,
573 returns => 'ARRAY[DomainResponse]',
574 };
575 }
576 # @return ARRAY[DomainResponse]
577 #
578 sub list_domains {
579 my ($self, %args) = @_;
580  
581 # verify the required parameter 'service_id' is set
582 unless (exists $args{'service_id'}) {
583 croak("Missing the required parameter 'service_id' when calling list_domains");
584 }
585  
586 # verify the required parameter 'version_id' is set
587 unless (exists $args{'version_id'}) {
588 croak("Missing the required parameter 'version_id' when calling list_domains");
589 }
590  
591 # parse inputs
592 my $_resource_path = '/service/{service_id}/version/{version_id}/domain';
593  
594 my $_method = 'GET';
595 my $query_params = {};
596 my $header_params = {};
597 my $form_params = {};
598  
599 # 'Accept' and 'Content-Type' header
600 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
601 if ($_header_accept) {
602 $header_params->{'Accept'} = $_header_accept;
603 }
604 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
605  
606 # path params
607 if ( exists $args{'service_id'}) {
608 my $_base_variable = "{" . "service_id" . "}";
609 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
610 $_resource_path =~ s/$_base_variable/$_base_value/g;
611 }
612  
613 # path params
614 if ( exists $args{'version_id'}) {
615 my $_base_variable = "{" . "version_id" . "}";
616 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
617 $_resource_path =~ s/$_base_variable/$_base_value/g;
618 }
619  
620 my $_body_data;
621 # authentication setting, if any
622 my $auth_settings = [qw(token )];
623  
624 # make the API Call
625 my $response = $self->{api_client}->call_api($_resource_path, $_method,
626 $query_params, $form_params,
627 $header_params, $_body_data, $auth_settings);
628 if (!$response) {
629 return;
630 }
631 my $_response_object = $self->{api_client}->deserialize('ARRAY[DomainResponse]', $response);
632 return $_response_object;
633 }
634  
635 #
636 # update_domain
637 #
638 # Update a domain
639 #
640 # @param string $service_id Alphanumeric string identifying the service. (required)
641 # @param int $version_id Integer identifying a service version. (required)
642 # @param string $domain_name The name of the domain or domains associated with this service. (required)
643 # @param string $comment A freeform descriptive note. (optional)
644 # @param string $name The name of the domain or domains associated with this service. (optional)
645 {
646 my $params = {
647 'service_id' => {
648 data_type => 'string',
649 description => 'Alphanumeric string identifying the service.',
650 required => '1',
651 },
652 'version_id' => {
653 data_type => 'int',
654 description => 'Integer identifying a service version.',
655 required => '1',
656 },
657 'domain_name' => {
658 data_type => 'string',
659 description => 'The name of the domain or domains associated with this service.',
660 required => '1',
661 },
662 'comment' => {
663 data_type => 'string',
664 description => 'A freeform descriptive note.',
665 required => '0',
666 },
667 'name' => {
668 data_type => 'string',
669 description => 'The name of the domain or domains associated with this service.',
670 required => '0',
671 },
672 };
673 __PACKAGE__->method_documentation->{ 'update_domain' } = {
674 summary => 'Update a domain',
675 params => $params,
676 returns => 'DomainResponse',
677 };
678 }
679 # @return DomainResponse
680 #
681 sub update_domain {
682 my ($self, %args) = @_;
683  
684 # verify the required parameter 'service_id' is set
685 unless (exists $args{'service_id'}) {
686 croak("Missing the required parameter 'service_id' when calling update_domain");
687 }
688  
689 # verify the required parameter 'version_id' is set
690 unless (exists $args{'version_id'}) {
691 croak("Missing the required parameter 'version_id' when calling update_domain");
692 }
693  
694 # verify the required parameter 'domain_name' is set
695 unless (exists $args{'domain_name'}) {
696 croak("Missing the required parameter 'domain_name' when calling update_domain");
697 }
698  
699 # parse inputs
700 my $_resource_path = '/service/{service_id}/version/{version_id}/domain/{domain_name}';
701  
702 my $_method = 'PUT';
703 my $query_params = {};
704 my $header_params = {};
705 my $form_params = {};
706  
707 # 'Accept' and 'Content-Type' header
708 my $_header_accept = $self->{api_client}->select_header_accept('application/json');
709 if ($_header_accept) {
710 $header_params->{'Accept'} = $_header_accept;
711 }
712 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/x-www-form-urlencoded');
713  
714 # path params
715 if ( exists $args{'service_id'}) {
716 my $_base_variable = "{" . "service_id" . "}";
717 my $_base_value = $self->{api_client}->to_path_value($args{'service_id'});
718 $_resource_path =~ s/$_base_variable/$_base_value/g;
719 }
720  
721 # path params
722 if ( exists $args{'version_id'}) {
723 my $_base_variable = "{" . "version_id" . "}";
724 my $_base_value = $self->{api_client}->to_path_value($args{'version_id'});
725 $_resource_path =~ s/$_base_variable/$_base_value/g;
726 }
727  
728 # path params
729 if ( exists $args{'domain_name'}) {
730 my $_base_variable = "{" . "domain_name" . "}";
731 my $_base_value = $self->{api_client}->to_path_value($args{'domain_name'});
732 $_resource_path =~ s/$_base_variable/$_base_value/g;
733 }
734  
735 # form params
736 if ( exists $args{'comment'} ) {
737 $form_params->{'comment'} = $self->{api_client}->to_form_value($args{'comment'});
738 }
739  
740 # form params
741 if ( exists $args{'name'} ) {
742 $form_params->{'name'} = $self->{api_client}->to_form_value($args{'name'});
743 }
744  
745 my $_body_data;
746 # authentication setting, if any
747 my $auth_settings = [qw(token )];
748  
749 # make the API Call
750 my $response = $self->{api_client}->call_api($_resource_path, $_method,
751 $query_params, $form_params,
752 $header_params, $_body_data, $auth_settings);
753 if (!$response) {
754 return;
755 }
756 my $_response_object = $self->{api_client}->deserialize('DomainResponse', $response);
757 return $_response_object;
758 }
759  
760 1;