onesignal 1.0.0.beta1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/LICENSE +24 -0
  4. data/README.md +75 -45
  5. data/RELEASE_INSTRUCTIONS.md +11 -0
  6. data/docs/DefaultApi.md +86 -86
  7. data/docs/InlineResponse200.md +1 -1
  8. data/docs/InlineResponse2001.md +1 -1
  9. data/docs/InlineResponse2002.md +1 -1
  10. data/docs/InlineResponse2005.md +4 -2
  11. data/docs/{InlineResponse2003.md → InlineResponse2007.md} +3 -3
  12. data/docs/InlineResponse2008.md +18 -0
  13. data/docs/InlineResponse4002.md +4 -2
  14. data/docs/InlineResponse4003.md +18 -0
  15. data/docs/InvalidIdentifierError.md +20 -0
  16. data/docs/Notification.md +12 -12
  17. data/docs/Notification200Errors.md +49 -0
  18. data/docs/NotificationAllOf.md +11 -11
  19. data/docs/NotificationSlice.md +1 -1
  20. data/docs/NotificationTarget.md +1 -1
  21. data/docs/NotificationWithMeta.md +260 -0
  22. data/docs/NotificationWithMetaAllOf.md +38 -0
  23. data/docs/OutcomesData.md +18 -0
  24. data/docs/Player.md +2 -2
  25. data/docs/PlayerNotificationTarget.md +1 -1
  26. data/docs/StringMap.md +1 -1
  27. data/lib/onesignal/api/default_api.rb +82 -55
  28. data/lib/onesignal/api_client.rb +9 -7
  29. data/lib/onesignal/api_error.rb +2 -2
  30. data/lib/onesignal/configuration.rb +6 -3
  31. data/lib/onesignal/models/app.rb +3 -2
  32. data/lib/onesignal/models/button.rb +3 -2
  33. data/lib/onesignal/models/delivery_data.rb +8 -2
  34. data/lib/onesignal/models/export_players_request_body.rb +3 -2
  35. data/lib/onesignal/models/filter.rb +3 -2
  36. data/lib/onesignal/models/filter_expressions.rb +3 -2
  37. data/lib/onesignal/models/filter_notification_target.rb +3 -2
  38. data/lib/onesignal/models/get_notification_request_body.rb +3 -2
  39. data/lib/onesignal/models/inline_response200.rb +4 -3
  40. data/lib/onesignal/models/inline_response2001.rb +4 -3
  41. data/lib/onesignal/models/inline_response2002.rb +4 -3
  42. data/lib/onesignal/models/inline_response2005.rb +19 -9
  43. data/lib/onesignal/models/{inline_response2003.rb → inline_response2007.rb} +7 -6
  44. data/lib/onesignal/models/{inline_response2004.rb → inline_response2008.rb} +13 -21
  45. data/lib/onesignal/models/inline_response201.rb +3 -2
  46. data/lib/onesignal/models/inline_response400.rb +3 -2
  47. data/lib/onesignal/models/inline_response4001.rb +3 -2
  48. data/lib/onesignal/models/inline_response4002.rb +20 -10
  49. data/lib/onesignal/models/{inline_response409.rb → inline_response4003.rb} +14 -22
  50. data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
  51. data/lib/onesignal/models/notification.rb +39 -19
  52. data/lib/onesignal/models/notification200_errors.rb +105 -0
  53. data/lib/onesignal/models/notification_all_of.rb +38 -18
  54. data/lib/onesignal/models/notification_all_of_android_background_layout.rb +3 -2
  55. data/lib/onesignal/models/notification_slice.rb +4 -3
  56. data/lib/onesignal/models/notification_target.rb +4 -3
  57. data/lib/onesignal/models/notification_with_meta.rb +1526 -0
  58. data/lib/onesignal/models/notification_with_meta_all_of.rb +322 -0
  59. data/lib/onesignal/models/operator.rb +3 -2
  60. data/lib/onesignal/models/outcome_data.rb +3 -2
  61. data/lib/onesignal/models/outcomes_data.rb +221 -0
  62. data/lib/onesignal/models/platform_delivery_data.rb +3 -2
  63. data/lib/onesignal/models/player.rb +6 -8
  64. data/lib/onesignal/models/player_notification_target.rb +4 -3
  65. data/lib/onesignal/models/player_slice.rb +3 -2
  66. data/lib/onesignal/models/purchase.rb +3 -2
  67. data/lib/onesignal/models/segment.rb +3 -2
  68. data/lib/onesignal/models/segment_notification_target.rb +3 -2
  69. data/lib/onesignal/models/string_map.rb +3 -7
  70. data/lib/onesignal/models/update_player_tags_request_body.rb +3 -2
  71. data/lib/onesignal/version.rb +3 -3
  72. data/lib/{OneSignal.rb → onesignal.rb} +10 -5
  73. data/onesignal.gemspec +5 -4
  74. data/spec/api/default_api_spec.rb +20 -20
  75. data/spec/api_client_spec.rb +4 -4
  76. data/spec/configuration_spec.rb +2 -2
  77. data/spec/models/app_spec.rb +2 -2
  78. data/spec/models/button_spec.rb +2 -2
  79. data/spec/models/delivery_data_spec.rb +2 -2
  80. data/spec/models/export_players_request_body_spec.rb +2 -2
  81. data/spec/models/filter_expressions_spec.rb +2 -2
  82. data/spec/models/filter_notification_target_spec.rb +2 -2
  83. data/spec/models/filter_spec.rb +2 -2
  84. data/spec/models/get_notification_request_body_spec.rb +2 -2
  85. data/spec/models/inline_response2001_spec.rb +2 -2
  86. data/spec/models/inline_response2002_spec.rb +2 -2
  87. data/spec/models/inline_response2005_spec.rb +9 -3
  88. data/spec/models/{inline_response2003_spec.rb → inline_response2007_spec.rb} +8 -8
  89. data/spec/models/{inline_response409_spec.rb → inline_response2008_spec.rb} +9 -15
  90. data/spec/models/inline_response200_spec.rb +2 -2
  91. data/spec/models/inline_response201_spec.rb +2 -2
  92. data/spec/models/inline_response4001_spec.rb +2 -2
  93. data/spec/models/inline_response4002_spec.rb +9 -3
  94. data/spec/models/inline_response4003_spec.rb +34 -0
  95. data/spec/models/inline_response400_spec.rb +2 -2
  96. data/spec/models/{inline_response2004_spec.rb → invalid_identifier_error_spec.rb} +10 -10
  97. data/spec/models/notification200_errors_spec.rb +31 -0
  98. data/spec/models/notification_all_of_android_background_layout_spec.rb +2 -2
  99. data/spec/models/notification_all_of_spec.rb +3 -3
  100. data/spec/models/notification_slice_spec.rb +2 -2
  101. data/spec/models/notification_spec.rb +3 -3
  102. data/spec/models/notification_target_spec.rb +2 -2
  103. data/spec/models/notification_with_meta_all_of_spec.rb +94 -0
  104. data/spec/models/notification_with_meta_spec.rb +764 -0
  105. data/spec/models/operator_spec.rb +2 -2
  106. data/spec/models/outcome_data_spec.rb +2 -2
  107. data/spec/models/outcomes_data_spec.rb +34 -0
  108. data/spec/models/platform_delivery_data_spec.rb +2 -2
  109. data/spec/models/player_notification_target_spec.rb +2 -2
  110. data/spec/models/player_slice_spec.rb +2 -2
  111. data/spec/models/player_spec.rb +2 -2
  112. data/spec/models/purchase_spec.rb +2 -2
  113. data/spec/models/segment_notification_target_spec.rb +2 -2
  114. data/spec/models/segment_spec.rb +2 -2
  115. data/spec/models/string_map_spec.rb +2 -2
  116. data/spec/models/update_player_tags_request_body_spec.rb +2 -2
  117. data/spec/spec_helper.rb +2 -2
  118. metadata +51 -29
  119. data/docs/InlineResponse2004.md +0 -20
  120. data/docs/InlineResponse409.md +0 -20
  121. data/git_push.sh +0 -58
