Class: Pingram::UserApi

Inherits:
Object
  • Object
show all
Defined in:
lib/pingram/api/user_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UserApi

Returns a new instance of UserApi.



19
20
21
# File 'lib/pingram/api/user_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/pingram/api/user_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#user_generate_slack_oauth_path(user_id, slack_oauth_request, opts = {}) ⇒ nil

Complete Slack OAuth flow and store access token for user

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/pingram/api/user_api.rb', line 27

def user_generate_slack_oauth_path(user_id, slack_oauth_request, opts = {})
  user_generate_slack_oauth_path_with_http_info(user_id, slack_oauth_request, opts)
  nil
end

#user_generate_slack_oauth_path_with_http_info(user_id, slack_oauth_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Complete Slack OAuth flow and store access token for user

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



37
38
39
40
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
83
84
85
86
87
88
89
90
# File 'lib/pingram/api/user_api.rb', line 37

def user_generate_slack_oauth_path_with_http_info(user_id, slack_oauth_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_generate_slack_oauth_path ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.user_generate_slack_oauth_path"
  end
  # verify the required parameter 'slack_oauth_request' is set
  if @api_client.config.client_side_validation && slack_oauth_request.nil?
    fail ArgumentError, "Missing the required parameter 'slack_oauth_request' when calling UserApi.user_generate_slack_oauth_path"
  end
  # resource path
  local_var_path = '/users/{userId}/slack-oauth'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_get_account_metadata(opts = {}) ⇒ GetAccountMetadataResponse

Get account-level metadata including logo, VAPID key, and web push status

Parameters:

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

    the optional parameters

Returns:



95
96
97
98
# File 'lib/pingram/api/user_api.rb', line 95

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

#user_get_account_metadata_with_http_info(opts = {}) ⇒ Array<(GetAccountMetadataResponse, Integer, Hash)>

Get account-level metadata including logo, VAPID key, and web push status

Parameters:

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

    the optional parameters

Returns:

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

    GetAccountMetadataResponse data, response status code and response headers



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
138
139
140
141
142
143
144
145
# File 'lib/pingram/api/user_api.rb', line 103

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_get_account_metadata ...'
  end
  # resource path
  local_var_path = '/users/account-metadata'

  # 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']) unless header_params['Accept']

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_get_available_slack_channels(user_id, opts = {}) ⇒ nil

Get list of Slack channels and users for the authenticated user

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

  • (nil)


151
152
153
154
# File 'lib/pingram/api/user_api.rb', line 151

def user_get_available_slack_channels(user_id, opts = {})
  user_get_available_slack_channels_with_http_info(user_id, opts)
  nil
end

#user_get_available_slack_channels_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get list of Slack channels and users for the authenticated user

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/pingram/api/user_api.rb', line 160

def user_get_available_slack_channels_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_get_available_slack_channels ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.user_get_available_slack_channels"
  end
  # resource path
  local_var_path = '/users/{userId}/slack-channels'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_get_in_app_notifications(opts = {}) ⇒ GetInappNotificationsResponse

Get in-app notifications for a user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :before (String)

    Timestamp or ISO date to fetch notifications before

  • :count (Float)

    Number of notifications to return (default 10)

Returns:



211
212
213
214
# File 'lib/pingram/api/user_api.rb', line 211

def user_get_in_app_notifications(opts = {})
  data, _status_code, _headers = user_get_in_app_notifications_with_http_info(opts)
  data
end

#user_get_in_app_notifications_with_http_info(opts = {}) ⇒ Array<(GetInappNotificationsResponse, Integer, Hash)>

Get in-app notifications for a user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :before (String)

    Timestamp or ISO date to fetch notifications before

  • :count (Float)

    Number of notifications to return (default 10)

Returns:



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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/pingram/api/user_api.rb', line 221

def user_get_in_app_notifications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_get_in_app_notifications ...'
  end
  # resource path
  local_var_path = '/user/inapp'

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

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

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_get_in_app_unread_count(opts = {}) ⇒ InappUnreadCountResponse

Get the count of unread in-app notifications for a user

Parameters:

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

    the optional parameters

Returns:



270
271
272
273
# File 'lib/pingram/api/user_api.rb', line 270

def user_get_in_app_unread_count(opts = {})
  data, _status_code, _headers = user_get_in_app_unread_count_with_http_info(opts)
  data
end

#user_get_in_app_unread_count_with_http_info(opts = {}) ⇒ Array<(InappUnreadCountResponse, Integer, Hash)>

Get the count of unread in-app notifications for a user

Parameters:

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

    the optional parameters

Returns:

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

    InappUnreadCountResponse data, response status code and response headers



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
# File 'lib/pingram/api/user_api.rb', line 278

def user_get_in_app_unread_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_get_in_app_unread_count ...'
  end
  # resource path
  local_var_path = '/user/inapp/unread'

  # 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']) unless header_params['Accept']

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_get_user(user_id, opts = {}) ⇒ User

Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:



326
327
328
329
# File 'lib/pingram/api/user_api.rb', line 326

def user_get_user(user_id, opts = {})
  data, _status_code, _headers = user_get_user_with_http_info(user_id, opts)
  data
end

#user_get_user_with_http_info(user_id, opts = {}) ⇒ Array<(User, Integer, Hash)>

Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

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

    User data, response status code and response headers



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
381
# File 'lib/pingram/api/user_api.rb', line 335

def user_get_user_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_get_user ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.user_get_user"
  end
  # resource path
  local_var_path = '/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_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']) unless header_params['Accept']

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_identify(user_id, post_user_request, opts = {}) ⇒ User

