hjhjhjnew 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +55 -0
  4. data/lib/tester.rb +56 -0
  5. data/lib/tester/api_helper.rb +261 -0
  6. data/lib/tester/configuration.rb +66 -0
  7. data/lib/tester/controllers/base_controller.rb +59 -0
  8. data/lib/tester/controllers/body_params_controller.rb +1270 -0
  9. data/lib/tester/controllers/echo_controller.rb +134 -0
  10. data/lib/tester/controllers/error_codes_controller.rb +179 -0
  11. data/lib/tester/controllers/form_params_controller.rb +1391 -0
  12. data/lib/tester/controllers/header_controller.rb +63 -0
  13. data/lib/tester/controllers/query_param_controller.rb +779 -0
  14. data/lib/tester/controllers/response_types_controller.rb +717 -0
  15. data/lib/tester/controllers/template_params_controller.rb +93 -0
  16. data/lib/tester/exceptions/api_exception.rb +18 -0
  17. data/lib/tester/exceptions/global_test_exception.rb +32 -0
  18. data/lib/tester/exceptions/local_test_exception.rb +30 -0
  19. data/lib/tester/exceptions/nested_model_exception.rb +37 -0
  20. data/lib/tester/http/faraday_client.rb +55 -0
  21. data/lib/tester/http/http_call_back.rb +22 -0
  22. data/lib/tester/http/http_client.rb +92 -0
  23. data/lib/tester/http/http_context.rb +18 -0
  24. data/lib/tester/http/http_method_enum.rb +11 -0
  25. data/lib/tester/http/http_request.rb +48 -0
  26. data/lib/tester/http/http_response.rb +21 -0
  27. data/lib/tester/models/additional_model_parameters.rb +70 -0
  28. data/lib/tester/models/base_model.rb +52 -0
  29. data/lib/tester/models/boss.rb +129 -0
  30. data/lib/tester/models/days.rb +30 -0
  31. data/lib/tester/models/delete_body.rb +52 -0
  32. data/lib/tester/models/echo_response.rb +88 -0
  33. data/lib/tester/models/employee.rb +155 -0
  34. data/lib/tester/models/job.rb +43 -0
  35. data/lib/tester/models/person.rb +113 -0
  36. data/lib/tester/models/query_parameter.rb +43 -0
  37. data/lib/tester/models/server_response.rb +61 -0
  38. data/lib/tester/models/suite_code.rb +21 -0
  39. data/lib/tester/models/test_nstring_encoding.rb +52 -0
  40. data/lib/tester/models/test_r_nstring_encoding.rb +52 -0
  41. data/lib/tester/models/test_rstring_encoding.rb +52 -0
  42. data/lib/tester/models/validate.rb +61 -0
  43. data/lib/tester/tester_client.rb +61 -0
  44. data/test/controllers/controller_test_base.rb +33 -0
  45. data/test/controllers/test_body_params_controller.rb +1210 -0
  46. data/test/controllers/test_echo_controller.rb +29 -0
  47. data/test/controllers/test_error_codes_controller.rb +47 -0
  48. data/test/controllers/test_form_params_controller.rb +1099 -0
  49. data/test/controllers/test_header_controller.rb +30 -0
  50. data/test/controllers/test_query_param_controller.rb +345 -0
  51. data/test/controllers/test_response_types_controller.rb +429 -0
  52. data/test/controllers/test_template_params_controller.rb +47 -0
  53. data/test/http_response_catcher.rb +16 -0
  54. data/test/test_helper.rb +91 -0
  55. metadata +178 -0