@@ -3,10 +3,10 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.1
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -123,7 +123,10 @@ module OneSignal
123
123
  # HTTP header 'Accept' (if needed)
124
124
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
125
  # HTTP header 'Content-Type'
126
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
126
+ content_type = @api_client.select_header_content_type(['application/json'])
127
+ if !content_type.nil?
128
+ header_params['Content-Type'] = content_type
129
+ end
127
130
 
128
131
  # form parameters
129
132
  form_params = opts[:form_params] || {}
@@ -188,7 +191,10 @@ module OneSignal
188
191
  # HTTP header 'Accept' (if needed)
189
192
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
193
  # HTTP header 'Content-Type'
191
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
194
+ content_type = @api_client.select_header_content_type(['application/json'])
195
+ if !content_type.nil?
196
+ header_params['Content-Type'] = content_type
197
+ end
192
198
 
193
199
  # form parameters
194
200
  form_params = opts[:form_params] || {}
@@ -220,20 +226,20 @@ module OneSignal
220
226
  end
221
227
 
222
228
  # Add a device
223
- # Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
229
+ # Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
224
230
  # @param player [Player]
225
231
  # @param [Hash] opts the optional parameters
226
- # @return [InlineResponse2004]
232
+ # @return [InlineResponse2005]
227
233
  def create_player(player, opts = {})