Create or update a user with the given ID. Updates lastSeenTime automatically.

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:



388
389
390
391
# File 'lib/pingram/api/user_api.rb', line 388

def user_identify(user_id, post_user_request, opts = {})
  data, _status_code, _headers = user_identify_with_http_info(user_id, post_user_request, opts)
  data
end

#user_identify_with_http_info(user_id, post_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>

Create or update a user with the given ID. Updates lastSeenTime automatically.

Parameters:

  • user_id (String)

    User ID

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

    the optional parameters

Returns:

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

    User data, response status code and response headers



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
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
# File 'lib/pingram/api/user_api.rb', line 398

def user_identify_with_http_info(user_id, post_user_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_identify ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.user_identify"
  end
  # verify the required parameter 'post_user_request' is set
  if @api_client.config.client_side_validation && post_user_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_user_request' when calling UserApi.user_identify"
  end
  # resource path
  local_var_path = '/users/{userId}'.sub('{' + 'userId' + '}', CGI.escape(user_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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_mark_in_app_notifications_as_seen(in_app_notification_unread_clear_request, opts = {}) ⇒ SuccessResponse

Mark in-app web notifications as seen/read for a user

Parameters:

Returns:



459
460
461
462
# File 'lib/pingram/api/user_api.rb', line 459

def user_mark_in_app_notifications_as_seen(in_app_notification_unread_clear_request, opts = {})
  data, _status_code, _headers = user_mark_in_app_notifications_as_seen_with_http_info(in_app_notification_unread_clear_request, opts)
  data
end

#user_mark_in_app_notifications_as_seen_with_http_info(in_app_notification_unread_clear_request, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>

Mark in-app web notifications as seen/read for a user

Parameters:

Returns:

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

    SuccessResponse data, response status code and response headers



468
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
519
# File 'lib/pingram/api/user_api.rb', line 468

def user_mark_in_app_notifications_as_seen_with_http_info(in_app_notification_unread_clear_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_mark_in_app_notifications_as_seen ...'
  end
  # verify the required parameter 'in_app_notification_unread_clear_request' is set
  if @api_client.config.client_side_validation && in_app_notification_unread_clear_request.nil?
    fail ArgumentError, "Missing the required parameter 'in_app_notification_unread_clear_request' when calling UserApi.user_mark_in_app_notifications_as_seen"
  end
  # resource path
  local_var_path = '/user/inapp/unread'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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

#user_update_in_app_notification_status(in_app_notification_patch_request, opts = {}) ⇒ SuccessResponse

Update in-app web notification status (opened, archived, clicked, etc.)

Parameters:

Returns:



525
526
527
528
# File 'lib/pingram/api/user_api.rb', line 525

def user_update_in_app_notification_status(in_app_notification_patch_request, opts = {})
  data, _status_code, _headers = user_update_in_app_notification_status_with_http_info(in_app_notification_patch_request, opts)
  data
end

#user_update_in_app_notification_status_with_http_info(in_app_notification_patch_request, opts = {}) ⇒ Array<(SuccessResponse, Integer, Hash)>

Update in-app web notification status (opened, archived, clicked, etc.)

Parameters:

Returns:

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

    SuccessResponse data, response status code and response headers



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
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/pingram/api/user_api.rb', line 534

def user_update_in_app_notification_status_with_http_info(in_app_notification_patch_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_update_in_app_notification_status ...'
  end
  # verify the required parameter 'in_app_notification_patch_request' is set
  if @api_client.config.client_side_validation && in_app_notification_patch_request.nil?
    fail ArgumentError, "Missing the required parameter 'in_app_notification_patch_request' when calling UserApi.user_update_in_app_notification_status"
  end
  # resource path
  local_var_path = '/user/inapp'

  # 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']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

  # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
  auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']

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