Class: KoronaEntryClient::TicketsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/korona-entry-client/api/tickets_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TicketsApi

Returns a new instance of TicketsApi.



19
20
21
# File 'lib/korona-entry-client/api/tickets_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/korona-entry-client/api/tickets_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#check_ticket(client, ticket_number, opts = {}) ⇒ EntryResponse

Checks a ticket. The entry can optionally also be committed.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_number (String)

    Ticket number to be checked.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :commit_entry (Boolean)

    True if entry should be committed.

  • :commit_type (String)
  • :organizational_unit_number (String)

    Number of organizational unit.

  • :time (DateTime)

    The time to be checked. Now if not specified further.

  • :number_of_uses (Integer)

    Number of uses. 1 if not specified further.

Returns:



32
33
34
35
# File 'lib/korona-entry-client/api/tickets_api.rb', line 32

def check_ticket(client, ticket_number, opts = {})
  data, _status_code, _headers = check_ticket_with_http_info(client, ticket_number, opts)
  data
end

#check_ticket_with_http_info(client, ticket_number, opts = {}) ⇒ Array<(EntryResponse, Integer, Hash)>

Checks a ticket. The entry can optionally also be committed.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_number (String)

    Ticket number to be checked.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :commit_entry (Boolean)

    True if entry should be committed.

  • :commit_type (String)
  • :organizational_unit_number (String)

    Number of organizational unit.

  • :time (DateTime)

    The time to be checked. Now if not specified further.

  • :number_of_uses (Integer)

    Number of uses. 1 if not specified further.

Returns:

  • (Array<(EntryResponse, Integer, Hash)>)

    EntryResponse data, response status code and response headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/korona-entry-client/api/tickets_api.rb', line 47

def check_ticket_with_http_info(client, ticket_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.check_ticket ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.check_ticket"
  end
  # verify the required parameter 'ticket_number' is set
  if @api_client.config.client_side_validation && ticket_number.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_number' when calling TicketsApi.check_ticket"
  end
  allowable_values = ["ACCESS", "EXIT"]
  if @api_client.config.client_side_validation && opts[:'commit_type'] && !allowable_values.include?(opts[:'commit_type'])
    fail ArgumentError, "invalid value for \"commit_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/{client}/checkTicket'.sub('{' + 'client' + '}', CGI.escape(client.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ticketNumber'] = ticket_number
  query_params[:'commitEntry'] = opts[:'commit_entry'] if !opts[:'commit_entry'].nil?
  query_params[:'commitType'] = opts[:'commit_type'] if !opts[:'commit_type'].nil?
  query_params[:'organizationalUnitNumber'] = opts[:'organizational_unit_number'] if !opts[:'organizational_unit_number'].nil?
  query_params[:'time'] = opts[:'time'] if !opts[:'time'].nil?
  query_params[:'numberOfUses'] = opts[:'number_of_uses'] if !opts[:'number_of_uses'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'EntryResponse' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#check_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_ticket(client, body, opts = {}) ⇒ ModelReference

Creates a new ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • body (Ticket)

    Properties to update of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



113
114
115
116
# File 'lib/korona-entry-client/api/tickets_api.rb', line 113

def create_ticket(client, body, opts = {})
  data, _status_code, _headers = create_ticket_with_http_info(client, body, opts)
  data
end

#create_ticket_entry(client, ticket_id, body, opts = {}) ⇒ ModelReference

Creates a new ticket entry for a specific ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (TicketEntry)

    Properties to update of the ticket entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



182
183
184
185
# File 'lib/korona-entry-client/api/tickets_api.rb', line 182

def create_ticket_entry(client, ticket_id, body, opts = {})
  data, _status_code, _headers = create_ticket_entry_with_http_info(client, ticket_id, body, opts)
  data
end

#create_ticket_entry_with_http_info(client, ticket_id, body, opts = {}) ⇒ Array<(ModelReference, Integer, Hash)>

Creates a new ticket entry for a specific ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (TicketEntry)

    Properties to update of the ticket entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelReference, Integer, Hash)>)

    ModelReference data, response status code and response headers



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/korona-entry-client/api/tickets_api.rb', line 193