228
234
  data, _status_code, _headers = create_player_with_http_info(player, opts)
229
235
  data
230
236
  end
231
237
 
232
238
  # Add a device
233
- # Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
239
+ # Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
234
240
  # @param player [Player]
235
241
  # @param [Hash] opts the optional parameters
236
- # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
242
+ # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
237
243
  def create_player_with_http_info(player, opts = {})
238
244
  if @api_client.config.debugging
239
245
  @api_client.config.logger.debug 'Calling API: DefaultApi.create_player ...'
@@ -253,7 +259,10 @@ module OneSignal
253
259
  # HTTP header 'Accept' (if needed)
254
260
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
261
  # HTTP header 'Content-Type'
256
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
262
+ content_type = @api_client.select_header_content_type(['application/json'])
263
+ if !content_type.nil?
264
+ header_params['Content-Type'] = content_type
265
+ end
257
266
 
258
267
  # form parameters
259
268
  form_params = opts[:form_params] || {}
@@ -262,7 +271,7 @@ module OneSignal
262
271
  post_body = opts[:debug_body] || @api_client.object_to_http_body(player)
263
272
 
264
273
  # return_type
265
- return_type = opts[:debug_return_type] || 'InlineResponse2004'
274
+ return_type = opts[:debug_return_type] || 'InlineResponse2005'
266
275
 
267
276
  # auth_names
268
277
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -285,7 +294,7 @@ module OneSignal
285
294
  end
286
295
 
287
296
  # Create Segments
288
- # Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
297
+ # Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
289
298
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
290
299
  # @param [Hash] opts the optional parameters
291
300
  # @option opts [Segment] :segment
@@ -296,7 +305,7 @@ module OneSignal
296
305
  end
297
306
 
298
307
  # Create Segments
299
- # Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \&quot;AND\&quot; or \&quot;OR\&quot; operator&#39;s. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
308
+ # Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \&quot;AND\&quot; or \&quot;OR\&quot; operator&#39;s. &amp;#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
300
309
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
301
310
  # @param [Hash] opts the optional parameters
302
311
  # @option opts [Segment] :segment
@@ -320,7 +329,10 @@ module OneSignal
320
329
  # HTTP header 'Accept' (if needed)
321
330
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
322
331
  # HTTP header 'Content-Type'
323
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
332
+ content_type = @api_client.select_header_content_type(['application/json'])
333
+ if !content_type.nil?
334
+ header_params['Content-Type'] = content_type
335
+ end
324
336
 
325
337
  # form parameters
326
338
  form_params = opts[:form_params] || {}
@@ -356,7 +368,7 @@ module OneSignal
356
368
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
357
369
  # @param player_id [String] The OneSignal player_id
358
370
  # @param [Hash] opts the optional parameters
359
- # @return [InlineResponse2001]
371
+ # @return [InlineResponse2007]
360
372
  def delete_player(app_id, player_id, opts = {})
361
373
  data, _status_code, _headers = delete_player_with_http_info(app_id, player_id, opts)
362
374
  data
@@ -367,7 +379,7 @@ module OneSignal
367
379
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
368
380
  # @param player_id [String] The OneSignal player_id
369
381
  # @param [Hash] opts the optional parameters
370
- # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
382
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
371
383
  def delete_player_with_http_info(app_id, player_id, opts = {})
372
384
  if @api_client.config.debugging
373
385
  @api_client.config.logger.debug 'Calling API: DefaultApi.delete_player ...'
@@ -399,7 +411,7 @@ module OneSignal
399
411
  post_body = opts[:debug_body]
400
412
 
401
413
  # return_type
402
- return_type = opts[:debug_return_type] || 'InlineResponse2001'
414
+ return_type = opts[:debug_return_type] || 'InlineResponse2007'
403
415
 
