Class: MergeTicketingClient::TicketsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/merge_ticketing_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/merge_ticketing_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/merge_ticketing_client/api/tickets_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#tickets_collaborators_list(x_account_token, parent_id, opts = {}) ⇒ PaginatedUserList

Returns a list of ‘User` objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    The pagination cursor value.

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :page_size (Integer)

    Number of results to return per page.

Returns:



32
33
34
35
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 32

def tickets_collaborators_list(, parent_id, opts = {})
  data, _status_code, _headers = tickets_collaborators_list_with_http_info(, parent_id, opts)
  data
end

#tickets_collaborators_list_with_http_info(x_account_token, parent_id, opts = {}) ⇒ Array<(PaginatedUserList, Integer, Hash)>

Returns a list of &#x60;User&#x60; objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    The pagination cursor value.

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :page_size (Integer)

    Number of results to return per page.

Returns:

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

    PaginatedUserList 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
107
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 47

def tickets_collaborators_list_with_http_info(, parent_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_collaborators_list ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_collaborators_list"
  end
  # verify the required parameter 'parent_id' is set
  if @api_client.config.client_side_validation && parent_id.nil?
    fail ArgumentError, "Missing the required parameter 'parent_id' when calling TicketsApi.tickets_collaborators_list"
  end
  allowable_values = ["roles", "teams", "teams,roles"]
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
    fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/tickets/{parent_id}/collaborators'.sub('{' + 'parent_id' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'PaginatedUserList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_collaborators_list",
    :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#tickets_collaborators_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_create(x_account_token, ticket_endpoint_request, opts = {}) ⇒ TicketResponse

Creates a ‘Ticket` object with the given values.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:



116
117
118
119
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 116

def tickets_create(, ticket_endpoint_request, opts = {})
  data, _status_code, _headers = tickets_create_with_http_info(, ticket_endpoint_request, opts)
  data
end

#tickets_create_with_http_info(x_account_token, ticket_endpoint_request, opts = {}) ⇒ Array<(TicketResponse, Integer, Hash)>

Creates a &#x60;Ticket&#x60; object with the given values.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:

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

    TicketResponse data, response status code and response headers



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
175
176
177
178
179
180
181
182
183
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 128