def create_ticket_entry_with_http_info(client, ticket_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.create_ticket_entry ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.create_ticket_entry"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.create_ticket_entry"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.create_ticket_entry"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}/ticketEntries'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'ModelReference' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#create_ticket_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_ticket_with_http_info(client, body, opts = {}) ⇒ Array<(ModelReference, Integer, Hash)>

Creates a new ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • body (Ticket)

    Properties to update of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelReference, Integer, Hash)>)

    ModelReference data, response status code and response headers



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/korona-entry-client/api/tickets_api.rb', line 123

def create_ticket_with_http_info(client, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.create_ticket ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.create_ticket"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.create_ticket"
  end
  # resource path
  local_var_path = '/{client}/tickets'.sub('{' + 'client' + '}', CGI.escape(client.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'ModelReference' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#create_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_image(client, ticket_id, opts = {}) ⇒ nil

Deletes the owners image of the ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


255
256
257
258
# File 'lib/korona-entry-client/api/tickets_api.rb', line 255

def delete_image(client, ticket_id, opts = {})
  delete_image_with_http_info(client, ticket_id, opts)
  nil
end

#delete_image_with_http_info(client, ticket_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deletes the owners image of the ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/korona-entry-client/api/tickets_api.rb', line 265

def delete_image_with_http_info(client, ticket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.delete_image ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.delete_image"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.delete_image"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#delete_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_ticket(client, ticket_id, opts = {}) ⇒ nil

Deletes the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


321
322
323
324
# File 'lib/korona-entry-client/api/tickets_api.rb', line 321

def delete_ticket(client, ticket_id, opts = {})
  delete_ticket_with_http_info(client, ticket_id, opts)
  nil
end

#delete_ticket_entry(client, ticket_id, ticket_entry_id, opts = {}) ⇒ nil

Deletes the single ticket entry (marks it as used up).

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


388
389
390
391
# File 'lib/korona-entry-client/api/tickets_api.rb', line 388

def delete_ticket_entry(client, ticket_id, ticket_entry_id, opts = {})
  delete_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts)
  nil
end

#delete_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deletes the single ticket entry (marks it as used up).

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/korona-entry-client/api/tickets_api.rb', line 399

def delete_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.delete_ticket_entry ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.delete_ticket_entry"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.delete_ticket_entry"
  end
  # verify the required parameter 'ticket_entry_id' is set
  if @api_client.config.client_side_validation && ticket_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_entry_id' when calling TicketsApi.delete_ticket_entry"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#delete_ticket_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_ticket_with_http_info(client, ticket_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deletes the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/korona-entry-client/api/tickets_api.rb', line 331

def delete_ticket_with_http_info(client, ticket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.delete_ticket ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.delete_ticket"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.delete_ticket"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#delete_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_image(client, ticket_id, opts = {}) ⇒ TicketImage

Returns the owners image of the ticket

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



459
460
461
462
# File 'lib/korona-entry-client/api/tickets_api.rb', line 459

def get_image(client, ticket_id, opts = {})
  data, _status_code, _headers = get_image_with_http_info(client, ticket_id, opts)
  data
end

#get_image_with_http_info(client, ticket_id, opts = {}) ⇒ Array<(TicketImage, Integer, Hash)>

Returns the owners image of the ticket

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TicketImage, Integer, Hash)>)

    TicketImage data, response status code and response headers



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/korona-entry-client/api/tickets_api.rb', line 469

def get_image_with_http_info(client, ticket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.get_image ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_image"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_image"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TicketImage' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#get_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_logs(client, time_from, time_to, log_types, opts = {}) ⇒ TicketEntryLogList

Returns the log for a optional single ticket and/or organizational unit

Parameters:

  • client (String)

    Identification of executing client.

  • time_from (DateTime)

    Log time from.

  • time_to (DateTime)

    Log time to.

  • log_types (Array<String>)

    Restrict the logs to specific log events.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticket_number (String)

    Optional filter to restrict the logs to actions to the specified ticket.

  • :organizational_unit_number (String)

    Optional filter to restrict the logs to actions within the specified organizational unit.

Returns:



529
530
531
532
# File 'lib/korona-entry-client/api/tickets_api.rb', line 529

def get_logs(client, time_from, time_to, log_types, opts = {})
  data, _status_code, _headers = get_logs_with_http_info(client, time_from, time_to, log_types, opts)
  data
end

#get_logs_with_http_info(client, time_from, time_to, log_types, opts = {}) ⇒ Array<(TicketEntryLogList, Integer, Hash)>

Returns the log for a optional single ticket and/or organizational unit

Parameters:

  • client (String)

    Identification of executing client.

  • time_from (DateTime)

    Log time from.

  • time_to (DateTime)

    Log time to.

  • log_types (Array<String>)

    Restrict the logs to specific log events.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticket_number (String)

    Optional filter to restrict the logs to actions to the specified ticket.

  • :organizational_unit_number (String)

    Optional filter to restrict the logs to actions within the specified organizational unit.

Returns:

  • (Array<(TicketEntryLogList, Integer, Hash)>)

    TicketEntryLogList data, response status code and response headers



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/korona-entry-client/api/tickets_api.rb', line 543

def get_logs_with_http_info(client, time_from, time_to, log_types, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.get_logs ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_logs"
  end
  # verify the required parameter 'time_from' is set
  if @api_client.config.client_side_validation && time_from.nil?
    fail ArgumentError, "Missing the required parameter 'time_from' when calling TicketsApi.get_logs"
  end
  # verify the required parameter 'time_to' is set
  if @api_client.config.client_side_validation && time_to.nil?
    fail ArgumentError, "Missing the required parameter 'time_to' when calling TicketsApi.get_logs"
  end
  # verify the required parameter 'log_types' is set
  if @api_client.config.client_side_validation && log_types.nil?
    fail ArgumentError, "Missing the required parameter 'log_types' when calling TicketsApi.get_logs"
  end
  # resource path
  local_var_path = '/{client}/ticketEntryLogs'.sub('{' + 'client' + '}', CGI.escape(client.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'timeFrom'] = time_from
  query_params[:'timeTo'] = time_to
  query_params[:'logTypes'] = @api_client.build_collection_param(log_types, :multi)
  query_params[:'ticketNumber'] = opts[:'ticket_number'] if !opts[:'ticket_number'].nil?
  query_params[:'organizationalUnitNumber'] = opts[:'organizational_unit_number'] if !opts[:'organizational_unit_number'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TicketEntryLogList' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#get_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ticket(client, ticket_id, opts = {}) ⇒ Ticket

Returns the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



612
613
614
615
# File 'lib/korona-entry-client/api/tickets_api.rb', line 612

def get_ticket(client, ticket_id, opts = {})
  data, _status_code, _headers = get_ticket_with_http_info(client, ticket_id, opts)
  data
end

#get_ticket_entry(client, ticket_id, ticket_entry_id, opts = {}) ⇒ TicketEntry

Returns a single ticket entry.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



679
680
681
682
# File 'lib/korona-entry-client/api/tickets_api.rb', line 679

def get_ticket_entry(client, ticket_id, ticket_entry_id, opts = {})
  data, _status_code, _headers = get_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts)
  data
end

#get_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts = {}) ⇒ Array<(TicketEntry, Integer, Hash)>

Returns a single ticket entry.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TicketEntry, Integer, Hash)>)

    TicketEntry data, response status code and response headers



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/korona-entry-client/api/tickets_api.rb', line 690

def get_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.get_ticket_entry ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_ticket_entry"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_ticket_entry"
  end
  # verify the required parameter 'ticket_entry_id' is set
  if @api_client.config.client_side_validation && ticket_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_entry_id' when calling TicketsApi.get_ticket_entry"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TicketEntry' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#get_ticket_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ticket_with_http_info(client, ticket_id, opts = {}) ⇒ Array<(Ticket, Integer, Hash)>

Returns the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Ticket, Integer, Hash)>)

    Ticket data, response status code and response headers



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
# File 'lib/korona-entry-client/api/tickets_api.rb', line 622

def get_ticket_with_http_info(client, ticket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.get_ticket ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_ticket"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.get_ticket"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Ticket' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#get_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_tickets(client, offset, page_size, opts = {}) ⇒ TicketList

Lists all tickets.

Parameters:

  • client (String)

    Identification of executing client.

  • offset (Integer)

    Position in the dataset to start to retrieve.

  • page_size (Integer)

    Amount of objects to return per page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticket_number (String)

    Restrict the list for a specific ticket number

  • :create_date_from (DateTime)

    Restrict the list for begin of creation date.

  • :create_date_to (DateTime)

    Restrict the list for end of creation date.

  • :deactivation_date_from (DateTime)

    Restrict the list for start of deactivation date.

  • :deactivation_date_to (DateTime)

    Restrict the list for end of deactivation date.

  • :locked (Boolean)

    Restrict the list for locked tickets.

  • :locked_to_date_from (DateTime)

    Restrict the list for for locked tickets.

  • :locked_to_date_to (DateTime)

    Restrict the list for for locked tickets.

  • :personalization_customer_number (String)

    Restrict the list for tickets owned by customers with specific customer number.

  • :personalization_lastname (String)

    Restrict the list for tickets owned by customers with specific last name.

  • :personalization_firstname (String)

    Restrict the list for tickets owned by customers with specific first name.

Returns:



762
763
764
765
# File 'lib/korona-entry-client/api/tickets_api.rb', line 762

def get_tickets(client, offset, page_size, opts = {})
  data, _status_code, _headers = get_tickets_with_http_info(client, offset, page_size, opts)
  data
end

#get_tickets_with_http_info(client, offset, page_size, opts = {}) ⇒ Array<(TicketList, Integer, Hash)>

Lists all tickets.

Parameters:

  • client (String)

    Identification of executing client.

  • offset (Integer)

    Position in the dataset to start to retrieve.

  • page_size (Integer)

    Amount of objects to return per page.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :ticket_number (String)

    Restrict the list for a specific ticket number

  • :create_date_from (DateTime)

    Restrict the list for begin of creation date.

  • :create_date_to (DateTime)

    Restrict the list for end of creation date.

  • :deactivation_date_from (DateTime)

    Restrict the list for start of deactivation date.

  • :deactivation_date_to (DateTime)

    Restrict the list for end of deactivation date.

  • :locked (Boolean)

    Restrict the list for locked tickets.

  • :locked_to_date_from (DateTime)

    Restrict the list for for locked tickets.

  • :locked_to_date_to (DateTime)

    Restrict the list for for locked tickets.

  • :personalization_customer_number (String)

    Restrict the list for tickets owned by customers with specific customer number.

  • :personalization_lastname (String)

    Restrict the list for tickets owned by customers with specific last name.

  • :personalization_firstname (String)

    Restrict the list for tickets owned by customers with specific first name.

Returns:

  • (Array<(TicketList, Integer, Hash)>)

    TicketList data, response status code and response headers



784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/korona-entry-client/api/tickets_api.rb', line 784

def get_tickets_with_http_info(client, offset, page_size, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.get_tickets ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.get_tickets"
  end
  # verify the required parameter 'offset' is set
  if @api_client.config.client_side_validation && offset.nil?
    fail ArgumentError, "Missing the required parameter 'offset' when calling TicketsApi.get_tickets"
  end
  # verify the required parameter 'page_size' is set
  if @api_client.config.client_side_validation && page_size.nil?
    fail ArgumentError, "Missing the required parameter 'page_size' when calling TicketsApi.get_tickets"
  end
  # resource path
  local_var_path = '/{client}/tickets'.sub('{' + 'client' + '}', CGI.escape(client.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = offset
  query_params[:'pageSize'] = page_size
  query_params[:'ticketNumber'] = opts[:'ticket_number'] if !opts[:'ticket_number'].nil?
  query_params[:'createDateFrom'] = opts[:'create_date_from'] if !opts[:'create_date_from'].nil?
  query_params[:'createDateTo'] = opts[:'create_date_to'] if !opts[:'create_date_to'].nil?
  query_params[:'deactivationDateFrom'] = opts[:'deactivation_date_from'] if !opts[:'deactivation_date_from'].nil?
  query_params[:'deactivationDateTo'] = opts[:'deactivation_date_to'] if !opts[:'deactivation_date_to'].nil?
  query_params[:'locked'] = opts[:'locked'] if !opts[:'locked'].nil?
  query_params[:'lockedToDateFrom'] = opts[:'locked_to_date_from'] if !opts[:'locked_to_date_from'].nil?
  query_params[:'lockedToDateTo'] = opts[:'locked_to_date_to'] if !opts[:'locked_to_date_to'].nil?
  query_params[:'personalizationCustomerNumber'] = opts[:'personalization_customer_number'] if !opts[:'personalization_customer_number'].nil?
  query_params[:'personalizationLastname'] = opts[:'personalization_lastname'] if !opts[:'personalization_lastname'].nil?
  query_params[:'personalizationFirstname'] = opts[:'personalization_firstname'] if !opts[:'personalization_firstname'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TicketList' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#get_tickets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_image(client, ticket_id, body, opts = {}) ⇒ ModelReference

Updates the owners image of the ticket

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (TicketImage)

    Properties to update of the image.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



858
859
860
861
# File 'lib/korona-entry-client/api/tickets_api.rb', line 858

def update_image(client, ticket_id, body, opts = {})
  data, _status_code, _headers = update_image_with_http_info(client, ticket_id, body, opts)
  data
end

#update_image_with_http_info(client, ticket_id, body, opts = {}) ⇒ Array<(ModelReference, Integer, Hash)>

Updates the owners image of the ticket

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (TicketImage)

    Properties to update of the image.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelReference, Integer, Hash)>)

    ModelReference data, response status code and response headers



869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
# File 'lib/korona-entry-client/api/tickets_api.rb', line 869

def update_image_with_http_info(client, ticket_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.update_image ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.update_image"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.update_image"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.update_image"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}/image'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'ModelReference' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#update_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_ticket(client, ticket_id, body, opts = {}) ⇒ ModelReference

Updates the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (Ticket)

    Properties to update of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



932
933
934
935
# File 'lib/korona-entry-client/api/tickets_api.rb', line 932

def update_ticket(client, ticket_id, body, opts = {})
  data, _status_code, _headers = update_ticket_with_http_info(client, ticket_id, body, opts)
  data
end

#update_ticket_entry(client, ticket_id, ticket_entry_id, body, opts = {}) ⇒ ModelReference

Updates the single ticket entry.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • body (TicketEntry)

    Properties to update of the ticket entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1007
1008
1009
1010
# File 'lib/korona-entry-client/api/tickets_api.rb', line 1007

def update_ticket_entry(client, ticket_id, ticket_entry_id, body, opts = {})
  data, _status_code, _headers = update_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, body, opts)
  data
end

#update_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, body, opts = {}) ⇒ Array<(ModelReference, Integer, Hash)>

Updates the single ticket entry.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • ticket_entry_id (Integer)

    ID to identify the ticket entry of the ticket.

  • body (TicketEntry)

    Properties to update of the ticket entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelReference, Integer, Hash)>)

    ModelReference data, response status code and response headers



1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
# File 'lib/korona-entry-client/api/tickets_api.rb', line 1019

def update_ticket_entry_with_http_info(client, ticket_id, ticket_entry_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.update_ticket_entry ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.update_ticket_entry"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.update_ticket_entry"
  end
  # verify the required parameter 'ticket_entry_id' is set
  if @api_client.config.client_side_validation && ticket_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_entry_id' when calling TicketsApi.update_ticket_entry"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.update_ticket_entry"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'ModelReference' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#update_ticket_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_ticket_with_http_info(client, ticket_id, body, opts = {}) ⇒ Array<(ModelReference, Integer, Hash)>

Updates the single ticket.

Parameters:

  • client (String)

    Identification of executing client.

  • ticket_id (Integer)

    ID to identify the ticket.

  • body (Ticket)

    Properties to update of the ticket.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ModelReference, Integer, Hash)>)

    ModelReference data, response status code and response headers



943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
# File 'lib/korona-entry-client/api/tickets_api.rb', line 943

def update_ticket_with_http_info(client, ticket_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.update_ticket ...'
  end
  # verify the required parameter 'client' is set
  if @api_client.config.client_side_validation && client.nil?
    fail ArgumentError, "Missing the required parameter 'client' when calling TicketsApi.update_ticket"
  end
  # verify the required parameter 'ticket_id' is set
  if @api_client.config.client_side_validation && ticket_id.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_id' when calling TicketsApi.update_ticket"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TicketsApi.update_ticket"
  end
  # resource path
  local_var_path = '/{client}/tickets/{ticketId}'.sub('{' + 'client' + '}', CGI.escape(client.to_s)).sub('{' + 'ticketId' + '}', CGI.escape(ticket_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  # return_type
  return_type = opts[:return_type] || 'ModelReference' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TicketsApi#update_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end