404
416
  # auth_names
405
417
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -426,7 +438,7 @@ module OneSignal
426
438
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
427
439
  # @param segment_id [String] The segment_id can be found in the URL of the segment when viewing it in the dashboard.
428
440
  # @param [Hash] opts the optional parameters
429
- # @return [InlineResponse2003]
441
+ # @return [InlineResponse2001]
430
442
  def delete_segments(app_id, segment_id, opts = {})
431
443
  data, _status_code, _headers = delete_segments_with_http_info(app_id, segment_id, opts)
432
444
  data
@@ -437,7 +449,7 @@ module OneSignal
437
449
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
438
450
  # @param segment_id [String] The segment_id can be found in the URL of the segment when viewing it in the dashboard.
439
451
  # @param [Hash] opts the optional parameters
440
- # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
452
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
441
453
  def delete_segments_with_http_info(app_id, segment_id, opts = {})
442
454
  if @api_client.config.debugging
443
455
  @api_client.config.logger.debug 'Calling API: DefaultApi.delete_segments ...'
@@ -468,7 +480,7 @@ module OneSignal
468
480
  post_body = opts[:debug_body]
469
481
 
470
482
  # return_type
471
- return_type = opts[:debug_return_type] || 'InlineResponse2003'
483
+ return_type = opts[:debug_return_type] || 'InlineResponse2001'
472
484
 
473
485
  # auth_names
474
486
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -491,22 +503,22 @@ module OneSignal
491
503
  end
492
504
 
493
505
  # CSV export
494
- # Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
506
+ # Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
495
507
  # @param app_id [String] The app ID that you want to export devices from
496
508
  # @param [Hash] opts the optional parameters
497
509
  # @option opts [ExportPlayersRequestBody] :export_players_request_body
498
- # @return [InlineResponse2005]
510
+ # @return [InlineResponse2008]
499
511
  def export_players(app_id, opts = {})
500
512
  data, _status_code, _headers = export_players_with_http_info(app_id, opts)
501
513
  data
502
514
  end
503
515
 
504
516
  # CSV export
505
- # Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 &#x3D; Chrome 80, 9 &#x3D; Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have &#x60;Linux armv&#x60; | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t &#x3D; unsubscribed, f &#x3D; subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
517
+ # Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &amp;#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &amp;#x1F6A7; Requires Authentication Key Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs. &amp;#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 &#x3D; Chrome 80, 9 &#x3D; Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have &#x60;Linux armv&#x60; | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t &#x3D; unsubscribed, f &#x3D; subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
506
518
  # @param app_id [String] The app ID that you want to export devices from
507
519
  # @param [Hash] opts the optional parameters
508
520
  # @option opts [ExportPlayersRequestBody] :export_players_request_body
509
- # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
521
+ # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
510
522
  def export_players_with_http_info(app_id, opts = {})
511
523
  if @api_client.config.debugging
512
524
  @api_client.config.logger.debug 'Calling API: DefaultApi.export_players ...'
@@ -526,7 +538,10 @@ module OneSignal
526
538
  # HTTP header 'Accept' (if needed)
527
539
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
528
540
  # HTTP header 'Content-Type'
529
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
541
+ content_type = @api_client.select_header_content_type(['application/json'])
542
+ if !content_type.nil?
543
+ header_params['Content-Type'] = content_type
544
+ end
530
545
 
531
546
  # form parameters
532
547
  form_params = opts[:form_params] || {}
@@ -535,7 +550,7 @@ module OneSignal
535
550
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'export_players_request_body'])
536
551
 
537
552
  # return_type
538
- return_type = opts[:debug_return_type] || 'InlineResponse2005'
553
+ return_type = opts[:debug_return_type] || 'InlineResponse2008'
539
554
 
540
555
  # auth_names
541
556
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -623,7 +638,7 @@ module OneSignal
623
638
  # View apps
624
639
  # View the details of all of your current OneSignal apps
625
640
  # @param [Hash] opts the optional parameters
626
- # @return [String]
641
+ # @return [Array<App>]
627
642
  def get_apps(opts = {})
628
643
  data, _status_code, _headers = get_apps_with_http_info(opts)
629
644
  data
@@ -632,7 +647,7 @@ module OneSignal
632
647
  # View apps
633
648
  # View the details of all of your current OneSignal apps
634
649
  # @param [Hash] opts the optional parameters
