Class: OpsgenieSdk::PolicyApi

Inherits:
Object
  • Object
show all
Defined in:
lib/opsgenie_sdk/api/policy_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PolicyApi

Returns a new instance of PolicyApi.



19
20
21
# File 'lib/opsgenie_sdk/api/policy_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/opsgenie_sdk/api/policy_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#change_policy_order(policy_id, body, opts = {}) ⇒ SuccessResponse

Change Policy Order Change execution order of the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

  • body

    Change order payload

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    TeamId of policy created if it belongs to a team

Returns:



29
30
31
32
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 29

def change_policy_order(policy_id, body, opts = {})
  data, _status_code, _headers = change_policy_order_with_http_info(policy_id, body, opts)
  data
end

#change_policy_order_with_http_info(policy_id, body, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>

Change Policy Order Change execution order of the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

  • body

    Change order payload

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(SuccessResponse, Fixnum, Hash)>)

    SuccessResponse data, response status code and response headers



41
42
43
44
45
46
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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 41

def change_policy_order_with_http_info(policy_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.change_policy_order ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.change_policy_order"
  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 PolicyApi.change_policy_order"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}/change-order'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SuccessResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#change_policy_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_policy(body, opts = {}) ⇒ CreatePolicyResponse

Create Policy Creates a new policy

Parameters:

  • body

    Payload of created policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



89
90
91
92
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 89

def create_policy(body, opts = {})
  data, _status_code, _headers = create_policy_with_http_info(body, opts)
  data
end

#create_policy_with_http_info(body, opts = {}) ⇒ Array<(CreatePolicyResponse, Fixnum, Hash)>

Create Policy Creates a new policy

Parameters:

  • body

    Payload of created policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(CreatePolicyResponse, Fixnum, Hash)>)

    CreatePolicyResponse data, response status code and response headers



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 100

def create_policy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.create_policy ...'
  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 PolicyApi.create_policy"
  end
  # resource path
  local_var_path = '/v2/policies'

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CreatePolicyResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#create_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_policy(policy_id, opts = {}) ⇒ SuccessResponse

Delete Policy Delete policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



144
145
146
147
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 144

def delete_policy(policy_id, opts = {})
  data, _status_code, _headers = delete_policy_with_http_info(policy_id, opts)
  data
end

#delete_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>

Delete Policy Delete policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(SuccessResponse, Fixnum, Hash)>)

    SuccessResponse data, response status code and response headers



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
184
185
186
187
188
189
190
191
192
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 155

def delete_policy_with_http_info(policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.delete_policy ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.delete_policy"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SuccessResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#delete_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#disable_policy(policy_id, opts = {}) ⇒ SuccessResponse

Disable Policy Disable the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



199
200
201
202
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 199

def disable_policy(policy_id, opts = {})
  data, _status_code, _headers = disable_policy_with_http_info(policy_id, opts)
  data
end

#disable_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>

Disable Policy Disable the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(SuccessResponse, Fixnum, Hash)>)

    SuccessResponse data, response status code and response headers



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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 210

def disable_policy_with_http_info(policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.disable_policy ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.disable_policy"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}/disable'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SuccessResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#disable_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#enable_policy(policy_id, opts = {}) ⇒ SuccessResponse

Enable Policy Enable the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



254
255
256
257
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 254

def enable_policy(policy_id, opts = {})
  data, _status_code, _headers = enable_policy_with_http_info(policy_id, opts)
  data
end

#enable_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>

Enable Policy Enable the policy with given id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(SuccessResponse, Fixnum, Hash)>)

    SuccessResponse data, 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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 265

def enable_policy_with_http_info(policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.enable_policy ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.enable_policy"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}/enable'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SuccessResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#enable_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_policy(policy_id, opts = {}) ⇒ GetPolicyResponse

Get Policy Used to get details of a single policy with id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



309
310
311
312
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 309

def get_policy(policy_id, opts = {})
  data, _status_code, _headers = get_policy_with_http_info(policy_id, opts)
  data
end

#get_policy_with_http_info(policy_id, opts = {}) ⇒ Array<(GetPolicyResponse, Fixnum, Hash)>

Get Policy Used to get details of a single policy with id

Parameters:

  • policy_id

    Id of the requested policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(GetPolicyResponse, Fixnum, Hash)>)

    GetPolicyResponse data, response status code and response headers



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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 320

def get_policy_with_http_info(policy_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.get_policy ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.get_policy"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GetPolicyResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#get_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_alert_policies(opts = {}) ⇒ ListPoliciesResponse

List Alert Policies Returns the list of alert policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



363
364
365
366
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 363

def list_alert_policies(opts = {})
  data, _status_code, _headers = list_alert_policies_with_http_info(opts)
  data
end

#list_alert_policies_with_http_info(opts = {}) ⇒ Array<(ListPoliciesResponse, Fixnum, Hash)>

List Alert Policies Returns the list of alert policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(ListPoliciesResponse, Fixnum, Hash)>)

    ListPoliciesResponse data, response status code and response headers



373
374
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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 373

def list_alert_policies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.list_alert_policies ...'
  end
  # resource path
  local_var_path = '/v2/policies/alert'

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListPoliciesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#list_alert_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_notification_policies(opts = {}) ⇒ ListPoliciesResponse

List Notification Policies Returns the list of notification policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:



412
413
414
415
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 412

def list_notification_policies(opts = {})
  data, _status_code, _headers = list_notification_policies_with_http_info(opts)
  data
end

#list_notification_policies_with_http_info(opts = {}) ⇒ Array<(ListPoliciesResponse, Fixnum, Hash)>

List Notification Policies Returns the list of notification policies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :team_id (Object)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(ListPoliciesResponse, Fixnum, Hash)>)

    ListPoliciesResponse data, response status code and response headers



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
453
454
455
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 422

def list_notification_policies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.list_notification_policies ...'
  end
  # resource path
  local_var_path = '/v2/policies/notification'

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListPoliciesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#list_notification_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_policy(policy_id, body, opts = {}) ⇒ SuccessResponse

Update Policy Update alert policy with given id

Parameters:

  • policy_id

    Id of the requested policy

  • body

    Payload of updated policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    TeamId of policy created if it belongs to a team

Returns:



463
464
465
466
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 463

def update_policy(policy_id, body, opts = {})
  data, _status_code, _headers = update_policy_with_http_info(policy_id, body, opts)
  data
end

#update_policy_with_http_info(policy_id, body, opts = {}) ⇒ Array<(SuccessResponse, Fixnum, Hash)>

Update Policy Update alert policy with given id

Parameters:

  • policy_id

    Id of the requested policy

  • body

    Payload of updated policy

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

    the optional parameters

Options Hash (opts):

  • :team_id (String)

    TeamId of policy created if it belongs to a team

Returns:

  • (Array<(SuccessResponse, Fixnum, Hash)>)

    SuccessResponse data, response status code and response headers



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
# File 'lib/opsgenie_sdk/api/policy_api.rb', line 475

def update_policy_with_http_info(policy_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PolicyApi.update_policy ...'
  end
  # verify the required parameter 'policy_id' is set
  if @api_client.config.client_side_validation && policy_id.nil?
    fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyApi.update_policy"
  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 PolicyApi.update_policy"
  end
  # resource path
  local_var_path = '/v2/policies/{policyId}'.sub('{' + 'policyId' + '}', policy_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['GenieKey']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SuccessResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PolicyApi#update_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end