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,134 @@
1
+ # This file was automatically generated for Stamplay by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module Tester
5
+ # EchoController
6
+ class EchoController < BaseController
7
+ @instance = EchoController.new
8
+
9
+ class << self
10
+ attr_accessor :instance
11
+ end
12
+
13
+ def instance
14
+ self.class.instance
15
+ end
16
+
17
+ # Echo's back the request
18
+ # @param [Object] input Required parameter: Example:
19
+ # @return Mixed response from the API call
20
+ def json_echo(input)
21
+ # Validate required parameters.
22
+ validate_parameters(
23
+ 'input' => input
24
+ )
25
+ # Prepare query url.
26
+ _query_builder = Configuration.get_base_uri
27
+ _query_builder << '/'
28
+ _query_url = APIHelper.clean_url _query_builder
29
+
30
+ # Prepare headers.
31
+ _headers = {
32
+ 'accept' => 'application/json',
33
+ 'content-type' => 'application/json; charset=utf-8'
34
+ }
35
+
36
+ # Prepare and execute HttpRequest.
37
+ _request = @http_client.post(
38
+ _query_url,
39
+ headers: _headers,
40
+ parameters: input.to_json
41
+ )
42
+ _context = execute_request(_request)
43
+
44
+ # Validate response against endpoint and global error codes.
45
+ return nil if _context.response.status_code == 404
46
+ validate_response(_context)
47
+
48
+ # Return appropriate response type.
49
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
50
+ _context.response.raw_body.nil? ||
51
+ _context.response.raw_body.to_s.strip.empty?
52
+ decoded
53
+ end
54
+
55
+ # Sends the request including any form params as JSON
56
+ # @param [Object] input Required parameter: Example:
57
+ # @return Mixed response from the API call
58
+ def form_echo(input)
59
+ # Validate required parameters.
60
+ validate_parameters(
61
+ 'input' => input
62
+ )
63
+ # Prepare query url.
64
+ _query_builder = Configuration.get_base_uri
65
+ _query_builder << '/'
66
+ _query_url = APIHelper.clean_url _query_builder
67
+
68
+ # Prepare headers.
69
+ _headers = {
70
+ 'accept' => 'application/json'
71
+ }
72
+
73
+ # Prepare form parameters.
74
+ _parameters = {
75
+ 'input' => input
76
+ }
77
+ _parameters = APIHelper.form_encode_parameters(_parameters)
78
+
79
+ # Prepare and execute HttpRequest.
80
+ _request = @http_client.post(
81
+ _query_url,
82
+ headers: _headers,
83
+ parameters: _parameters
84
+ )
85
+ _context = execute_request(_request)
86
+
87
+ # Validate response against endpoint and global error codes.
88
+ return nil if _context.response.status_code == 404
89
+ validate_response(_context)
90
+
91
+ # Return appropriate response type.
92
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
93
+ _context.response.raw_body.nil? ||
94
+ _context.response.raw_body.to_s.strip.empty?
95
+ decoded
96
+ end
97
+
98
+ # TODO: type endpoint description here
99
+ # @param [Hash] _query_parameters Additional optional query parameters are
100
+ # supported by this endpoint.
101
+ # @return EchoResponse response from the API call
102
+ def query_echo(_query_parameters = nil)
103
+ # Prepare query url.
104
+ _query_builder = Configuration.get_base_uri
105
+ _query_builder << '/'
106
+ _query_builder = APIHelper.append_url_with_query_parameters(
107
+ _query_builder,
108
+ _query_parameters,
109
+ array_serialization: Configuration.array_serialization
110
+ )
111
+ _query_url = APIHelper.clean_url _query_builder
112
+
113
+ # Prepare headers.
114
+ _headers = {
115
+ 'accept' => 'application/json'
116
+ }
117
+
118
+ # Prepare and execute HttpRequest.
119
+ _request = @http_client.get(
120
+ _query_url,
121
+ headers: _headers
122
+ )
123
+ _context = execute_request(_request)
124
+
125
+ # Validate response against endpoint and global error codes.
126
+ return nil if _context.response.status_code == 404
127
+ validate_response(_context)
128
+
129
+ # Return appropriate response type.
130
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
131
+ EchoResponse.from_hash(decoded)
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,179 @@
1
+ # This file was automatically generated for Stamplay by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module Tester
5
+ # ErrorCodesController
6
+ class ErrorCodesController < BaseController
7
+ @instance = ErrorCodesController.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
+ # @return Mixed response from the API call
19
+ def get_501
20
+ # Prepare query url.
21
+ _query_builder = Configuration.get_base_uri
22
+ _query_builder << '/error/501'
23
+ _query_url = APIHelper.clean_url _query_builder
24
+
25
+ # Prepare headers.
26
+ _headers = {
27
+ 'accept' => 'application/json'
28
+ }
29
+
30
+ # Prepare and execute HttpRequest.
31
+ _request = @http_client.get(
32
+ _query_url,
33
+ headers: _headers
34
+ )
35
+ _context = execute_request(_request)
36
+
37
+ # Validate response against endpoint and global error codes.
38
+ return nil if _context.response.status_code == 404
39
+ if _context.response.status_code == 501
40
+ raise NestedModelException.new(
41
+ 'error 501',
42
+ _context
43
+ )
44
+ end
45
+ validate_response(_context)
46
+
47
+ # Return appropriate response type.
48
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
49
+ _context.response.raw_body.nil? ||
50
+ _context.response.raw_body.to_s.strip.empty?
51
+ decoded
52
+ end
53
+
54
+ # TODO: type endpoint description here
55
+ # @return Mixed response from the API call
56
+ def get_400
57
+ # Prepare query url.
58
+ _query_builder = Configuration.get_base_uri
59
+ _query_builder << '/error/400'
60
+ _query_url = APIHelper.clean_url _query_builder
61
+
62
+ # Prepare headers.
63
+ _headers = {
64
+ 'accept' => 'application/json'
65
+ }
66
+
67
+ # Prepare and execute HttpRequest.
68
+ _request = @http_client.get(
69
+ _query_url,
70
+ headers: _headers
71
+ )
72
+ _context = execute_request(_request)
73
+
74
+ # Validate response against endpoint and global error codes.
75
+ return nil if _context.response.status_code == 404
76
+ validate_response(_context)
77
+
78
+ # Return appropriate response type.
79
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
80
+ _context.response.raw_body.nil? ||
81
+ _context.response.raw_body.to_s.strip.empty?
82
+ decoded
83
+ end
84
+
85
+ # TODO: type endpoint description here
86
+ # @return Mixed response from the API call
87
+ def get_500
88
+ # Prepare query url.
89
+ _query_builder = Configuration.get_base_uri
90
+ _query_builder << '/error/500'
91
+ _query_url = APIHelper.clean_url _query_builder
92
+
93
+ # Prepare headers.
94
+ _headers = {
95
+ 'accept' => 'application/json'
96
+ }
97
+
98
+ # Prepare and execute HttpRequest.
99
+ _request = @http_client.get(
100
+ _query_url,
101
+ headers: _headers
102
+ )
103
+ _context = execute_request(_request)
104
+
105
+ # Validate response against endpoint and global error codes.
106
+ return nil if _context.response.status_code == 404
107
+ validate_response(_context)
108
+
109
+ # Return appropriate response type.
110
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
111
+ _context.response.raw_body.nil? ||
112
+ _context.response.raw_body.to_s.strip.empty?
113
+ decoded
114
+ end
115
+
116
+ # TODO: type endpoint description here
117
+ # @return Mixed response from the API call
118
+ def get_401
119
+ # Prepare query url.
120
+ _query_builder = Configuration.get_base_uri
121
+ _query_builder << '/error/401'
122
+ _query_url = APIHelper.clean_url _query_builder
123
+
124
+ # Prepare headers.
125
+ _headers = {
126
+ 'accept' => 'application/json'
127
+ }
128
+
129
+ # Prepare and execute HttpRequest.
130
+ _request = @http_client.get(
131
+ _query_url,
132
+ headers: _headers
133
+ )
134
+ _context = execute_request(_request)
135
+
136
+ # Validate response against endpoint and global error codes.
137
+ return nil if _context.response.status_code == 404
138
+ if _context.response.status_code == 401
139
+ raise LocalTestException.new(
140
+ '401 Local',
141
+ _context
142
+ )
143
+ elsif _context.response.status_code == 421
144
+ raise LocalTestException.new(
145
+ 'Default',
146
+ _context
147
+ )
148
+ elsif _context.response.status_code == 431
149
+ raise LocalTestException.new(
150
+ 'Default',
151
+ _context
152
+ )
153
+ elsif _context.response.status_code == 432
154
+ raise LocalTestException.new(
155
+ 'Default',
156
+ _context
157
+ )
158
+ elsif _context.response.status_code == 441
159
+ raise LocalTestException.new(
160
+ 'Default',
161
+ _context
162
+ )
163
+ end
164
+ unless _context.response.status_code.between?(200, 208)
165
+ raise LocalTestException.new(
166
+ 'Invalid response.',
167
+ _context
168
+ )
169
+ end
170
+ validate_response(_context)
171
+
172
+ # Return appropriate response type.
173
+ decoded = APIHelper.json_deserialize(_context.response.raw_body) unless
174
+ _context.response.raw_body.nil? ||
175
+ _context.response.raw_body.to_s.strip.empty?
176
+ decoded
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,1391 @@
1
+ # This file was automatically generated for Stamplay by APIMATIC v2.0
2
+ # ( https://apimatic.io ).
3
+
4
+ module Tester
5
+ # FormParamsController
6
+ class FormParamsController < BaseController
7
+ @instance = FormParamsController.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 [DeleteBody] body Required parameter: Example:
19
+ # @return ServerResponse response from the API call
20
+ def send_delete_form(body)
21
+ # Validate required parameters.
22
+ validate_parameters(
23
+ 'body' => body
24
+ )
25
+ # Prepare query url.
26
+ _query_builder = Configuration.get_base_uri
27
+ _query_builder << '/form/deleteForm'
28
+ _query_url = APIHelper.clean_url _query_builder
29
+
30
+ # Prepare headers.
31
+ _headers = {
32
+ 'accept' => 'application/json'
33
+ }
34
+
35
+ # Prepare form parameters.
36
+ _parameters = {
37
+ 'body' => body
38
+ }
39
+ _parameters = APIHelper.form_encode_parameters(_parameters)
40
+
41
+ # Prepare and execute HttpRequest.
42
+ _request = @http_client.delete(
43
+ _query_url,
44
+ headers: _headers,
45
+ parameters: _parameters
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
+ # TODO: type endpoint description here
59
+ # @param [File] file Required parameter: Example:
60
+ # @return ServerResponse response from the API call
61
+ def send_delete_multipart(file)
62
+ # Validate required parameters.
63
+ validate_parameters(
64
+ 'file' => file
65
+ )
66
+ # Prepare query url.
67
+ _query_builder = Configuration.get_base_uri
68
+ _query_builder << '/form/deleteMultipart'
69
+ _query_url = APIHelper.clean_url _query_builder
70
+
71
+ # Prepare headers.
72
+ _headers = {
73
+ 'accept' => 'application/json'
74
+ }
75
+
76
+ # Prepare form parameters.
77
+ _parameters = {
78
+ 'file' => file
79
+ }
80
+ _parameters = APIHelper.form_encode_parameters(_parameters)
81
+
82
+ # Prepare and execute HttpRequest.
83
+ _request = @http_client.delete(
84
+ _query_url,
85
+ headers: _headers,
86
+ parameters: _parameters
87
+ )
88
+ _context = execute_request(_request)
89
+
90
+ # Validate response against endpoint and global error codes.
91
+ return nil if _context.response.status_code == 404
92
+ validate_response(_context)
93
+
94
+ # Return appropriate response type.
95
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
96
+ ServerResponse.from_hash(decoded)
97
+ end
98
+
99
+ # TODO: type endpoint description here
100
+ # @param [List of Date] dates Required parameter: Example:
101
+ # @return ServerResponse response from the API call
102
+ def send_date_array(dates)
103
+ # Validate required parameters.
104
+ validate_parameters(
105
+ 'dates' => dates
106
+ )
107
+ # Prepare query url.
108
+ _query_builder = Configuration.get_base_uri
109
+ _query_builder << '/form/date'
110
+ _query_builder = APIHelper.append_url_with_query_parameters(
111
+ _query_builder,
112
+ {
113
+ 'array' => true
114
+ },
115
+ array_serialization: Configuration.array_serialization
116
+ )
117
+ _query_url = APIHelper.clean_url _query_builder
118
+
119
+ # Prepare headers.
120
+ _headers = {
121
+ 'accept' => 'application/json'
122
+ }
123
+
124
+ # Prepare form parameters.
125
+ _parameters = {
126
+ 'dates' => dates
127
+ }
128
+ _parameters = APIHelper.form_encode_parameters(_parameters)
129
+
130
+ # Prepare and execute HttpRequest.
131
+ _request = @http_client.post(
132
+ _query_url,
133
+ headers: _headers,
134
+ parameters: _parameters
135
+ )
136
+ _context = execute_request(_request)
137
+
138
+ # Validate response against endpoint and global error codes.
139
+ return nil if _context.response.status_code == 404
140
+ validate_response(_context)
141
+
142
+ # Return appropriate response type.
143
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
144
+ ServerResponse.from_hash(decoded)
145
+ end
146
+
147
+ # TODO: type endpoint description here
148
+ # @param [Date] date Required parameter: Example:
149
+ # @return ServerResponse response from the API call
150
+ def send_date(date)
151
+ # Validate required parameters.
152
+ validate_parameters(
153
+ 'date' => date
154
+ )
155
+ # Prepare query url.
156
+ _query_builder = Configuration.get_base_uri
157
+ _query_builder << '/form/date'
158
+ _query_url = APIHelper.clean_url _query_builder
159
+
160
+ # Prepare headers.
161
+ _headers = {
162
+ 'accept' => 'application/json'
163
+ }
164
+
165
+ # Prepare form parameters.
166
+ _parameters = {
167
+ 'date' => date
168
+ }
169
+ _parameters = APIHelper.form_encode_parameters(_parameters)
170
+
171
+ # Prepare and execute HttpRequest.
172
+ _request = @http_client.post(
173
+ _query_url,
174
+ headers: _headers,
175
+ parameters: _parameters
176
+ )
177
+ _context = execute_request(_request)
178
+
179
+ # Validate response against endpoint and global error codes.
180
+ return nil if _context.response.status_code == 404
181
+ validate_response(_context)
182
+
183
+ # Return appropriate response type.
184
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
185
+ ServerResponse.from_hash(decoded)
186
+ end
187
+
188
+ # TODO: type endpoint description here
189
+ # @param [DateTime] datetime Required parameter: Example:
190
+ # @return ServerResponse response from the API call
191
+ def send_unix_date_time(datetime)
192
+ # Validate required parameters.
193
+ validate_parameters(
194
+ 'datetime' => datetime
195
+ )
196
+ # Prepare query url.
197
+ _query_builder = Configuration.get_base_uri
198
+ _query_builder << '/form/unixdatetime'
199
+ _query_url = APIHelper.clean_url _query_builder
200
+
201
+ # Prepare headers.
202
+ _headers = {
203
+ 'accept' => 'application/json'
204
+ }
205
+
206
+ # Prepare form parameters.
207
+ _parameters = {
208
+ 'datetime' => datetime.to_time.utc.to_i
209
+ }
210
+ _parameters = APIHelper.form_encode_parameters(_parameters)
211
+
212
+ # Prepare and execute HttpRequest.
213
+ _request = @http_client.post(
214
+ _query_url,
215
+ headers: _headers,
216
+ parameters: _parameters
217
+ )
218
+ _context = execute_request(_request)
219
+
220
+ # Validate response against endpoint and global error codes.
221
+ return nil if _context.response.status_code == 404
222
+ validate_response(_context)
223
+
224
+ # Return appropriate response type.
225
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
226
+ ServerResponse.from_hash(decoded)
227
+ end
228
+
229
+ # TODO: type endpoint description here
230
+ # @param [DateTime] datetime Required parameter: Example:
231
+ # @return ServerResponse response from the API call
232
+ def send_rfc_1123_date_time(datetime)
233
+ # Validate required parameters.
234
+ validate_parameters(
235
+ 'datetime' => datetime
236
+ )
237
+ # Prepare query url.
238
+ _query_builder = Configuration.get_base_uri
239
+ _query_builder << '/form/rfc1123datetime'
240
+ _query_url = APIHelper.clean_url _query_builder
241
+
242
+ # Prepare headers.
243
+ _headers = {
244
+ 'accept' => 'application/json'
245
+ }
246
+
247
+ # Prepare form parameters.
248
+ _parameters = {
249
+ 'datetime' => datetime.httpdate
250
+ }
251
+ _parameters = APIHelper.form_encode_parameters(_parameters)
252
+
253
+ # Prepare and execute HttpRequest.
254
+ _request = @http_client.post(
255
+ _query_url,
256
+ headers: _headers,
257
+ parameters: _parameters
258
+ )
259
+ _context = execute_request(_request)
260
+
261
+ # Validate response against endpoint and global error codes.
262
+ return nil if _context.response.status_code == 404
263
+ validate_response(_context)
264
+
265
+ # Return appropriate response type.
266
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
267
+ ServerResponse.from_hash(decoded)
268
+ end
269
+
270
+ # TODO: type endpoint description here
271
+ # @param [DateTime] datetime Required parameter: Example:
272
+ # @return ServerResponse response from the API call
273
+ def send_rfc_3339_date_time(datetime)
274
+ # Validate required parameters.
275
+ validate_parameters(
276
+ 'datetime' => datetime
277
+ )
278
+ # Prepare query url.
279
+ _query_builder = Configuration.get_base_uri
280
+ _query_builder << '/form/rfc3339datetime'
281
+ _query_url = APIHelper.clean_url _query_builder
282
+
283
+ # Prepare headers.
284
+ _headers = {
285
+ 'accept' => 'application/json'
286
+ }
287
+
288
+ # Prepare form parameters.
289
+ _parameters = {
290
+ 'datetime' => datetime
291
+ }
292
+ _parameters = APIHelper.form_encode_parameters(_parameters)
293
+
294
+ # Prepare and execute HttpRequest.
295
+ _request = @http_client.post(
296
+ _query_url,
297
+ headers: _headers,
298
+ parameters: _parameters
299
+ )
300
+ _context = execute_request(_request)
301
+
302
+ # Validate response against endpoint and global error codes.
303
+ return nil if _context.response.status_code == 404
304
+ validate_response(_context)
305
+
306
+ # Return appropriate response type.
307
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
308
+ ServerResponse.from_hash(decoded)
309
+ end
310
+
311
+ # TODO: type endpoint description here
312
+ # @param [List of DateTime] datetimes Required parameter: Example:
313
+ # @return ServerResponse response from the API call
314
+ def send_unix_date_time_array(datetimes)
315
+ # Validate required parameters.
316
+ validate_parameters(
317
+ 'datetimes' => datetimes
318
+ )
319
+ # Prepare query url.
320
+ _query_builder = Configuration.get_base_uri
321
+ _query_builder << '/form/unixdatetime'
322
+ _query_builder = APIHelper.append_url_with_query_parameters(
323
+ _query_builder,
324
+ {
325
+ 'array' => true
326
+ },
327
+ array_serialization: Configuration.array_serialization
328
+ )
329
+ _query_url = APIHelper.clean_url _query_builder
330
+
331
+ # Prepare headers.
332
+ _headers = {
333
+ 'accept' => 'application/json'
334
+ }
335
+
336
+ # Prepare form parameters.
337
+ _parameters = {
338
+ 'datetimes' => datetimes.map { |element| element.to_time.utc.to_i }
339
+ }
340
+ _parameters = APIHelper.form_encode_parameters(_parameters)
341
+
342
+ # Prepare and execute HttpRequest.
343
+ _request = @http_client.post(
344
+ _query_url,
345
+ headers: _headers,
346
+ parameters: _parameters
347
+ )
348
+ _context = execute_request(_request)
349
+
350
+ # Validate response against endpoint and global error codes.
351
+ return nil if _context.response.status_code == 404
352
+ validate_response(_context)
353
+
354
+ # Return appropriate response type.
355
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
356
+ ServerResponse.from_hash(decoded)
357
+ end
358
+
359
+ # TODO: type endpoint description here
360
+ # @param [List of DateTime] datetimes Required parameter: Example:
361
+ # @return ServerResponse response from the API call
362
+ def send_rfc_1123_date_time_array(datetimes)
363
+ # Validate required parameters.
364
+ validate_parameters(
365
+ 'datetimes' => datetimes
366
+ )
367
+ # Prepare query url.
368
+ _query_builder = Configuration.get_base_uri
369
+ _query_builder << '/form/rfc1123datetime'
370
+ _query_builder = APIHelper.append_url_with_query_parameters(
371
+ _query_builder,
372
+ {
373
+ 'array' => true
374
+ },
375
+ array_serialization: Configuration.array_serialization
376
+ )
377
+ _query_url = APIHelper.clean_url _query_builder
378
+
379
+ # Prepare headers.
380
+ _headers = {
381
+ 'accept' => 'application/json'
382
+ }
383
+
384
+ # Prepare form parameters.
385
+ _parameters = {
386
+ 'datetimes' => datetimes.map(&:httpdate)
387
+ }
388
+ _parameters = APIHelper.form_encode_parameters(_parameters)
389
+
390
+ # Prepare and execute HttpRequest.
391
+ _request = @http_client.post(
392
+ _query_url,
393
+ headers: _headers,
394
+ parameters: _parameters
395
+ )
396
+ _context = execute_request(_request)
397
+
398
+ # Validate response against endpoint and global error codes.
399
+ return nil if _context.response.status_code == 404
400
+ validate_response(_context)
401
+
402
+ # Return appropriate response type.
403
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
404
+ ServerResponse.from_hash(decoded)
405
+ end
406
+
407
+ # TODO: type endpoint description here
408
+ # @param [Long] value Required parameter: Example:
409
+ # @return ServerResponse response from the API call
410
+ def send_long(value)
411
+ # Validate required parameters.
412
+ validate_parameters(
413
+ 'value' => value
414
+ )
415
+ # Prepare query url.
416
+ _query_builder = Configuration.get_base_uri
417
+ _query_builder << '/form/number'
418
+ _query_url = APIHelper.clean_url _query_builder
419
+
420
+ # Prepare headers.
421
+ _headers = {
422
+ 'accept' => 'application/json'
423
+ }
424
+
425
+ # Prepare form parameters.
426
+ _parameters = {
427
+ 'value' => value
428
+ }
429
+ _parameters = APIHelper.form_encode_parameters(_parameters)
430
+
431
+ # Prepare and execute HttpRequest.
432
+ _request = @http_client.post(
433
+ _query_url,
434
+ headers: _headers,
435
+ parameters: _parameters
436
+ )
437
+ _context = execute_request(_request)
438
+
439
+ # Validate response against endpoint and global error codes.
440
+ return nil if _context.response.status_code == 404
441
+ validate_response(_context)
442
+
443
+ # Return appropriate response type.
444
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
445
+ ServerResponse.from_hash(decoded)
446
+ end
447
+
448
+ # TODO: type endpoint description here
449
+ # @param [List of Integer] integers Required parameter: Example:
450
+ # @return ServerResponse response from the API call
451
+ def send_integer_array(integers)
452
+ # Validate required parameters.
453
+ validate_parameters(
454
+ 'integers' => integers
455
+ )
456
+ # Prepare query url.
457
+ _query_builder = Configuration.get_base_uri
458
+ _query_builder << '/form/number'
459
+ _query_builder = APIHelper.append_url_with_query_parameters(
460
+ _query_builder,
461
+ {
462
+ 'array' => true
463
+ },
464
+ array_serialization: Configuration.array_serialization
465
+ )
466
+ _query_url = APIHelper.clean_url _query_builder
467
+
468
+ # Prepare headers.
469
+ _headers = {
470
+ 'accept' => 'application/json'
471
+ }
472
+
473
+ # Prepare form parameters.
474
+ _parameters = {
475
+ 'integers' => integers
476
+ }
477
+ _parameters = APIHelper.form_encode_parameters(_parameters)
478
+
479
+ # Prepare and execute HttpRequest.
480
+ _request = @http_client.post(
481
+ _query_url,
482
+ headers: _headers,
483
+ parameters: _parameters
484
+ )
485
+ _context = execute_request(_request)
486
+
487
+ # Validate response against endpoint and global error codes.
488
+ return nil if _context.response.status_code == 404
489
+ validate_response(_context)
490
+
491
+ # Return appropriate response type.
492
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
493
+ ServerResponse.from_hash(decoded)
494
+ end
495
+
496
+ # TODO: type endpoint description here
497
+ # @param [List of String] strings Required parameter: Example:
498
+ # @return ServerResponse response from the API call
499
+ def send_string_array(strings)
500
+ # Validate required parameters.
501
+ validate_parameters(
502
+ 'strings' => strings
503
+ )
504
+ # Prepare query url.
505
+ _query_builder = Configuration.get_base_uri
506
+ _query_builder << '/form/string'
507
+ _query_builder = APIHelper.append_url_with_query_parameters(
508
+ _query_builder,
509
+ {
510
+ 'array' => true
511
+ },
512
+ array_serialization: Configuration.array_serialization
513
+ )
514
+ _query_url = APIHelper.clean_url _query_builder
515
+
516
+ # Prepare headers.
517
+ _headers = {
518
+ 'accept' => 'application/json'
519
+ }
520
+
521
+ # Prepare form parameters.
522
+ _parameters = {
523
+ 'strings' => strings
524
+ }
525
+ _parameters = APIHelper.form_encode_parameters(_parameters)
526
+
527
+ # Prepare and execute HttpRequest.
528
+ _request = @http_client.post(
529
+ _query_url,
530
+ headers: _headers,
531
+ parameters: _parameters
532
+ )
533
+ _context = execute_request(_request)
534
+
535
+ # Validate response against endpoint and global error codes.
536
+ return nil if _context.response.status_code == 404
537
+ validate_response(_context)
538
+
539
+ # Return appropriate response type.
540
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
541
+ ServerResponse.from_hash(decoded)
542
+ end
543
+
544
+ # TODO: type endpoint description here
545
+ # @param [String] name Required parameter: Example:
546
+ # @param [Hash] _field_parameters Additional optional form parameters are
547
+ # supported by this endpoint.
548
+ # @return ServerResponse response from the API call
549
+ def allow_dynamic_form_fields(name,
550
+ _field_parameters = nil)
551
+ # Validate required parameters.
552
+ validate_parameters(
553
+ 'name' => name
554
+ )
555
+ # Prepare query url.
556
+ _query_builder = Configuration.get_base_uri
557
+ _query_builder << '/form/allowDynamicFormFields'
558
+ _query_url = APIHelper.clean_url _query_builder
559
+
560
+ # Prepare headers.
561
+ _headers = {
562
+ 'accept' => 'application/json'
563
+ }
564
+
565
+ # Prepare form parameters.
566
+ _parameters = {
567
+ 'name' => name
568
+ }
569
+ if !_parameters.nil? && !_field_parameters.nil?
570
+ _parameters.merge!(_field_parameters)
571
+ end
572
+ _parameters = APIHelper.form_encode_parameters(_parameters)
573
+
574
+ # Prepare and execute HttpRequest.
575
+ _request = @http_client.post(
576
+ _query_url,
577
+ headers: _headers,
578
+ parameters: _parameters
579
+ )
580
+ _context = execute_request(_request)
581
+
582
+ # Validate response against endpoint and global error codes.
583
+ return nil if _context.response.status_code == 404
584
+ validate_response(_context)
585
+
586
+ # Return appropriate response type.
587
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
588
+ ServerResponse.from_hash(decoded)
589
+ end
590
+
591
+ # TODO: type endpoint description here
592
+ # @param [Employee] model Required parameter: Example:
593
+ # @return ServerResponse response from the API call
594
+ def send_model(model)
595
+ # Validate required parameters.
596
+ validate_parameters(
597
+ 'model' => model
598
+ )
599
+ # Prepare query url.
600
+ _query_builder = Configuration.get_base_uri
601
+ _query_builder << '/form/model'
602
+ _query_url = APIHelper.clean_url _query_builder
603
+
604
+ # Prepare headers.
605
+ _headers = {
606
+ 'accept' => 'application/json'
607
+ }
608
+
609
+ # Prepare form parameters.
610
+ _parameters = {
611
+ 'model' => model
612
+ }
613
+ _parameters = APIHelper.form_encode_parameters(_parameters)
614
+
615
+ # Prepare and execute HttpRequest.
616
+ _request = @http_client.post(
617
+ _query_url,
618
+ headers: _headers,
619
+ parameters: _parameters
620
+ )
621
+ _context = execute_request(_request)
622
+
623
+ # Validate response against endpoint and global error codes.
624
+ return nil if _context.response.status_code == 404
625
+ validate_response(_context)
626
+
627
+ # Return appropriate response type.
628
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
629
+ ServerResponse.from_hash(decoded)
630
+ end
631
+
632
+ # TODO: type endpoint description here
633
+ # @param [List of Employee] models Required parameter: Example:
634
+ # @return ServerResponse response from the API call
635
+ def send_model_array(models)
636
+ # Validate required parameters.
637
+ validate_parameters(
638
+ 'models' => models
639
+ )
640
+ # Prepare query url.
641
+ _query_builder = Configuration.get_base_uri
642
+ _query_builder << '/form/model'
643
+ _query_builder = APIHelper.append_url_with_query_parameters(
644
+ _query_builder,
645
+ {
646
+ 'array' => true
647
+ },
648
+ array_serialization: Configuration.array_serialization
649
+ )
650
+ _query_url = APIHelper.clean_url _query_builder
651
+
652
+ # Prepare headers.
653
+ _headers = {
654
+ 'accept' => 'application/json'
655
+ }
656
+
657
+ # Prepare form parameters.
658
+ _parameters = {
659
+ 'models' => models
660
+ }
661
+ _parameters = APIHelper.form_encode_parameters(_parameters)
662
+
663
+ # Prepare and execute HttpRequest.
664
+ _request = @http_client.post(
665
+ _query_url,
666
+ headers: _headers,
667
+ parameters: _parameters
668
+ )
669
+ _context = execute_request(_request)
670
+
671
+ # Validate response against endpoint and global error codes.
672
+ return nil if _context.response.status_code == 404
673
+ validate_response(_context)
674
+
675
+ # Return appropriate response type.
676
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
677
+ ServerResponse.from_hash(decoded)
678
+ end
679
+
680
+ # TODO: type endpoint description here
681
+ # @param [File] file Required parameter: Example:
682
+ # @return ServerResponse response from the API call
683
+ def send_file(file)
684
+ # Validate required parameters.
685
+ validate_parameters(
686
+ 'file' => file
687
+ )
688
+ # Prepare query url.
689
+ _query_builder = Configuration.get_base_uri
690
+ _query_builder << '/form/file'
691
+ _query_url = APIHelper.clean_url _query_builder
692
+
693
+ # Prepare headers.
694
+ _headers = {
695
+ 'accept' => 'application/json'
696
+ }
697
+
698
+ # Prepare form parameters.
699
+ _parameters = {
700
+ 'file' => file
701
+ }
702
+ _parameters = APIHelper.form_encode_parameters(_parameters)
703
+
704
+ # Prepare and execute HttpRequest.
705
+ _request = @http_client.post(
706
+ _query_url,
707
+ headers: _headers,
708
+ parameters: _parameters
709
+ )
710
+ _context = execute_request(_request)
711
+
712
+ # Validate response against endpoint and global error codes.
713
+ return nil if _context.response.status_code == 404
714
+ validate_response(_context)
715
+
716
+ # Return appropriate response type.
717
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
718
+ ServerResponse.from_hash(decoded)
719
+ end
720
+
721
+ # TODO: type endpoint description here
722
+ # @param [File] file Required parameter: Example:
723
+ # @param [File] file_1 Required parameter: Example:
724
+ # @return ServerResponse response from the API call
725
+ def send_multiple_files(file,
726
+ file1)
727
+ # Validate required parameters.
728
+ validate_parameters(
729
+ 'file' => file,
730
+ 'file1' => file1
731
+ )
732
+ # Prepare query url.
733
+ _query_builder = Configuration.get_base_uri
734
+ _query_builder << '/form/multipleFiles'
735
+ _query_url = APIHelper.clean_url _query_builder
736
+
737
+ # Prepare headers.
738
+ _headers = {
739
+ 'accept' => 'application/json'
740
+ }
741
+
742
+ # Prepare form parameters.
743
+ _parameters = {
744
+ 'file' => file,
745
+ 'file1' => file1
746
+ }
747
+ _parameters = APIHelper.form_encode_parameters(_parameters)
748
+
749
+ # Prepare and execute HttpRequest.
750
+ _request = @http_client.post(
751
+ _query_url,
752
+ headers: _headers,
753
+ parameters: _parameters
754
+ )
755
+ _context = execute_request(_request)
756
+
757
+ # Validate response against endpoint and global error codes.
758
+ return nil if _context.response.status_code == 404
759
+ validate_response(_context)
760
+
761
+ # Return appropriate response type.
762
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
763
+ ServerResponse.from_hash(decoded)
764
+ end
765
+
766
+ # TODO: type endpoint description here
767
+ # @param [String] value Required parameter: Example:
768
+ # @return ServerResponse response from the API call
769
+ def send_string(value)
770
+ # Validate required parameters.
771
+ validate_parameters(
772
+ 'value' => value
773
+ )
774
+ # Prepare query url.
775
+ _query_builder = Configuration.get_base_uri
776
+ _query_builder << '/form/string'
777
+ _query_url = APIHelper.clean_url _query_builder
778
+
779
+ # Prepare headers.
780
+ _headers = {
781
+ 'accept' => 'application/json'
782
+ }
783
+
784
+ # Prepare form parameters.
785
+ _parameters = {
786
+ 'value' => value
787
+ }
788
+ _parameters = APIHelper.form_encode_parameters(_parameters)
789
+
790
+ # Prepare and execute HttpRequest.
791
+ _request = @http_client.post(
792
+ _query_url,
793
+ headers: _headers,
794
+ parameters: _parameters
795
+ )
796
+ _context = execute_request(_request)
797
+
798
+ # Validate response against endpoint and global error codes.
799
+ return nil if _context.response.status_code == 404
800
+ validate_response(_context)
801
+
802
+ # Return appropriate response type.
803
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
804
+ ServerResponse.from_hash(decoded)
805
+ end
806
+
807
+ # TODO: type endpoint description here
808
+ # @param [List of DateTime] datetimes Required parameter: Example:
809
+ # @return ServerResponse response from the API call
810
+ def send_rfc_3339_date_time_array(datetimes)
811
+ # Validate required parameters.
812
+ validate_parameters(
813
+ 'datetimes' => datetimes
814
+ )
815
+ # Prepare query url.
816
+ _query_builder = Configuration.get_base_uri
817
+ _query_builder << '/form/rfc3339datetime'
818
+ _query_builder = APIHelper.append_url_with_query_parameters(
819
+ _query_builder,
820
+ {
821
+ 'array' => true
822
+ },
823
+ array_serialization: Configuration.array_serialization
824
+ )
825
+ _query_url = APIHelper.clean_url _query_builder
826
+
827
+ # Prepare headers.
828
+ _headers = {
829
+ 'accept' => 'application/json'
830
+ }
831
+
832
+ # Prepare form parameters.
833
+ _parameters = {
834
+ 'datetimes' => datetimes
835
+ }
836
+ _parameters = APIHelper.form_encode_parameters(_parameters)
837
+
838
+ # Prepare and execute HttpRequest.
839
+ _request = @http_client.post(
840
+ _query_url,
841
+ headers: _headers,
842
+ parameters: _parameters
843
+ )
844
+ _context = execute_request(_request)
845
+
846
+ # Validate response against endpoint and global error codes.
847
+ return nil if _context.response.status_code == 404
848
+ validate_response(_context)
849
+
850
+ # Return appropriate response type.
851
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
852
+ ServerResponse.from_hash(decoded)
853
+ end
854
+
855
+ # Send a variety for form params. Returns file count and body params
856
+ # @param [File] file Required parameter: Example:
857
+ # @param [List of Integer] integers Required parameter: Example:
858
+ # @param [List of Employee] models Required parameter: Example:
859
+ # @param [List of String] strings Required parameter: Example:
860
+ # @return ServerResponse response from the API call
861
+ def send_mixed_array(options = {})
862
+ # Validate required parameters.
863
+ validate_parameters(
864
+ 'file' => options['file'],
865
+ 'integers' => options['integers'],
866
+ 'models' => options['models'],
867
+ 'strings' => options['strings']
868
+ )
869
+ # Prepare query url.
870
+ _query_builder = Configuration.get_base_uri
871
+ _query_builder << '/form/mixed'
872
+ _query_url = APIHelper.clean_url _query_builder
873
+
874
+ # Prepare headers.
875
+ _headers = {
876
+ 'accept' => 'application/json'
877
+ }
878
+
879
+ # Prepare form parameters.
880
+ _parameters = {
881
+ 'file' => options['file'],
882
+ 'integers' => options['integers'],
883
+ 'models' => options['models'],
884
+ 'strings' => options['strings']
885
+ }
886
+ _parameters = APIHelper.form_encode_parameters(_parameters)
887
+
888
+ # Prepare and execute HttpRequest.
889
+ _request = @http_client.post(
890
+ _query_url,
891
+ headers: _headers,
892
+ parameters: _parameters
893
+ )
894
+ _context = execute_request(_request)
895
+
896
+ # Validate response against endpoint and global error codes.
897
+ return nil if _context.response.status_code == 404
898
+ validate_response(_context)
899
+
900
+ # Return appropriate response type.
901
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
902
+ ServerResponse.from_hash(decoded)
903
+ end
904
+
905
+ # TODO: type endpoint description here
906
+ # @param [Employee] model Required parameter: Example:
907
+ # @return ServerResponse response from the API call
908
+ def update_model_with_form(model)
909
+ # Validate required parameters.
910
+ validate_parameters(
911
+ 'model' => model
912
+ )
913
+ # Prepare query url.
914
+ _query_builder = Configuration.get_base_uri
915
+ _query_builder << '/form/updateModel'
916
+ _query_url = APIHelper.clean_url _query_builder
917
+
918
+ # Prepare headers.
919
+ _headers = {
920
+ 'accept' => 'application/json'
921
+ }
922
+
923
+ # Prepare form parameters.
924
+ _parameters = {
925
+ 'model' => model
926
+ }
927
+ _parameters = APIHelper.form_encode_parameters(_parameters)
928
+
929
+ # Prepare and execute HttpRequest.
930
+ _request = @http_client.put(
931
+ _query_url,
932
+ headers: _headers,
933
+ parameters: _parameters
934
+ )
935
+ _context = execute_request(_request)
936
+
937
+ # Validate response against endpoint and global error codes.
938
+ return nil if _context.response.status_code == 404
939
+ validate_response(_context)
940
+
941
+ # Return appropriate response type.
942
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
943
+ ServerResponse.from_hash(decoded)
944
+ end
945
+
946
+ # TODO: type endpoint description here
947
+ # @param [Employee] model Required parameter: Example:
948
+ # @return ServerResponse response from the API call
949
+ def send_delete_form_1(model)
950
+ # Validate required parameters.
951
+ validate_parameters(
952
+ 'model' => model
953
+ )
954
+ # Prepare query url.
955
+ _query_builder = Configuration.get_base_uri
956
+ _query_builder << '/form/deleteForm1'
957
+ _query_url = APIHelper.clean_url _query_builder
958
+
959
+ # Prepare headers.
960
+ _headers = {
961
+ 'accept' => 'application/json'
962
+ }
963
+
964
+ # Prepare form parameters.
965
+ _parameters = {
966
+ 'model' => model
967
+ }
968
+ _parameters = APIHelper.form_encode_parameters(_parameters)
969
+
970
+ # Prepare and execute HttpRequest.
971
+ _request = @http_client.delete(
972
+ _query_url,
973
+ headers: _headers,
974
+ parameters: _parameters
975
+ )
976
+ _context = execute_request(_request)
977
+
978
+ # Validate response against endpoint and global error codes.
979
+ return nil if _context.response.status_code == 404
980
+ validate_response(_context)
981
+
982
+ # Return appropriate response type.
983
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
984
+ ServerResponse.from_hash(decoded)
985
+ end
986
+
987
+ # TODO: type endpoint description here
988
+ # @param [List of Employee] models Required parameter: Example:
989
+ # @return ServerResponse response from the API call
990
+ def send_delete_form_with_model_array(models)
991
+ # Validate required parameters.
992
+ validate_parameters(
993
+ 'models' => models
994
+ )
995
+ # Prepare query url.
996
+ _query_builder = Configuration.get_base_uri
997
+ _query_builder << '/form/deleteForm1'
998
+ _query_builder = APIHelper.append_url_with_query_parameters(
999
+ _query_builder,
1000
+ {
1001
+ 'array' => true
1002
+ },
1003
+ array_serialization: Configuration.array_serialization
1004
+ )
1005
+ _query_url = APIHelper.clean_url _query_builder
1006
+
1007
+ # Prepare headers.
1008
+ _headers = {
1009
+ 'accept' => 'application/json'
1010
+ }
1011
+
1012
+ # Prepare form parameters.
1013
+ _parameters = {
1014
+ 'models' => models
1015
+ }
1016
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1017
+
1018
+ # Prepare and execute HttpRequest.
1019
+ _request = @http_client.delete(
1020
+ _query_url,
1021
+ headers: _headers,
1022
+ parameters: _parameters
1023
+ )
1024
+ _context = execute_request(_request)
1025
+
1026
+ # Validate response against endpoint and global error codes.
1027
+ return nil if _context.response.status_code == 404
1028
+ validate_response(_context)
1029
+
1030
+ # Return appropriate response type.
1031
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1032
+ ServerResponse.from_hash(decoded)
1033
+ end
1034
+
1035
+ # TODO: type endpoint description here
1036
+ # @param [List of Employee] models Required parameter: Example:
1037
+ # @return ServerResponse response from the API call
1038
+ def update_model_array_with_form(models)
1039
+ # Validate required parameters.
1040
+ validate_parameters(
1041
+ 'models' => models
1042
+ )
1043
+ # Prepare query url.
1044
+ _query_builder = Configuration.get_base_uri
1045
+ _query_builder << '/form/updateModel'
1046
+ _query_builder = APIHelper.append_url_with_query_parameters(
1047
+ _query_builder,
1048
+ {
1049
+ 'array' => true
1050
+ },
1051
+ array_serialization: Configuration.array_serialization
1052
+ )
1053
+ _query_url = APIHelper.clean_url _query_builder
1054
+
1055
+ # Prepare headers.
1056
+ _headers = {
1057
+ 'accept' => 'application/json'
1058
+ }
1059
+
1060
+ # Prepare form parameters.
1061
+ _parameters = {
1062
+ 'models' => models
1063
+ }
1064
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1065
+
1066
+ # Prepare and execute HttpRequest.
1067
+ _request = @http_client.put(
1068
+ _query_url,
1069
+ headers: _headers,
1070
+ parameters: _parameters
1071
+ )
1072
+ _context = execute_request(_request)
1073
+
1074
+ # Validate response against endpoint and global error codes.
1075
+ return nil if _context.response.status_code == 404
1076
+ validate_response(_context)
1077
+
1078
+ # Return appropriate response type.
1079
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1080
+ ServerResponse.from_hash(decoded)
1081
+ end
1082
+
1083
+ # TODO: type endpoint description here
1084
+ # @param [String] value Required parameter: Example:
1085
+ # @return ServerResponse response from the API call
1086
+ def update_string_with_form(value)
1087
+ # Validate required parameters.
1088
+ validate_parameters(
1089
+ 'value' => value
1090
+ )
1091
+ # Prepare query url.
1092
+ _query_builder = Configuration.get_base_uri
1093
+ _query_builder << '/form/updateString'
1094
+ _query_url = APIHelper.clean_url _query_builder
1095
+
1096
+ # Prepare headers.
1097
+ _headers = {
1098
+ 'accept' => 'application/json'
1099
+ }
1100
+
1101
+ # Prepare form parameters.
1102
+ _parameters = {
1103
+ 'value' => value
1104
+ }
1105
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1106
+
1107
+ # Prepare and execute HttpRequest.
1108
+ _request = @http_client.put(
1109
+ _query_url,
1110
+ headers: _headers,
1111
+ parameters: _parameters
1112
+ )
1113
+ _context = execute_request(_request)
1114
+
1115
+ # Validate response against endpoint and global error codes.
1116
+ return nil if _context.response.status_code == 404
1117
+ validate_response(_context)
1118
+
1119
+ # Return appropriate response type.
1120
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1121
+ ServerResponse.from_hash(decoded)
1122
+ end
1123
+
1124
+ # TODO: type endpoint description here
1125
+ # @param [List of String] strings Required parameter: Example:
1126
+ # @return ServerResponse response from the API call
1127
+ def update_string_array_with_form(strings)
1128
+ # Validate required parameters.
1129
+ validate_parameters(
1130
+ 'strings' => strings
1131
+ )
1132
+ # Prepare query url.
1133
+ _query_builder = Configuration.get_base_uri
1134
+ _query_builder << '/form/updateString'
1135
+ _query_builder = APIHelper.append_url_with_query_parameters(
1136
+ _query_builder,
1137
+ {
1138
+ 'array' => true
1139
+ },
1140
+ array_serialization: Configuration.array_serialization
1141
+ )
1142
+ _query_url = APIHelper.clean_url _query_builder
1143
+
1144
+ # Prepare headers.
1145
+ _headers = {
1146
+ 'accept' => 'application/json'
1147
+ }
1148
+
1149
+ # Prepare form parameters.
1150
+ _parameters = {
1151
+ 'strings' => strings
1152
+ }
1153
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1154
+
1155
+ # Prepare and execute HttpRequest.
1156
+ _request = @http_client.put(
1157
+ _query_url,
1158
+ headers: _headers,
1159
+ parameters: _parameters
1160
+ )
1161
+ _context = execute_request(_request)
1162
+
1163
+ # Validate response against endpoint and global error codes.
1164
+ return nil if _context.response.status_code == 404
1165
+ validate_response(_context)
1166
+
1167
+ # Return appropriate response type.
1168
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1169
+ ServerResponse.from_hash(decoded)
1170
+ end
1171
+
1172
+ # TODO: type endpoint description here
1173
+ # @param [List of SuiteCode] suites Required parameter: Example:
1174
+ # @return ServerResponse response from the API call
1175
+ def send_integer_enum_array(suites)
1176
+ # Validate required parameters.
1177
+ validate_parameters(
1178
+ 'suites' => suites
1179
+ )
1180
+ # Prepare query url.
1181
+ _query_builder = Configuration.get_base_uri
1182
+ _query_builder << '/form/integerenum'
1183
+ _query_builder = APIHelper.append_url_with_query_parameters(
1184
+ _query_builder,
1185
+ {
1186
+ 'array' => true
1187
+ },
1188
+ array_serialization: Configuration.array_serialization
1189
+ )
1190
+ _query_url = APIHelper.clean_url _query_builder
1191
+
1192
+ # Prepare headers.
1193
+ _headers = {
1194
+ 'accept' => 'application/json'
1195
+ }
1196
+
1197
+ # Prepare form parameters.
1198
+ _parameters = {
1199
+ 'suites' => suites
1200
+ }
1201
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1202
+
1203
+ # Prepare and execute HttpRequest.
1204
+ _request = @http_client.post(
1205
+ _query_url,
1206
+ headers: _headers,
1207
+ parameters: _parameters
1208
+ )
1209
+ _context = execute_request(_request)
1210
+
1211
+ # Validate response against endpoint and global error codes.
1212
+ return nil if _context.response.status_code == 404
1213
+ validate_response(_context)
1214
+
1215
+ # Return appropriate response type.
1216
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1217
+ ServerResponse.from_hash(decoded)
1218
+ end
1219
+
1220
+ # TODO: type endpoint description here
1221
+ # @param [List of Days] days Required parameter: Example:
1222
+ # @return ServerResponse response from the API call
1223
+ def send_string_enum_array(days)
1224
+ # Validate required parameters.
1225
+ validate_parameters(
1226
+ 'days' => days
1227
+ )
1228
+ # Prepare query url.
1229
+ _query_builder = Configuration.get_base_uri
1230
+ _query_builder << '/form/stringenum'
1231
+ _query_builder = APIHelper.append_url_with_query_parameters(
1232
+ _query_builder,
1233
+ {
1234
+ 'array' => true
1235
+ },
1236
+ array_serialization: Configuration.array_serialization
1237
+ )
1238
+ _query_url = APIHelper.clean_url _query_builder
1239
+
1240
+ # Prepare headers.
1241
+ _headers = {
1242
+ 'accept' => 'application/json'
1243
+ }
1244
+
1245
+ # Prepare form parameters.
1246
+ _parameters = {
1247
+ 'days' => days
1248
+ }
1249
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1250
+
1251
+ # Prepare and execute HttpRequest.
1252
+ _request = @http_client.post(
1253
+ _query_url,
1254
+ headers: _headers,
1255
+ parameters: _parameters
1256
+ )
1257
+ _context = execute_request(_request)
1258
+
1259
+ # Validate response against endpoint and global error codes.
1260
+ return nil if _context.response.status_code == 404
1261
+ validate_response(_context)
1262
+
1263
+ # Return appropriate response type.
1264
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1265
+ ServerResponse.from_hash(decoded)
1266
+ end
1267
+
1268
+ # TODO: type endpoint description here
1269
+ # @param [TestNstringEncoding] body Required parameter: Example:
1270
+ # @return ServerResponse response from the API call
1271
+ def send_string_in_form_with_new_line(body)
1272
+ # Validate required parameters.
1273
+ validate_parameters(
1274
+ 'body' => body
1275
+ )
1276
+ # Prepare query url.
1277
+ _query_builder = Configuration.get_base_uri
1278
+ _query_builder << '/form/stringEncoding'
1279
+ _query_url = APIHelper.clean_url _query_builder
1280
+
1281
+ # Prepare headers.
1282
+ _headers = {
1283
+ 'accept' => 'application/json'
1284
+ }
1285
+
1286
+ # Prepare form parameters.
1287
+ _parameters = {
1288
+ 'body' => body
1289
+ }
1290
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1291
+
1292
+ # Prepare and execute HttpRequest.
1293
+ _request = @http_client.post(
1294
+ _query_url,
1295
+ headers: _headers,
1296
+ parameters: _parameters
1297
+ )
1298
+ _context = execute_request(_request)
1299
+
1300
+ # Validate response against endpoint and global error codes.
1301
+ return nil if _context.response.status_code == 404
1302
+ validate_response(_context)
1303
+
1304
+ # Return appropriate response type.
1305
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1306
+ ServerResponse.from_hash(decoded)
1307
+ end
1308
+
1309
+ # TODO: type endpoint description here
1310
+ # @param [TestRstringEncoding] body Required parameter: Example:
1311
+ # @return ServerResponse response from the API call
1312
+ def send_string_in_form_with_r(body)
1313
+ # Validate required parameters.
1314
+ validate_parameters(
1315
+ 'body' => body
1316
+ )
1317
+ # Prepare query url.
1318
+ _query_builder = Configuration.get_base_uri
1319
+ _query_builder << '/form/stringEncoding'
1320
+ _query_url = APIHelper.clean_url _query_builder
1321
+
1322
+ # Prepare headers.
1323
+ _headers = {
1324
+ 'accept' => 'application/json'
1325
+ }
1326
+
1327
+ # Prepare form parameters.
1328
+ _parameters = {
1329
+ 'body' => body
1330
+ }
1331
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1332
+
1333
+ # Prepare and execute HttpRequest.
1334
+ _request = @http_client.post(
1335
+ _query_url,
1336
+ headers: _headers,
1337
+ parameters: _parameters
1338
+ )
1339
+ _context = execute_request(_request)
1340
+
1341
+ # Validate response against endpoint and global error codes.
1342
+ return nil if _context.response.status_code == 404
1343
+ validate_response(_context)
1344
+
1345
+ # Return appropriate response type.
1346
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1347
+ ServerResponse.from_hash(decoded)
1348
+ end
1349
+
1350
+ # TODO: type endpoint description here
1351
+ # @param [TestRNstringEncoding] body Required parameter: Example:
1352
+ # @return ServerResponse response from the API call
1353
+ def send_string_in_form_with_r_n(body)
1354
+ # Validate required parameters.
1355
+ validate_parameters(
1356
+ 'body' => body
1357
+ )
1358
+ # Prepare query url.
1359
+ _query_builder = Configuration.get_base_uri
1360
+ _query_builder << '/form/stringEncoding'
1361
+ _query_url = APIHelper.clean_url _query_builder
1362
+
1363
+ # Prepare headers.
1364
+ _headers = {
1365
+ 'accept' => 'application/json'
1366
+ }
1367
+
1368
+ # Prepare form parameters.
1369
+ _parameters = {
1370
+ 'body' => body
1371
+ }
1372
+ _parameters = APIHelper.form_encode_parameters(_parameters)
1373
+
1374
+ # Prepare and execute HttpRequest.
1375
+ _request = @http_client.post(
1376
+ _query_url,
1377
+ headers: _headers,
1378
+ parameters: _parameters
1379
+ )
1380
+ _context = execute_request(_request)
1381
+
1382
+ # Validate response against endpoint and global error codes.
1383
+ return nil if _context.response.status_code == 404
1384
+ validate_response(_context)
1385
+
1386
+ # Return appropriate response type.
1387
+ decoded = APIHelper.json_deserialize(_context.response.raw_body)
1388
+ ServerResponse.from_hash(decoded)
1389
+ end
1390
+ end
1391
+ end