Class: Tester::QueryParamController

Inherits:
BaseController show all
Defined in:
lib/tester/controllers/query_param_controller.rb

Overview

QueryParamController

Class Attribute Summary collapse

Attributes inherited from BaseController

#http_call_back, #http_client

Instance Method Summary collapse

Methods inherited from BaseController

#execute_request, #initialize, #validate_parameters, #validate_response

Constructor Details

This class inherits a constructor from Tester::BaseController

Class Attribute Details

.instanceObject

Returns the value of attribute instance.



10
11
12
# File 'lib/tester/controllers/query_param_controller.rb', line 10

def instance
  @instance
end

Instance Method Details

#date(date) ⇒ Object

TODO: type endpoint description here

Parameters:

  • date (Date)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/tester/controllers/query_param_controller.rb', line 110

def date(date)
  # Validate required parameters.
  validate_parameters(
    'date' => date
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/date'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'date' => date
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#date_array(dates) ⇒ Object

TODO: type endpoint description here

Parameters:

  • dates (List of Date)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/tester/controllers/query_param_controller.rb', line 20

def date_array(dates)
  # Validate required parameters.
  validate_parameters(
    'dates' => dates
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/datearray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'dates' => dates
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#instanceObject



13
14
15
# File 'lib/tester/controllers/query_param_controller.rb', line 13

def instance
  self.class.instance
end

#integer_enum_array(suites) ⇒ Object

TODO: type endpoint description here

Parameters:

  • suites (List of SuiteCode)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# File 'lib/tester/controllers/query_param_controller.rb', line 741

def integer_enum_array(suites)
  # Validate required parameters.
  validate_parameters(
    'suites' => suites
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/integerenumarray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'suites' => suites
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#multiple_params(number, precision, string, url) ⇒ Object

TODO: type endpoint description here

Parameters:

  • number (Integer)

    Required parameter: Example:

  • precision (Float)

    Required parameter: Example:

  • string (String)

    Required parameter: Example:

  • url (String)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/tester/controllers/query_param_controller.rb', line 691

def multiple_params(number,
                    precision,
                    string,
                    url)
  # Validate required parameters.
  validate_parameters(
    'number' => number,
    'precision' => precision,
    'string' => string,
    'url' => url
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/multipleparams'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'number' => number,
      'precision' => precision,
      'string' => string,
      'url' => url
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#no_paramsObject

TODO: type endpoint description here

Returns:

  • ServerResponse response from the API call



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/tester/controllers/query_param_controller.rb', line 396

def no_params
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/noparams'
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#number_array(integers) ⇒ Object

TODO: type endpoint description here

Parameters:

  • integers (List of Integer)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/tester/controllers/query_param_controller.rb', line 508

def number_array(integers)
  # Validate required parameters.
  validate_parameters(
    'integers' => integers
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/numberarray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'integers' => integers
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#optional_dynamic_query_param(name, _query_parameters = nil) ⇒ Object

get optional dynamic query parameter supported by this endpoint.

Parameters:

  • name (String)

    Required parameter: Example:

  • _query_parameters (Hash) (defaults to: nil)

    Additional optional query parameters are

Returns:

  • ServerResponse response from the API call



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/tester/controllers/query_param_controller.rb', line 63

def optional_dynamic_query_param(name,
                                 _query_parameters = nil)
  # Validate required parameters.
  validate_parameters(
    'name' => name
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/optionalQueryParam'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'name' => name
    },
    array_serialization: Configuration.array_serialization
  )
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    _query_parameters,
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#rfc_1123_date_time(datetime) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetime (DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/tester/controllers/query_param_controller.rb', line 233

def rfc_1123_date_time(datetime)
  # Validate required parameters.
  validate_parameters(
    'datetime' => datetime
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/rfc1123datetime'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetime' => datetime.httpdate
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#rfc_1123_date_time_array(datetimes) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetimes (List of DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/tester/controllers/query_param_controller.rb', line 274

def rfc_1123_date_time_array(datetimes)
  # Validate required parameters.
  validate_parameters(
    'datetimes' => datetimes
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/rfc1123datetimearray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetimes' => datetimes.map(&:httpdate)
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#rfc_3339_date_time(datetime) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetime (DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/tester/controllers/query_param_controller.rb', line 356

def rfc_3339_date_time(datetime)
  # Validate required parameters.
  validate_parameters(
    'datetime' => datetime
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/rfc3339datetime'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetime' => datetime
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#rfc_3339_date_time_array(datetimes) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetimes (List of DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/tester/controllers/query_param_controller.rb', line 315

def rfc_3339_date_time_array(datetimes)
  # Validate required parameters.
  validate_parameters(
    'datetimes' => datetimes
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/rfc3339datetimearray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetimes' => datetimes
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#simple_query(boolean, number, string, _query_parameters = nil) ⇒ Object

TODO: type endpoint description here supported by this endpoint.

Parameters:

  • boolean (Boolean)

    Required parameter: Example:

  • number (Integer)

    Required parameter: Example:

  • string (String)

    Required parameter: Example:

  • _query_parameters (Hash) (defaults to: nil)

    Additional optional query parameters are

Returns:

  • ServerResponse response from the API call



594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# File 'lib/tester/controllers/query_param_controller.rb', line 594

def simple_query(boolean,
                 number,
                 string,
                 _query_parameters = nil)
  # Validate required parameters.
  validate_parameters(
    'boolean' => boolean,
    'number' => number,
    'string' => string
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'boolean' => boolean,
      'number' => number,
      'string' => string
    },
    array_serialization: Configuration.array_serialization
  )
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    _query_parameters,
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#string_array(strings) ⇒ Object

TODO: type endpoint description here

Parameters:

  • strings (List of String)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/tester/controllers/query_param_controller.rb', line 549

def string_array(strings)
  # Validate required parameters.
  validate_parameters(
    'strings' => strings
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/stringarray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'strings' => strings
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#string_enum_array(days) ⇒ Object

TODO: type endpoint description here

Parameters:

  • days (List of Days)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/tester/controllers/query_param_controller.rb', line 647

def string_enum_array(days)
  # Validate required parameters.
  validate_parameters(
    'days' => days
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/stringenumarray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'days' => days
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#string_param(string) ⇒ Object

TODO: type endpoint description here

Parameters:

  • string (String)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/tester/controllers/query_param_controller.rb', line 426

def string_param(string)
  # Validate required parameters.
  validate_parameters(
    'string' => string
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/stringparam'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'string' => string
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#unix_date_time(datetime) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetime (DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/tester/controllers/query_param_controller.rb', line 192

def unix_date_time(datetime)
  # Validate required parameters.
  validate_parameters(
    'datetime' => datetime
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/unixdatetime'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetime' => datetime.to_time.utc.to_i
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#unix_date_time_array(datetimes) ⇒ Object

TODO: type endpoint description here

Parameters:

  • datetimes (List of DateTime)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/tester/controllers/query_param_controller.rb', line 151

def unix_date_time_array(datetimes)
  # Validate required parameters.
  validate_parameters(
    'datetimes' => datetimes
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/unixdatetimearray'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'datetimes' => datetimes.map { |element| element.to_time.utc.to_i }
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end

#url_param(url) ⇒ Object

TODO: type endpoint description here

Parameters:

  • url (String)

    Required parameter: Example:

Returns:

  • ServerResponse response from the API call



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/tester/controllers/query_param_controller.rb', line 467

def url_param(url)
  # Validate required parameters.
  validate_parameters(
    'url' => url
  )
  # Prepare query url.
  _query_builder = Configuration.get_base_uri
  _query_builder << '/query/urlparam'
  _query_builder = APIHelper.append_url_with_query_parameters(
    _query_builder,
    {
      'url' => url
    },
    array_serialization: Configuration.array_serialization
  )
  _query_url = APIHelper.clean_url _query_builder

  # Prepare headers.
  _headers = {
    'accept' => 'application/json'
  }

  # Prepare and execute HttpRequest.
  _request = @http_client.get(
    _query_url,
    headers: _headers
  )
  _context = execute_request(_request)

  # Validate response against endpoint and global error codes.
  return nil if _context.response.status_code == 404
  validate_response(_context)

  # Return appropriate response type.
  decoded = APIHelper.json_deserialize(_context.response.raw_body)
  ServerResponse.from_hash(decoded)
end