635
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
650
+ # @return [Array<(Array<App>, Integer, Hash)>] Array<App> data, response status code and response headers
636
651
  def get_apps_with_http_info(opts = {})
637
652
  if @api_client.config.debugging
638
653
  @api_client.config.logger.debug 'Calling API: DefaultApi.get_apps ...'
@@ -655,7 +670,7 @@ module OneSignal
655
670
  post_body = opts[:debug_body]
656
671
 
657
672
  # return_type
658
- return_type = opts[:debug_return_type] || 'String'
673
+ return_type = opts[:debug_return_type] || 'Array<App>'
659
674
 
660
675
  # auth_names
661
676
  auth_names = opts[:debug_auth_names] || ['user_key']
@@ -682,7 +697,7 @@ module OneSignal
682
697
  # @param app_id [String]
683
698
  # @param notification_id [String]
684
699
  # @param [Hash] opts the optional parameters
685
- # @return [Notification]
700
+ # @return [NotificationWithMeta]
686
701
  def get_notification(app_id, notification_id, opts = {})
687
702
  data, _status_code, _headers = get_notification_with_http_info(app_id, notification_id, opts)
688
703
  data
@@ -693,7 +708,7 @@ module OneSignal
693
708
  # @param app_id [String]
694
709
  # @param notification_id [String]
695
710
  # @param [Hash] opts the optional parameters
696
- # @return [Array<(Notification, Integer, Hash)>] Notification data, response status code and response headers
711
+ # @return [Array<(NotificationWithMeta, Integer, Hash)>] NotificationWithMeta data, response status code and response headers
697
712
  def get_notification_with_http_info(app_id, notification_id, opts = {})
698
713
  if @api_client.config.debugging
699
714
  @api_client.config.logger.debug 'Calling API: DefaultApi.get_notification ...'
@@ -725,7 +740,7 @@ module OneSignal
725
740
  post_body = opts[:debug_body]
726
741
 
727
742
  # return_type
728
- return_type = opts[:debug_return_type] || 'Notification'
743
+ return_type = opts[:debug_return_type] || 'NotificationWithMeta'
729
744
 
730
745
  # auth_names
731
746
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -748,7 +763,7 @@ module OneSignal
748
763
  end
749
764
 
750
765
  # Notification History
751
- # -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs.
766
+ # -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs.
752
767
  # @param notification_id [String] The \&quot;id\&quot; of the message found in the Notification object
753
768
  # @param get_notification_request_body [GetNotificationRequestBody]
754
769
  # @param [Hash] opts the optional parameters
@@ -759,7 +774,7 @@ module OneSignal
759
774
  end
760
775
 
761
776
  # Notification History
762
- # -&gt; View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -&gt; Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \&quot;sent\&quot; events recorded, but will show \&quot;clicked\&quot; events. Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs.
777
+ # -&gt; View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &amp;#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -&gt; Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \&quot;sent\&quot; events recorded, but will show \&quot;clicked\&quot; events. Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs.
763
778
  # @param notification_id [String] The \&quot;id\&quot; of the message found in the Notification object
764
779
  # @param get_notification_request_body [GetNotificationRequestBody]
765
780
  # @param [Hash] opts the optional parameters
@@ -787,7 +802,10 @@ module OneSignal
787
802
  # HTTP header 'Accept' (if needed)
788
803
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
789
804
  # HTTP header 'Content-Type'
790
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
805
+ content_type = @api_client.select_header_content_type(['application/json'])
806
+ if !content_type.nil?
807
+ header_params['Content-Type'] = content_type
808
+ end
791
809
 
792
810
  # form parameters
793
811
  form_params = opts[:form_params] || {}
@@ -822,7 +840,7 @@ module OneSignal
822
840
  # View the details of multiple notifications
823
841
  # @param app_id [String] The app ID that you want to view notifications from
824
842
  # @param [Hash] opts the optional parameters
825
- # @option opts [String] :limit How many notifications to return. Max is 50. Default is 50.
843
+ # @option opts [Integer] :limit How many notifications to return. Max is 50. Default is 50.
826
844
  # @option opts [Integer] :offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
827
845
  # @option opts [Integer] :kind Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only
828
846
  # @return [NotificationSlice]
@@ -835,7 +853,7 @@ module OneSignal
835
853
  # View the details of multiple notifications
836
854
  # @param app_id [String] The app ID that you want to view notifications from
