korona-entry-client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +128 -0
  4. data/Rakefile +10 -0
  5. data/docs/BadRequestError.md +19 -0
  6. data/docs/EntryResponse.md +21 -0
  7. data/docs/ExternalTicketConfiguration.md +29 -0
  8. data/docs/ExternalTicketConfigurationList.md +17 -0
  9. data/docs/ExternalTicketConfigurationsApi.md +247 -0
  10. data/docs/ModelReference.md +23 -0
  11. data/docs/NotAcceptableError.md +19 -0
  12. data/docs/OrganizationalUnit.md +27 -0
  13. data/docs/OrganizationalUnitList.md +17 -0
  14. data/docs/OrganizationalUnitsApi.md +247 -0
  15. data/docs/Ticket.md +35 -0
  16. data/docs/TicketEntry.md +49 -0
  17. data/docs/TicketEntryLog.md +39 -0
  18. data/docs/TicketEntryLogList.md +17 -0
  19. data/docs/TicketImage.md +17 -0
  20. data/docs/TicketInformation.md +27 -0
  21. data/docs/TicketList.md +17 -0
  22. data/docs/TicketPersonalization.md +21 -0
  23. data/docs/TicketsApi.md +654 -0
  24. data/git_push.sh +58 -0
  25. data/korona-entry-client.gemspec +39 -0
  26. data/lib/korona-entry-client.rb +58 -0
  27. data/lib/korona-entry-client/api/external_ticket_configurations_api.rb +356 -0
  28. data/lib/korona-entry-client/api/organizational_units_api.rb +356 -0
  29. data/lib/korona-entry-client/api/tickets_api.rb +854 -0
  30. data/lib/korona-entry-client/api_client.rb +386 -0
  31. data/lib/korona-entry-client/api_error.rb +57 -0
  32. data/lib/korona-entry-client/configuration.rb +248 -0
  33. data/lib/korona-entry-client/models/bad_request_error.rb +217 -0
  34. data/lib/korona-entry-client/models/entry_response.rb +226 -0
  35. data/lib/korona-entry-client/models/external_ticket_configuration.rb +304 -0
  36. data/lib/korona-entry-client/models/external_ticket_configuration_list.rb +214 -0
  37. data/lib/korona-entry-client/models/model_reference.rb +238 -0
  38. data/lib/korona-entry-client/models/not_acceptable_error.rb +250 -0
  39. data/lib/korona-entry-client/models/organizational_unit.rb +257 -0
  40. data/lib/korona-entry-client/models/organizational_unit_list.rb +214 -0
  41. data/lib/korona-entry-client/models/ticket.rb +299 -0
  42. data/lib/korona-entry-client/models/ticket_entry.rb +403 -0
  43. data/lib/korona-entry-client/models/ticket_entry_log.rb +374 -0
  44. data/lib/korona-entry-client/models/ticket_entry_log_list.rb +214 -0
  45. data/lib/korona-entry-client/models/ticket_image.rb +215 -0
  46. data/lib/korona-entry-client/models/ticket_information.rb +258 -0
  47. data/lib/korona-entry-client/models/ticket_list.rb +214 -0
  48. data/lib/korona-entry-client/models/ticket_personalization.rb +228 -0
  49. data/lib/korona-entry-client/version.rb +15 -0
  50. data/spec/api/external_ticket_configurations_api_spec.rb +95 -0
  51. data/spec/api/organizational_units_api_spec.rb +95 -0
  52. data/spec/api/tickets_api_spec.rb +191 -0
  53. data/spec/api_client_spec.rb +226 -0
  54. data/spec/configuration_spec.rb +42 -0
  55. data/spec/models/bad_request_error_spec.rb +47 -0
  56. data/spec/models/entry_response_spec.rb +53 -0
  57. data/spec/models/external_ticket_configuration_list_spec.rb +41 -0
  58. data/spec/models/external_ticket_configuration_spec.rb +77 -0
  59. data/spec/models/model_reference_spec.rb +59 -0
  60. data/spec/models/not_acceptable_error_spec.rb +51 -0
  61. data/spec/models/organizational_unit_list_spec.rb +41 -0
  62. data/spec/models/organizational_unit_spec.rb +71 -0
  63. data/spec/models/ticket_entry_log_list_spec.rb +41 -0
  64. data/spec/models/ticket_entry_log_spec.rb +119 -0
  65. data/spec/models/ticket_entry_spec.rb +137 -0
  66. data/spec/models/ticket_image_spec.rb +41 -0
  67. data/spec/models/ticket_information_spec.rb +71 -0
  68. data/spec/models/ticket_list_spec.rb +41 -0
  69. data/spec/models/ticket_personalization_spec.rb +53 -0
  70. data/spec/models/ticket_spec.rb +95 -0
  71. data/spec/spec_helper.rb +111 -0
  72. metadata +196 -0