def tickets_create_with_http_info(, ticket_endpoint_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_create ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_create"
  end
  # verify the required parameter 'ticket_endpoint_request' is set
  if @api_client.config.client_side_validation && ticket_endpoint_request.nil?
    fail ArgumentError, "Missing the required parameter 'ticket_endpoint_request' when calling TicketsApi.tickets_create"
  end
  # resource path
  local_var_path = '/tickets'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
  query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?

  # 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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'TicketResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_create",
    :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#tickets_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_list(x_account_token, opts = {}) ⇒ PaginatedTicketList

Returns a list of ‘Ticket` objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    If provided, will only return tickets for this account.

  • :assignee_ids (String)

    If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas.

  • :collection_ids (String)

    If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas.

  • :completed_after (Time)

    If provided, will only return tickets completed after this datetime.

  • :completed_before (Time)

    If provided, will only return tickets completed before this datetime.

  • :contact_id (String)

    If provided, will only return tickets for this contact.

  • :created_after (Time)

    If provided, will only return objects created after this datetime.

  • :created_before (Time)

    If provided, will only return objects created before this datetime.

  • :cursor (String)

    The pagination cursor value.

  • :due_after (Time)

    If provided, will only return tickets due after this datetime.

  • :due_before (Time)

    If provided, will only return tickets due before this datetime.

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_remote_fields (Boolean)

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

  • :modified_after (Time)

    If provided, only objects synced by Merge after this date time will be returned.

  • :modified_before (Time)

    If provided, only objects synced by Merge before this date time will be returned.

  • :page_size (Integer)

    Number of results to return per page.

  • :parent_ticket_id (String)

    If provided, will only return sub tickets of the parent_ticket_id.

  • :priority (String)

    If provided, will only return tickets of this priority. * &#x60;URGENT&#x60; - URGENT * &#x60;HIGH&#x60; - HIGH * &#x60;NORMAL&#x60; - NORMAL * &#x60;LOW&#x60; - LOW

  • :project_id (String)

    If provided, will only return tickets for this project.

  • :remote_created_after (Time)

    If provided, will only return tickets created in the third party platform after this datetime.

  • :remote_created_before (Time)

    If provided, will only return tickets created in the third party platform before this datetime.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :remote_id (String)

    The API provider&#39;s ID for the given object.

  • :remote_updated_after (Time)

    If provided, will only return tickets updated in the third party platform after this datetime.

  • :remote_updated_before (Time)

    If provided, will only return tickets updated in the third party platform before this datetime.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

  • :status (String)

    If provided, will only return tickets of this status. * &#x60;OPEN&#x60; - OPEN * &#x60;CLOSED&#x60; - CLOSED * &#x60;IN_PROGRESS&#x60; - IN_PROGRESS * &#x60;ON_HOLD&#x60; - ON_HOLD

  • :tags (String)

    If provided, will only return tickets matching the tags; multiple tags can be separated by commas.

  • :ticket_type (String)

    If provided, will only return tickets of this type.

Returns:



220
221
222
223
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 220

def tickets_list(, opts = {})
  data, _status_code, _headers = tickets_list_with_http_info(, opts)
  data
end

#tickets_list_with_http_info(x_account_token, opts = {}) ⇒ Array<(PaginatedTicketList, Integer, Hash)>

Returns a list of &#x60;Ticket&#x60; objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    If provided, will only return tickets for this account.

  • :assignee_ids (String)

    If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas.

  • :collection_ids (String)

    If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas.

  • :completed_after (Time)

    If provided, will only return tickets completed after this datetime.

  • :completed_before (Time)

    If provided, will only return tickets completed before this datetime.

  • :contact_id (String)

    If provided, will only return tickets for this contact.

  • :created_after (Time)

    If provided, will only return objects created after this datetime.

  • :created_before (Time)

    If provided, will only return objects created before this datetime.

  • :cursor (String)

    The pagination cursor value.

  • :due_after (Time)

    If provided, will only return tickets due after this datetime.

  • :due_before (Time)

    If provided, will only return tickets due before this datetime.

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_remote_fields (Boolean)

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

  • :modified_after (Time)

    If provided, only objects synced by Merge after this date time will be returned.

  • :modified_before (Time)

    If provided, only objects synced by Merge before this date time will be returned.

  • :page_size (Integer)

    Number of results to return per page.

  • :parent_ticket_id (String)

    If provided, will only return sub tickets of the parent_ticket_id.

  • :priority (String)

    If provided, will only return tickets of this priority. * &#x60;URGENT&#x60; - URGENT * &#x60;HIGH&#x60; - HIGH * &#x60;NORMAL&#x60; - NORMAL * &#x60;LOW&#x60; - LOW

  • :project_id (String)

    If provided, will only return tickets for this project.

  • :remote_created_after (Time)

    If provided, will only return tickets created in the third party platform after this datetime.

  • :remote_created_before (Time)

    If provided, will only return tickets created in the third party platform before this datetime.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :remote_id (String)

    The API provider&#39;s ID for the given object.

  • :remote_updated_after (Time)

    If provided, will only return tickets updated in the third party platform after this datetime.

  • :remote_updated_before (Time)

    If provided, will only return tickets updated in the third party platform before this datetime.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

  • :status (String)

    If provided, will only return tickets of this status. * &#x60;OPEN&#x60; - OPEN * &#x60;CLOSED&#x60; - CLOSED * &#x60;IN_PROGRESS&#x60; - IN_PROGRESS * &#x60;ON_HOLD&#x60; - ON_HOLD

  • :tags (String)

    If provided, will only return tickets matching the tags; multiple tags can be separated by commas.

  • :ticket_type (String)

    If provided, will only return tickets of this type.

Returns:

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

    PaginatedTicketList data, response status code and response headers



260
261
262
263
264
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 260

def tickets_list_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_list ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_list"
  end
  allowable_values = ["account", "account,contact", "account,contact,creator", "account,contact,creator,parent_ticket", "account,contact,parent_ticket", "account,creator", "account,creator,parent_ticket", "account,parent_ticket", "assignees", "assignees,account", "assignees,account,contact", "assignees,account,contact,creator", "assignees,account,contact,creator,parent_ticket", "assignees,account,contact,parent_ticket", "assignees,account,creator", "assignees,account,creator,parent_ticket", "assignees,account,parent_ticket", "assignees,collections", "assignees,collections,account", "assignees,collections,account,contact", "assignees,collections,account,contact,creator", "assignees,collections,account,contact,creator,parent_ticket", "assignees,collections,account,contact,parent_ticket", "assignees,collections,account,creator", "assignees,collections,account,creator,parent_ticket", "assignees,collections,account,parent_ticket", "assignees,collections,contact", "assignees,collections,contact,creator", "assignees,collections,contact,creator,parent_ticket", "assignees,collections,contact,parent_ticket", "assignees,collections,creator", "assignees,collections,creator,parent_ticket", "assignees,collections,parent_ticket", "assignees,contact", "assignees,contact,creator", "assignees,contact,creator,parent_ticket", "assignees,contact,parent_ticket", "assignees,creator", "assignees,creator,parent_ticket", "assignees,parent_ticket", "attachments", "attachments,account", "attachments,account,contact", "attachments,account,contact,creator", "attachments,account,contact,creator,parent_ticket", "attachments,account,contact,parent_ticket", "attachments,account,creator", "attachments,account,creator,parent_ticket", "attachments,account,parent_ticket", "attachments,assignees", "attachments,assignees,account", "attachments,assignees,account,contact", "attachments,assignees,account,contact,creator", "attachments,assignees,account,contact,creator,parent_ticket", "attachments,assignees,account,contact,parent_ticket", "attachments,assignees,account,creator", "attachments,assignees,account,creator,parent_ticket", "attachments,assignees,account,parent_ticket", "attachments,assignees,collections", "attachments,assignees,collections,account", "attachments,assignees,collections,account,contact", "attachments,assignees,collections,account,contact,creator", "attachments,assignees,collections,account,contact,creator,parent_ticket", "attachments,assignees,collections,account,contact,parent_ticket", "attachments,assignees,collections,account,creator", "attachments,assignees,collections,account,creator,parent_ticket", "attachments,assignees,collections,account,parent_ticket", "attachments,assignees,collections,contact", "attachments,assignees,collections,contact,creator", "attachments,assignees,collections,contact,creator,parent_ticket", "attachments,assignees,collections,contact,parent_ticket", "attachments,assignees,collections,creator", "attachments,assignees,collections,creator,parent_ticket", "attachments,assignees,collections,parent_ticket", "attachments,assignees,contact", "attachments,assignees,contact,creator", "attachments,assignees,contact,creator,parent_ticket", "attachments,assignees,contact,parent_ticket", "attachments,assignees,creator", "attachments,assignees,creator,parent_ticket", "attachments,assignees,parent_ticket", "attachments,collections", "attachments,collections,account", "attachments,collections,account,contact", "attachments,collections,account,contact,creator", "attachments,collections,account,contact,creator,parent_ticket", "attachments,collections,account,contact,parent_ticket", "attachments,collections,account,creator", "attachments,collections,account,creator,parent_ticket", "attachments,collections,account,parent_ticket", "attachments,collections,contact", "attachments,collections,contact,creator", "attachments,collections,contact,creator,parent_ticket", "attachments,collections,contact,parent_ticket", "attachments,collections,creator", "attachments,collections,creator,parent_ticket", "attachments,collections,parent_ticket", "attachments,contact", "attachments,contact,creator", "attachments,contact,creator,parent_ticket", "attachments,contact,parent_ticket", "attachments,creator", "attachments,creator,parent_ticket", "attachments,parent_ticket", "collections", "collections,account", "collections,account,contact", "collections,account,contact,creator", "collections,account,contact,creator,parent_ticket", "collections,account,contact,parent_ticket", "collections,account,creator", "collections,account,creator,parent_ticket", "collections,account,parent_ticket", "collections,contact", "collections,contact,creator", "collections,contact,creator,parent_ticket", "collections,contact,parent_ticket", "collections,creator", "collections,creator,parent_ticket", "collections,parent_ticket", "contact", "contact,creator", "contact,creator,parent_ticket", "contact,parent_ticket", "creator", "creator,parent_ticket", "parent_ticket"]
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
    fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
  end
  allowable_values = ["HIGH", "LOW", "NORMAL", "URGENT"]
  if @api_client.config.client_side_validation && opts[:'priority'] && !allowable_values.include?(opts[:'priority'])
    fail ArgumentError, "invalid value for \"priority\", must be one of #{allowable_values}"
  end
  allowable_values = ["priority", "priority,status", "priority,status,ticket_type", "priority,ticket_type", "status", "status,ticket_type", "ticket_type"]
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
    fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
  end
  allowable_values = ["priority", "priority,status", "priority,status,ticket_type", "priority,ticket_type", "status", "status,ticket_type", "ticket_type"]
  if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
    fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
  end
  allowable_values = ["CLOSED", "IN_PROGRESS", "ON_HOLD", "OPEN"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/tickets'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'assignee_ids'] = opts[:'assignee_ids'] if !opts[:'assignee_ids'].nil?
  query_params[:'collection_ids'] = opts[:'collection_ids'] if !opts[:'collection_ids'].nil?
  query_params[:'completed_after'] = opts[:'completed_after'] if !opts[:'completed_after'].nil?
  query_params[:'completed_before'] = opts[:'completed_before'] if !opts[:'completed_before'].nil?
  query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
  query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'due_after'] = opts[:'due_after'] if !opts[:'due_after'].nil?
  query_params[:'due_before'] = opts[:'due_before'] if !opts[:'due_before'].nil?
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'include_remote_fields'] = opts[:'include_remote_fields'] if !opts[:'include_remote_fields'].nil?
  query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
  query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'parent_ticket_id'] = opts[:'parent_ticket_id'] if !opts[:'parent_ticket_id'].nil?
  query_params[:'priority'] = opts[:'priority'] if !opts[:'priority'].nil?
  query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
  query_params[:'remote_created_after'] = opts[:'remote_created_after'] if !opts[:'remote_created_after'].nil?
  query_params[:'remote_created_before'] = opts[:'remote_created_before'] if !opts[:'remote_created_before'].nil?
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
  query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
  query_params[:'remote_updated_after'] = opts[:'remote_updated_after'] if !opts[:'remote_updated_after'].nil?
  query_params[:'remote_updated_before'] = opts[:'remote_updated_before'] if !opts[:'remote_updated_before'].nil?
  query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
  query_params[:'ticket_type'] = opts[:'ticket_type'] if !opts[:'ticket_type'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'PaginatedTicketList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_list",
    :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#tickets_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_meta_patch_retrieve(x_account_token, id, opts = {}) ⇒ MetaResponse

Returns metadata for ‘Ticket` PATCHs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:



365
366
367
368
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 365

def tickets_meta_patch_retrieve(, id, opts = {})
  data, _status_code, _headers = tickets_meta_patch_retrieve_with_http_info(, id, opts)
  data
end

#tickets_meta_patch_retrieve_with_http_info(x_account_token, id, opts = {}) ⇒ Array<(MetaResponse, Integer, Hash)>

Returns metadata for &#x60;Ticket&#x60; PATCHs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:

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

    MetaResponse data, response status code and response headers



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 375

def tickets_meta_patch_retrieve_with_http_info(, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_meta_patch_retrieve ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_meta_patch_retrieve"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling TicketsApi.tickets_meta_patch_retrieve"
  end
  # resource path
  local_var_path = '/tickets/meta/patch/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MetaResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_meta_patch_retrieve",
    :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#tickets_meta_patch_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_meta_post_retrieve(x_account_token, opts = {}) ⇒ MetaResponse

Returns metadata for ‘Ticket` POSTs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:



432
433
434
435
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 432

def tickets_meta_post_retrieve(, opts = {})
  data, _status_code, _headers = tickets_meta_post_retrieve_with_http_info(, opts)
  data
end

#tickets_meta_post_retrieve_with_http_info(x_account_token, opts = {}) ⇒ Array<(MetaResponse, Integer, Hash)>

Returns metadata for &#x60;Ticket&#x60; POSTs.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Returns:

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

    MetaResponse data, response status code and response headers



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 441

def tickets_meta_post_retrieve_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_meta_post_retrieve ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_meta_post_retrieve"
  end
  # resource path
  local_var_path = '/tickets/meta/post'

  # 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'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'MetaResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_meta_post_retrieve",
    :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#tickets_meta_post_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_partial_update(x_account_token, id, patched_ticket_endpoint_request, opts = {}) ⇒ TicketResponse

Updates a ‘Ticket` object with the given `id`.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

  • id (String)
  • patched_ticket_endpoint_request (PatchedTicketEndpointRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:



498
499
500
501
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 498

def tickets_partial_update(, id, patched_ticket_endpoint_request, opts = {})
  data, _status_code, _headers = tickets_partial_update_with_http_info(, id, patched_ticket_endpoint_request, opts)
  data
end

#tickets_partial_update_with_http_info(x_account_token, id, patched_ticket_endpoint_request, opts = {}) ⇒ Array<(TicketResponse, Integer, Hash)>

Updates a &#x60;Ticket&#x60; object with the given &#x60;id&#x60;.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

  • id (String)
  • patched_ticket_endpoint_request (PatchedTicketEndpointRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :is_debug_mode (Boolean)

    Whether to include debug fields (such as log file links) in the response.

  • :run_async (Boolean)

    Whether or not third-party updates should be run asynchronously.

Returns:

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

    TicketResponse data, response status code and response headers



511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
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
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 511

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

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'is_debug_mode'] = opts[:'is_debug_mode'] if !opts[:'is_debug_mode'].nil?
  query_params[:'run_async'] = opts[:'run_async'] if !opts[:'run_async'].nil?

  # 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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  header_params[:'X-Account-Token'] = 

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'TicketResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_partial_update",
    :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#tickets_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_remote_field_classes_list(x_account_token, opts = {}) ⇒ PaginatedRemoteFieldClassList

Returns a list of ‘RemoteFieldClass` objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    The pagination cursor value.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :page_size (Integer)

    Number of results to return per page.

Returns:



580
581
582
583
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 580

def tickets_remote_field_classes_list(, opts = {})
  data, _status_code, _headers = tickets_remote_field_classes_list_with_http_info(, opts)
  data
end

#tickets_remote_field_classes_list_with_http_info(x_account_token, opts = {}) ⇒ Array<(PaginatedRemoteFieldClassList, Integer, Hash)>

Returns a list of &#x60;RemoteFieldClass&#x60; objects.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    The pagination cursor value.

  • :include_deleted_data (Boolean)

    Whether to include data that was marked as deleted by third party webhooks.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :page_size (Integer)

    Number of results to return per page.

Returns:



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

def tickets_remote_field_classes_list_with_http_info(, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_remote_field_classes_list ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_remote_field_classes_list"
  end
  # resource path
  local_var_path = '/tickets/remote-field-classes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'include_deleted_data'] = opts[:'include_deleted_data'] if !opts[:'include_deleted_data'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'PaginatedRemoteFieldClassList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_remote_field_classes_list",
    :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#tickets_remote_field_classes_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#tickets_retrieve(x_account_token, id, opts = {}) ⇒ Ticket

Returns a ‘Ticket` object with the given `id`.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_remote_fields (Boolean)

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

Returns:



656
657
658
659
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 656

def tickets_retrieve(, id, opts = {})
  data, _status_code, _headers = tickets_retrieve_with_http_info(, id, opts)
  data
end

#tickets_retrieve_with_http_info(x_account_token, id, opts = {}) ⇒ Array<(Ticket, Integer, Hash)>

Returns a &#x60;Ticket&#x60; object with the given &#x60;id&#x60;.

Parameters:

  • x_account_token (String)

    Token identifying the end user.

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

    the optional parameters

Options Hash (opts):

  • :expand (String)

    Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

  • :include_remote_data (Boolean)

    Whether to include the original data Merge fetched from the third-party to produce these models.

  • :include_remote_fields (Boolean)

    Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

  • :remote_fields (String)

    Deprecated. Use show_enum_origins.

  • :show_enum_origins (String)

    Which fields should be returned in non-normalized form.

Returns:

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

    Ticket data, response status code and response headers



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
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
# File 'lib/merge_ticketing_client/api/tickets_api.rb', line 671

def tickets_retrieve_with_http_info(, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TicketsApi.tickets_retrieve ...'
  end
  # verify the required parameter 'x_account_token' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TicketsApi.tickets_retrieve"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling TicketsApi.tickets_retrieve"
  end
  allowable_values = ["account", "account,contact", "account,contact,creator", "account,contact,creator,parent_ticket", "account,contact,parent_ticket", "account,creator", "account,creator,parent_ticket", "account,parent_ticket", "assignees", "assignees,account", "assignees,account,contact", "assignees,account,contact,creator", "assignees,account,contact,creator,parent_ticket", "assignees,account,contact,parent_ticket", "assignees,account,creator", "assignees,account,creator,parent_ticket", "assignees,account,parent_ticket", "assignees,collections", "assignees,collections,account", "assignees,collections,account,contact", "assignees,collections,account,contact,creator", "assignees,collections,account,contact,creator,parent_ticket", "assignees,collections,account,contact,parent_ticket", "assignees,collections,account,creator", "assignees,collections,account,creator,parent_ticket", "assignees,collections,account,parent_ticket", "assignees,collections,contact", "assignees,collections,contact,creator", "assignees,collections,contact,creator,parent_ticket", "assignees,collections,contact,parent_ticket", "assignees,collections,creator", "assignees,collections,creator,parent_ticket", "assignees,collections,parent_ticket", "assignees,contact", "assignees,contact,creator", "assignees,contact,creator,parent_ticket", "assignees,contact,parent_ticket", "assignees,creator", "assignees,creator,parent_ticket", "assignees,parent_ticket", "attachments", "attachments,account", "attachments,account,contact", "attachments,account,contact,creator", "attachments,account,contact,creator,parent_ticket", "attachments,account,contact,parent_ticket", "attachments,account,creator", "attachments,account,creator,parent_ticket", "attachments,account,parent_ticket", "attachments,assignees", "attachments,assignees,account", "attachments,assignees,account,contact", "attachments,assignees,account,contact,creator", "attachments,assignees,account,contact,creator,parent_ticket", "attachments,assignees,account,contact,parent_ticket", "attachments,assignees,account,creator", "attachments,assignees,account,creator,parent_ticket", "attachments,assignees,account,parent_ticket", "attachments,assignees,collections", "attachments,assignees,collections,account", "attachments,assignees,collections,account,contact", "attachments,assignees,collections,account,contact,creator", "attachments,assignees,collections,account,contact,creator,parent_ticket", "attachments,assignees,collections,account,contact,parent_ticket", "attachments,assignees,collections,account,creator", "attachments,assignees,collections,account,creator,parent_ticket", "attachments,assignees,collections,account,parent_ticket", "attachments,assignees,collections,contact", "attachments,assignees,collections,contact,creator", "attachments,assignees,collections,contact,creator,parent_ticket", "attachments,assignees,collections,contact,parent_ticket", "attachments,assignees,collections,creator", "attachments,assignees,collections,creator,parent_ticket", "attachments,assignees,collections,parent_ticket", "attachments,assignees,contact", "attachments,assignees,contact,creator", "attachments,assignees,contact,creator,parent_ticket", "attachments,assignees,contact,parent_ticket", "attachments,assignees,creator", "attachments,assignees,creator,parent_ticket", "attachments,assignees,parent_ticket", "attachments,collections", "attachments,collections,account", "attachments,collections,account,contact", "attachments,collections,account,contact,creator", "attachments,collections,account,contact,creator,parent_ticket", "attachments,collections,account,contact,parent_ticket", "attachments,collections,account,creator", "attachments,collections,account,creator,parent_ticket", "attachments,collections,account,parent_ticket", "attachments,collections,contact", "attachments,collections,contact,creator", "attachments,collections,contact,creator,parent_ticket", "attachments,collections,contact,parent_ticket", "attachments,collections,creator", "attachments,collections,creator,parent_ticket", "attachments,collections,parent_ticket", "attachments,contact", "attachments,contact,creator", "attachments,contact,creator,parent_ticket", "attachments,contact,parent_ticket", "attachments,creator", "attachments,creator,parent_ticket", "attachments,parent_ticket", "collections", "collections,account", "collections,account,contact", "collections,account,contact,creator", "collections,account,contact,creator,parent_ticket", "collections,account,contact,parent_ticket", "collections,account,creator", "collections,account,creator,parent_ticket", "collections,account,parent_ticket", "collections,contact", "collections,contact,creator", "collections,contact,creator,parent_ticket", "collections,contact,parent_ticket", "collections,creator", "collections,creator,parent_ticket", "collections,parent_ticket", "contact", "contact,creator", "contact,creator,parent_ticket", "contact,parent_ticket", "creator", "creator,parent_ticket", "parent_ticket"]
  if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
    fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
  end
  allowable_values = ["priority", "priority,status", "priority,status,ticket_type", "priority,ticket_type", "status", "status,ticket_type", "ticket_type"]
  if @api_client.config.client_side_validation && opts[:'remote_fields'] && !allowable_values.include?(opts[:'remote_fields'])
    fail ArgumentError, "invalid value for \"remote_fields\", must be one of #{allowable_values}"
  end
  allowable_values = ["priority", "priority,status", "priority,status,ticket_type", "priority,ticket_type", "status", "status,ticket_type", "ticket_type"]
  if @api_client.config.client_side_validation && opts[:'show_enum_origins'] && !allowable_values.include?(opts[:'show_enum_origins'])
    fail ArgumentError, "invalid value for \"show_enum_origins\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/tickets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
  query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
  query_params[:'include_remote_fields'] = opts[:'include_remote_fields'] if !opts[:'include_remote_fields'].nil?
  query_params[:'remote_fields'] = opts[:'remote_fields'] if !opts[:'remote_fields'].nil?
  query_params[:'show_enum_origins'] = opts[:'show_enum_origins'] if !opts[:'show_enum_origins'].nil?

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

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

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['tokenAuth']

  new_options = opts.merge(
    :operation => :"TicketsApi.tickets_retrieve",
    :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#tickets_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end