837
855
  # @param [Hash] opts the optional parameters
838
- # @option opts [String] :limit How many notifications to return. Max is 50. Default is 50.
856
+ # @option opts [Integer] :limit How many notifications to return. Max is 50. Default is 50.
839
857
  # @option opts [Integer] :offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
840
858
  # @option opts [Integer] :kind Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only
841
859
  # @return [Array<(NotificationSlice, Integer, Hash)>] NotificationSlice data, response status code and response headers
@@ -896,30 +914,30 @@ module OneSignal
896
914
  end
897
915
 
898
916
  # View Outcomes
899
- # View the details of all the outcomes associated with your app 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
917
+ # View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
900
918
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
901
- # @param outcome_names [String] Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the os prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
919
+ # @param outcome_names [String] Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \&quot;os\&quot; prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
902
920
  # @param [Hash] opts the optional parameters
903
- # @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]&#x3D;os__click.count&amp;outcome_names[]&#x3D;Sales, Purchase.count where Sales, Purchase is the custom outcomes with a comma in the name.
921
+ # @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]&#x3D;os__click.count&amp;outcome_names[]&#x3D;Sales, Purchase.count where \&quot;Sales, Purchase\&quot; is the custom outcomes with a comma in the name.
904
922
  # @option opts [String] :outcome_time_range Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted.
905
923
  # @option opts [String] :outcome_platforms Optional Platform id. Refer device&#39;s platform ids for values. Example: outcome_platform&#x3D;0 for iOS outcome_platform&#x3D;7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
906
924
  # @option opts [String] :outcome_attribution Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution&#x3D;direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.
907
- # @return [Array<OutcomeData>]
925
+ # @return [OutcomesData]
908
926
  def get_outcomes(app_id, outcome_names, opts = {})
909
927
  data, _status_code, _headers = get_outcomes_with_http_info(app_id, outcome_names, opts)
910
928
  data
911
929
  end
912
930
 
913
931
  # View Outcomes
914
- # View the details of all the outcomes associated with your app 🚧 Requires Authentication Key Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs. 🚧 Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
932
+ # View the details of all the outcomes associated with your app &amp;#x1F6A7; Requires Authentication Key Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs. &amp;#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
915
933
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
916
- # @param outcome_names [String] Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the os prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
934
+ # @param outcome_names [String] Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \&quot;os\&quot; prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
917
935
  # @param [Hash] opts the optional parameters
918
- # @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]&#x3D;os__click.count&amp;outcome_names[]&#x3D;Sales, Purchase.count where Sales, Purchase is the custom outcomes with a comma in the name.
936
+ # @option opts [String] :outcome_names2 Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]&#x3D;os__click.count&amp;outcome_names[]&#x3D;Sales, Purchase.count where \&quot;Sales, Purchase\&quot; is the custom outcomes with a comma in the name.
919
937
  # @option opts [String] :outcome_time_range Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted.
920
938
  # @option opts [String] :outcome_platforms Optional Platform id. Refer device&#39;s platform ids for values. Example: outcome_platform&#x3D;0 for iOS outcome_platform&#x3D;7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
921
939
  # @option opts [String] :outcome_attribution Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution&#x3D;direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.
922
- # @return [Array<(Array<OutcomeData>, Integer, Hash)>] Array<OutcomeData> data, response status code and response headers
940
+ # @return [Array<(OutcomesData, Integer, Hash)>] OutcomesData data, response status code and response headers
923
941
  def get_outcomes_with_http_info(app_id, outcome_names, opts = {})
924
942
  if @api_client.config.debugging
925
943
  @api_client.config.logger.debug 'Calling API: DefaultApi.get_outcomes ...'
@@ -955,7 +973,7 @@ module OneSignal
955
973
  post_body = opts[:debug_body]
956
974
 
957
975
  # return_type
958
- return_type = opts[:debug_return_type] || 'Array<OutcomeData>'
976
+ return_type = opts[:debug_return_type] || 'OutcomesData'
959
977
 
960
978
  # auth_names
961
979
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -1054,7 +1072,7 @@ module OneSignal
1054
1072
  # View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
1055
1073
  # @param app_id [String] The app ID that you want to view players from
1056
1074
  # @param [Hash] opts the optional parameters
1057
- # @option opts [String] :limit How many devices to return. Max is 300. Default is 300
1075
+ # @option opts [Integer] :limit How many devices to return. Max is 300. Default is 300
1058
1076
  # @option opts [Integer] :offset Result offset. Default is 0. Results are sorted by id;