@@ -0,0 +1,63 @@
1
+ # This file was automatically generated for Stamplay by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module Tester
5
+ # HeaderController
6
+ class HeaderController < BaseController
7
+ @instance = HeaderController.new
8
+
9
+ class << self
10
+ attr_accessor :instance
11
+ end
12
+
13
+ def instance
14
+ self.class.instance
15
+ end
16
+
17
+ # Sends a single header params
18
+ # @param [String] custom_header Required parameter: Example:
19
+ # @param [String] value Required parameter: Represents the value of the
20
+ # custom header
21
+ # @return ServerResponse response from the API call
22
+ def send_headers(custom_header,
23
+ value)
24
+ # Validate required parameters.
25
+ validate_parameters(
26
+ 'custom_header' => custom_header,
27
+ 'value' => value
28
+ )
29
+ # Prepare query url.
30
+ _query_builder = Configuration.get_base_uri
31
+ _query_builder << '/header'
32
+ _query_url = APIHelper.clean_url _query_builder
33
+
34
+ # Prepare headers.
35
+ _headers = {
36
+ 'accept' => 'application/json',
37
+ 'custom-header' => custom_header
38
+ }
39
+
40
+ # Prepare form parameters.
41
+ _parameters = {
42
+ 'value' => value
43
+ }
44
+ _parameters = APIHelper.form_encode_parameters(_parameters)
45
+
46
+ # Prepare and execute HttpRequest.
47
+ _request = @http_client.post(
48
+ _query_url,
49
+ headers: _headers,
50
+ parameters: _parameters
51
+ )
52
+ _context = execute_request(_request)
53
+
54
+ # Validate response against endpoint and global error codes.
55
+ return nil if _context.response.status_code == 404
56
+ validate_response(_context)
57
+
58
+ # Return appropriate response type.
59
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
60
+ ServerResponse.from_hash(decoded)
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,779 @@
1
+ # This file was automatically generated for Stamplay by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module Tester
5
+ # QueryParamController
6
+ class QueryParamController < BaseController
7
+ @instance = QueryParamController.new
8
+
9
+ class << self
10
+ attr_accessor :instance
11
+ end
12
+
13
+ def instance
14
+ self.class.instance
15
+ end
16
+
17
+ # TODO: type endpoint description here
18
+ # @param [List of Date] dates Required parameter: Example:
19
+ # @return ServerResponse response from the API call
20
+ def date_array(dates)
21
+ # Validate required parameters.
22
+ validate_parameters(
23
+ 'dates' => dates
24
+ )
25
+ # Prepare query url.
26
+ _query_builder = Configuration.get_base_uri
27
+ _query_builder << '/query/datearray'
28
+ _query_builder = APIHelper.append_url_with_query_parameters(
29
+ _query_builder,
30
+ {
31
+ 'dates' => dates
32
+ },
33
+ array_serialization: Configuration.array_serialization
34
+ )
35
+ _query_url = APIHelper.clean_url _query_builder
36
+
37
+ # Prepare headers.
38
+ _headers = {
39
+ 'accept' => 'application/json'
40
+ }
41
+
42
+ # Prepare and execute HttpRequest.
43
+ _request = @http_client.get(
44
+ _query_url,
45
+ headers: _headers
46
+ )
47
+ _context = execute_request(_request)
48
+
49
+ # Validate response against endpoint and global error codes.
50
+ return nil if _context.response.status_code == 404
51
+ validate_response(_context)
52
+
53
+ # Return appropriate response type.
54
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
55
+ ServerResponse.from_hash(decoded)
56
+ end
57
+
58
+ # get optional dynamic query parameter
59
+ # @param [String] name Required parameter: Example:
60
+ # @param [Hash] _query_parameters Additional optional query parameters are
61
+ # supported by this endpoint.
62
+ # @return ServerResponse response from the API call
63
+ def optional_dynamic_query_param(name,
64
+ _query_parameters = nil)
65
+ # Validate required parameters.
66
+ validate_parameters(
67
+ 'name' => name
68
+ )
69
+ # Prepare query url.
70
+ _query_builder = Configuration.get_base_uri
71
+ _query_builder << '/query/optionalQueryParam'
72
+ _query_builder = APIHelper.append_url_with_query_parameters(
73
+ _query_builder,
74
+ {
75
+ 'name' => name
76
+ },
77
+ array_serialization: Configuration.array_serialization
78
+ )
79
+ _query_builder = APIHelper.append_url_with_query_parameters(
80
+ _query_builder,
81
+ _query_parameters,
82
+ array_serialization: Configuration.array_serialization
83
+ )
84
+ _query_url = APIHelper.clean_url _query_builder
85
+
86
+ # Prepare headers.
87
+ _headers = {
88
+ 'accept' => 'application/json'
89
+ }
90
+
91
+ # Prepare and execute HttpRequest.
92
+ _request = @http_client.get(
93
+ _query_url,
94
+ headers: _headers
95
+ )
96
+ _context = execute_request(_request)
97
+
98
+ # Validate response against endpoint and global error codes.
99
+ return nil if _context.response.status_code == 404
100
+ validate_response(_context)
101
+
102
+ # Return appropriate response type.
103
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
104
+ ServerResponse.from_hash(decoded)
105
+ end
106
+
107
+ # TODO: type endpoint description here
108
+ # @param [Date] date Required parameter: Example:
109
+ # @return ServerResponse response from the API call
110
+ def date(date)
111
+ # Validate required parameters.
112
+ validate_parameters(
113
+ 'date' => date
114
+ )
115
+ # Prepare query url.
116
+ _query_builder = Configuration.get_base_uri
117
+ _query_builder << '/query/date'
118
+ _query_builder = APIHelper.append_url_with_query_parameters(
119
+ _query_builder,
120
+ {
121
+ 'date' => date
122
+ },
123
+ array_serialization: Configuration.array_serialization
124
+ )
125
+ _query_url = APIHelper.clean_url _query_builder
126
+
127
+ # Prepare headers.
128
+ _headers = {
129
+ 'accept' => 'application/json'
130
+ }
131
+
132
+ # Prepare and execute HttpRequest.
133
+ _request = @http_client.get(
134
+ _query_url,
135
+ headers: _headers
136
+ )
137
+ _context = execute_request(_request)
138
+
139
+ # Validate response against endpoint and global error codes.
140
+ return nil if _context.response.status_code == 404
141
+ validate_response(_context)
142
+
143
+ # Return appropriate response type.
144
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
145
+ ServerResponse.from_hash(decoded)
146
+ end
147
+
148
+ # TODO: type endpoint description here
149
+ # @param [List of DateTime] datetimes Required parameter: Example:
150
+ # @return ServerResponse response from the API call
151
+ def unix_date_time_array(datetimes)
152
+ # Validate required parameters.
153
+ validate_parameters(
154
+ 'datetimes' => datetimes
155
+ )
156
+ # Prepare query url.
157
+ _query_builder = Configuration.get_base_uri
158
+ _query_builder << '/query/unixdatetimearray'
159
+ _query_builder = APIHelper.append_url_with_query_parameters(
160
+ _query_builder,
161
+ {
162
+ 'datetimes' => datetimes.map { |element| element.to_time.utc.to_i }
163
+ },
164
+ array_serialization: Configuration.array_serialization
165
+ )
166
+ _query_url = APIHelper.clean_url _query_builder
167
+
168
+ # Prepare headers.
169
+ _headers = {
170
+ 'accept' => 'application/json'
171
+ }
172
+
173
+ # Prepare and execute HttpRequest.
174
+ _request = @http_client.get(
175
+ _query_url,
176
+ headers: _headers
177
+ )
178
+ _context = execute_request(_request)
179
+
180
+ # Validate response against endpoint and global error codes.
181
+ return nil if _context.response.status_code == 404
182
+ validate_response(_context)
183
+
184
+ # Return appropriate response type.
185
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
186
+ ServerResponse.from_hash(decoded)
187
+ end
188
+
189
+ # TODO: type endpoint description here
190
+ # @param [DateTime] datetime Required parameter: Example:
191
+ # @return ServerResponse response from the API call
192
+ def unix_date_time(datetime)
193
+ # Validate required parameters.
194
+ validate_parameters(
195
+ 'datetime' => datetime
196
+ )
197
+ # Prepare query url.
198
+ _query_builder = Configuration.get_base_uri
199
+ _query_builder << '/query/unixdatetime'
200
+ _query_builder = APIHelper.append_url_with_query_parameters(
201
+ _query_builder,
202
+ {
203
+ 'datetime' => datetime.to_time.utc.to_i
204
+ },
205
+ array_serialization: Configuration.array_serialization
206
+ )
207
+ _query_url = APIHelper.clean_url _query_builder
208
+
209
+ # Prepare headers.
210
+ _headers = {
211
+ 'accept' => 'application/json'
212
+ }
213
+
214
+ # Prepare and execute HttpRequest.
215
+ _request = @http_client.get(
216
+ _query_url,
217
+ headers: _headers
218
+ )
219
+ _context = execute_request(_request)
220
+
221
+ # Validate response against endpoint and global error codes.
222
+ return nil if _context.response.status_code == 404
223
+ validate_response(_context)
224
+
225
+ # Return appropriate response type.
226
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
227
+ ServerResponse.from_hash(decoded)
228
+ end
229
+
230
+ # TODO: type endpoint description here
231
+ # @param [DateTime] datetime Required parameter: Example:
232
+ # @return ServerResponse response from the API call
233
+ def rfc_1123_date_time(datetime)
234
+ # Validate required parameters.
235
+ validate_parameters(
236
+ 'datetime' => datetime
237
+ )
238
+ # Prepare query url.
239
+ _query_builder = Configuration.get_base_uri
240
+ _query_builder << '/query/rfc1123datetime'
241
+ _query_builder = APIHelper.append_url_with_query_parameters(
242
+ _query_builder,
243
+ {
244
+ 'datetime' => datetime.httpdate
245
+ },
246
+ array_serialization: Configuration.array_serialization
247
+ )
248
+ _query_url = APIHelper.clean_url _query_builder
249
+
250
+ # Prepare headers.
251
+ _headers = {
252
+ 'accept' => 'application/json'
253
+ }
254
+
255
+ # Prepare and execute HttpRequest.
256
+ _request = @http_client.get(
257
+ _query_url,
258
+ headers: _headers
259
+ )
260
+ _context = execute_request(_request)
261
+
262
+ # Validate response against endpoint and global error codes.
263
+ return nil if _context.response.status_code == 404
264
+ validate_response(_context)
265
+
266
+ # Return appropriate response type.
267
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
268
+ ServerResponse.from_hash(decoded)
269
+ end
270
+
271
+ # TODO: type endpoint description here
272
+ # @param [List of DateTime] datetimes Required parameter: Example:
273
+ # @return ServerResponse response from the API call
274
+ def rfc_1123_date_time_array(datetimes)
275
+ # Validate required parameters.
276
+ validate_parameters(
277
+ 'datetimes' => datetimes
278
+ )
279
+ # Prepare query url.
280
+ _query_builder = Configuration.get_base_uri
281
+ _query_builder << '/query/rfc1123datetimearray'
282
+ _query_builder = APIHelper.append_url_with_query_parameters(
283
+ _query_builder,
284
+ {
285
+ 'datetimes' => datetimes.map(&:httpdate)
286
+ },
287
+ array_serialization: Configuration.array_serialization
288
+ )
289
+ _query_url = APIHelper.clean_url _query_builder
290
+
291
+ # Prepare headers.
292
+ _headers = {
293
+ 'accept' => 'application/json'
294
+ }
295
+
296
+ # Prepare and execute HttpRequest.
297
+ _request = @http_client.get(
298
+ _query_url,
299
+ headers: _headers
300
+ )
301
+ _context = execute_request(_request)
302
+
303
+ # Validate response against endpoint and global error codes.
304
+ return nil if _context.response.status_code == 404
305
+ validate_response(_context)
306
+
307
+ # Return appropriate response type.
308
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
309
+ ServerResponse.from_hash(decoded)
310
+ end
311
+
312
+ # TODO: type endpoint description here
313
+ # @param [List of DateTime] datetimes Required parameter: Example:
314
+ # @return ServerResponse response from the API call
315
+ def rfc_3339_date_time_array(datetimes)
316
+ # Validate required parameters.
317
+ validate_parameters(
318
+ 'datetimes' => datetimes
319
+ )
320
+ # Prepare query url.
321
+ _query_builder = Configuration.get_base_uri
322
+ _query_builder << '/query/rfc3339datetimearray'
323
+ _query_builder = APIHelper.append_url_with_query_parameters(
324
+ _query_builder,
325
+ {
326
+ 'datetimes' => datetimes
327
+ },
328
+ array_serialization: Configuration.array_serialization
329
+ )
330
+ _query_url = APIHelper.clean_url _query_builder
331
+
332
+ # Prepare headers.
333
+ _headers = {
334
+ 'accept' => 'application/json'
335
+ }
336
+
337
+ # Prepare and execute HttpRequest.
338
+ _request = @http_client.get(
339
+ _query_url,
340
+ headers: _headers
341
+ )
342
+ _context = execute_request(_request)
343
+
344
+ # Validate response against endpoint and global error codes.
345
+ return nil if _context.response.status_code == 404
346
+ validate_response(_context)
347
+
348
+ # Return appropriate response type.
349
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
350
+ ServerResponse.from_hash(decoded)
351
+ end
352
+
353
+ # TODO: type endpoint description here
354
+ # @param [DateTime] datetime Required parameter: Example:
355
+ # @return ServerResponse response from the API call
356
+ def rfc_3339_date_time(datetime)
357
+ # Validate required parameters.
358
+ validate_parameters(
359
+ 'datetime' => datetime
360
+ )
361
+ # Prepare query url.
362
+ _query_builder = Configuration.get_base_uri
363
+ _query_builder << '/query/rfc3339datetime'
364
+ _query_builder = APIHelper.append_url_with_query_parameters(
365
+ _query_builder,
366
+ {
367
+ 'datetime' => datetime
368
+ },
369
+ array_serialization: Configuration.array_serialization
370
+ )
371
+ _query_url = APIHelper.clean_url _query_builder
372
+
373
+ # Prepare headers.
374
+ _headers = {
375
+ 'accept' => 'application/json'
376
+ }
377
+
378
+ # Prepare and execute HttpRequest.
379
+ _request = @http_client.get(
380
+ _query_url,
381
+ headers: _headers
382
+ )
383
+ _context = execute_request(_request)
384
+
385
+ # Validate response against endpoint and global error codes.
386
+ return nil if _context.response.status_code == 404
387
+ validate_response(_context)
388
+
389
+ # Return appropriate response type.
390
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
391
+ ServerResponse.from_hash(decoded)
392
+ end
393
+
394
+ # TODO: type endpoint description here
395
+ # @return ServerResponse response from the API call
396
+ def no_params
397
+ # Prepare query url.
398
+ _query_builder = Configuration.get_base_uri
399
+ _query_builder << '/query/noparams'
400
+ _query_url = APIHelper.clean_url _query_builder
401
+
402
+ # Prepare headers.
403
+ _headers = {
404
+ 'accept' => 'application/json'
405
+ }
406
+
407
+ # Prepare and execute HttpRequest.
408
+ _request = @http_client.get(
409
+ _query_url,
410
+ headers: _headers
411
+ )
412
+ _context = execute_request(_request)
413
+
414
+ # Validate response against endpoint and global error codes.
415
+ return nil if _context.response.status_code == 404
416
+ validate_response(_context)
417
+
418
+ # Return appropriate response type.
419
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
420
+ ServerResponse.from_hash(decoded)
421
+ end
422
+
423
+ # TODO: type endpoint description here
424
+ # @param [String] string Required parameter: Example:
425
+ # @return ServerResponse response from the API call
426
+ def string_param(string)
427
+ # Validate required parameters.
428
+ validate_parameters(
429
+ 'string' => string
430
+ )
431
+ # Prepare query url.
432
+ _query_builder = Configuration.get_base_uri
433
+ _query_builder << '/query/stringparam'
434
+ _query_builder = APIHelper.append_url_with_query_parameters(
435
+ _query_builder,
436
+ {
437
+ 'string' => string
438
+ },
439
+ array_serialization: Configuration.array_serialization
440
+ )
441
+ _query_url = APIHelper.clean_url _query_builder
442
+
443
+ # Prepare headers.
444
+ _headers = {
445
+ 'accept' => 'application/json'
446
+ }
447
+
448
+ # Prepare and execute HttpRequest.
449
+ _request = @http_client.get(
450
+ _query_url,
451
+ headers: _headers
452
+ )
453
+ _context = execute_request(_request)
454
+
455
+ # Validate response against endpoint and global error codes.
456
+ return nil if _context.response.status_code == 404
457
+ validate_response(_context)
458
+
459
+ # Return appropriate response type.
460
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
461
+ ServerResponse.from_hash(decoded)
462
+ end
463
+
464
+ # TODO: type endpoint description here
465
+ # @param [String] url Required parameter: Example:
466
+ # @return ServerResponse response from the API call
467
+ def url_param(url)
468
+ # Validate required parameters.
469
+ validate_parameters(
470
+ 'url' => url
471
+ )
472
+ # Prepare query url.
473
+ _query_builder = Configuration.get_base_uri
474
+ _query_builder << '/query/urlparam'
475
+ _query_builder = APIHelper.append_url_with_query_parameters(
476
+ _query_builder,
477
+ {
478
+ 'url' => url
479
+ },
480
+ array_serialization: Configuration.array_serialization
481
+ )
482
+ _query_url = APIHelper.clean_url _query_builder
483
+
484
+ # Prepare headers.
485
+ _headers = {
486
+ 'accept' => 'application/json'
487
+ }
488
+
489
+ # Prepare and execute HttpRequest.
490
+ _request = @http_client.get(
491
+ _query_url,
492
+ headers: _headers
493
+ )
494
+ _context = execute_request(_request)
495
+
496
+ # Validate response against endpoint and global error codes.
497
+ return nil if _context.response.status_code == 404
498
+ validate_response(_context)
499
+
500
+ # Return appropriate response type.
501
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
502
+ ServerResponse.from_hash(decoded)
503
+ end
504
+
505
+ # TODO: type endpoint description here
506
+ # @param [List of Integer] integers Required parameter: Example:
507
+ # @return ServerResponse response from the API call
508
+ def number_array(integers)
509
+ # Validate required parameters.
510
+ validate_parameters(
511
+ 'integers' => integers
512
+ )
513
+ # Prepare query url.
514
+ _query_builder = Configuration.get_base_uri
515
+ _query_builder << '/query/numberarray'
516
+ _query_builder = APIHelper.append_url_with_query_parameters(
517
+ _query_builder,
518
+ {
519
+ 'integers' => integers
520
+ },
521
+ array_serialization: Configuration.array_serialization
522
+ )
523
+ _query_url = APIHelper.clean_url _query_builder
524
+
525
+ # Prepare headers.
526
+ _headers = {
527
+ 'accept' => 'application/json'
528
+ }
529
+
530
+ # Prepare and execute HttpRequest.
531
+ _request = @http_client.get(
532
+ _query_url,
533
+ headers: _headers
534
+ )
535
+ _context = execute_request(_request)
536
+
537
+ # Validate response against endpoint and global error codes.
538
+ return nil if _context.response.status_code == 404
539
+ validate_response(_context)
540
+
541
+ # Return appropriate response type.
542
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
543
+ ServerResponse.from_hash(decoded)
544
+ end
545
+
546
+ # TODO: type endpoint description here
547
+ # @param [List of String] strings Required parameter: Example:
548
+ # @return ServerResponse response from the API call
549
+ def string_array(strings)
550
+ # Validate required parameters.
551
+ validate_parameters(
552
+ 'strings' => strings
553
+ )
554
+ # Prepare query url.
555
+ _query_builder = Configuration.get_base_uri
556
+ _query_builder << '/query/stringarray'
557
+ _query_builder = APIHelper.append_url_with_query_parameters(
558
+ _query_builder,
559
+ {
560
+ 'strings' => strings
561
+ },
562
+ array_serialization: Configuration.array_serialization
563
+ )
564
+ _query_url = APIHelper.clean_url _query_builder
565
+
566
+ # Prepare headers.
567
+ _headers = {
568
+ 'accept' => 'application/json'
569
+ }
570
+
571
+ # Prepare and execute HttpRequest.
572
+ _request = @http_client.get(
573
+ _query_url,
574
+ headers: _headers
575
+ )
576
+ _context = execute_request(_request)
577
+
578
+ # Validate response against endpoint and global error codes.
579
+ return nil if _context.response.status_code == 404
580
+ validate_response(_context)
581
+
582
+ # Return appropriate response type.
583
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
584
+ ServerResponse.from_hash(decoded)
585
+ end
586
+
587
+ # TODO: type endpoint description here
588
+ # @param [Boolean] boolean Required parameter: Example:
589
+ # @param [Integer] number Required parameter: Example:
590
+ # @param [String] string Required parameter: Example:
591
+ # @param [Hash] _query_parameters Additional optional query parameters are
592
+ # supported by this endpoint.
593
+ # @return ServerResponse response from the API call
594
+ def simple_query(boolean,
595
+ number,
596
+ string,
597
+ _query_parameters = nil)
598
+ # Validate required parameters.
599
+ validate_parameters(
600
+ 'boolean' => boolean,
601
+ 'number' => number,
602
+ 'string' => string
603
+ )
604
+ # Prepare query url.
605
+ _query_builder = Configuration.get_base_uri
606
+ _query_builder << '/query'
607
+ _query_builder = APIHelper.append_url_with_query_parameters(
608
+ _query_builder,
609
+ {
610
+ 'boolean' => boolean,
611
+ 'number' => number,
612
+ 'string' => string
613
+ },
614
+ array_serialization: Configuration.array_serialization
615
+ )
616
+ _query_builder = APIHelper.append_url_with_query_parameters(
617
+ _query_builder,
618
+ _query_parameters,
619
+ array_serialization: Configuration.array_serialization
620
+ )
621
+ _query_url = APIHelper.clean_url _query_builder
622
+
623
+ # Prepare headers.
624
+ _headers = {
625
+ 'accept' => 'application/json'
626
+ }
627
+
628
+ # Prepare and execute HttpRequest.
629
+ _request = @http_client.get(
630
+ _query_url,
631
+ headers: _headers
632
+ )
633
+ _context = execute_request(_request)
634
+
635
+ # Validate response against endpoint and global error codes.
636
+ return nil if _context.response.status_code == 404
637
+ validate_response(_context)
638
+
639
+ # Return appropriate response type.
640
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
641
+ ServerResponse.from_hash(decoded)
642
+ end
643
+
644
+ # TODO: type endpoint description here
645
+ # @param [List of Days] days Required parameter: Example:
646
+ # @return ServerResponse response from the API call
647
+ def string_enum_array(days)
648
+ # Validate required parameters.
649
+ validate_parameters(
650
+ 'days' => days
651
+ )
652
+ # Prepare query url.
653
+ _query_builder = Configuration.get_base_uri
654
+ _query_builder << '/query/stringenumarray'
655
+ _query_builder = APIHelper.append_url_with_query_parameters(
656
+ _query_builder,
657
+ {
658
+ 'days' => days
659
+ },
660
+ array_serialization: Configuration.array_serialization
661
+ )
662
+ _query_url = APIHelper.clean_url _query_builder
663
+
664
+ # Prepare headers.
665
+ _headers = {
666
+ 'accept' => 'application/json'
667
+ }
668
+
669
+ # Prepare and execute HttpRequest.
670
+ _request = @http_client.get(
671
+ _query_url,
672
+ headers: _headers
673
+ )
674
+ _context = execute_request(_request)
675
+
676
+ # Validate response against endpoint and global error codes.
677
+ return nil if _context.response.status_code == 404
678
+ validate_response(_context)
679
+
680
+ # Return appropriate response type.
681
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
682
+ ServerResponse.from_hash(decoded)
683
+ end
684
+
685
+ # TODO: type endpoint description here
686
+ # @param [Integer] number Required parameter: Example:
687
+ # @param [Float] precision Required parameter: Example:
688
+ # @param [String] string Required parameter: Example:
689
+ # @param [String] url Required parameter: Example:
690
+ # @return ServerResponse response from the API call
691
+ def multiple_params(number,
692
+ precision,
693
+ string,
694
+ url)
695
+ # Validate required parameters.
696
+ validate_parameters(
697
+ 'number' => number,
698
+ 'precision' => precision,
699
+ 'string' => string,
700
+ 'url' => url
701
+ )
702
+ # Prepare query url.
703
+ _query_builder = Configuration.get_base_uri
704
+ _query_builder << '/query/multipleparams'
705
+ _query_builder = APIHelper.append_url_with_query_parameters(
706
+ _query_builder,
707
+ {
708
+ 'number' => number,
709
+ 'precision' => precision,
710
+ 'string' => string,
711
+ 'url' => url
712
+ },
713
+ array_serialization: Configuration.array_serialization
714
+ )
715
+ _query_url = APIHelper.clean_url _query_builder
716
+
717
+ # Prepare headers.
718
+ _headers = {
719
+ 'accept' => 'application/json'
720
+ }
721
+
722
+ # Prepare and execute HttpRequest.
723
+ _request = @http_client.get(
724
+ _query_url,
725
+ headers: _headers
726
+ )
727
+ _context = execute_request(_request)
728
+
729
+ # Validate response against endpoint and global error codes.
730
+ return nil if _context.response.status_code == 404
731
+ validate_response(_context)
732
+
733
+ # Return appropriate response type.
734
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
735
+ ServerResponse.from_hash(decoded)
736
+ end
737
+
738
+ # TODO: type endpoint description here
739
+ # @param [List of SuiteCode] suites Required parameter: Example:
740
+ # @return ServerResponse response from the API call
741
+ def integer_enum_array(suites)
742
+ # Validate required parameters.
743
+ validate_parameters(
744
+ 'suites' => suites
745
+ )
746
+ # Prepare query url.
747
+ _query_builder = Configuration.get_base_uri
748
+ _query_builder << '/query/integerenumarray'
749
+ _query_builder = APIHelper.append_url_with_query_parameters(
750
+ _query_builder,
751
+ {
752
+ 'suites' => suites
753
+ },
754
+ array_serialization: Configuration.array_serialization
755
+ )
756
+ _query_url = APIHelper.clean_url _query_builder
757
+
758
+ # Prepare headers.
759
+ _headers = {
760
+ 'accept' => 'application/json'
761
+ }
762
+
763
+ # Prepare and execute HttpRequest.
764
+ _request = @http_client.get(
765
+ _query_url,
766
+ headers: _headers
767
+ )
768
+ _context = execute_request(_request)
769
+
770
+ # Validate response against endpoint and global error codes.
771
+ return nil if _context.response.status_code == 404
772
+ validate_response(_context)
773
+
774
+ # Return appropriate response type.
775
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
776
+ ServerResponse.from_hash(decoded)
777
+ end
778
+ end
779
+ end