@@ -0,0 +1,356 @@
1
+ =begin
2
+ #KORONA.entry API v1
3
+
4
+ #Our api provides access to our entry services
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module KoronaEntryClient
16
+ class OrganizationalUnitsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Creates a new organizational unit.
23
+ # @param client [String] Identification of executing client.
24
+ # @param body [OrganizationalUnit] Properties to update of the organizational unit.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ModelReference]
27
+ def create_organizational_unit(client, body, opts = {})
28
+ data, _status_code, _headers = create_organizational_unit_with_http_info(client, body, opts)
29
+ data
30
+ end
31
+
32
+ # Creates a new organizational unit.
33
+ # @param client [String] Identification of executing client.
34
+ # @param body [OrganizationalUnit] Properties to update of the organizational unit.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ModelReference, Integer, Hash)>] ModelReference data, response status code and response headers
37
+ def create_organizational_unit_with_http_info(client, body, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.create_organizational_unit ...'
40
+ end
41
+ # verify the required parameter 'client' is set
42
+ if @api_client.config.client_side_validation && client.nil?
43
+ fail ArgumentError, "Missing the required parameter 'client' when calling OrganizationalUnitsApi.create_organizational_unit"
44
+ end
45
+ # verify the required parameter 'body' is set
46
+ if @api_client.config.client_side_validation && body.nil?
47
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationalUnitsApi.create_organizational_unit"
48
+ end
49
+ # resource path
50
+ local_var_path = '/{client}/organizationalUnits'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
67
+
68
+ # return_type
69
+ return_type = opts[:return_type] || 'ModelReference'
70
+
71
+ # auth_names
72
+ auth_names = opts[:auth_names] || []
73
+
74
+ new_options = opts.merge(
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: OrganizationalUnitsApi#create_organizational_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Deletes the single organizational unit.
91
+ # @param client [String] Identification of executing client.
92
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def delete_organizational_unit(client, organizational_unit_id, opts = {})
96
+ delete_organizational_unit_with_http_info(client, organizational_unit_id, opts)
97
+ nil
98
+ end
99
+
100
+ # Deletes the single organizational unit.
101
+ # @param client [String] Identification of executing client.
102
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def delete_organizational_unit_with_http_info(client, organizational_unit_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.delete_organizational_unit ...'
108
+ end
109
+ # verify the required parameter 'client' is set
110
+ if @api_client.config.client_side_validation && client.nil?
111
+ fail ArgumentError, "Missing the required parameter 'client' when calling OrganizationalUnitsApi.delete_organizational_unit"
112
+ end
113
+ # verify the required parameter 'organizational_unit_id' is set
114
+ if @api_client.config.client_side_validation && organizational_unit_id.nil?
115
+ fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.delete_organizational_unit"
116
+ end
117
+ # resource path
118
+ local_var_path = '/{client}/organizationalUnits/{organizationalUnitId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s))
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body]
133
+
134
+ # return_type
135
+ return_type = opts[:return_type]
136
+
137
+ # auth_names
138
+ auth_names = opts[:auth_names] || []
139
+
140
+ new_options = opts.merge(
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: OrganizationalUnitsApi#delete_organizational_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Returns the single organizational unit.
157
+ # @param client [String] Identification of executing client.
158
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [OrganizationalUnit]
161
+ def get_organizational_unit(client, organizational_unit_id, opts = {})
162
+ data, _status_code, _headers = get_organizational_unit_with_http_info(client, organizational_unit_id, opts)
163
+ data
164
+ end
165
+
166
+ # Returns the single organizational unit.
167
+ # @param client [String] Identification of executing client.
168
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [Array<(OrganizationalUnit, Integer, Hash)>] OrganizationalUnit data, response status code and response headers
171
+ def get_organizational_unit_with_http_info(client, organizational_unit_id, opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_unit ...'
174
+ end
175
+ # verify the required parameter 'client' is set
176
+ if @api_client.config.client_side_validation && client.nil?
177
+ fail ArgumentError, "Missing the required parameter 'client' when calling OrganizationalUnitsApi.get_organizational_unit"
178
+ end
179
+ # verify the required parameter 'organizational_unit_id' is set
180
+ if @api_client.config.client_side_validation && organizational_unit_id.nil?
181
+ fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.get_organizational_unit"
182
+ end
183
+ # resource path
184
+ local_var_path = '/{client}/organizationalUnits/{organizationalUnitId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s))
185
+
186
+ # query parameters
187
+ query_params = opts[:query_params] || {}
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body]
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'OrganizationalUnit'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || []
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Returns all organizational unit
223
+ # @param client [String] Identification of executing client.
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [OrganizationalUnitList]
226
+ def get_organizational_units(client, opts = {})
227
+ data, _status_code, _headers = get_organizational_units_with_http_info(client, opts)
228
+ data
229
+ end
230
+
231
+ # Returns all organizational unit
232
+ # @param client [String] Identification of executing client.
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [Array<(OrganizationalUnitList, Integer, Hash)>] OrganizationalUnitList data, response status code and response headers
235
+ def get_organizational_units_with_http_info(client, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.get_organizational_units ...'
238
+ end
239
+ # verify the required parameter 'client' is set
240
+ if @api_client.config.client_side_validation && client.nil?
241
+ fail ArgumentError, "Missing the required parameter 'client' when calling OrganizationalUnitsApi.get_organizational_units"
242
+ end
243
+ # resource path
244
+ local_var_path = '/{client}/organizationalUnits'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
245
+
246
+ # query parameters
247
+ query_params = opts[:query_params] || {}
248
+
249
+ # header parameters
250
+ header_params = opts[:header_params] || {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
253
+
254
+ # form parameters
255
+ form_params = opts[:form_params] || {}
256
+
257
+ # http body (model)
258
+ post_body = opts[:body]
259
+
260
+ # return_type
261
+ return_type = opts[:return_type] || 'OrganizationalUnitList'
262
+
263
+ # auth_names
264
+ auth_names = opts[:auth_names] || []
265
+
266
+ new_options = opts.merge(
267
+ :header_params => header_params,
268
+ :query_params => query_params,
269
+ :form_params => form_params,
270
+ :body => post_body,
271
+ :auth_names => auth_names,
272
+ :return_type => return_type
273
+ )
274
+
275
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
276
+ if @api_client.config.debugging
277
+ @api_client.config.logger.debug "API called: OrganizationalUnitsApi#get_organizational_units\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
278
+ end
279
+ return data, status_code, headers
280
+ end
281
+
282
+ # Updates the single organizational unit.
283
+ # @param client [String] Identification of executing client.
284
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
285
+ # @param body [OrganizationalUnit] Properties to update of the organizational unit.
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [ModelReference]
288
+ def update_organizational_unit(client, organizational_unit_id, body, opts = {})
289
+ data, _status_code, _headers = update_organizational_unit_with_http_info(client, organizational_unit_id, body, opts)
290
+ data
291
+ end
292
+
293
+ # Updates the single organizational unit.
294
+ # @param client [String] Identification of executing client.
295
+ # @param organizational_unit_id [Integer] ID to identify the organizational unit.
296
+ # @param body [OrganizationalUnit] Properties to update of the organizational unit.
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(ModelReference, Integer, Hash)>] ModelReference data, response status code and response headers
299
+ def update_organizational_unit_with_http_info(client, organizational_unit_id, body, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: OrganizationalUnitsApi.update_organizational_unit ...'
302
+ end
303
+ # verify the required parameter 'client' is set
304
+ if @api_client.config.client_side_validation && client.nil?
305
+ fail ArgumentError, "Missing the required parameter 'client' when calling OrganizationalUnitsApi.update_organizational_unit"
306
+ end
307
+ # verify the required parameter 'organizational_unit_id' is set
308
+ if @api_client.config.client_side_validation && organizational_unit_id.nil?
309
+ fail ArgumentError, "Missing the required parameter 'organizational_unit_id' when calling OrganizationalUnitsApi.update_organizational_unit"
310
+ end
311
+ # verify the required parameter 'body' is set
312
+ if @api_client.config.client_side_validation && body.nil?
313
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationalUnitsApi.update_organizational_unit"
314
+ end
315
+ # resource path
316
+ local_var_path = '/{client}/organizationalUnits/{organizationalUnitId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'organizationalUnitId' + '}', CGI.escape(organizational_unit_id.to_s))
317
+
318
+ # query parameters
319
+ query_params = opts[:query_params] || {}
320
+
321
+ # header parameters
322
+ header_params = opts[:header_params] || {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
325
+ # HTTP header 'Content-Type'
326
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
327
+
328
+ # form parameters
329
+ form_params = opts[:form_params] || {}
330
+
331
+ # http body (model)
332
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
333
+
334
+ # return_type
335
+ return_type = opts[:return_type] || 'ModelReference'
336
+
337
+ # auth_names
338
+ auth_names = opts[:auth_names] || []
339
+
340
+ new_options = opts.merge(
341
+ :header_params => header_params,
342
+ :query_params => query_params,
343
+ :form_params => form_params,
344
+ :body => post_body,
345
+ :auth_names => auth_names,
346
+ :return_type => return_type
347
+ )
348
+
349
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
350
+ if @api_client.config.debugging
351
+ @api_client.config.logger.debug "API called: OrganizationalUnitsApi#update_organizational_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
+ end
353
+ return data, status_code, headers
354
+ end
355
+ end
356
+ end
@@ -0,0 +1,854 @@
1
+ =begin
2
+ #KORONA.entry API v1
3
+
4
+ #Our api provides access to our entry services
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module KoronaEntryClient
16
+ class TicketsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Checks a ticket. The entry can optionally also be committed.
23
+ # @param client [String] Identification of executing client.
24
+ # @param ticket_number [String] Ticket number to be checked.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :commit_entry True if entry should be committed.
27
+ # @option opts [String] :commit_type
28
+ # @option opts [String] :organizational_unit_number Number of organizational unit.
29
+ # @option opts [DateTime] :time The time to be checked. *Now* if not specified further.
30
+ # @option opts [Integer] :number_of_uses Number of uses. *1* if not specified further.
31
+ # @return [EntryResponse]
32
+ def check_ticket(client, ticket_number, opts = {})
33
+ data, _status_code, _headers = check_ticket_with_http_info(client, ticket_number, opts)
34
+ data
35
+ end
36
+
37
+ # Checks a ticket. The entry can optionally also be committed.
38
+ # @param client [String] Identification of executing client.
39
+ # @param ticket_number [String] Ticket number to be checked.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Boolean] :commit_entry True if entry should be committed.
42
+ # @option opts [String] :commit_type
43
+ # @option opts [String] :organizational_unit_number Number of organizational unit.
44
+ # @option opts [DateTime] :time The time to be checked. *Now* if not specified further.
45
+ # @option opts [Integer] :number_of_uses Number of uses. *1* if not specified further.
46
+ # @return [Array<(EntryResponse, Integer, Hash)>] EntryResponse data, response status code and response headers
47
+ def check_ticket_with_http_info(client, ticket_number, opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: TicketsApi.check_ticket ...'
50
+ end
51
+ # verify the required parameter 'client' is set
52
+ if @api_client.config.client_side_validation && client.nil?
53
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.check_ticket"
54
+ end
55
+ # verify the required parameter 'ticket_number' is set
56
+ if @api_client.config.client_side_validation && ticket_number.nil?
57
+ fail ArgumentError, "Missing the required parameter 'ticket_number' when calling TicketsApi.check_ticket"
58
+ end
59
+ allowable_values = ["ACCESS", "EXIT"]
60
+ if @api_client.config.client_side_validation && opts[:'commit_type'] && !allowable_values.include?(opts[:'commit_type'])
61
+ fail ArgumentError, "invalid value for \"commit_type\", must be one of #{allowable_values}"
62
+ end
63
+ # resource path
64
+ local_var_path = '/{client}/checkTicket'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+ query_params[:'ticketNumber'] = ticket_number
69
+ query_params[:'commitEntry'] = opts[:'commit_entry'] if !opts[:'commit_entry'].nil?
70
+ query_params[:'commitType'] = opts[:'commit_type'] if !opts[:'commit_type'].nil?
71
+ query_params[:'organizationalUnitNumber'] = opts[:'organizational_unit_number'] if !opts[:'organizational_unit_number'].nil?
72
+ query_params[:'time'] = opts[:'time'] if !opts[:'time'].nil?
73
+ query_params[:'numberOfUses'] = opts[:'number_of_uses'] if !opts[:'number_of_uses'].nil?
74
+
75
+ # header parameters
76
+ header_params = opts[:header_params] || {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
79
+
80
+ # form parameters
81
+ form_params = opts[:form_params] || {}
82
+
83
+ # http body (model)
84
+ post_body = opts[:body]
85
+
86
+ # return_type
87
+ return_type = opts[:return_type] || 'EntryResponse'
88
+
89
+ # auth_names
90
+ auth_names = opts[:auth_names] || ['basicAuth']
91
+
92
+ new_options = opts.merge(
93
+ :header_params => header_params,
94
+ :query_params => query_params,
95
+ :form_params => form_params,
96
+ :body => post_body,
97
+ :auth_names => auth_names,
98
+ :return_type => return_type
99
+ )
100
+
101
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug "API called: TicketsApi#check_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
104
+ end
105
+ return data, status_code, headers
106
+ end
107
+
108
+ # Creates a new ticket.
109
+ # @param client [String] Identification of executing client.
110
+ # @param body [Ticket] Properties to update of the ticket.
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [ModelReference]
113
+ def create_ticket(client, body, opts = {})
114
+ data, _status_code, _headers = create_ticket_with_http_info(client, body, opts)
115
+ data
116
+ end
117
+
118
+ # Creates a new ticket.
119
+ # @param client [String] Identification of executing client.
120
+ # @param body [Ticket] Properties to update of the ticket.
121
+ # @param [Hash] opts the optional parameters
122
+ # @return [Array<(ModelReference, Integer, Hash)>] ModelReference data, response status code and response headers
123
+ def create_ticket_with_http_info(client, body, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: TicketsApi.create_ticket ...'
126
+ end
127
+ # verify the required parameter 'client' is set
128
+ if @api_client.config.client_side_validation && client.nil?
129
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.create_ticket"
130
+ end
131
+ # verify the required parameter 'body' is set
132
+ if @api_client.config.client_side_validation && body.nil?
133
+ fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.create_ticket"
134
+ end
135
+ # resource path
136
+ local_var_path = '/{client}/tickets'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
137
+
138
+ # query parameters
139
+ query_params = opts[:query_params] || {}
140
+
141
+ # header parameters
142
+ header_params = opts[:header_params] || {}
143
+ # HTTP header 'Accept' (if needed)
144
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
145
+ # HTTP header 'Content-Type'
146
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
147
+
148
+ # form parameters
149
+ form_params = opts[:form_params] || {}
150
+
151
+ # http body (model)
152
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
153
+
154
+ # return_type
155
+ return_type = opts[:return_type] || 'ModelReference'
156
+
157
+ # auth_names
158
+ auth_names = opts[:auth_names] || ['basicAuth']
159
+
160
+ new_options = opts.merge(
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => return_type
167
+ )
168
+
169
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: TicketsApi#create_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ return data, status_code, headers
174
+ end
175
+
176
+ # Deletes the owners image of the ticket.
177
+ # @param client [String] Identification of executing client.
178
+ # @param ticket_id [Integer] ID to identify the ticket.
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [nil]
181
+ def delete_image(client, ticket_id, opts = {})
182
+ delete_image_with_http_info(client, ticket_id, opts)
183
+ nil
184
+ end
185
+
186
+ # Deletes the owners image of the ticket.
187
+ # @param client [String] Identification of executing client.
188
+ # @param ticket_id [Integer] ID to identify the ticket.
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
191
+ def delete_image_with_http_info(client, ticket_id, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: TicketsApi.delete_image ...'
194
+ end
195
+ # verify the required parameter 'client' is set
196
+ if @api_client.config.client_side_validation && client.nil?
197
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.delete_image"
198
+ end
199
+ # verify the required parameter 'ticket_id' is set
200
+ if @api_client.config.client_side_validation && ticket_id.nil?
201
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.delete_image"
202
+ end
203
+ # resource path
204
+ local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
205
+
206
+ # query parameters
207
+ query_params = opts[:query_params] || {}
208
+
209
+ # header parameters
210
+ header_params = opts[:header_params] || {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
213
+
214
+ # form parameters
215
+ form_params = opts[:form_params] || {}
216
+
217
+ # http body (model)
218
+ post_body = opts[:body]
219
+
220
+ # return_type
221
+ return_type = opts[:return_type]
222
+
223
+ # auth_names
224
+ auth_names = opts[:auth_names] || ['basicAuth']
225
+
226
+ new_options = opts.merge(
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => return_type
233
+ )
234
+
235
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug "API called: TicketsApi#delete_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
238
+ end
239
+ return data, status_code, headers
240
+ end
241
+
242
+ # Deletes the single ticket.
243
+ # @param client [String] Identification of executing client.
244
+ # @param ticket_id [Integer] ID to identify the ticket.
245
+ # @param [Hash] opts the optional parameters
246
+ # @return [nil]
247
+ def delete_ticket(client, ticket_id, opts = {})
248
+ delete_ticket_with_http_info(client, ticket_id, opts)
249
+ nil
250
+ end
251
+
252
+ # Deletes the single ticket.
253
+ # @param client [String] Identification of executing client.
254
+ # @param ticket_id [Integer] ID to identify the ticket.
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
257
+ def delete_ticket_with_http_info(client, ticket_id, opts = {})
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug 'Calling API: TicketsApi.delete_ticket ...'
260
+ end
261
+ # verify the required parameter 'client' is set
262
+ if @api_client.config.client_side_validation && client.nil?
263
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.delete_ticket"
264
+ end
265
+ # verify the required parameter 'ticket_id' is set
266
+ if @api_client.config.client_side_validation && ticket_id.nil?
267
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.delete_ticket"
268
+ end
269
+ # resource path
270
+ local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
+
280
+ # form parameters
281
+ form_params = opts[:form_params] || {}
282
+
283
+ # http body (model)
284
+ post_body = opts[:body]
285
+
286
+ # return_type
287
+ return_type = opts[:return_type]
288
+
289
+ # auth_names
290
+ auth_names = opts[:auth_names] || ['basicAuth']
291
+
292
+ new_options = opts.merge(
293
+ :header_params => header_params,
294
+ :query_params => query_params,
295
+ :form_params => form_params,
296
+ :body => post_body,
297
+ :auth_names => auth_names,
298
+ :return_type => return_type
299
+ )
300
+
301
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
302
+ if @api_client.config.debugging
303
+ @api_client.config.logger.debug "API called: TicketsApi#delete_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
304
+ end
305
+ return data, status_code, headers
306
+ end
307
+
308
+ # Returns the owners image of the ticket
309
+ # @param client [String] Identification of executing client.
310
+ # @param ticket_id [Integer] ID to identify the ticket.
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [TicketImage]
313
+ def get_image(client, ticket_id, opts = {})
314
+ data, _status_code, _headers = get_image_with_http_info(client, ticket_id, opts)
315
+ data
316
+ end
317
+
318
+ # Returns the owners image of the ticket
319
+ # @param client [String] Identification of executing client.
320
+ # @param ticket_id [Integer] ID to identify the ticket.
321
+ # @param [Hash] opts the optional parameters
322
+ # @return [Array<(TicketImage, Integer, Hash)>] TicketImage data, response status code and response headers
323
+ def get_image_with_http_info(client, ticket_id, opts = {})
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug 'Calling API: TicketsApi.get_image ...'
326
+ end
327
+ # verify the required parameter 'client' is set
328
+ if @api_client.config.client_side_validation && client.nil?
329
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_image"
330
+ end
331
+ # verify the required parameter 'ticket_id' is set
332
+ if @api_client.config.client_side_validation && ticket_id.nil?
333
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_image"
334
+ end
335
+ # resource path
336
+ local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
337
+
338
+ # query parameters
339
+ query_params = opts[:query_params] || {}
340
+
341
+ # header parameters
342
+ header_params = opts[:header_params] || {}
343
+ # HTTP header 'Accept' (if needed)
344
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
345
+
346
+ # form parameters
347
+ form_params = opts[:form_params] || {}
348
+
349
+ # http body (model)
350
+ post_body = opts[:body]
351
+
352
+ # return_type
353
+ return_type = opts[:return_type] || 'TicketImage'
354
+
355
+ # auth_names
356
+ auth_names = opts[:auth_names] || ['basicAuth']
357
+
358
+ new_options = opts.merge(
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type
365
+ )
366
+
367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: TicketsApi#get_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+
374
+ # Returns the log for a optional single ticket and/or organizational unit
375
+ # @param client [String] Identification of executing client.
376
+ # @param time_from [DateTime] Log time from.
377
+ # @param time_to [DateTime] Log time to.
378
+ # @param log_types [Array<String>] Restrict the logs to specific log events.
379
+ # @param [Hash] opts the optional parameters
380
+ # @option opts [String] :ticket_number Optional filter to restrict the logs to actions to the specified ticket.
381
+ # @option opts [String] :organizational_unit_number Optional filter to restrict the logs to actions within the specified organizational unit.
382
+ # @return [TicketEntryLogList]
383
+ def get_logs(client, time_from, time_to, log_types, opts = {})
384
+ data, _status_code, _headers = get_logs_with_http_info(client, time_from, time_to, log_types, opts)
385
+ data
386
+ end
387
+
388
+ # Returns the log for a optional single ticket and/or organizational unit
389
+ # @param client [String] Identification of executing client.
390
+ # @param time_from [DateTime] Log time from.
391
+ # @param time_to [DateTime] Log time to.
392
+ # @param log_types [Array<String>] Restrict the logs to specific log events.
393
+ # @param [Hash] opts the optional parameters
394
+ # @option opts [String] :ticket_number Optional filter to restrict the logs to actions to the specified ticket.
395
+ # @option opts [String] :organizational_unit_number Optional filter to restrict the logs to actions within the specified organizational unit.
396
+ # @return [Array<(TicketEntryLogList, Integer, Hash)>] TicketEntryLogList data, response status code and response headers
397
+ def get_logs_with_http_info(client, time_from, time_to, log_types, opts = {})
398
+ if @api_client.config.debugging
399
+ @api_client.config.logger.debug 'Calling API: TicketsApi.get_logs ...'
400
+ end
401
+ # verify the required parameter 'client' is set
402
+ if @api_client.config.client_side_validation && client.nil?
403
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_logs"
404
+ end
405
+ # verify the required parameter 'time_from' is set
406
+ if @api_client.config.client_side_validation && time_from.nil?
407
+ fail ArgumentError, "Missing the required parameter 'time_from' when calling TicketsApi.get_logs"
408
+ end
409
+ # verify the required parameter 'time_to' is set
410
+ if @api_client.config.client_side_validation && time_to.nil?
411
+ fail ArgumentError, "Missing the required parameter 'time_to' when calling TicketsApi.get_logs"
412
+ end
413
+ # verify the required parameter 'log_types' is set
414
+ if @api_client.config.client_side_validation && log_types.nil?
415
+ fail ArgumentError, "Missing the required parameter 'log_types' when calling TicketsApi.get_logs"
416
+ end
417
+ # resource path
418
+ local_var_path = '/{client}/ticketEntryLogs'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
419
+
420
+ # query parameters
421
+ query_params = opts[:query_params] || {}
422
+ query_params[:'timeFrom'] = time_from
423
+ query_params[:'timeTo'] = time_to
424
+ query_params[:'logTypes'] = @api_client.build_collection_param(log_types, :multi)
425
+ query_params[:'ticketNumber'] = opts[:'ticket_number'] if !opts[:'ticket_number'].nil?
426
+ query_params[:'organizationalUnitNumber'] = opts[:'organizational_unit_number'] if !opts[:'organizational_unit_number'].nil?
427
+
428
+ # header parameters
429
+ header_params = opts[:header_params] || {}
430
+ # HTTP header 'Accept' (if needed)
431
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
432
+
433
+ # form parameters
434
+ form_params = opts[:form_params] || {}
435
+
436
+ # http body (model)
437
+ post_body = opts[:body]
438
+
439
+ # return_type
440
+ return_type = opts[:return_type] || 'TicketEntryLogList'
441
+
442
+ # auth_names
443
+ auth_names = opts[:auth_names] || ['basicAuth']
444
+
445
+ new_options = opts.merge(
446
+ :header_params => header_params,
447
+ :query_params => query_params,
448
+ :form_params => form_params,
449
+ :body => post_body,
450
+ :auth_names => auth_names,
451
+ :return_type => return_type
452
+ )
453
+
454
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
455
+ if @api_client.config.debugging
456
+ @api_client.config.logger.debug "API called: TicketsApi#get_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
457
+ end
458
+ return data, status_code, headers
459
+ end
460
+
461
+ # Returns the single ticket.
462
+ # @param client [String] Identification of executing client.
463
+ # @param ticket_id [Integer] ID to identify the ticket.
464
+ # @param [Hash] opts the optional parameters
465
+ # @return [Ticket]
466
+ def get_ticket(client, ticket_id, opts = {})
467
+ data, _status_code, _headers = get_ticket_with_http_info(client, ticket_id, opts)
468
+ data
469
+ end
470
+
471
+ # Returns the single ticket.
472
+ # @param client [String] Identification of executing client.
473
+ # @param ticket_id [Integer] ID to identify the ticket.
474
+ # @param [Hash] opts the optional parameters
475
+ # @return [Array<(Ticket, Integer, Hash)>] Ticket data, response status code and response headers
476
+ def get_ticket_with_http_info(client, ticket_id, opts = {})
477
+ if @api_client.config.debugging
478
+ @api_client.config.logger.debug 'Calling API: TicketsApi.get_ticket ...'
479
+ end
480
+ # verify the required parameter 'client' is set
481
+ if @api_client.config.client_side_validation && client.nil?
482
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_ticket"
483
+ end
484
+ # verify the required parameter 'ticket_id' is set
485
+ if @api_client.config.client_side_validation && ticket_id.nil?
486
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_ticket"
487
+ end
488
+ # resource path
489
+ local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
490
+
491
+ # query parameters
492
+ query_params = opts[:query_params] || {}
493
+
494
+ # header parameters
495
+ header_params = opts[:header_params] || {}
496
+ # HTTP header 'Accept' (if needed)
497
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
498
+
499
+ # form parameters
500
+ form_params = opts[:form_params] || {}
501
+
502
+ # http body (model)
503
+ post_body = opts[:body]
504
+
505
+ # return_type
506
+ return_type = opts[:return_type] || 'Ticket'
507
+
508
+ # auth_names
509
+ auth_names = opts[:auth_names] || ['basicAuth']
510
+
511
+ new_options = opts.merge(
512
+ :header_params => header_params,
513
+ :query_params => query_params,
514
+ :form_params => form_params,
515
+ :body => post_body,
516
+ :auth_names => auth_names,
517
+ :return_type => return_type
518
+ )
519
+
520
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
521
+ if @api_client.config.debugging
522
+ @api_client.config.logger.debug "API called: TicketsApi#get_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
523
+ end
524
+ return data, status_code, headers
525
+ end
526
+
527
+ # Returns a single ticket entry.
528
+ # @param client [String] Identification of executing client.
529
+ # @param ticket_id [Integer] ID to identify the ticket.
530
+ # @param ticket_entry_id [Integer] ID to identify the ticket entry of the ticket.
531
+ # @param [Hash] opts the optional parameters
532
+ # @return [TicketEntry]
533
+ def get_ticket_entry(client, ticket_id, ticket_entry_id, opts = {})
534
+ data, _status_code, _headers = get_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts)
535
+ data
536
+ end
537
+
538
+ # Returns a single ticket entry.
539
+ # @param client [String] Identification of executing client.
540
+ # @param ticket_id [Integer] ID to identify the ticket.
541
+ # @param ticket_entry_id [Integer] ID to identify the ticket entry of the ticket.
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [Array<(TicketEntry, Integer, Hash)>] TicketEntry data, response status code and response headers
544
+ def get_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts = {})
545
+ if @api_client.config.debugging
546
+ @api_client.config.logger.debug 'Calling API: TicketsApi.get_ticket_entry ...'
547
+ end
548
+ # verify the required parameter 'client' is set
549
+ if @api_client.config.client_side_validation && client.nil?
550
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_ticket_entry"
551
+ end
552
+ # verify the required parameter 'ticket_id' is set
553
+ if @api_client.config.client_side_validation && ticket_id.nil?
554
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_ticket_entry"
555
+ end
556
+ # verify the required parameter 'ticket_entry_id' is set
557
+ if @api_client.config.client_side_validation && ticket_entry_id.nil?
558
+ fail ArgumentError, "Missing the required parameter 'ticket_entry_id' when calling TicketsApi.get_ticket_entry"
559
+ end
560
+ # resource path
561
+ local_var_path = '/{client}/tickets/{ticketId}/ticketEntries/{ticketEntryId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s)).sub('{' + 'ticketEntryId' + '}', CGI.escape(ticket_entry_id.to_s))
562
+
563
+ # query parameters
564
+ query_params = opts[:query_params] || {}
565
+
566
+ # header parameters
567
+ header_params = opts[:header_params] || {}
568
+ # HTTP header 'Accept' (if needed)
569
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
570
+
571
+ # form parameters
572
+ form_params = opts[:form_params] || {}
573
+
574
+ # http body (model)
575
+ post_body = opts[:body]
576
+
577
+ # return_type
578
+ return_type = opts[:return_type] || 'TicketEntry'
579
+
580
+ # auth_names
581
+ auth_names = opts[:auth_names] || ['basicAuth']
582
+
583
+ new_options = opts.merge(
584
+ :header_params => header_params,
585
+ :query_params => query_params,
586
+ :form_params => form_params,
587
+ :body => post_body,
588
+ :auth_names => auth_names,
589
+ :return_type => return_type
590
+ )
591
+
592
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
593
+ if @api_client.config.debugging
594
+ @api_client.config.logger.debug "API called: TicketsApi#get_ticket_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
595
+ end
596
+ return data, status_code, headers
597
+ end
598
+
599
+ # Lists all tickets.
600
+ # @param client [String] Identification of executing client.
601
+ # @param offset [Integer] Position in the dataset to start to retrieve.
602
+ # @param page_size [Integer] Amount of objects to return per page.
603
+ # @param [Hash] opts the optional parameters
604
+ # @option opts [String] :ticket_number Restrict the list for a specific ticket number
605
+ # @option opts [DateTime] :create_date_from Restrict the list for begin of creation date.
606
+ # @option opts [DateTime] :create_date_to Restrict the list for end of creation date.
607
+ # @option opts [DateTime] :deactivation_date_from Restrict the list for start of deactivation date.
608
+ # @option opts [DateTime] :deactivation_date_to Restrict the list for end of deactivation date.
609
+ # @option opts [Boolean] :locked Restrict the list for locked tickets.
610
+ # @option opts [DateTime] :locked_to_date_from Restrict the list for for locked tickets.
611
+ # @option opts [DateTime] :locked_to_date_to Restrict the list for for locked tickets.
612
+ # @option opts [String] :personalization_customer_number Restrict the list for tickets owned by customers with specific customer number.
613
+ # @option opts [String] :personalization_lastname Restrict the list for tickets owned by customers with specific last name.
614
+ # @option opts [String] :personalization_firstname Restrict the list for tickets owned by customers with specific first name.
615
+ # @return [TicketList]
616
+ def get_tickets(client, offset, page_size, opts = {})
617
+ data, _status_code, _headers = get_tickets_with_http_info(client, offset, page_size, opts)
618
+ data
619
+ end
620
+
621
+ # Lists all tickets.
622
+ # @param client [String] Identification of executing client.
623
+ # @param offset [Integer] Position in the dataset to start to retrieve.
624
+ # @param page_size [Integer] Amount of objects to return per page.
625
+ # @param [Hash] opts the optional parameters
626
+ # @option opts [String] :ticket_number Restrict the list for a specific ticket number
627
+ # @option opts [DateTime] :create_date_from Restrict the list for begin of creation date.
628
+ # @option opts [DateTime] :create_date_to Restrict the list for end of creation date.
629
+ # @option opts [DateTime] :deactivation_date_from Restrict the list for start of deactivation date.
630
+ # @option opts [DateTime] :deactivation_date_to Restrict the list for end of deactivation date.
631
+ # @option opts [Boolean] :locked Restrict the list for locked tickets.
632
+ # @option opts [DateTime] :locked_to_date_from Restrict the list for for locked tickets.
633
+ # @option opts [DateTime] :locked_to_date_to Restrict the list for for locked tickets.
634
+ # @option opts [String] :personalization_customer_number Restrict the list for tickets owned by customers with specific customer number.
635
+ # @option opts [String] :personalization_lastname Restrict the list for tickets owned by customers with specific last name.
636
+ # @option opts [String] :personalization_firstname Restrict the list for tickets owned by customers with specific first name.
637
+ # @return [Array<(TicketList, Integer, Hash)>] TicketList data, response status code and response headers
638
+ def get_tickets_with_http_info(client, offset, page_size, opts = {})
639
+ if @api_client.config.debugging
640
+ @api_client.config.logger.debug 'Calling API: TicketsApi.get_tickets ...'
641
+ end
642
+ # verify the required parameter 'client' is set
643
+ if @api_client.config.client_side_validation && client.nil?
644
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_tickets"
645
+ end
646
+ # verify the required parameter 'offset' is set
647
+ if @api_client.config.client_side_validation && offset.nil?
648
+ fail ArgumentError, "Missing the required parameter 'offset' when calling TicketsApi.get_tickets"
649
+ end
650
+ # verify the required parameter 'page_size' is set
651
+ if @api_client.config.client_side_validation && page_size.nil?
652
+ fail ArgumentError, "Missing the required parameter 'page_size' when calling TicketsApi.get_tickets"
653
+ end
654
+ # resource path
655
+ local_var_path = '/{client}/tickets'.sub('{' + 'client' + '}', CGI.escape(client.to_s))
656
+
657
+ # query parameters
658
+ query_params = opts[:query_params] || {}
659
+ query_params[:'offset'] = offset
660
+ query_params[:'pageSize'] = page_size
661
+ query_params[:'ticketNumber'] = opts[:'ticket_number'] if !opts[:'ticket_number'].nil?
662
+ query_params[:'createDateFrom'] = opts[:'create_date_from'] if !opts[:'create_date_from'].nil?
663
+ query_params[:'createDateTo'] = opts[:'create_date_to'] if !opts[:'create_date_to'].nil?
664
+ query_params[:'deactivationDateFrom'] = opts[:'deactivation_date_from'] if !opts[:'deactivation_date_from'].nil?
665
+ query_params[:'deactivationDateTo'] = opts[:'deactivation_date_to'] if !opts[:'deactivation_date_to'].nil?
666
+ query_params[:'locked'] = opts[:'locked'] if !opts[:'locked'].nil?
667
+ query_params[:'lockedToDateFrom'] = opts[:'locked_to_date_from'] if !opts[:'locked_to_date_from'].nil?
668
+ query_params[:'lockedToDateTo'] = opts[:'locked_to_date_to'] if !opts[:'locked_to_date_to'].nil?
669
+ query_params[:'personalizationCustomerNumber'] = opts[:'personalization_customer_number'] if !opts[:'personalization_customer_number'].nil?
670
+ query_params[:'personalizationLastname'] = opts[:'personalization_lastname'] if !opts[:'personalization_lastname'].nil?
671
+ query_params[:'personalizationFirstname'] = opts[:'personalization_firstname'] if !opts[:'personalization_firstname'].nil?
672
+
673
+ # header parameters
674
+ header_params = opts[:header_params] || {}
675
+ # HTTP header 'Accept' (if needed)
676
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
677
+
678
+ # form parameters
679
+ form_params = opts[:form_params] || {}
680
+
681
+ # http body (model)
682
+ post_body = opts[:body]
683
+
684
+ # return_type
685
+ return_type = opts[:return_type] || 'TicketList'
686
+
687
+ # auth_names
688
+ auth_names = opts[:auth_names] || ['basicAuth']
689
+
690
+ new_options = opts.merge(
691
+ :header_params => header_params,
692
+ :query_params => query_params,
693
+ :form_params => form_params,
694
+ :body => post_body,
695
+ :auth_names => auth_names,
696
+ :return_type => return_type
697
+ )
698
+
699
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
700
+ if @api_client.config.debugging
701
+ @api_client.config.logger.debug "API called: TicketsApi#get_tickets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
702
+ end
703
+ return data, status_code, headers
704
+ end
705
+
706
+ # Updates the owners image of the ticket
707
+ # @param client [String] Identification of executing client.
708
+ # @param ticket_id [Integer] ID to identify the ticket.
709
+ # @param body [TicketImage] Properties to update of the image.
710
+ # @param [Hash] opts the optional parameters
711
+ # @return [ModelReference]
712
+ def update_image(client, ticket_id, body, opts = {})
713
+ data, _status_code, _headers = update_image_with_http_info(client, ticket_id, body, opts)
714
+ data
715
+ end
716
+
717
+ # Updates the owners image of the ticket
718
+ # @param client [String] Identification of executing client.
719
+ # @param ticket_id [Integer] ID to identify the ticket.
720
+ # @param body [TicketImage] Properties to update of the image.
721
+ # @param [Hash] opts the optional parameters
722
+ # @return [Array<(ModelReference, Integer, Hash)>] ModelReference data, response status code and response headers
723
+ def update_image_with_http_info(client, ticket_id, body, opts = {})
724
+ if @api_client.config.debugging
725
+ @api_client.config.logger.debug 'Calling API: TicketsApi.update_image ...'
726
+ end
727
+ # verify the required parameter 'client' is set
728
+ if @api_client.config.client_side_validation && client.nil?
729
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.update_image"
730
+ end
731
+ # verify the required parameter 'ticket_id' is set
732
+ if @api_client.config.client_side_validation && ticket_id.nil?
733
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.update_image"
734
+ end
735
+ # verify the required parameter 'body' is set
736
+ if @api_client.config.client_side_validation && body.nil?
737
+ fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.update_image"
738
+ end
739
+ # resource path
740
+ local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
741
+
742
+ # query parameters
743
+ query_params = opts[:query_params] || {}
744
+
745
+ # header parameters
746
+ header_params = opts[:header_params] || {}
747
+ # HTTP header 'Accept' (if needed)
748
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
749
+ # HTTP header 'Content-Type'
750
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
751
+
752
+ # form parameters
753
+ form_params = opts[:form_params] || {}
754
+
755
+ # http body (model)
756
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
757
+
758
+ # return_type
759
+ return_type = opts[:return_type] || 'ModelReference'
760
+
761
+ # auth_names
762
+ auth_names = opts[:auth_names] || ['basicAuth']
763
+
764
+ new_options = opts.merge(
765
+ :header_params => header_params,
766
+ :query_params => query_params,
767
+ :form_params => form_params,
768
+ :body => post_body,
769
+ :auth_names => auth_names,
770
+ :return_type => return_type
771
+ )
772
+
773
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
774
+ if @api_client.config.debugging
775
+ @api_client.config.logger.debug "API called: TicketsApi#update_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
776
+ end
777
+ return data, status_code, headers
778
+ end
779
+
780
+ # Updates the single ticket.
781
+ # @param client [String] Identification of executing client.
782
+ # @param ticket_id [Integer] ID to identify the ticket.
783
+ # @param body [Ticket] Properties to update of the ticket.
784
+ # @param [Hash] opts the optional parameters
785
+ # @return [ModelReference]
786
+ def update_ticket(client, ticket_id, body, opts = {})
787
+ data, _status_code, _headers = update_ticket_with_http_info(client, ticket_id, body, opts)
788
+ data
789
+ end
790
+
791
+ # Updates the single ticket.
792
+ # @param client [String] Identification of executing client.
793
+ # @param ticket_id [Integer] ID to identify the ticket.
794
+ # @param body [Ticket] Properties to update of the ticket.
795
+ # @param [Hash] opts the optional parameters
796
+ # @return [Array<(ModelReference, Integer, Hash)>] ModelReference data, response status code and response headers
797
+ def update_ticket_with_http_info(client, ticket_id, body, opts = {})
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug 'Calling API: TicketsApi.update_ticket ...'
800
+ end
801
+ # verify the required parameter 'client' is set
802
+ if @api_client.config.client_side_validation && client.nil?
803
+ fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.update_ticket"
804
+ end
805
+ # verify the required parameter 'ticket_id' is set
806
+ if @api_client.config.client_side_validation && ticket_id.nil?
807
+ fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.update_ticket"
808
+ end
809
+ # verify the required parameter 'body' is set
810
+ if @api_client.config.client_side_validation && body.nil?
811
+ fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.update_ticket"
812
+ end
813
+ # resource path
814
+ local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))
815
+
816
+ # query parameters
817
+ query_params = opts[:query_params] || {}
818
+
819
+ # header parameters
820
+ header_params = opts[:header_params] || {}
821
+ # HTTP header 'Accept' (if needed)
822
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
823
+ # HTTP header 'Content-Type'
824
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
825
+
826
+ # form parameters
827
+ form_params = opts[:form_params] || {}
828
+
829
+ # http body (model)
830
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
831
+
832
+ # return_type
833
+ return_type = opts[:return_type] || 'ModelReference'
834
+
835
+ # auth_names
836
+ auth_names = opts[:auth_names] || ['basicAuth']
837
+
838
+ new_options = opts.merge(
839
+ :header_params => header_params,
840
+ :query_params => query_params,
841
+ :form_params => form_params,
842
+ :body => post_body,
843
+ :auth_names => auth_names,
844
+ :return_type => return_type
845
+ )
846
+
847
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "API called: TicketsApi#update_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
850
+ end
851
+ return data, status_code, headers
852
+ end
853
+ end
854
+ end