1059
1077
  # @return [PlayerSlice]
1060
1078
  def get_players(app_id, opts = {})
@@ -1066,7 +1084,7 @@ module OneSignal
1066
1084
  # View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
1067
1085
  # @param app_id [String] The app ID that you want to view players from
1068
1086
  # @param [Hash] opts the optional parameters
1069
- # @option opts [String] :limit How many devices to return. Max is 300. Default is 300
1087
+ # @option opts [Integer] :limit How many devices to return. Max is 300. Default is 300
1070
1088
  # @option opts [Integer] :offset Result offset. Default is 0. Results are sorted by id;
1071
1089
  # @return [Array<(PlayerSlice, Integer, Hash)>] PlayerSlice data, response status code and response headers
1072
1090
  def get_players_with_http_info(app_id, opts = {})
@@ -1160,7 +1178,10 @@ module OneSignal
1160
1178
  # HTTP header 'Accept' (if needed)
1161
1179
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1162
1180
  # HTTP header 'Content-Type'
1163
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1181
+ content_type = @api_client.select_header_content_type(['application/json'])
1182
+ if !content_type.nil?
1183
+ header_params['Content-Type'] = content_type
1184
+ end
1164
1185
 
1165
1186
  # form parameters
1166
1187
  form_params = opts[:form_params] || {}
@@ -1231,7 +1252,10 @@ module OneSignal
1231
1252
  # HTTP header 'Accept' (if needed)
1232
1253
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1233
1254
  # HTTP header 'Content-Type'
1234
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1255
+ content_type = @api_client.select_header_content_type(['application/json'])
1256
+ if !content_type.nil?
1257
+ header_params['Content-Type'] = content_type
1258
+ end
1235
1259
 
1236
1260
  # form parameters
1237
1261
  form_params = opts[:form_params] || {}
@@ -1263,24 +1287,24 @@ module OneSignal
1263
1287
  end
1264
1288
 
1265
1289
  # Edit tags with external user id
1266
- # Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
1290
+ # Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
1267
1291
  # @param app_id [String] The OneSignal App ID the user record is found under.
1268
1292
  # @param external_user_id [String] The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
1269
1293
  # @param [Hash] opts the optional parameters
1270
1294
  # @option opts [UpdatePlayerTagsRequestBody] :update_player_tags_request_body
1271
- # @return [InlineResponse2003]
1295
+ # @return [InlineResponse2001]
1272
1296
  def update_player_tags(app_id, external_user_id, opts = {})
1273
1297
  data, _status_code, _headers = update_player_tags_with_http_info(app_id, external_user_id, opts)
1274
1298
  data
1275
1299
  end
1276
1300
 
1277
1301
  # Edit tags with external user id
1278
- # Update an existing device&#39;s tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\&quot;key\&quot;, \&quot;value1\&quot;) then update the tag value to \&quot;value2\&quot; with this API endpoint. You will not be able to set the value back to \&quot;value1\&quot; through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device&#39;s tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \&quot;tags\&quot;: { \&quot;rank\&quot;: \&quot;\&quot;, \&quot;category\&quot;: \&quot;\&quot;, \&quot;class\&quot;: \&quot;my_new_value\&quot; }
1302
+ # Update an existing device&#39;s tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\&quot;key\&quot;, \&quot;value1\&quot;) then update the tag value to \&quot;value2\&quot; with this API endpoint. You will not be able to set the value back to \&quot;value1\&quot; through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device&#39;s tags. This is only applicable on the Android Mobile App SDKs. &amp;#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \&quot;tags\&quot;: { \&quot;rank\&quot;: \&quot;\&quot;, \&quot;category\&quot;: \&quot;\&quot;, \&quot;class\&quot;: \&quot;my_new_value\&quot; }
1279
1303
  # @param app_id [String] The OneSignal App ID the user record is found under.
1280
1304
  # @param external_user_id [String] The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
1281
1305
  # @param [Hash] opts the optional parameters
1282
1306
  # @option opts [UpdatePlayerTagsRequestBody] :update_player_tags_request_body
1283
- # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
1307
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
1284
1308
  def update_player_tags_with_http_info(app_id, external_user_id, opts = {})
1285
1309
  if @api_client.config.debugging
1286
1310
  @api_client.config.logger.debug 'Calling API: DefaultApi.update_player_tags ...'
@@ -1304,7 +1328,10 @@ module OneSignal
1304
1328
  # HTTP header 'Accept' (if needed)
1305
1329
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1306
1330
  # HTTP header 'Content-Type'
1307
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1331
+ content_type = @api_client.select_header_content_type(['application/json'])
1332
+ if !content_type.nil?
1333
+ header_params['Content-Type'] = content_type
1334
+ end
1308
1335
 
1309
1336
  # form parameters
1310
1337
  form_params = opts[:form_params] || {}
@@ -1313,7 +1340,7 @@ module OneSignal
1313
1340
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_player_tags_request_body'])
1314
1341
 
1315
1342
  # return_type
1316
- return_type = opts[:debug_return_type] || 'InlineResponse2003'
1343
+ return_type = opts[:debug_return_type] || 'InlineResponse2001'
1317
1344
 
1318
1345
  # auth_names
1319
1346
  auth_names = opts[:debug_auth_names] || ['app_key']
@@ -3,10 +3,10 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.1
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -90,10 +90,11 @@ module OneSignal
90
90
  url = build_request_url(path, opts)
91
91
  http_method = http_method.to_sym.downcase
92
92
 
93
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=1.0.1'
93
94
  header_params = @default_headers.merge(opts[:header_params] || {})
94
- header_params['OS-Usage-Data'] = 'kind=sdk, name=onesignal-ruby, version=1.0.0'
95
95
  query_params = opts[:query_params] || {}
96
96
  form_params = opts[:form_params] || {}
97
+ follow_location = opts[:follow_location] || true
97
98
 
98
99
  update_params_for_auth! header_params, query_params, opts[:auth_names]
99
100
 
@@ -110,7 +111,8 @@ module OneSignal
110
111
  :ssl_verifyhost => _verify_ssl_host,
111
112
  :sslcert => @config.cert_file,
112
113
  :sslkey => @config.key_file,
113
- :verbose => @config.debugging
114
+ :verbose => @config.debugging,
115
+ :followlocation => follow_location
114
116
  }
115
117
 
116
118
  # set custom cert, if provided
@@ -297,7 +299,7 @@ module OneSignal
297
299
  @config.base_url(opts[:operation]) + path
298
300
  end
299
301
 
300
- # Update hearder and query params based on authentication settings.
302
+ # Update header and query params based on authentication settings.
301
303
  #
302
304
  # @param [Hash] header_params Header parameters
303
305
  # @param [Hash] query_params Query parameters
@@ -336,8 +338,8 @@ module OneSignal
336
338
  # @param [Array] content_types array for Content-Type
337
339
  # @return [String] the Content-Type header (e.g. application/json)
338
340
  def select_header_content_type(content_types)
339
- # use application/json by default
340
- return 'application/json' if content_types.nil? || content_types.empty?
341
+ # return nil by default
342
+ return if content_types.nil? || content_types.empty?
341
343
  # use JSON when present, otherwise use the first one
342
344
  json_content_type = content_types.find { |s| json_mime?(s) }
343
345
  json_content_type || content_types.first
@@ -3,10 +3,10 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.1
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.1
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -110,6 +110,7 @@ module OneSignal
110
110
  # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
111
111
  attr_accessor :params_encoding
112
112
 
113
+
113
114
  attr_accessor :inject_format
114
115
 
115
116
  attr_accessor :force_ending_format
@@ -126,9 +127,10 @@ module OneSignal
126
127
  @client_side_validation = true
127
128
  @verify_ssl = true
128
129
  @verify_ssl_host = true
129
- @params_encoding = nil
130
130
  @cert_file = nil
131
131
  @key_file = nil
132
+ @timeout = 0
133
+ @params_encoding = nil
132
134
  @debugging = false
133
135
  @inject_format = false
134
136
  @force_ending_format = false
@@ -238,5 +240,6 @@ module OneSignal
238
240
 
239
241
  url
240
242
  end
243
+
241
244
  end
242
245
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 1.0.1
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.2.0-SNAPSHOT
9
+ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -424,6 +424,7 @@ module OneSignal
424
424
  # @return [Object] Returns the model itself
425
425
  def build_from_hash(attributes)
426
426
  return nil unless attributes.is_a?(Hash)
427
+ attributes = attributes.transform_keys(&:to_sym)
427
428
  self.class.openapi_types.each_pair do |key, type|
428
429
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
429
430
  self.send("#{key}=", nil)