onesignal 1.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +74 -0
  3. data/README.md +112 -88
  4. data/docs/App.md +9 -1
  5. data/docs/BasicNotification.md +230 -0
  6. data/docs/BasicNotificationAllOf.md +202 -0
  7. data/docs/{NotificationAllOfAndroidBackgroundLayout.md → BasicNotificationAllOfAndroidBackgroundLayout.md} +2 -2
  8. data/docs/BeginLiveActivityRequest.md +20 -0
  9. data/docs/CancelNotificationSuccessResponse.md +18 -0
  10. data/docs/CreateNotificationSuccessResponse.md +24 -0
  11. data/docs/{InlineResponse2005.md → CreatePlayerSuccessResponse.md} +2 -2
  12. data/docs/{InlineResponse4002.md → CreateSegmentConflictResponse.md} +2 -2
  13. data/docs/CreateSegmentSuccessResponse.md +20 -0
  14. data/docs/CreateSubscriptionRequestBody.md +20 -0
  15. data/docs/CreateUserConflictResponse.md +18 -0
  16. data/docs/CreateUserConflictResponseErrorsInner.md +22 -0
  17. data/docs/CreateUserConflictResponseErrorsItemsMeta.md +18 -0
  18. data/docs/DefaultApi.md +1591 -266
  19. data/docs/DeletePlayerNotFoundResponse.md +18 -0
  20. data/docs/{InlineResponse2001.md → DeletePlayerSuccessResponse.md} +2 -2
  21. data/docs/DeleteSegmentNotFoundResponse.md +18 -0
  22. data/docs/DeleteSegmentSuccessResponse.md +18 -0
  23. data/docs/DeliveryData.md +5 -5
  24. data/docs/{InlineResponse2008.md → ExportEventsSuccessResponse.md} +2 -2
  25. data/docs/ExportPlayersRequestBody.md +2 -2
  26. data/docs/ExportPlayersSuccessResponse.md +18 -0
  27. data/docs/Filter.md +1 -1
  28. data/docs/FilterExpressions.md +1 -1
  29. data/docs/GenericError.md +18 -0
  30. data/docs/GenericErrorErrorsInner.md +20 -0
  31. data/docs/InlineResponse200.md +2 -8
  32. data/docs/InlineResponse2003.md +18 -0
  33. data/docs/InlineResponse201.md +2 -4
  34. data/docs/InlineResponse202.md +18 -0
  35. data/docs/Notification.md +22 -30
  36. data/docs/NotificationAllOf.md +1 -175
  37. data/docs/{InlineResponse2002.md → NotificationHistorySuccessResponse.md} +2 -2
  38. data/docs/NotificationTarget.md +5 -25
  39. data/docs/NotificationWithMeta.md +21 -29
  40. data/docs/PlatformDeliveryData.md +5 -1
  41. data/docs/PlatformDeliveryDataEmailAllOf.md +30 -0
  42. data/docs/PlatformDeliveryDataSmsAllOf.md +22 -0
  43. data/docs/Player.md +1 -1
  44. data/docs/PlayerNotificationTarget.md +5 -1
  45. data/docs/PlayerNotificationTargetIncludeAliases.md +18 -0
  46. data/docs/PropertiesDeltas.md +22 -0
  47. data/docs/PropertiesObject.md +38 -0
  48. data/docs/Purchase.md +4 -2
  49. data/docs/RateLimiterError.md +18 -0
  50. data/docs/SubscriptionObject.md +50 -0
  51. data/docs/TransferSubscriptionRequestBody.md +18 -0
  52. data/docs/UpdateLiveActivityRequest.md +24 -0
  53. data/docs/UpdateLiveActivitySuccessResponse.md +20 -0
  54. data/docs/{InlineResponse2007.md → UpdatePlayerSuccessResponse.md} +3 -3
  55. data/docs/UpdatePlayerTagsSuccessResponse.md +18 -0
  56. data/docs/UpdateSubscriptionRequestBody.md +18 -0
  57. data/docs/UpdateUserRequest.md +22 -0
  58. data/docs/User.md +24 -0
  59. data/docs/UserIdentityRequestBody.md +18 -0
  60. data/docs/UserIdentityResponse.md +18 -0
  61. data/docs/UserSubscriptionOptions.md +18 -0
  62. data/lib/onesignal/api/default_api.rb +1583 -221
  63. data/lib/onesignal/api_client.rb +2 -2
  64. data/lib/onesignal/api_error.rb +1 -1
  65. data/lib/onesignal/configuration.rb +6 -6
  66. data/lib/onesignal/models/app.rb +57 -7
  67. data/lib/onesignal/models/basic_notification.rb +1442 -0
  68. data/lib/onesignal/models/basic_notification_all_of.rb +1252 -0
  69. data/lib/onesignal/models/{notification_all_of_android_background_layout.rb → basic_notification_all_of_android_background_layout.rb} +4 -4
  70. data/lib/onesignal/models/begin_live_activity_request.rb +238 -0
  71. data/lib/onesignal/models/button.rb +1 -1
  72. data/lib/onesignal/models/cancel_notification_success_response.rb +219 -0
  73. data/lib/onesignal/models/create_notification_success_response.rb +248 -0
  74. data/lib/onesignal/models/{inline_response2005.rb → create_player_success_response.rb} +4 -4
  75. data/lib/onesignal/models/{inline_response4002.rb → create_segment_conflict_response.rb} +4 -4
  76. data/lib/onesignal/models/create_segment_success_response.rb +229 -0
  77. data/lib/onesignal/models/create_subscription_request_body.rb +228 -0
  78. data/lib/onesignal/models/{inline_response4001.rb → create_user_conflict_response.rb} +6 -15
  79. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +237 -0
  80. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +219 -0
  81. data/lib/onesignal/models/delete_player_not_found_response.rb +219 -0
  82. data/lib/onesignal/models/{inline_response2001.rb → delete_player_success_response.rb} +4 -4
  83. data/lib/onesignal/models/delete_segment_not_found_response.rb +219 -0
  84. data/lib/onesignal/models/delete_segment_success_response.rb +219 -0
  85. data/lib/onesignal/models/delivery_data.rb +6 -1
  86. data/lib/onesignal/models/{inline_response2008.rb → export_events_success_response.rb} +4 -4
  87. data/lib/onesignal/models/export_players_request_body.rb +3 -3
  88. data/lib/onesignal/models/export_players_success_response.rb +219 -0
  89. data/lib/onesignal/models/filter.rb +2 -2
  90. data/lib/onesignal/models/filter_expressions.rb +2 -2
  91. data/lib/onesignal/models/{inline_response400.rb → generic_error.rb} +5 -5
  92. data/lib/onesignal/models/generic_error_errors_inner.rb +228 -0
  93. data/lib/onesignal/models/get_notification_request_body.rb +1 -1
  94. data/lib/onesignal/models/inline_response200.rb +10 -46
  95. data/lib/onesignal/models/{inline_response4003.rb → inline_response2003.rb} +12 -12
  96. data/lib/onesignal/models/inline_response201.rb +8 -18
  97. data/lib/onesignal/models/inline_response202.rb +219 -0
  98. data/lib/onesignal/models/invalid_identifier_error.rb +1 -1
  99. data/lib/onesignal/models/notification.rb +173 -141
  100. data/lib/onesignal/models/notification200_errors.rb +1 -1
  101. data/lib/onesignal/models/notification_all_of.rb +6 -929
  102. data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb} +4 -4
  103. data/lib/onesignal/models/notification_slice.rb +1 -1
  104. data/lib/onesignal/models/notification_target.rb +60 -126
  105. data/lib/onesignal/models/notification_with_meta.rb +168 -137
  106. data/lib/onesignal/models/notification_with_meta_all_of.rb +2 -1
  107. data/lib/onesignal/models/operator.rb +1 -1
  108. data/lib/onesignal/models/outcome_data.rb +1 -1
  109. data/lib/onesignal/models/outcomes_data.rb +1 -1
  110. data/lib/onesignal/models/platform_delivery_data.rb +25 -5
  111. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +287 -0
  112. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +243 -0
  113. data/lib/onesignal/models/player.rb +9 -6
  114. data/lib/onesignal/models/player_notification_target.rb +60 -5
  115. data/lib/onesignal/models/player_notification_target_include_aliases.rb +221 -0
  116. data/lib/onesignal/models/player_slice.rb +1 -1
  117. data/lib/onesignal/models/properties_deltas.rb +239 -0
  118. data/lib/onesignal/models/properties_object.rb +313 -0
  119. data/lib/onesignal/models/purchase.rb +15 -6
  120. data/lib/onesignal/models/rate_limiter_error.rb +221 -0
  121. data/lib/onesignal/models/segment.rb +1 -1
  122. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  123. data/lib/onesignal/models/string_map.rb +1 -1
  124. data/lib/onesignal/models/{filter_notification_target.rb → subscription_object.rb} +145 -78
  125. data/lib/onesignal/models/transfer_subscription_request_body.rb +221 -0
  126. data/lib/onesignal/models/update_live_activity_request.rb +309 -0
  127. data/lib/onesignal/models/update_live_activity_success_response.rb +228 -0
  128. data/lib/onesignal/models/{inline_response2007.rb → update_player_success_response.rb} +5 -5
  129. data/lib/onesignal/models/update_player_tags_request_body.rb +1 -1
  130. data/lib/onesignal/models/update_player_tags_success_response.rb +219 -0
  131. data/lib/onesignal/models/update_subscription_request_body.rb +219 -0
  132. data/lib/onesignal/models/update_user_request.rb +239 -0
  133. data/lib/onesignal/models/user.rb +250 -0
  134. data/lib/onesignal/models/user_identity_request_body.rb +221 -0
  135. data/lib/onesignal/models/user_identity_response.rb +221 -0
  136. data/lib/onesignal/models/user_subscription_options.rb +219 -0
  137. data/lib/onesignal/version.rb +2 -2
  138. data/lib/onesignal.rb +43 -12
  139. data/onesignal.gemspec +1 -1
  140. data/spec/api/default_api_spec.rb +249 -12
  141. data/spec/api_client_spec.rb +1 -1
  142. data/spec/configuration_spec.rb +4 -4
  143. data/spec/models/app_spec.rb +25 -1
  144. data/spec/models/{notification_all_of_android_background_layout_spec.rb → basic_notification_all_of_android_background_layout_spec.rb} +7 -7
  145. data/spec/models/basic_notification_all_of_spec.rb +590 -0
  146. data/spec/models/basic_notification_spec.rb +678 -0
  147. data/spec/models/begin_live_activity_request_spec.rb +40 -0
  148. data/spec/models/button_spec.rb +1 -1
  149. data/spec/models/cancel_notification_success_response_spec.rb +34 -0
  150. data/spec/models/create_notification_success_response_spec.rb +52 -0
  151. data/spec/models/{inline_response2005_spec.rb → create_player_success_response_spec.rb} +7 -7
  152. data/spec/models/{inline_response4001_spec.rb → create_segment_conflict_response_spec.rb} +7 -7
  153. data/spec/models/{inline_response4002_spec.rb → create_segment_success_response_spec.rb} +8 -8
  154. data/spec/models/create_subscription_request_body_spec.rb +40 -0
  155. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +46 -0
  156. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +34 -0
  157. data/spec/models/create_user_conflict_response_spec.rb +34 -0
  158. data/spec/models/delete_player_not_found_response_spec.rb +34 -0
  159. data/spec/models/{inline_response2001_spec.rb → delete_player_success_response_spec.rb} +7 -7
  160. data/spec/models/delete_segment_not_found_response_spec.rb +34 -0
  161. data/spec/models/delete_segment_success_response_spec.rb +34 -0
  162. data/spec/models/delivery_data_spec.rb +1 -1
  163. data/spec/models/{inline_response2008_spec.rb → export_events_success_response_spec.rb} +7 -7
  164. data/spec/models/export_players_request_body_spec.rb +1 -1
  165. data/spec/models/export_players_success_response_spec.rb +34 -0
  166. data/spec/models/filter_expressions_spec.rb +1 -1
  167. data/spec/models/filter_spec.rb +1 -1
  168. data/spec/models/generic_error_errors_inner_spec.rb +40 -0
  169. data/spec/models/{inline_response4003_spec.rb → generic_error_spec.rb} +8 -8
  170. data/spec/models/get_notification_request_body_spec.rb +1 -1
  171. data/spec/models/{inline_response2007_spec.rb → inline_response2003_spec.rb} +8 -8
  172. data/spec/models/inline_response200_spec.rb +2 -20
  173. data/spec/models/inline_response201_spec.rb +2 -8
  174. data/spec/models/{inline_response400_spec.rb → inline_response202_spec.rb} +8 -8
  175. data/spec/models/invalid_identifier_error_spec.rb +1 -1
  176. data/spec/models/notification200_errors_spec.rb +1 -1
  177. data/spec/models/notification_all_of_spec.rb +1 -527
  178. data/spec/models/{inline_response2002_spec.rb → notification_history_success_response_spec.rb} +7 -7
  179. data/spec/models/notification_slice_spec.rb +1 -1
  180. data/spec/models/notification_spec.rb +56 -76
  181. data/spec/models/notification_target_spec.rb +17 -73
  182. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  183. data/spec/models/notification_with_meta_spec.rb +56 -76
  184. data/spec/models/operator_spec.rb +1 -1
  185. data/spec/models/outcome_data_spec.rb +1 -1
  186. data/spec/models/outcomes_data_spec.rb +1 -1
  187. data/spec/models/platform_delivery_data_email_all_of_spec.rb +70 -0
  188. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +46 -0
  189. data/spec/models/platform_delivery_data_spec.rb +13 -1
  190. data/spec/models/player_notification_target_include_aliases_spec.rb +34 -0
  191. data/spec/models/player_notification_target_spec.rb +17 -1
  192. data/spec/models/player_slice_spec.rb +1 -1
  193. data/spec/models/player_spec.rb +1 -1
  194. data/spec/models/properties_deltas_spec.rb +46 -0
  195. data/spec/models/{filter_notification_target_spec.rb → properties_object_spec.rb} +18 -24
  196. data/spec/models/purchase_spec.rb +7 -1
  197. data/spec/models/rate_limiter_error_spec.rb +34 -0
  198. data/spec/models/segment_notification_target_spec.rb +1 -1
  199. data/spec/models/segment_spec.rb +1 -1
  200. data/spec/models/string_map_spec.rb +1 -1
  201. data/spec/models/subscription_object_spec.rb +134 -0
  202. data/spec/models/transfer_subscription_request_body_spec.rb +34 -0
  203. data/spec/models/update_live_activity_request_spec.rb +60 -0
  204. data/spec/models/update_live_activity_success_response_spec.rb +40 -0
  205. data/spec/models/update_player_success_response_spec.rb +34 -0
  206. data/spec/models/update_player_tags_request_body_spec.rb +1 -1
  207. data/spec/models/update_player_tags_success_response_spec.rb +34 -0
  208. data/spec/models/update_subscription_request_body_spec.rb +34 -0
  209. data/spec/models/update_user_request_spec.rb +46 -0
  210. data/spec/models/user_identity_request_body_spec.rb +34 -0
  211. data/spec/models/user_identity_response_spec.rb +34 -0
  212. data/spec/models/user_spec.rb +52 -0
  213. data/spec/models/user_subscription_options_spec.rb +34 -0
  214. data/spec/spec_helper.rb +1 -1
  215. metadata +178 -53
  216. data/docs/FilterNotificationTarget.md +0 -40
  217. data/docs/InlineResponse400.md +0 -18
  218. data/docs/InlineResponse4001.md +0 -20
  219. data/docs/InlineResponse4003.md +0 -18
data/docs/DefaultApi.md CHANGED
@@ -1,33 +1,123 @@
1
1
  # OneSignal::DefaultApi
2
2
 
3
- All URIs are relative to *https://onesignal.com/api/v1*
3
+ All URIs are relative to *https://api.onesignal.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**begin_live_activity**](DefaultApi.md#begin_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity |
7
8
  | [**cancel_notification**](DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification |
8
9
  | [**create_app**](DefaultApi.md#create_app) | **POST** /apps | Create an app |
9
10
  | [**create_notification**](DefaultApi.md#create_notification) | **POST** /notifications | Create notification |
10
11
  | [**create_player**](DefaultApi.md#create_player) | **POST** /players | Add a device |
11
12
  | [**create_segments**](DefaultApi.md#create_segments) | **POST** /apps/{app_id}/segments | Create Segments |
13
+ | [**create_subscription**](DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | |
14
+ | [**create_user**](DefaultApi.md#create_user) | **POST** /apps/{app_id}/users | |
15
+ | [**delete_alias**](DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | |
12
16
  | [**delete_player**](DefaultApi.md#delete_player) | **DELETE** /players/{player_id} | Delete a user record |
13
17
  | [**delete_segments**](DefaultApi.md#delete_segments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments |
14
- | [**export_players**](DefaultApi.md#export_players) | **POST** /players/csv_export?app_id={app_id} | CSV export |
18
+ | [**delete_subscription**](DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | |
19
+ | [**delete_user**](DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
20
+ | [**end_live_activity**](DefaultApi.md#end_live_activity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity |
21
+ | [**export_events**](DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events |
22
+ | [**export_players**](DefaultApi.md#export_players) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players |
23
+ | [**fetch_aliases**](DefaultApi.md#fetch_aliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
24
+ | [**fetch_user**](DefaultApi.md#fetch_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
25
+ | [**fetch_user_identity**](DefaultApi.md#fetch_user_identity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
15
26
  | [**get_app**](DefaultApi.md#get_app) | **GET** /apps/{app_id} | View an app |
16
27
  | [**get_apps**](DefaultApi.md#get_apps) | **GET** /apps | View apps |
28
+ | [**get_eligible_iams**](DefaultApi.md#get_eligible_iams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams | |
17
29
  | [**get_notification**](DefaultApi.md#get_notification) | **GET** /notifications/{notification_id} | View notification |
18
30
  | [**get_notification_history**](DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History |
19
31
  | [**get_notifications**](DefaultApi.md#get_notifications) | **GET** /notifications | View notifications |
20
32
  | [**get_outcomes**](DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes |
21
33
  | [**get_player**](DefaultApi.md#get_player) | **GET** /players/{player_id} | View device |
22
34
  | [**get_players**](DefaultApi.md#get_players) | **GET** /players | View devices |
35
+ | [**identify_user_by_alias**](DefaultApi.md#identify_user_by_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
36
+ | [**identify_user_by_subscription_id**](DefaultApi.md#identify_user_by_subscription_id) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
37
+ | [**transfer_subscription**](DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | |
23
38
  | [**update_app**](DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app |
39
+ | [**update_live_activity**](DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push |
24
40
  | [**update_player**](DefaultApi.md#update_player) | **PUT** /players/{player_id} | Edit device |
25
41
  | [**update_player_tags**](DefaultApi.md#update_player_tags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id |
42
+ | [**update_subscription**](DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | |
43
+ | [**update_user**](DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
44
+
45
+
46
+ ## begin_live_activity
47
+
48
+ > begin_live_activity(app_id, activity_id, begin_live_activity_request)
49
+
50
+ Start Live Activity
51
+
52
+ Starts a Live Activity
53
+
54
+ ### Examples
55
+
56
+ ```ruby
57
+ require 'onesignal'
58
+ # setup authorization
59
+ OneSignal.configure do |config|
60
+ # Configure Bearer authorization: app_key
61
+ config.app_key = 'YOUR_BEARER_TOKEN'
62
+
63
+ end
64
+
65
+ api_instance = OneSignal::DefaultApi.new
66
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
67
+ activity_id = 'activity_id_example' # String | Live Activity record ID
68
+ begin_live_activity_request = OneSignal::BeginLiveActivityRequest.new({push_token: 'push_token_example', subscription_id: 'subscription_id_example'}) # BeginLiveActivityRequest |
69
+
70
+ begin
71
+ # Start Live Activity
72
+ api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
73
+ rescue OneSignal::ApiError => e
74
+ puts "Error when calling DefaultApi->begin_live_activity: #{e}"
75
+ end
76
+ ```
77
+
78
+ #### Using the begin_live_activity_with_http_info variant
79
+
80
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
81
+
82
+ > <Array(nil, Integer, Hash)> begin_live_activity_with_http_info(app_id, activity_id, begin_live_activity_request)
83
+
84
+ ```ruby
85
+ begin
86
+ # Start Live Activity
87
+ data, status_code, headers = api_instance.begin_live_activity_with_http_info(app_id, activity_id, begin_live_activity_request)
88
+ p status_code # => 2xx
89
+ p headers # => { ... }
90
+ p data # => nil
91
+ rescue OneSignal::ApiError => e
92
+ puts "Error when calling DefaultApi->begin_live_activity_with_http_info: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+ | Name | Type | Description | Notes |
99
+ | ---- | ---- | ----------- | ----- |
100
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
101
+ | **activity_id** | **String** | Live Activity record ID | |
102
+ | **begin_live_activity_request** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | |
103
+
104
+ ### Return type
105
+
106
+ nil (empty response body)
107
+
108
+ ### Authorization
109
+
110
+ [app_key](../README.md#app_key)
111
+
112
+ ### HTTP request headers
113
+
114
+ - **Content-Type**: application/json
115
+ - **Accept**: application/json
26
116
 
27
117
 
28
118
  ## cancel_notification
29
119
 
30
- > <InlineResponse2001> cancel_notification(app_id, notification_id)
120
+ > <CancelNotificationSuccessResponse> cancel_notification(app_id, notification_id)
31
121
 
32
122
  Stop a scheduled or currently outgoing notification
33
123
 
@@ -61,7 +151,7 @@ end
61
151
 
62
152
  This returns an Array which contains the response data, status code and headers.
63
153
 
64
- > <Array(<InlineResponse2001>, Integer, Hash)> cancel_notification_with_http_info(app_id, notification_id)
154
+ > <Array(<CancelNotificationSuccessResponse>, Integer, Hash)> cancel_notification_with_http_info(app_id, notification_id)
65
155
 
66
156
  ```ruby
67
157
  begin
@@ -69,7 +159,7 @@ begin
69
159
  data, status_code, headers = api_instance.cancel_notification_with_http_info(app_id, notification_id)
70
160
  p status_code # => 2xx
71
161
  p headers # => { ... }
72
- p data # => <InlineResponse2001>
162
+ p data # => <CancelNotificationSuccessResponse>
73
163
  rescue OneSignal::ApiError => e
74
164
  puts "Error when calling DefaultApi->cancel_notification_with_http_info: #{e}"
75
165
  end
@@ -84,7 +174,7 @@ end
84
174
 
85
175
  ### Return type
86
176
 
87
- [**InlineResponse2001**](InlineResponse2001.md)
177
+ [**CancelNotificationSuccessResponse**](CancelNotificationSuccessResponse.md)
88
178
 
89
179
  ### Authorization
90
180
 
@@ -116,7 +206,7 @@ OneSignal.configure do |config|
116
206
  end
117
207
 
118
208
  api_instance = OneSignal::DefaultApi.new
119
- app = OneSignal::App.new({id: 'id_example'}) # App |
209
+ app = OneSignal::App.new # App |
120
210
 
121
211
  begin
122
212
  # Create an app
@@ -167,7 +257,7 @@ end
167
257
 
168
258
  ## create_notification
169
259
 
170
- > <InlineResponse200> create_notification(notification)
260
+ > <CreateNotificationSuccessResponse> create_notification(notification)
171
261
 
172
262
  Create notification
173
263
 
@@ -200,7 +290,7 @@ end
200
290
 
201
291
  This returns an Array which contains the response data, status code and headers.
202
292
 
203
- > <Array(<InlineResponse200>, Integer, Hash)> create_notification_with_http_info(notification)
293
+ > <Array(<CreateNotificationSuccessResponse>, Integer, Hash)> create_notification_with_http_info(notification)
204
294
 
205
295
  ```ruby
206
296
  begin
@@ -208,7 +298,7 @@ begin
208
298
  data, status_code, headers = api_instance.create_notification_with_http_info(notification)
209
299
  p status_code # => 2xx
210
300
  p headers # => { ... }
211
- p data # => <InlineResponse200>
301
+ p data # => <CreateNotificationSuccessResponse>
212
302
  rescue OneSignal::ApiError => e
213
303
  puts "Error when calling DefaultApi->create_notification_with_http_info: #{e}"
214
304
  end
@@ -222,7 +312,7 @@ end
222
312
 
223
313
  ### Return type
224
314
 
225
- [**InlineResponse200**](InlineResponse200.md)
315
+ [**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md)
226
316
 
227
317
  ### Authorization
228
318
 
@@ -236,7 +326,7 @@ end
236
326
 
237
327
  ## create_player
238
328
 
239
- > <InlineResponse2005> create_player(player)
329
+ > <CreatePlayerSuccessResponse> create_player(player)
240
330
 
241
331
  Add a device
242
332
 
@@ -254,7 +344,7 @@ OneSignal.configure do |config|
254
344
  end
255
345
 
256
346
  api_instance = OneSignal::DefaultApi.new
257
- player = OneSignal::Player.new({id: 'id_example', device_type: 37}) # Player |
347
+ player = OneSignal::Player.new({device_type: 37}) # Player |
258
348
 
259
349
  begin
260
350
  # Add a device
@@ -269,7 +359,7 @@ end
269
359
 
270
360
  This returns an Array which contains the response data, status code and headers.
271
361
 
272
- > <Array(<InlineResponse2005>, Integer, Hash)> create_player_with_http_info(player)
362
+ > <Array(<CreatePlayerSuccessResponse>, Integer, Hash)> create_player_with_http_info(player)
273
363
 
274
364
  ```ruby
275
365
  begin
@@ -277,7 +367,7 @@ begin
277
367
  data, status_code, headers = api_instance.create_player_with_http_info(player)
278
368
  p status_code # => 2xx
279
369
  p headers # => { ... }
280
- p data # => <InlineResponse2005>
370
+ p data # => <CreatePlayerSuccessResponse>
281
371
  rescue OneSignal::ApiError => e
282
372
  puts "Error when calling DefaultApi->create_player_with_http_info: #{e}"
283
373
  end
@@ -291,7 +381,7 @@ end
291
381
 
292
382
  ### Return type
293
383
 
294
- [**InlineResponse2005**](InlineResponse2005.md)
384
+ [**CreatePlayerSuccessResponse**](CreatePlayerSuccessResponse.md)
295
385
 
296
386
  ### Authorization
297
387
 
@@ -305,7 +395,7 @@ end
305
395
 
306
396
  ## create_segments
307
397
 
308
- > <InlineResponse201> create_segments(app_id, opts)
398
+ > <CreateSegmentSuccessResponse> create_segments(app_id, opts)
309
399
 
310
400
  Create Segments
311
401
 
@@ -341,7 +431,7 @@ end
341
431
 
342
432
  This returns an Array which contains the response data, status code and headers.
343
433
 
344
- > <Array(<InlineResponse201>, Integer, Hash)> create_segments_with_http_info(app_id, opts)
434
+ > <Array(<CreateSegmentSuccessResponse>, Integer, Hash)> create_segments_with_http_info(app_id, opts)
345
435
 
346
436
  ```ruby
347
437
  begin
@@ -349,7 +439,7 @@ begin
349
439
  data, status_code, headers = api_instance.create_segments_with_http_info(app_id, opts)
350
440
  p status_code # => 2xx
351
441
  p headers # => { ... }
352
- p data # => <InlineResponse201>
442
+ p data # => <CreateSegmentSuccessResponse>
353
443
  rescue OneSignal::ApiError => e
354
444
  puts "Error when calling DefaultApi->create_segments_with_http_info: #{e}"
355
445
  end
@@ -364,7 +454,7 @@ end
364
454
 
365
455
  ### Return type
366
456
 
367
- [**InlineResponse201**](InlineResponse201.md)
457
+ [**CreateSegmentSuccessResponse**](CreateSegmentSuccessResponse.md)
368
458
 
369
459
  ### Authorization
370
460
 
@@ -376,13 +466,13 @@ end
376
466
  - **Accept**: application/json
377
467
 
378
468
 
379
- ## delete_player
469
+ ## create_subscription
380
470
 
381
- > <InlineResponse2007> delete_player(app_id, player_id)
471
+ > <InlineResponse201> create_subscription(app_id, alias_label, alias_id, create_subscription_request_body)
382
472
 
383
- Delete a user record
384
473
 
385
- Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
474
+
475
+ Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
386
476
 
387
477
  ### Examples
388
478
 
@@ -396,33 +486,35 @@ OneSignal.configure do |config|
396
486
  end
397
487
 
398
488
  api_instance = OneSignal::DefaultApi.new
399
- app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
400
- player_id = 'player_id_example' # String | The OneSignal player_id
489
+ app_id = 'app_id_example' # String |
490
+ alias_label = 'alias_label_example' # String |
491
+ alias_id = 'alias_id_example' # String |
492
+ create_subscription_request_body = OneSignal::CreateSubscriptionRequestBody.new # CreateSubscriptionRequestBody |
401
493
 
402
494
  begin
403
- # Delete a user record
404
- result = api_instance.delete_player(app_id, player_id)
495
+
496
+ result = api_instance.create_subscription(app_id, alias_label, alias_id, create_subscription_request_body)
405
497
  p result
406
498
  rescue OneSignal::ApiError => e
407
- puts "Error when calling DefaultApi->delete_player: #{e}"
499
+ puts "Error when calling DefaultApi->create_subscription: #{e}"
408
500
  end
409
501
  ```
410
502
 
411
- #### Using the delete_player_with_http_info variant
503
+ #### Using the create_subscription_with_http_info variant
412
504
 
413
505
  This returns an Array which contains the response data, status code and headers.
414
506
 
415
- > <Array(<InlineResponse2007>, Integer, Hash)> delete_player_with_http_info(app_id, player_id)
507
+ > <Array(<InlineResponse201>, Integer, Hash)> create_subscription_with_http_info(app_id, alias_label, alias_id, create_subscription_request_body)
416
508
 
417
509
  ```ruby
418
510
  begin
419
- # Delete a user record
420
- data, status_code, headers = api_instance.delete_player_with_http_info(app_id, player_id)
511
+
512
+ data, status_code, headers = api_instance.create_subscription_with_http_info(app_id, alias_label, alias_id, create_subscription_request_body)
421
513
  p status_code # => 2xx
422
514
  p headers # => { ... }
423
- p data # => <InlineResponse2007>
515
+ p data # => <InlineResponse201>
424
516
  rescue OneSignal::ApiError => e
425
- puts "Error when calling DefaultApi->delete_player_with_http_info: #{e}"
517
+ puts "Error when calling DefaultApi->create_subscription_with_http_info: #{e}"
426
518
  end
427
519
  ```
428
520
 
@@ -430,12 +522,14 @@ end
430
522
 
431
523
  | Name | Type | Description | Notes |
432
524
  | ---- | ---- | ----------- | ----- |
433
- | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
434
- | **player_id** | **String** | The OneSignal player_id | |
525
+ | **app_id** | **String** | | |
526
+ | **alias_label** | **String** | | |
527
+ | **alias_id** | **String** | | |
528
+ | **create_subscription_request_body** | [**CreateSubscriptionRequestBody**](CreateSubscriptionRequestBody.md) | | |
435
529
 
436
530
  ### Return type
437
531
 
438
- [**InlineResponse2007**](InlineResponse2007.md)
532
+ [**InlineResponse201**](InlineResponse201.md)
439
533
 
440
534
  ### Authorization
441
535
 
@@ -443,17 +537,17 @@ end
443
537
 
444
538
  ### HTTP request headers
445
539
 
446
- - **Content-Type**: Not defined
540
+ - **Content-Type**: application/json
447
541
  - **Accept**: application/json
448
542
 
449
543
 
450
- ## delete_segments
544
+ ## create_user
451
545
 
452
- > <InlineResponse2001> delete_segments(app_id, segment_id)
546
+ > <User> create_user(app_id, user)
453
547
 
454
- Delete Segments
455
548
 
456
- Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
549
+
550
+ Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
457
551
 
458
552
  ### Examples
459
553
 
@@ -467,33 +561,33 @@ OneSignal.configure do |config|
467
561
  end
468
562
 
469
563
  api_instance = OneSignal::DefaultApi.new
470
- app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
471
- segment_id = 'segment_id_example' # String | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
564
+ app_id = 'app_id_example' # String |
565
+ user = OneSignal::User.new # User |
472
566
 
473
567
  begin
474
- # Delete Segments
475
- result = api_instance.delete_segments(app_id, segment_id)
568
+
569
+ result = api_instance.create_user(app_id, user)
476
570
  p result
477
571
  rescue OneSignal::ApiError => e
478
- puts "Error when calling DefaultApi->delete_segments: #{e}"
572
+ puts "Error when calling DefaultApi->create_user: #{e}"
479
573
  end
480
574
  ```
481
575
 
482
- #### Using the delete_segments_with_http_info variant
576
+ #### Using the create_user_with_http_info variant
483
577
 
484
578
  This returns an Array which contains the response data, status code and headers.
485
579
 
486
- > <Array(<InlineResponse2001>, Integer, Hash)> delete_segments_with_http_info(app_id, segment_id)
580
+ > <Array(<User>, Integer, Hash)> create_user_with_http_info(app_id, user)
487
581
 
488
582
  ```ruby
489
583
  begin
490
- # Delete Segments
491
- data, status_code, headers = api_instance.delete_segments_with_http_info(app_id, segment_id)
584
+
585
+ data, status_code, headers = api_instance.create_user_with_http_info(app_id, user)
492
586
  p status_code # => 2xx
493
587
  p headers # => { ... }
494
- p data # => <InlineResponse2001>
588
+ p data # => <User>
495
589
  rescue OneSignal::ApiError => e
496
- puts "Error when calling DefaultApi->delete_segments_with_http_info: #{e}"
590
+ puts "Error when calling DefaultApi->create_user_with_http_info: #{e}"
497
591
  end
498
592
  ```
499
593
 
@@ -501,12 +595,12 @@ end
501
595
 
502
596
  | Name | Type | Description | Notes |
503
597
  | ---- | ---- | ----------- | ----- |
504
- | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
505
- | **segment_id** | **String** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | |
598
+ | **app_id** | **String** | | |
599
+ | **user** | [**User**](User.md) | | |
506
600
 
507
601
  ### Return type
508
602
 
509
- [**InlineResponse2001**](InlineResponse2001.md)
603
+ [**User**](User.md)
510
604
 
511
605
  ### Authorization
512
606
 
@@ -514,17 +608,17 @@ end
514
608
 
515
609
  ### HTTP request headers
516
610
 
517
- - **Content-Type**: Not defined
611
+ - **Content-Type**: application/json
518
612
  - **Accept**: application/json
519
613
 
520
614
 
521
- ## export_players
615
+ ## delete_alias
522
616
 
523
- > <InlineResponse2008> export_players(app_id, opts)
617
+ > <InlineResponse200> delete_alias(app_id, alias_label, alias_id, alias_label_to_delete)
524
618
 
525
- CSV export
526
619
 
527
- 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. |
620
+
621
+ Deletes an alias by alias label
528
622
 
529
623
  ### Examples
530
624
 
@@ -538,35 +632,35 @@ OneSignal.configure do |config|
538
632
  end
539
633
 
540
634
  api_instance = OneSignal::DefaultApi.new
541
- app_id = 'app_id_example' # String | The app ID that you want to export devices from
542
- opts = {
543
- export_players_request_body: OneSignal::ExportPlayersRequestBody.new # ExportPlayersRequestBody |
544
- }
635
+ app_id = 'app_id_example' # String |
636
+ alias_label = 'alias_label_example' # String |
637
+ alias_id = 'alias_id_example' # String |
638
+ alias_label_to_delete = 'alias_label_to_delete_example' # String |
545
639
 
546
640
  begin
547
- # CSV export
548
- result = api_instance.export_players(app_id, opts)
641
+
642
+ result = api_instance.delete_alias(app_id, alias_label, alias_id, alias_label_to_delete)
549
643
  p result
550
644
  rescue OneSignal::ApiError => e
551
- puts "Error when calling DefaultApi->export_players: #{e}"
645
+ puts "Error when calling DefaultApi->delete_alias: #{e}"
552
646
  end
553
647
  ```
554
648
 
555
- #### Using the export_players_with_http_info variant
649
+ #### Using the delete_alias_with_http_info variant
556
650
 
557
651
  This returns an Array which contains the response data, status code and headers.
558
652
 
559
- > <Array(<InlineResponse2008>, Integer, Hash)> export_players_with_http_info(app_id, opts)
653
+ > <Array(<InlineResponse200>, Integer, Hash)> delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete)
560
654
 
561
655
  ```ruby
562
656
  begin
563
- # CSV export
564
- data, status_code, headers = api_instance.export_players_with_http_info(app_id, opts)
657
+
658
+ data, status_code, headers = api_instance.delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete)
565
659
  p status_code # => 2xx
566
660
  p headers # => { ... }
567
- p data # => <InlineResponse2008>
661
+ p data # => <InlineResponse200>
568
662
  rescue OneSignal::ApiError => e
569
- puts "Error when calling DefaultApi->export_players_with_http_info: #{e}"
663
+ puts "Error when calling DefaultApi->delete_alias_with_http_info: #{e}"
570
664
  end
571
665
  ```
572
666
 
@@ -574,12 +668,14 @@ end
574
668
 
575
669
  | Name | Type | Description | Notes |
576
670
  | ---- | ---- | ----------- | ----- |
577
- | **app_id** | **String** | The app ID that you want to export devices from | |
578
- | **export_players_request_body** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | [optional] |
671
+ | **app_id** | **String** | | |
672
+ | **alias_label** | **String** | | |
673
+ | **alias_id** | **String** | | |
674
+ | **alias_label_to_delete** | **String** | | |
579
675
 
580
676
  ### Return type
581
677
 
582
- [**InlineResponse2008**](InlineResponse2008.md)
678
+ [**InlineResponse200**](InlineResponse200.md)
583
679
 
584
680
  ### Authorization
585
681
 
@@ -587,17 +683,17 @@ end
587
683
 
588
684
  ### HTTP request headers
589
685
 
590
- - **Content-Type**: application/json
686
+ - **Content-Type**: Not defined
591
687
  - **Accept**: application/json
592
688
 
593
689
 
594
- ## get_app
690
+ ## delete_player
595
691
 
596
- > <App> get_app(app_id)
692
+ > <DeletePlayerSuccessResponse> delete_player(app_id, player_id)
597
693
 
598
- View an app
694
+ Delete a user record
599
695
 
600
- View the details of a single OneSignal app
696
+ Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
601
697
 
602
698
  ### Examples
603
699
 
@@ -605,38 +701,39 @@ View the details of a single OneSignal app
605
701
  require 'onesignal'
606
702
  # setup authorization
607
703
  OneSignal.configure do |config|
608
- # Configure Bearer authorization: user_key
609
- config.user_key = 'YOUR_BEARER_TOKEN'
704
+ # Configure Bearer authorization: app_key
705
+ config.app_key = 'YOUR_BEARER_TOKEN'
610
706
 
611
707
  end
612
708
 
613
709
  api_instance = OneSignal::DefaultApi.new
614
- app_id = 'app_id_example' # String | An app id
710
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
711
+ player_id = 'player_id_example' # String | The OneSignal player_id
615
712
 
616
713
  begin
617
- # View an app
618
- result = api_instance.get_app(app_id)
714
+ # Delete a user record
715
+ result = api_instance.delete_player(app_id, player_id)
619
716
  p result
620
717
  rescue OneSignal::ApiError => e
621
- puts "Error when calling DefaultApi->get_app: #{e}"
718
+ puts "Error when calling DefaultApi->delete_player: #{e}"
622
719
  end
623
720
  ```
624
721
 
625
- #### Using the get_app_with_http_info variant
722
+ #### Using the delete_player_with_http_info variant
626
723
 
627
724
  This returns an Array which contains the response data, status code and headers.
628
725
 
629
- > <Array(<App>, Integer, Hash)> get_app_with_http_info(app_id)
726
+ > <Array(<DeletePlayerSuccessResponse>, Integer, Hash)> delete_player_with_http_info(app_id, player_id)
630
727
 
631
728
  ```ruby
632
729
  begin
633
- # View an app
634
- data, status_code, headers = api_instance.get_app_with_http_info(app_id)
730
+ # Delete a user record
731
+ data, status_code, headers = api_instance.delete_player_with_http_info(app_id, player_id)
635
732
  p status_code # => 2xx
636
733
  p headers # => { ... }
637
- p data # => <App>
734
+ p data # => <DeletePlayerSuccessResponse>
638
735
  rescue OneSignal::ApiError => e
639
- puts "Error when calling DefaultApi->get_app_with_http_info: #{e}"
736
+ puts "Error when calling DefaultApi->delete_player_with_http_info: #{e}"
640
737
  end
641
738
  ```
642
739
 
@@ -644,15 +741,16 @@ end
644
741
 
645
742
  | Name | Type | Description | Notes |
646
743
  | ---- | ---- | ----------- | ----- |
647
- | **app_id** | **String** | An app id | |
744
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
745
+ | **player_id** | **String** | The OneSignal player_id | |
648
746
 
649
747
  ### Return type
650
748
 
651
- [**App**](App.md)
749
+ [**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md)
652
750
 
653
751
  ### Authorization
654
752
 
655
- [user_key](../README.md#user_key)
753
+ [app_key](../README.md#app_key)
656
754
 
657
755
  ### HTTP request headers
658
756
 
@@ -660,13 +758,13 @@ end
660
758
  - **Accept**: application/json
661
759
 
662
760
 
663
- ## get_apps
761
+ ## delete_segments
664
762
 
665
- > <Array<App>> get_apps
763
+ > <DeleteSegmentSuccessResponse> delete_segments(app_id, segment_id)
666
764
 
667
- View apps
765
+ Delete Segments
668
766
 
669
- View the details of all of your current OneSignal apps
767
+ Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
670
768
 
671
769
  ### Examples
672
770
 
@@ -674,51 +772,56 @@ View the details of all of your current OneSignal apps
674
772
  require 'onesignal'
675
773
  # setup authorization
676
774
  OneSignal.configure do |config|
677
- # Configure Bearer authorization: user_key
678
- config.user_key = 'YOUR_BEARER_TOKEN'
775
+ # Configure Bearer authorization: app_key
776
+ config.app_key = 'YOUR_BEARER_TOKEN'
679
777
 
680
778
  end
681
779
 
682
780
  api_instance = OneSignal::DefaultApi.new
781
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
782
+ segment_id = 'segment_id_example' # String | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
683
783
 
684
784
  begin
685
- # View apps
686
- result = api_instance.get_apps
785
+ # Delete Segments
786
+ result = api_instance.delete_segments(app_id, segment_id)
687
787
  p result
688
788
  rescue OneSignal::ApiError => e
689
- puts "Error when calling DefaultApi->get_apps: #{e}"
789
+ puts "Error when calling DefaultApi->delete_segments: #{e}"
690
790
  end
691
791
  ```
692
792
 
693
- #### Using the get_apps_with_http_info variant
793
+ #### Using the delete_segments_with_http_info variant
694
794
 
695
795
  This returns an Array which contains the response data, status code and headers.
696
796
 
697
- > <Array(<Array<App>>, Integer, Hash)> get_apps_with_http_info
797
+ > <Array(<DeleteSegmentSuccessResponse>, Integer, Hash)> delete_segments_with_http_info(app_id, segment_id)
698
798
 
699
799
  ```ruby
700
800
  begin
701
- # View apps
702
- data, status_code, headers = api_instance.get_apps_with_http_info
801
+ # Delete Segments
802
+ data, status_code, headers = api_instance.delete_segments_with_http_info(app_id, segment_id)
703
803
  p status_code # => 2xx
704
804
  p headers # => { ... }
705
- p data # => <Array<App>>
805
+ p data # => <DeleteSegmentSuccessResponse>
706
806
  rescue OneSignal::ApiError => e
707
- puts "Error when calling DefaultApi->get_apps_with_http_info: #{e}"
807
+ puts "Error when calling DefaultApi->delete_segments_with_http_info: #{e}"
708
808
  end
709
809
  ```
710
810
 
711
811
  ### Parameters
712
812
 
713
- This endpoint does not need any parameter.
813
+ | Name | Type | Description | Notes |
814
+ | ---- | ---- | ----------- | ----- |
815
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
816
+ | **segment_id** | **String** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | |
714
817
 
715
818
  ### Return type
716
819
 
717
- [**Array&lt;App&gt;**](App.md)
820
+ [**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md)
718
821
 
719
822
  ### Authorization
720
823
 
721
- [user_key](../README.md#user_key)
824
+ [app_key](../README.md#app_key)
722
825
 
723
826
  ### HTTP request headers
724
827
 
@@ -726,13 +829,13 @@ This endpoint does not need any parameter.
726
829
  - **Accept**: application/json
727
830
 
728
831
 
729
- ## get_notification
832
+ ## delete_subscription
730
833
 
731
- > <NotificationWithMeta> get_notification(app_id, notification_id)
834
+ > delete_subscription(app_id, subscription_id)
732
835
 
733
- View notification
734
836
 
735
- View the details of a single notification and outcomes associated with it
837
+
838
+ Deletes the Subscription.
736
839
 
737
840
  ### Examples
738
841
 
@@ -747,32 +850,31 @@ end
747
850
 
748
851
  api_instance = OneSignal::DefaultApi.new
749
852
  app_id = 'app_id_example' # String |
750
- notification_id = 'notification_id_example' # String |
853
+ subscription_id = 'subscription_id_example' # String |
751
854
 
752
855
  begin
753
- # View notification
754
- result = api_instance.get_notification(app_id, notification_id)
755
- p result
856
+
857
+ api_instance.delete_subscription(app_id, subscription_id)
756
858
  rescue OneSignal::ApiError => e
757
- puts "Error when calling DefaultApi->get_notification: #{e}"
859
+ puts "Error when calling DefaultApi->delete_subscription: #{e}"
758
860
  end
759
861
  ```
760
862
 
761
- #### Using the get_notification_with_http_info variant
863
+ #### Using the delete_subscription_with_http_info variant
762
864
 
763
- This returns an Array which contains the response data, status code and headers.
865
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
764
866
 
765
- > <Array(<NotificationWithMeta>, Integer, Hash)> get_notification_with_http_info(app_id, notification_id)
867
+ > <Array(nil, Integer, Hash)> delete_subscription_with_http_info(app_id, subscription_id)
766
868
 
767
869
  ```ruby
768
870
  begin
769
- # View notification
770
- data, status_code, headers = api_instance.get_notification_with_http_info(app_id, notification_id)
871
+
872
+ data, status_code, headers = api_instance.delete_subscription_with_http_info(app_id, subscription_id)
771
873
  p status_code # => 2xx
772
874
  p headers # => { ... }
773
- p data # => <NotificationWithMeta>
875
+ p data # => nil
774
876
  rescue OneSignal::ApiError => e
775
- puts "Error when calling DefaultApi->get_notification_with_http_info: #{e}"
877
+ puts "Error when calling DefaultApi->delete_subscription_with_http_info: #{e}"
776
878
  end
777
879
  ```
778
880
 
@@ -781,11 +883,11 @@ end
781
883
  | Name | Type | Description | Notes |
782
884
  | ---- | ---- | ----------- | ----- |
783
885
  | **app_id** | **String** | | |
784
- | **notification_id** | **String** | | |
886
+ | **subscription_id** | **String** | | |
785
887
 
786
888
  ### Return type
787
889
 
788
- [**NotificationWithMeta**](NotificationWithMeta.md)
890
+ nil (empty response body)
789
891
 
790
892
  ### Authorization
791
893
 
@@ -797,13 +899,13 @@ end
797
899
  - **Accept**: application/json
798
900
 
799
901
 
800
- ## get_notification_history
902
+ ## delete_user
801
903
 
802
- > <InlineResponse2002> get_notification_history(notification_id, get_notification_request_body)
904
+ > delete_user(app_id, alias_label, alias_id)
803
905
 
804
- Notification History
805
906
 
806
- -> 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.
907
+
908
+ Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
807
909
 
808
910
  ### Examples
809
911
 
@@ -817,33 +919,33 @@ OneSignal.configure do |config|
817
919
  end
818
920
 
819
921
  api_instance = OneSignal::DefaultApi.new
820
- notification_id = 'notification_id_example' # String | The \"id\" of the message found in the Notification object
821
- get_notification_request_body = OneSignal::GetNotificationRequestBody.new # GetNotificationRequestBody |
922
+ app_id = 'app_id_example' # String |
923
+ alias_label = 'alias_label_example' # String |
924
+ alias_id = 'alias_id_example' # String |
822
925
 
823
926
  begin
824
- # Notification History
825
- result = api_instance.get_notification_history(notification_id, get_notification_request_body)
826
- p result
927
+
928
+ api_instance.delete_user(app_id, alias_label, alias_id)
827
929
  rescue OneSignal::ApiError => e
828
- puts "Error when calling DefaultApi->get_notification_history: #{e}"
930
+ puts "Error when calling DefaultApi->delete_user: #{e}"
829
931
  end
830
932
  ```
831
933
 
832
- #### Using the get_notification_history_with_http_info variant
934
+ #### Using the delete_user_with_http_info variant
833
935
 
834
- This returns an Array which contains the response data, status code and headers.
936
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
835
937
 
836
- > <Array(<InlineResponse2002>, Integer, Hash)> get_notification_history_with_http_info(notification_id, get_notification_request_body)
938
+ > <Array(nil, Integer, Hash)> delete_user_with_http_info(app_id, alias_label, alias_id)
837
939
 
838
940
  ```ruby
839
941
  begin
840
- # Notification History
841
- data, status_code, headers = api_instance.get_notification_history_with_http_info(notification_id, get_notification_request_body)
942
+
943
+ data, status_code, headers = api_instance.delete_user_with_http_info(app_id, alias_label, alias_id)
842
944
  p status_code # => 2xx
843
945
  p headers # => { ... }
844
- p data # => <InlineResponse2002>
946
+ p data # => nil
845
947
  rescue OneSignal::ApiError => e
846
- puts "Error when calling DefaultApi->get_notification_history_with_http_info: #{e}"
948
+ puts "Error when calling DefaultApi->delete_user_with_http_info: #{e}"
847
949
  end
848
950
  ```
849
951
 
@@ -851,12 +953,13 @@ end
851
953
 
852
954
  | Name | Type | Description | Notes |
853
955
  | ---- | ---- | ----------- | ----- |
854
- | **notification_id** | **String** | The \&quot;id\&quot; of the message found in the Notification object | |
855
- | **get_notification_request_body** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | |
956
+ | **app_id** | **String** | | |
957
+ | **alias_label** | **String** | | |
958
+ | **alias_id** | **String** | | |
856
959
 
857
960
  ### Return type
858
961
 
859
- [**InlineResponse2002**](InlineResponse2002.md)
962
+ nil (empty response body)
860
963
 
861
964
  ### Authorization
862
965
 
@@ -864,17 +967,17 @@ end
864
967
 
865
968
  ### HTTP request headers
866
969
 
867
- - **Content-Type**: application/json
970
+ - **Content-Type**: Not defined
868
971
  - **Accept**: application/json
869
972
 
870
973
 
871
- ## get_notifications
974
+ ## end_live_activity
872
975
 
873
- > <NotificationSlice> get_notifications(app_id, opts)
976
+ > end_live_activity(app_id, activity_id, subscription_id)
874
977
 
875
- View notifications
978
+ Stop Live Activity
876
979
 
877
- View the details of multiple notifications
980
+ Stops a Live Activity
878
981
 
879
982
  ### Examples
880
983
 
@@ -888,37 +991,33 @@ OneSignal.configure do |config|
888
991
  end
889
992
 
890
993
  api_instance = OneSignal::DefaultApi.new
891
- app_id = 'app_id_example' # String | The app ID that you want to view notifications from
892
- opts = {
893
- limit: 56, # Integer | How many notifications to return. Max is 50. Default is 50.
894
- offset: 56, # Integer | 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.
895
- kind: 0 # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
896
- }
994
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
995
+ activity_id = 'activity_id_example' # String | Live Activity record ID
996
+ subscription_id = 'subscription_id_example' # String | Subscription ID
897
997
 
898
998
  begin
899
- # View notifications
900
- result = api_instance.get_notifications(app_id, opts)
901
- p result
999
+ # Stop Live Activity
1000
+ api_instance.end_live_activity(app_id, activity_id, subscription_id)
902
1001
  rescue OneSignal::ApiError => e
903
- puts "Error when calling DefaultApi->get_notifications: #{e}"
1002
+ puts "Error when calling DefaultApi->end_live_activity: #{e}"
904
1003
  end
905
1004
  ```
906
1005
 
907
- #### Using the get_notifications_with_http_info variant
1006
+ #### Using the end_live_activity_with_http_info variant
908
1007
 
909
- This returns an Array which contains the response data, status code and headers.
1008
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
910
1009
 
911
- > <Array(<NotificationSlice>, Integer, Hash)> get_notifications_with_http_info(app_id, opts)
1010
+ > <Array(nil, Integer, Hash)> end_live_activity_with_http_info(app_id, activity_id, subscription_id)
912
1011
 
913
1012
  ```ruby
914
1013
  begin
915
- # View notifications
916
- data, status_code, headers = api_instance.get_notifications_with_http_info(app_id, opts)
1014
+ # Stop Live Activity
1015
+ data, status_code, headers = api_instance.end_live_activity_with_http_info(app_id, activity_id, subscription_id)
917
1016
  p status_code # => 2xx
918
1017
  p headers # => { ... }
919
- p data # => <NotificationSlice>
1018
+ p data # => nil
920
1019
  rescue OneSignal::ApiError => e
921
- puts "Error when calling DefaultApi->get_notifications_with_http_info: #{e}"
1020
+ puts "Error when calling DefaultApi->end_live_activity_with_http_info: #{e}"
922
1021
  end
923
1022
  ```
924
1023
 
@@ -926,14 +1025,1030 @@ end
926
1025
 
927
1026
  | Name | Type | Description | Notes |
928
1027
  | ---- | ---- | ----------- | ----- |
929
- | **app_id** | **String** | The app ID that you want to view notifications from | |
930
- | **limit** | **Integer** | How many notifications to return. Max is 50. Default is 50. | [optional] |
931
- | **offset** | **Integer** | 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. | [optional] |
932
- | **kind** | **Integer** | Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only | [optional] |
1028
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
1029
+ | **activity_id** | **String** | Live Activity record ID | |
1030
+ | **subscription_id** | **String** | Subscription ID | |
1031
+
1032
+ ### Return type
1033
+
1034
+ nil (empty response body)
1035
+
1036
+ ### Authorization
1037
+
1038
+ [app_key](../README.md#app_key)
1039
+
1040
+ ### HTTP request headers
1041
+
1042
+ - **Content-Type**: Not defined
1043
+ - **Accept**: application/json
1044
+
1045
+
1046
+ ## export_events
1047
+
1048
+ > <ExportEventsSuccessResponse> export_events(notification_id, app_id)
1049
+
1050
+ Export CSV of Events
1051
+
1052
+ Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
1053
+
1054
+ ### Examples
1055
+
1056
+ ```ruby
1057
+ require 'onesignal'
1058
+ # setup authorization
1059
+ OneSignal.configure do |config|
1060
+ # Configure Bearer authorization: app_key
1061
+ config.app_key = 'YOUR_BEARER_TOKEN'
1062
+
1063
+ end
1064
+
1065
+ api_instance = OneSignal::DefaultApi.new
1066
+ notification_id = 'notification_id_example' # String | The ID of the notification to export events from.
1067
+ app_id = 'app_id_example' # String | The ID of the app that the notification belongs to.
1068
+
1069
+ begin
1070
+ # Export CSV of Events
1071
+ result = api_instance.export_events(notification_id, app_id)
1072
+ p result
1073
+ rescue OneSignal::ApiError => e
1074
+ puts "Error when calling DefaultApi->export_events: #{e}"
1075
+ end
1076
+ ```
1077
+
1078
+ #### Using the export_events_with_http_info variant
1079
+
1080
+ This returns an Array which contains the response data, status code and headers.
1081
+
1082
+ > <Array(<ExportEventsSuccessResponse>, Integer, Hash)> export_events_with_http_info(notification_id, app_id)
1083
+
1084
+ ```ruby
1085
+ begin
1086
+ # Export CSV of Events
1087
+ data, status_code, headers = api_instance.export_events_with_http_info(notification_id, app_id)
1088
+ p status_code # => 2xx
1089
+ p headers # => { ... }
1090
+ p data # => <ExportEventsSuccessResponse>
1091
+ rescue OneSignal::ApiError => e
1092
+ puts "Error when calling DefaultApi->export_events_with_http_info: #{e}"
1093
+ end
1094
+ ```
1095
+
1096
+ ### Parameters
1097
+
1098
+ | Name | Type | Description | Notes |
1099
+ | ---- | ---- | ----------- | ----- |
1100
+ | **notification_id** | **String** | The ID of the notification to export events from. | |
1101
+ | **app_id** | **String** | The ID of the app that the notification belongs to. | |
1102
+
1103
+ ### Return type
1104
+
1105
+ [**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md)
1106
+
1107
+ ### Authorization
1108
+
1109
+ [app_key](../README.md#app_key)
1110
+
1111
+ ### HTTP request headers
1112
+
1113
+ - **Content-Type**: Not defined
1114
+ - **Accept**: application/json
1115
+
1116
+
1117
+ ## export_players
1118
+
1119
+ > <ExportPlayersSuccessResponse> export_players(app_id, opts)
1120
+
1121
+ Export CSV of Players
1122
+
1123
+ 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. |
1124
+
1125
+ ### Examples
1126
+
1127
+ ```ruby
1128
+ require 'onesignal'
1129
+ # setup authorization
1130
+ OneSignal.configure do |config|
1131
+ # Configure Bearer authorization: app_key
1132
+ config.app_key = 'YOUR_BEARER_TOKEN'
1133
+
1134
+ end
1135
+
1136
+ api_instance = OneSignal::DefaultApi.new
1137
+ app_id = 'app_id_example' # String | The app ID that you want to export devices from
1138
+ opts = {
1139
+ export_players_request_body: OneSignal::ExportPlayersRequestBody.new # ExportPlayersRequestBody |
1140
+ }
1141
+
1142
+ begin
1143
+ # Export CSV of Players
1144
+ result = api_instance.export_players(app_id, opts)
1145
+ p result
1146
+ rescue OneSignal::ApiError => e
1147
+ puts "Error when calling DefaultApi->export_players: #{e}"
1148
+ end
1149
+ ```
1150
+
1151
+ #### Using the export_players_with_http_info variant
1152
+
1153
+ This returns an Array which contains the response data, status code and headers.
1154
+
1155
+ > <Array(<ExportPlayersSuccessResponse>, Integer, Hash)> export_players_with_http_info(app_id, opts)
1156
+
1157
+ ```ruby
1158
+ begin
1159
+ # Export CSV of Players
1160
+ data, status_code, headers = api_instance.export_players_with_http_info(app_id, opts)
1161
+ p status_code # => 2xx
1162
+ p headers # => { ... }
1163
+ p data # => <ExportPlayersSuccessResponse>
1164
+ rescue OneSignal::ApiError => e
1165
+ puts "Error when calling DefaultApi->export_players_with_http_info: #{e}"
1166
+ end
1167
+ ```
1168
+
1169
+ ### Parameters
1170
+
1171
+ | Name | Type | Description | Notes |
1172
+ | ---- | ---- | ----------- | ----- |
1173
+ | **app_id** | **String** | The app ID that you want to export devices from | |
1174
+ | **export_players_request_body** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | [optional] |
1175
+
1176
+ ### Return type
1177
+
1178
+ [**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md)
1179
+
1180
+ ### Authorization
1181
+
1182
+ [app_key](../README.md#app_key)
1183
+
1184
+ ### HTTP request headers
1185
+
1186
+ - **Content-Type**: application/json
1187
+ - **Accept**: application/json
1188
+
1189
+
1190
+ ## fetch_aliases
1191
+
1192
+ > <UserIdentityResponse> fetch_aliases(app_id, subscription_id)
1193
+
1194
+
1195
+
1196
+ Lists all Aliases for the User identified by :subscription_id.
1197
+
1198
+ ### Examples
1199
+
1200
+ ```ruby
1201
+ require 'onesignal'
1202
+ # setup authorization
1203
+ OneSignal.configure do |config|
1204
+ # Configure Bearer authorization: app_key
1205
+ config.app_key = 'YOUR_BEARER_TOKEN'
1206
+
1207
+ end
1208
+
1209
+ api_instance = OneSignal::DefaultApi.new
1210
+ app_id = 'app_id_example' # String |
1211
+ subscription_id = 'subscription_id_example' # String |
1212
+
1213
+ begin
1214
+
1215
+ result = api_instance.fetch_aliases(app_id, subscription_id)
1216
+ p result
1217
+ rescue OneSignal::ApiError => e
1218
+ puts "Error when calling DefaultApi->fetch_aliases: #{e}"
1219
+ end
1220
+ ```
1221
+
1222
+ #### Using the fetch_aliases_with_http_info variant
1223
+
1224
+ This returns an Array which contains the response data, status code and headers.
1225
+
1226
+ > <Array(<UserIdentityResponse>, Integer, Hash)> fetch_aliases_with_http_info(app_id, subscription_id)
1227
+
1228
+ ```ruby
1229
+ begin
1230
+
1231
+ data, status_code, headers = api_instance.fetch_aliases_with_http_info(app_id, subscription_id)
1232
+ p status_code # => 2xx
1233
+ p headers # => { ... }
1234
+ p data # => <UserIdentityResponse>
1235
+ rescue OneSignal::ApiError => e
1236
+ puts "Error when calling DefaultApi->fetch_aliases_with_http_info: #{e}"
1237
+ end
1238
+ ```
1239
+
1240
+ ### Parameters
1241
+
1242
+ | Name | Type | Description | Notes |
1243
+ | ---- | ---- | ----------- | ----- |
1244
+ | **app_id** | **String** | | |
1245
+ | **subscription_id** | **String** | | |
1246
+
1247
+ ### Return type
1248
+
1249
+ [**UserIdentityResponse**](UserIdentityResponse.md)
1250
+
1251
+ ### Authorization
1252
+
1253
+ [app_key](../README.md#app_key)
1254
+
1255
+ ### HTTP request headers
1256
+
1257
+ - **Content-Type**: Not defined
1258
+ - **Accept**: application/json
1259
+
1260
+
1261
+ ## fetch_user
1262
+
1263
+ > <User> fetch_user(app_id, alias_label, alias_id)
1264
+
1265
+
1266
+
1267
+ Returns the User’s properties, Aliases, and Subscriptions.
1268
+
1269
+ ### Examples
1270
+
1271
+ ```ruby
1272
+ require 'onesignal'
1273
+ # setup authorization
1274
+ OneSignal.configure do |config|
1275
+ # Configure Bearer authorization: app_key
1276
+ config.app_key = 'YOUR_BEARER_TOKEN'
1277
+
1278
+ end
1279
+
1280
+ api_instance = OneSignal::DefaultApi.new
1281
+ app_id = 'app_id_example' # String |
1282
+ alias_label = 'alias_label_example' # String |
1283
+ alias_id = 'alias_id_example' # String |
1284
+
1285
+ begin
1286
+
1287
+ result = api_instance.fetch_user(app_id, alias_label, alias_id)
1288
+ p result
1289
+ rescue OneSignal::ApiError => e
1290
+ puts "Error when calling DefaultApi->fetch_user: #{e}"
1291
+ end
1292
+ ```
1293
+
1294
+ #### Using the fetch_user_with_http_info variant
1295
+
1296
+ This returns an Array which contains the response data, status code and headers.
1297
+
1298
+ > <Array(<User>, Integer, Hash)> fetch_user_with_http_info(app_id, alias_label, alias_id)
1299
+
1300
+ ```ruby
1301
+ begin
1302
+
1303
+ data, status_code, headers = api_instance.fetch_user_with_http_info(app_id, alias_label, alias_id)
1304
+ p status_code # => 2xx
1305
+ p headers # => { ... }
1306
+ p data # => <User>
1307
+ rescue OneSignal::ApiError => e
1308
+ puts "Error when calling DefaultApi->fetch_user_with_http_info: #{e}"
1309
+ end
1310
+ ```
1311
+
1312
+ ### Parameters
1313
+
1314
+ | Name | Type | Description | Notes |
1315
+ | ---- | ---- | ----------- | ----- |
1316
+ | **app_id** | **String** | | |
1317
+ | **alias_label** | **String** | | |
1318
+ | **alias_id** | **String** | | |
1319
+
1320
+ ### Return type
1321
+
1322
+ [**User**](User.md)
1323
+
1324
+ ### Authorization
1325
+
1326
+ [app_key](../README.md#app_key)
1327
+
1328
+ ### HTTP request headers
1329
+
1330
+ - **Content-Type**: Not defined
1331
+ - **Accept**: application/json
1332
+
1333
+
1334
+ ## fetch_user_identity
1335
+
1336
+ > <InlineResponse200> fetch_user_identity(app_id, alias_label, alias_id)
1337
+
1338
+
1339
+
1340
+ Lists all Aliases for the User identified by (:alias_label, :alias_id).
1341
+
1342
+ ### Examples
1343
+
1344
+ ```ruby
1345
+ require 'onesignal'
1346
+ # setup authorization
1347
+ OneSignal.configure do |config|
1348
+ # Configure Bearer authorization: app_key
1349
+ config.app_key = 'YOUR_BEARER_TOKEN'
1350
+
1351
+ end
1352
+
1353
+ api_instance = OneSignal::DefaultApi.new
1354
+ app_id = 'app_id_example' # String |
1355
+ alias_label = 'alias_label_example' # String |
1356
+ alias_id = 'alias_id_example' # String |
1357
+
1358
+ begin
1359
+
1360
+ result = api_instance.fetch_user_identity(app_id, alias_label, alias_id)
1361
+ p result
1362
+ rescue OneSignal::ApiError => e
1363
+ puts "Error when calling DefaultApi->fetch_user_identity: #{e}"
1364
+ end
1365
+ ```
1366
+
1367
+ #### Using the fetch_user_identity_with_http_info variant
1368
+
1369
+ This returns an Array which contains the response data, status code and headers.
1370
+
1371
+ > <Array(<InlineResponse200>, Integer, Hash)> fetch_user_identity_with_http_info(app_id, alias_label, alias_id)
1372
+
1373
+ ```ruby
1374
+ begin
1375
+
1376
+ data, status_code, headers = api_instance.fetch_user_identity_with_http_info(app_id, alias_label, alias_id)
1377
+ p status_code # => 2xx
1378
+ p headers # => { ... }
1379
+ p data # => <InlineResponse200>
1380
+ rescue OneSignal::ApiError => e
1381
+ puts "Error when calling DefaultApi->fetch_user_identity_with_http_info: #{e}"
1382
+ end
1383
+ ```
1384
+
1385
+ ### Parameters
1386
+
1387
+ | Name | Type | Description | Notes |
1388
+ | ---- | ---- | ----------- | ----- |
1389
+ | **app_id** | **String** | | |
1390
+ | **alias_label** | **String** | | |
1391
+ | **alias_id** | **String** | | |
1392
+
1393
+ ### Return type
1394
+
1395
+ [**InlineResponse200**](InlineResponse200.md)
1396
+
1397
+ ### Authorization
1398
+
1399
+ [app_key](../README.md#app_key)
1400
+
1401
+ ### HTTP request headers
1402
+
1403
+ - **Content-Type**: Not defined
1404
+ - **Accept**: application/json
1405
+
1406
+
1407
+ ## get_app
1408
+
1409
+ > <App> get_app(app_id)
1410
+
1411
+ View an app
1412
+
1413
+ View the details of a single OneSignal app
1414
+
1415
+ ### Examples
1416
+
1417
+ ```ruby
1418
+ require 'onesignal'
1419
+ # setup authorization
1420
+ OneSignal.configure do |config|
1421
+ # Configure Bearer authorization: user_key
1422
+ config.user_key = 'YOUR_BEARER_TOKEN'
1423
+
1424
+ end
1425
+
1426
+ api_instance = OneSignal::DefaultApi.new
1427
+ app_id = 'app_id_example' # String | An app id
1428
+
1429
+ begin
1430
+ # View an app
1431
+ result = api_instance.get_app(app_id)
1432
+ p result
1433
+ rescue OneSignal::ApiError => e
1434
+ puts "Error when calling DefaultApi->get_app: #{e}"
1435
+ end
1436
+ ```
1437
+
1438
+ #### Using the get_app_with_http_info variant
1439
+
1440
+ This returns an Array which contains the response data, status code and headers.
1441
+
1442
+ > <Array(<App>, Integer, Hash)> get_app_with_http_info(app_id)
1443
+
1444
+ ```ruby
1445
+ begin
1446
+ # View an app
1447
+ data, status_code, headers = api_instance.get_app_with_http_info(app_id)
1448
+ p status_code # => 2xx
1449
+ p headers # => { ... }
1450
+ p data # => <App>
1451
+ rescue OneSignal::ApiError => e
1452
+ puts "Error when calling DefaultApi->get_app_with_http_info: #{e}"
1453
+ end
1454
+ ```
1455
+
1456
+ ### Parameters
1457
+
1458
+ | Name | Type | Description | Notes |
1459
+ | ---- | ---- | ----------- | ----- |
1460
+ | **app_id** | **String** | An app id | |
1461
+
1462
+ ### Return type
1463
+
1464
+ [**App**](App.md)
1465
+
1466
+ ### Authorization
1467
+
1468
+ [user_key](../README.md#user_key)
1469
+
1470
+ ### HTTP request headers
1471
+
1472
+ - **Content-Type**: Not defined
1473
+ - **Accept**: application/json
1474
+
1475
+
1476
+ ## get_apps
1477
+
1478
+ > <Array<App>> get_apps
1479
+
1480
+ View apps
1481
+
1482
+ View the details of all of your current OneSignal apps
1483
+
1484
+ ### Examples
1485
+
1486
+ ```ruby
1487
+ require 'onesignal'
1488
+ # setup authorization
1489
+ OneSignal.configure do |config|
1490
+ # Configure Bearer authorization: user_key
1491
+ config.user_key = 'YOUR_BEARER_TOKEN'
1492
+
1493
+ end
1494
+
1495
+ api_instance = OneSignal::DefaultApi.new
1496
+
1497
+ begin
1498
+ # View apps
1499
+ result = api_instance.get_apps
1500
+ p result
1501
+ rescue OneSignal::ApiError => e
1502
+ puts "Error when calling DefaultApi->get_apps: #{e}"
1503
+ end
1504
+ ```
1505
+
1506
+ #### Using the get_apps_with_http_info variant
1507
+
1508
+ This returns an Array which contains the response data, status code and headers.
1509
+
1510
+ > <Array(<Array<App>>, Integer, Hash)> get_apps_with_http_info
1511
+
1512
+ ```ruby
1513
+ begin
1514
+ # View apps
1515
+ data, status_code, headers = api_instance.get_apps_with_http_info
1516
+ p status_code # => 2xx
1517
+ p headers # => { ... }
1518
+ p data # => <Array<App>>
1519
+ rescue OneSignal::ApiError => e
1520
+ puts "Error when calling DefaultApi->get_apps_with_http_info: #{e}"
1521
+ end
1522
+ ```
1523
+
1524
+ ### Parameters
1525
+
1526
+ This endpoint does not need any parameter.
1527
+
1528
+ ### Return type
1529
+
1530
+ [**Array&lt;App&gt;**](App.md)
1531
+
1532
+ ### Authorization
1533
+
1534
+ [user_key](../README.md#user_key)
1535
+
1536
+ ### HTTP request headers
1537
+
1538
+ - **Content-Type**: Not defined
1539
+ - **Accept**: application/json
1540
+
1541
+
1542
+ ## get_eligible_iams
1543
+
1544
+ > <InlineResponse2003> get_eligible_iams(app_id, subscription_id)
1545
+
1546
+
1547
+
1548
+ Manifest of In-App Messages the Subscription is eligible to display by the SDK.
1549
+
1550
+ ### Examples
1551
+
1552
+ ```ruby
1553
+ require 'onesignal'
1554
+ # setup authorization
1555
+ OneSignal.configure do |config|
1556
+ # Configure Bearer authorization: app_key
1557
+ config.app_key = 'YOUR_BEARER_TOKEN'
1558
+
1559
+ end
1560
+
1561
+ api_instance = OneSignal::DefaultApi.new
1562
+ app_id = 'app_id_example' # String |
1563
+ subscription_id = 'subscription_id_example' # String |
1564
+
1565
+ begin
1566
+
1567
+ result = api_instance.get_eligible_iams(app_id, subscription_id)
1568
+ p result
1569
+ rescue OneSignal::ApiError => e
1570
+ puts "Error when calling DefaultApi->get_eligible_iams: #{e}"
1571
+ end
1572
+ ```
1573
+
1574
+ #### Using the get_eligible_iams_with_http_info variant
1575
+
1576
+ This returns an Array which contains the response data, status code and headers.
1577
+
1578
+ > <Array(<InlineResponse2003>, Integer, Hash)> get_eligible_iams_with_http_info(app_id, subscription_id)
1579
+
1580
+ ```ruby
1581
+ begin
1582
+
1583
+ data, status_code, headers = api_instance.get_eligible_iams_with_http_info(app_id, subscription_id)
1584
+ p status_code # => 2xx
1585
+ p headers # => { ... }
1586
+ p data # => <InlineResponse2003>
1587
+ rescue OneSignal::ApiError => e
1588
+ puts "Error when calling DefaultApi->get_eligible_iams_with_http_info: #{e}"
1589
+ end
1590
+ ```
1591
+
1592
+ ### Parameters
1593
+
1594
+ | Name | Type | Description | Notes |
1595
+ | ---- | ---- | ----------- | ----- |
1596
+ | **app_id** | **String** | | |
1597
+ | **subscription_id** | **String** | | |
1598
+
1599
+ ### Return type
1600
+
1601
+ [**InlineResponse2003**](InlineResponse2003.md)
1602
+
1603
+ ### Authorization
1604
+
1605
+ [app_key](../README.md#app_key)
1606
+
1607
+ ### HTTP request headers
1608
+
1609
+ - **Content-Type**: Not defined
1610
+ - **Accept**: application/json
1611
+
1612
+
1613
+ ## get_notification
1614
+
1615
+ > <NotificationWithMeta> get_notification(app_id, notification_id)
1616
+
1617
+ View notification
1618
+
1619
+ View the details of a single notification and outcomes associated with it
1620
+
1621
+ ### Examples
1622
+
1623
+ ```ruby
1624
+ require 'onesignal'
1625
+ # setup authorization
1626
+ OneSignal.configure do |config|
1627
+ # Configure Bearer authorization: app_key
1628
+ config.app_key = 'YOUR_BEARER_TOKEN'
1629
+
1630
+ end
1631
+
1632
+ api_instance = OneSignal::DefaultApi.new
1633
+ app_id = 'app_id_example' # String |
1634
+ notification_id = 'notification_id_example' # String |
1635
+
1636
+ begin
1637
+ # View notification
1638
+ result = api_instance.get_notification(app_id, notification_id)
1639
+ p result
1640
+ rescue OneSignal::ApiError => e
1641
+ puts "Error when calling DefaultApi->get_notification: #{e}"
1642
+ end
1643
+ ```
1644
+
1645
+ #### Using the get_notification_with_http_info variant
1646
+
1647
+ This returns an Array which contains the response data, status code and headers.
1648
+
1649
+ > <Array(<NotificationWithMeta>, Integer, Hash)> get_notification_with_http_info(app_id, notification_id)
1650
+
1651
+ ```ruby
1652
+ begin
1653
+ # View notification
1654
+ data, status_code, headers = api_instance.get_notification_with_http_info(app_id, notification_id)
1655
+ p status_code # => 2xx
1656
+ p headers # => { ... }
1657
+ p data # => <NotificationWithMeta>
1658
+ rescue OneSignal::ApiError => e
1659
+ puts "Error when calling DefaultApi->get_notification_with_http_info: #{e}"
1660
+ end
1661
+ ```
1662
+
1663
+ ### Parameters
1664
+
1665
+ | Name | Type | Description | Notes |
1666
+ | ---- | ---- | ----------- | ----- |
1667
+ | **app_id** | **String** | | |
1668
+ | **notification_id** | **String** | | |
1669
+
1670
+ ### Return type
1671
+
1672
+ [**NotificationWithMeta**](NotificationWithMeta.md)
1673
+
1674
+ ### Authorization
1675
+
1676
+ [app_key](../README.md#app_key)
1677
+
1678
+ ### HTTP request headers
1679
+
1680
+ - **Content-Type**: Not defined
1681
+ - **Accept**: application/json
1682
+
1683
+
1684
+ ## get_notification_history
1685
+
1686
+ > <NotificationHistorySuccessResponse> get_notification_history(notification_id, get_notification_request_body)
1687
+
1688
+ Notification History
1689
+
1690
+ -> 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.
1691
+
1692
+ ### Examples
1693
+
1694
+ ```ruby
1695
+ require 'onesignal'
1696
+ # setup authorization
1697
+ OneSignal.configure do |config|
1698
+ # Configure Bearer authorization: app_key
1699
+ config.app_key = 'YOUR_BEARER_TOKEN'
1700
+
1701
+ end
1702
+
1703
+ api_instance = OneSignal::DefaultApi.new
1704
+ notification_id = 'notification_id_example' # String | The \"id\" of the message found in the Notification object
1705
+ get_notification_request_body = OneSignal::GetNotificationRequestBody.new # GetNotificationRequestBody |
1706
+
1707
+ begin
1708
+ # Notification History
1709
+ result = api_instance.get_notification_history(notification_id, get_notification_request_body)
1710
+ p result
1711
+ rescue OneSignal::ApiError => e
1712
+ puts "Error when calling DefaultApi->get_notification_history: #{e}"
1713
+ end
1714
+ ```
1715
+
1716
+ #### Using the get_notification_history_with_http_info variant
1717
+
1718
+ This returns an Array which contains the response data, status code and headers.
1719
+
1720
+ > <Array(<NotificationHistorySuccessResponse>, Integer, Hash)> get_notification_history_with_http_info(notification_id, get_notification_request_body)
1721
+
1722
+ ```ruby
1723
+ begin
1724
+ # Notification History
1725
+ data, status_code, headers = api_instance.get_notification_history_with_http_info(notification_id, get_notification_request_body)
1726
+ p status_code # => 2xx
1727
+ p headers # => { ... }
1728
+ p data # => <NotificationHistorySuccessResponse>
1729
+ rescue OneSignal::ApiError => e
1730
+ puts "Error when calling DefaultApi->get_notification_history_with_http_info: #{e}"
1731
+ end
1732
+ ```
1733
+
1734
+ ### Parameters
1735
+
1736
+ | Name | Type | Description | Notes |
1737
+ | ---- | ---- | ----------- | ----- |
1738
+ | **notification_id** | **String** | The \&quot;id\&quot; of the message found in the Notification object | |
1739
+ | **get_notification_request_body** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | |
1740
+
1741
+ ### Return type
1742
+
1743
+ [**NotificationHistorySuccessResponse**](NotificationHistorySuccessResponse.md)
1744
+
1745
+ ### Authorization
1746
+
1747
+ [app_key](../README.md#app_key)
1748
+
1749
+ ### HTTP request headers
1750
+
1751
+ - **Content-Type**: application/json
1752
+ - **Accept**: application/json
1753
+
1754
+
1755
+ ## get_notifications
1756
+
1757
+ > <NotificationSlice> get_notifications(app_id, opts)
1758
+
1759
+ View notifications
1760
+
1761
+ View the details of multiple notifications
1762
+
1763
+ ### Examples
1764
+
1765
+ ```ruby
1766
+ require 'onesignal'
1767
+ # setup authorization
1768
+ OneSignal.configure do |config|
1769
+ # Configure Bearer authorization: app_key
1770
+ config.app_key = 'YOUR_BEARER_TOKEN'
1771
+
1772
+ end
1773
+
1774
+ api_instance = OneSignal::DefaultApi.new
1775
+ app_id = 'app_id_example' # String | The app ID that you want to view notifications from
1776
+ opts = {
1777
+ limit: 56, # Integer | How many notifications to return. Max is 50. Default is 50.
1778
+ offset: 56, # Integer | 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.
1779
+ kind: 0 # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
1780
+ }
1781
+
1782
+ begin
1783
+ # View notifications
1784
+ result = api_instance.get_notifications(app_id, opts)
1785
+ p result
1786
+ rescue OneSignal::ApiError => e
1787
+ puts "Error when calling DefaultApi->get_notifications: #{e}"
1788
+ end
1789
+ ```
1790
+
1791
+ #### Using the get_notifications_with_http_info variant
1792
+
1793
+ This returns an Array which contains the response data, status code and headers.
1794
+
1795
+ > <Array(<NotificationSlice>, Integer, Hash)> get_notifications_with_http_info(app_id, opts)
1796
+
1797
+ ```ruby
1798
+ begin
1799
+ # View notifications
1800
+ data, status_code, headers = api_instance.get_notifications_with_http_info(app_id, opts)
1801
+ p status_code # => 2xx
1802
+ p headers # => { ... }
1803
+ p data # => <NotificationSlice>
1804
+ rescue OneSignal::ApiError => e
1805
+ puts "Error when calling DefaultApi->get_notifications_with_http_info: #{e}"
1806
+ end
1807
+ ```
1808
+
1809
+ ### Parameters
1810
+
1811
+ | Name | Type | Description | Notes |
1812
+ | ---- | ---- | ----------- | ----- |
1813
+ | **app_id** | **String** | The app ID that you want to view notifications from | |
1814
+ | **limit** | **Integer** | How many notifications to return. Max is 50. Default is 50. | [optional] |
1815
+ | **offset** | **Integer** | 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. | [optional] |
1816
+ | **kind** | **Integer** | Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only | [optional] |
1817
+
1818
+ ### Return type
1819
+
1820
+ [**NotificationSlice**](NotificationSlice.md)
1821
+
1822
+ ### Authorization
1823
+
1824
+ [app_key](../README.md#app_key)
1825
+
1826
+ ### HTTP request headers
1827
+
1828
+ - **Content-Type**: Not defined
1829
+ - **Accept**: application/json
1830
+
1831
+
1832
+ ## get_outcomes
1833
+
1834
+ > <OutcomesData> get_outcomes(app_id, outcome_names, opts)
1835
+
1836
+ View Outcomes
1837
+
1838
+ 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.
1839
+
1840
+ ### Examples
1841
+
1842
+ ```ruby
1843
+ require 'onesignal'
1844
+ # setup authorization
1845
+ OneSignal.configure do |config|
1846
+ # Configure Bearer authorization: app_key
1847
+ config.app_key = 'YOUR_BEARER_TOKEN'
1848
+
1849
+ end
1850
+
1851
+ api_instance = OneSignal::DefaultApi.new
1852
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
1853
+ outcome_names = 'outcome_names_example' # 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
1854
+ opts = {
1855
+ outcome_names2: 'outcome_names_example', # String | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name.
1856
+ outcome_time_range: 'outcome_time_range_example', # String | 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.
1857
+ outcome_platforms: 'outcome_platforms_example', # String | Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
1858
+ outcome_attribution: 'outcome_attribution_example' # String | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.
1859
+ }
1860
+
1861
+ begin
1862
+ # View Outcomes
1863
+ result = api_instance.get_outcomes(app_id, outcome_names, opts)
1864
+ p result
1865
+ rescue OneSignal::ApiError => e
1866
+ puts "Error when calling DefaultApi->get_outcomes: #{e}"
1867
+ end
1868
+ ```
1869
+
1870
+ #### Using the get_outcomes_with_http_info variant
1871
+
1872
+ This returns an Array which contains the response data, status code and headers.
1873
+
1874
+ > <Array(<OutcomesData>, Integer, Hash)> get_outcomes_with_http_info(app_id, outcome_names, opts)
1875
+
1876
+ ```ruby
1877
+ begin
1878
+ # View Outcomes
1879
+ data, status_code, headers = api_instance.get_outcomes_with_http_info(app_id, outcome_names, opts)
1880
+ p status_code # => 2xx
1881
+ p headers # => { ... }
1882
+ p data # => <OutcomesData>
1883
+ rescue OneSignal::ApiError => e
1884
+ puts "Error when calling DefaultApi->get_outcomes_with_http_info: #{e}"
1885
+ end
1886
+ ```
1887
+
1888
+ ### Parameters
1889
+
1890
+ | Name | Type | Description | Notes |
1891
+ | ---- | ---- | ----------- | ----- |
1892
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
1893
+ | **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 | |
1894
+ | **outcome_names2** | **String** | 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. | [optional] |
1895
+ | **outcome_time_range** | **String** | 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. | [optional] |
1896
+ | **outcome_platforms** | **String** | 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. | [optional] |
1897
+ | **outcome_attribution** | **String** | 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. | [optional] |
1898
+
1899
+ ### Return type
1900
+
1901
+ [**OutcomesData**](OutcomesData.md)
1902
+
1903
+ ### Authorization
1904
+
1905
+ [app_key](../README.md#app_key)
1906
+
1907
+ ### HTTP request headers
1908
+
1909
+ - **Content-Type**: Not defined
1910
+ - **Accept**: application/json
1911
+
1912
+
1913
+ ## get_player
1914
+
1915
+ > <Player> get_player(app_id, player_id, opts)
1916
+
1917
+ View device
1918
+
1919
+ View the details of an existing device in one of your OneSignal apps
1920
+
1921
+ ### Examples
1922
+
1923
+ ```ruby
1924
+ require 'onesignal'
1925
+ # setup authorization
1926
+ OneSignal.configure do |config|
1927
+ # Configure Bearer authorization: app_key
1928
+ config.app_key = 'YOUR_BEARER_TOKEN'
1929
+
1930
+ end
1931
+
1932
+ api_instance = OneSignal::DefaultApi.new
1933
+ app_id = 'app_id_example' # String | Your app_id for this device
1934
+ player_id = 'player_id_example' # String | Player's OneSignal ID
1935
+ opts = {
1936
+ email_auth_hash: 'email_auth_hash_example' # String | Email - Only required if you have enabled Identity Verification and device_type is email (11).
1937
+ }
1938
+
1939
+ begin
1940
+ # View device
1941
+ result = api_instance.get_player(app_id, player_id, opts)
1942
+ p result
1943
+ rescue OneSignal::ApiError => e
1944
+ puts "Error when calling DefaultApi->get_player: #{e}"
1945
+ end
1946
+ ```
1947
+
1948
+ #### Using the get_player_with_http_info variant
1949
+
1950
+ This returns an Array which contains the response data, status code and headers.
1951
+
1952
+ > <Array(<Player>, Integer, Hash)> get_player_with_http_info(app_id, player_id, opts)
1953
+
1954
+ ```ruby
1955
+ begin
1956
+ # View device
1957
+ data, status_code, headers = api_instance.get_player_with_http_info(app_id, player_id, opts)
1958
+ p status_code # => 2xx
1959
+ p headers # => { ... }
1960
+ p data # => <Player>
1961
+ rescue OneSignal::ApiError => e
1962
+ puts "Error when calling DefaultApi->get_player_with_http_info: #{e}"
1963
+ end
1964
+ ```
1965
+
1966
+ ### Parameters
1967
+
1968
+ | Name | Type | Description | Notes |
1969
+ | ---- | ---- | ----------- | ----- |
1970
+ | **app_id** | **String** | Your app_id for this device | |
1971
+ | **player_id** | **String** | Player&#39;s OneSignal ID | |
1972
+ | **email_auth_hash** | **String** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] |
1973
+
1974
+ ### Return type
1975
+
1976
+ [**Player**](Player.md)
1977
+
1978
+ ### Authorization
1979
+
1980
+ [app_key](../README.md#app_key)
1981
+
1982
+ ### HTTP request headers
1983
+
1984
+ - **Content-Type**: Not defined
1985
+ - **Accept**: application/json
1986
+
1987
+
1988
+ ## get_players
1989
+
1990
+ > <PlayerSlice> get_players(app_id, opts)
1991
+
1992
+ View devices
1993
+
1994
+ 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.
1995
+
1996
+ ### Examples
1997
+
1998
+ ```ruby
1999
+ require 'onesignal'
2000
+ # setup authorization
2001
+ OneSignal.configure do |config|
2002
+ # Configure Bearer authorization: app_key
2003
+ config.app_key = 'YOUR_BEARER_TOKEN'
2004
+
2005
+ end
2006
+
2007
+ api_instance = OneSignal::DefaultApi.new
2008
+ app_id = 'app_id_example' # String | The app ID that you want to view players from
2009
+ opts = {
2010
+ limit: 56, # Integer | How many devices to return. Max is 300. Default is 300
2011
+ offset: 56 # Integer | Result offset. Default is 0. Results are sorted by id;
2012
+ }
2013
+
2014
+ begin
2015
+ # View devices
2016
+ result = api_instance.get_players(app_id, opts)
2017
+ p result
2018
+ rescue OneSignal::ApiError => e
2019
+ puts "Error when calling DefaultApi->get_players: #{e}"
2020
+ end
2021
+ ```
2022
+
2023
+ #### Using the get_players_with_http_info variant
2024
+
2025
+ This returns an Array which contains the response data, status code and headers.
2026
+
2027
+ > <Array(<PlayerSlice>, Integer, Hash)> get_players_with_http_info(app_id, opts)
2028
+
2029
+ ```ruby
2030
+ begin
2031
+ # View devices
2032
+ data, status_code, headers = api_instance.get_players_with_http_info(app_id, opts)
2033
+ p status_code # => 2xx
2034
+ p headers # => { ... }
2035
+ p data # => <PlayerSlice>
2036
+ rescue OneSignal::ApiError => e
2037
+ puts "Error when calling DefaultApi->get_players_with_http_info: #{e}"
2038
+ end
2039
+ ```
2040
+
2041
+ ### Parameters
2042
+
2043
+ | Name | Type | Description | Notes |
2044
+ | ---- | ---- | ----------- | ----- |
2045
+ | **app_id** | **String** | The app ID that you want to view players from | |
2046
+ | **limit** | **Integer** | How many devices to return. Max is 300. Default is 300 | [optional] |
2047
+ | **offset** | **Integer** | Result offset. Default is 0. Results are sorted by id; | [optional] |
933
2048
 
934
2049
  ### Return type
935
2050
 
936
- [**NotificationSlice**](NotificationSlice.md)
2051
+ [**PlayerSlice**](PlayerSlice.md)
937
2052
 
938
2053
  ### Authorization
939
2054
 
@@ -945,13 +2060,13 @@ end
945
2060
  - **Accept**: application/json
946
2061
 
947
2062
 
948
- ## get_outcomes
2063
+ ## identify_user_by_alias
949
2064
 
950
- > <OutcomesData> get_outcomes(app_id, outcome_names, opts)
2065
+ > <InlineResponse200> identify_user_by_alias(app_id, alias_label, alias_id, user_identity_request_body)
951
2066
 
952
- View Outcomes
953
2067
 
954
- 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.
2068
+
2069
+ Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
955
2070
 
956
2071
  ### Examples
957
2072
 
@@ -965,39 +2080,35 @@ OneSignal.configure do |config|
965
2080
  end
966
2081
 
967
2082
  api_instance = OneSignal::DefaultApi.new
968
- app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
969
- outcome_names = 'outcome_names_example' # 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
970
- opts = {
971
- outcome_names2: 'outcome_names_example', # String | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name.
972
- outcome_time_range: 'outcome_time_range_example', # String | 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.
973
- outcome_platforms: 'outcome_platforms_example', # String | Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted.
974
- outcome_attribution: 'outcome_attribution_example' # String | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted.
975
- }
2083
+ app_id = 'app_id_example' # String |
2084
+ alias_label = 'alias_label_example' # String |
2085
+ alias_id = 'alias_id_example' # String |
2086
+ user_identity_request_body = OneSignal::UserIdentityRequestBody.new # UserIdentityRequestBody |
976
2087
 
977
2088
  begin
978
- # View Outcomes
979
- result = api_instance.get_outcomes(app_id, outcome_names, opts)
2089
+
2090
+ result = api_instance.identify_user_by_alias(app_id, alias_label, alias_id, user_identity_request_body)
980
2091
  p result
981
2092
  rescue OneSignal::ApiError => e
982
- puts "Error when calling DefaultApi->get_outcomes: #{e}"
2093
+ puts "Error when calling DefaultApi->identify_user_by_alias: #{e}"
983
2094
  end
984
2095
  ```
985
2096
 
986
- #### Using the get_outcomes_with_http_info variant
2097
+ #### Using the identify_user_by_alias_with_http_info variant
987
2098
 
988
2099
  This returns an Array which contains the response data, status code and headers.
989
2100
 
990
- > <Array(<OutcomesData>, Integer, Hash)> get_outcomes_with_http_info(app_id, outcome_names, opts)
2101
+ > <Array(<InlineResponse200>, Integer, Hash)> identify_user_by_alias_with_http_info(app_id, alias_label, alias_id, user_identity_request_body)
991
2102
 
992
2103
  ```ruby
993
2104
  begin
994
- # View Outcomes
995
- data, status_code, headers = api_instance.get_outcomes_with_http_info(app_id, outcome_names, opts)
2105
+
2106
+ data, status_code, headers = api_instance.identify_user_by_alias_with_http_info(app_id, alias_label, alias_id, user_identity_request_body)
996
2107
  p status_code # => 2xx
997
2108
  p headers # => { ... }
998
- p data # => <OutcomesData>
2109
+ p data # => <InlineResponse200>
999
2110
  rescue OneSignal::ApiError => e
1000
- puts "Error when calling DefaultApi->get_outcomes_with_http_info: #{e}"
2111
+ puts "Error when calling DefaultApi->identify_user_by_alias_with_http_info: #{e}"
1001
2112
  end
1002
2113
  ```
1003
2114
 
@@ -1005,16 +2116,14 @@ end
1005
2116
 
1006
2117
  | Name | Type | Description | Notes |
1007
2118
  | ---- | ---- | ----------- | ----- |
1008
- | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
1009
- | **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 | |
1010
- | **outcome_names2** | **String** | 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. | [optional] |
1011
- | **outcome_time_range** | **String** | 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. | [optional] |
1012
- | **outcome_platforms** | **String** | 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. | [optional] |
1013
- | **outcome_attribution** | **String** | 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. | [optional] |
2119
+ | **app_id** | **String** | | |
2120
+ | **alias_label** | **String** | | |
2121
+ | **alias_id** | **String** | | |
2122
+ | **user_identity_request_body** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | |
1014
2123
 
1015
2124
  ### Return type
1016
2125
 
1017
- [**OutcomesData**](OutcomesData.md)
2126
+ [**InlineResponse200**](InlineResponse200.md)
1018
2127
 
1019
2128
  ### Authorization
1020
2129
 
@@ -1022,17 +2131,17 @@ end
1022
2131
 
1023
2132
  ### HTTP request headers
1024
2133
 
1025
- - **Content-Type**: Not defined
2134
+ - **Content-Type**: application/json
1026
2135
  - **Accept**: application/json
1027
2136
 
1028
2137
 
1029
- ## get_player
2138
+ ## identify_user_by_subscription_id
1030
2139
 
1031
- > <Player> get_player(app_id, player_id, opts)
2140
+ > <UserIdentityResponse> identify_user_by_subscription_id(app_id, subscription_id, user_identity_request_body)
1032
2141
 
1033
- View device
1034
2142
 
1035
- View the details of an existing device in one of your OneSignal apps
2143
+
2144
+ Upserts one or more Aliases for the User identified by :subscription_id.
1036
2145
 
1037
2146
  ### Examples
1038
2147
 
@@ -1046,36 +2155,34 @@ OneSignal.configure do |config|
1046
2155
  end
1047
2156
 
1048
2157
  api_instance = OneSignal::DefaultApi.new
1049
- app_id = 'app_id_example' # String | Your app_id for this device
1050
- player_id = 'player_id_example' # String | Player's OneSignal ID
1051
- opts = {
1052
- email_auth_hash: 'email_auth_hash_example' # String | Email - Only required if you have enabled Identity Verification and device_type is email (11).
1053
- }
2158
+ app_id = 'app_id_example' # String |
2159
+ subscription_id = 'subscription_id_example' # String |
2160
+ user_identity_request_body = OneSignal::UserIdentityRequestBody.new # UserIdentityRequestBody |
1054
2161
 
1055
2162
  begin
1056
- # View device
1057
- result = api_instance.get_player(app_id, player_id, opts)
2163
+
2164
+ result = api_instance.identify_user_by_subscription_id(app_id, subscription_id, user_identity_request_body)
1058
2165
  p result
1059
2166
  rescue OneSignal::ApiError => e
1060
- puts "Error when calling DefaultApi->get_player: #{e}"
2167
+ puts "Error when calling DefaultApi->identify_user_by_subscription_id: #{e}"
1061
2168
  end
1062
2169
  ```
1063
2170
 
1064
- #### Using the get_player_with_http_info variant
2171
+ #### Using the identify_user_by_subscription_id_with_http_info variant
1065
2172
 
1066
2173
  This returns an Array which contains the response data, status code and headers.
1067
2174
 
1068
- > <Array(<Player>, Integer, Hash)> get_player_with_http_info(app_id, player_id, opts)
2175
+ > <Array(<UserIdentityResponse>, Integer, Hash)> identify_user_by_subscription_id_with_http_info(app_id, subscription_id, user_identity_request_body)
1069
2176
 
1070
2177
  ```ruby
1071
2178
  begin
1072
- # View device
1073
- data, status_code, headers = api_instance.get_player_with_http_info(app_id, player_id, opts)
2179
+
2180
+ data, status_code, headers = api_instance.identify_user_by_subscription_id_with_http_info(app_id, subscription_id, user_identity_request_body)
1074
2181
  p status_code # => 2xx
1075
2182
  p headers # => { ... }
1076
- p data # => <Player>
2183
+ p data # => <UserIdentityResponse>
1077
2184
  rescue OneSignal::ApiError => e
1078
- puts "Error when calling DefaultApi->get_player_with_http_info: #{e}"
2185
+ puts "Error when calling DefaultApi->identify_user_by_subscription_id_with_http_info: #{e}"
1079
2186
  end
1080
2187
  ```
1081
2188
 
@@ -1083,13 +2190,13 @@ end
1083
2190
 
1084
2191
  | Name | Type | Description | Notes |
1085
2192
  | ---- | ---- | ----------- | ----- |
1086
- | **app_id** | **String** | Your app_id for this device | |
1087
- | **player_id** | **String** | Player&#39;s OneSignal ID | |
1088
- | **email_auth_hash** | **String** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] |
2193
+ | **app_id** | **String** | | |
2194
+ | **subscription_id** | **String** | | |
2195
+ | **user_identity_request_body** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | |
1089
2196
 
1090
2197
  ### Return type
1091
2198
 
1092
- [**Player**](Player.md)
2199
+ [**UserIdentityResponse**](UserIdentityResponse.md)
1093
2200
 
1094
2201
  ### Authorization
1095
2202
 
@@ -1097,17 +2204,17 @@ end
1097
2204
 
1098
2205
  ### HTTP request headers
1099
2206
 
1100
- - **Content-Type**: Not defined
2207
+ - **Content-Type**: application/json
1101
2208
  - **Accept**: application/json
1102
2209
 
1103
2210
 
1104
- ## get_players
2211
+ ## transfer_subscription
1105
2212
 
1106
- > <PlayerSlice> get_players(app_id, opts)
2213
+ > <UserIdentityResponse> transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
1107
2214
 
1108
- View devices
1109
2215
 
1110
- 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.
2216
+
2217
+ Transfers this Subscription to the User identified by the identity in the payload.
1111
2218
 
1112
2219
  ### Examples
1113
2220
 
@@ -1121,36 +2228,34 @@ OneSignal.configure do |config|
1121
2228
  end
1122
2229
 
1123
2230
  api_instance = OneSignal::DefaultApi.new
1124
- app_id = 'app_id_example' # String | The app ID that you want to view players from
1125
- opts = {
1126
- limit: 56, # Integer | How many devices to return. Max is 300. Default is 300
1127
- offset: 56 # Integer | Result offset. Default is 0. Results are sorted by id;
1128
- }
2231
+ app_id = 'app_id_example' # String |
2232
+ subscription_id = 'subscription_id_example' # String |
2233
+ transfer_subscription_request_body = OneSignal::TransferSubscriptionRequestBody.new # TransferSubscriptionRequestBody |
1129
2234
 
1130
2235
  begin
1131
- # View devices
1132
- result = api_instance.get_players(app_id, opts)
2236
+
2237
+ result = api_instance.transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
1133
2238
  p result
1134
2239
  rescue OneSignal::ApiError => e
1135
- puts "Error when calling DefaultApi->get_players: #{e}"
2240
+ puts "Error when calling DefaultApi->transfer_subscription: #{e}"
1136
2241
  end
1137
2242
  ```
1138
2243
 
1139
- #### Using the get_players_with_http_info variant
2244
+ #### Using the transfer_subscription_with_http_info variant
1140
2245
 
1141
2246
  This returns an Array which contains the response data, status code and headers.
1142
2247
 
1143
- > <Array(<PlayerSlice>, Integer, Hash)> get_players_with_http_info(app_id, opts)
2248
+ > <Array(<UserIdentityResponse>, Integer, Hash)> transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
1144
2249
 
1145
2250
  ```ruby
1146
2251
  begin
1147
- # View devices
1148
- data, status_code, headers = api_instance.get_players_with_http_info(app_id, opts)
2252
+
2253
+ data, status_code, headers = api_instance.transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
1149
2254
  p status_code # => 2xx
1150
2255
  p headers # => { ... }
1151
- p data # => <PlayerSlice>
2256
+ p data # => <UserIdentityResponse>
1152
2257
  rescue OneSignal::ApiError => e
1153
- puts "Error when calling DefaultApi->get_players_with_http_info: #{e}"
2258
+ puts "Error when calling DefaultApi->transfer_subscription_with_http_info: #{e}"
1154
2259
  end
1155
2260
  ```
1156
2261
 
@@ -1158,13 +2263,13 @@ end
1158
2263
 
1159
2264
  | Name | Type | Description | Notes |
1160
2265
  | ---- | ---- | ----------- | ----- |
1161
- | **app_id** | **String** | The app ID that you want to view players from | |
1162
- | **limit** | **Integer** | How many devices to return. Max is 300. Default is 300 | [optional] |
1163
- | **offset** | **Integer** | Result offset. Default is 0. Results are sorted by id; | [optional] |
2266
+ | **app_id** | **String** | | |
2267
+ | **subscription_id** | **String** | | |
2268
+ | **transfer_subscription_request_body** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md) | | |
1164
2269
 
1165
2270
  ### Return type
1166
2271
 
1167
- [**PlayerSlice**](PlayerSlice.md)
2272
+ [**UserIdentityResponse**](UserIdentityResponse.md)
1168
2273
 
1169
2274
  ### Authorization
1170
2275
 
@@ -1172,7 +2277,7 @@ end
1172
2277
 
1173
2278
  ### HTTP request headers
1174
2279
 
1175
- - **Content-Type**: Not defined
2280
+ - **Content-Type**: application/json
1176
2281
  - **Accept**: application/json
1177
2282
 
1178
2283
 
@@ -1197,7 +2302,7 @@ end
1197
2302
 
1198
2303
  api_instance = OneSignal::DefaultApi.new
1199
2304
  app_id = 'app_id_example' # String | An app id
1200
- app = OneSignal::App.new({id: 'id_example'}) # App |
2305
+ app = OneSignal::App.new # App |
1201
2306
 
1202
2307
  begin
1203
2308
  # Update an app
@@ -1247,9 +2352,82 @@ end
1247
2352
  - **Accept**: application/json
1248
2353
 
1249
2354
 
2355
+ ## update_live_activity
2356
+
2357
+ > <UpdateLiveActivitySuccessResponse> update_live_activity(app_id, activity_id, update_live_activity_request)
2358
+
2359
+ Update a Live Activity via Push
2360
+
2361
+ Updates a specified live activity.
2362
+
2363
+ ### Examples
2364
+
2365
+ ```ruby
2366
+ require 'onesignal'
2367
+ # setup authorization
2368
+ OneSignal.configure do |config|
2369
+ # Configure Bearer authorization: app_key
2370
+ config.app_key = 'YOUR_BEARER_TOKEN'
2371
+
2372
+ end
2373
+
2374
+ api_instance = OneSignal::DefaultApi.new
2375
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
2376
+ activity_id = 'activity_id_example' # String | Live Activity record ID
2377
+ update_live_activity_request = OneSignal::UpdateLiveActivityRequest.new({name: 'headings', event: 'update', event_updates: 3.56}) # UpdateLiveActivityRequest |
2378
+
2379
+ begin
2380
+ # Update a Live Activity via Push
2381
+ result = api_instance.update_live_activity(app_id, activity_id, update_live_activity_request)
2382
+ p result
2383
+ rescue OneSignal::ApiError => e
2384
+ puts "Error when calling DefaultApi->update_live_activity: #{e}"
2385
+ end
2386
+ ```
2387
+
2388
+ #### Using the update_live_activity_with_http_info variant
2389
+
2390
+ This returns an Array which contains the response data, status code and headers.
2391
+
2392
+ > <Array(<UpdateLiveActivitySuccessResponse>, Integer, Hash)> update_live_activity_with_http_info(app_id, activity_id, update_live_activity_request)
2393
+
2394
+ ```ruby
2395
+ begin
2396
+ # Update a Live Activity via Push
2397
+ data, status_code, headers = api_instance.update_live_activity_with_http_info(app_id, activity_id, update_live_activity_request)
2398
+ p status_code # => 2xx
2399
+ p headers # => { ... }
2400
+ p data # => <UpdateLiveActivitySuccessResponse>
2401
+ rescue OneSignal::ApiError => e
2402
+ puts "Error when calling DefaultApi->update_live_activity_with_http_info: #{e}"
2403
+ end
2404
+ ```
2405
+
2406
+ ### Parameters
2407
+
2408
+ | Name | Type | Description | Notes |
2409
+ | ---- | ---- | ----------- | ----- |
2410
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
2411
+ | **activity_id** | **String** | Live Activity record ID | |
2412
+ | **update_live_activity_request** | [**UpdateLiveActivityRequest**](UpdateLiveActivityRequest.md) | | |
2413
+
2414
+ ### Return type
2415
+
2416
+ [**UpdateLiveActivitySuccessResponse**](UpdateLiveActivitySuccessResponse.md)
2417
+
2418
+ ### Authorization
2419
+
2420
+ [app_key](../README.md#app_key)
2421
+
2422
+ ### HTTP request headers
2423
+
2424
+ - **Content-Type**: application/json
2425
+ - **Accept**: application/json
2426
+
2427
+
1250
2428
  ## update_player
1251
2429
 
1252
- > <InlineResponse2001> update_player(player_id, player)
2430
+ > <UpdatePlayerSuccessResponse> update_player(player_id, player)
1253
2431
 
1254
2432
  Edit device
1255
2433
 
@@ -1268,7 +2446,7 @@ end
1268
2446
 
1269
2447
  api_instance = OneSignal::DefaultApi.new
1270
2448
  player_id = 'player_id_example' # String | Player's OneSignal ID
1271
- player = OneSignal::Player.new({id: 'id_example', device_type: 37}) # Player |
2449
+ player = OneSignal::Player.new({device_type: 37}) # Player |
1272
2450
 
1273
2451
  begin
1274
2452
  # Edit device
@@ -1283,7 +2461,7 @@ end
1283
2461
 
1284
2462
  This returns an Array which contains the response data, status code and headers.
1285
2463
 
1286
- > <Array(<InlineResponse2001>, Integer, Hash)> update_player_with_http_info(player_id, player)
2464
+ > <Array(<UpdatePlayerSuccessResponse>, Integer, Hash)> update_player_with_http_info(player_id, player)
1287
2465
 
1288
2466
  ```ruby
1289
2467
  begin
@@ -1291,7 +2469,7 @@ begin
1291
2469
  data, status_code, headers = api_instance.update_player_with_http_info(player_id, player)
1292
2470
  p status_code # => 2xx
1293
2471
  p headers # => { ... }
1294
- p data # => <InlineResponse2001>
2472
+ p data # => <UpdatePlayerSuccessResponse>
1295
2473
  rescue OneSignal::ApiError => e
1296
2474
  puts "Error when calling DefaultApi->update_player_with_http_info: #{e}"
1297
2475
  end
@@ -1306,7 +2484,7 @@ end
1306
2484
 
1307
2485
  ### Return type
1308
2486
 
1309
- [**InlineResponse2001**](InlineResponse2001.md)
2487
+ [**UpdatePlayerSuccessResponse**](UpdatePlayerSuccessResponse.md)
1310
2488
 
1311
2489
  ### Authorization
1312
2490
 
@@ -1320,7 +2498,7 @@ end
1320
2498
 
1321
2499
  ## update_player_tags
1322
2500
 
1323
- > <InlineResponse2001> update_player_tags(app_id, external_user_id, opts)
2501
+ > <UpdatePlayerTagsSuccessResponse> update_player_tags(app_id, external_user_id, opts)
1324
2502
 
1325
2503
  Edit tags with external user id
1326
2504
 
@@ -1357,7 +2535,7 @@ end
1357
2535
 
1358
2536
  This returns an Array which contains the response data, status code and headers.
1359
2537
 
1360
- > <Array(<InlineResponse2001>, Integer, Hash)> update_player_tags_with_http_info(app_id, external_user_id, opts)
2538
+ > <Array(<UpdatePlayerTagsSuccessResponse>, Integer, Hash)> update_player_tags_with_http_info(app_id, external_user_id, opts)
1361
2539
 
1362
2540
  ```ruby
1363
2541
  begin
@@ -1365,7 +2543,7 @@ begin
1365
2543
  data, status_code, headers = api_instance.update_player_tags_with_http_info(app_id, external_user_id, opts)
1366
2544
  p status_code # => 2xx
1367
2545
  p headers # => { ... }
1368
- p data # => <InlineResponse2001>
2546
+ p data # => <UpdatePlayerTagsSuccessResponse>
1369
2547
  rescue OneSignal::ApiError => e
1370
2548
  puts "Error when calling DefaultApi->update_player_tags_with_http_info: #{e}"
1371
2549
  end
@@ -1381,7 +2559,154 @@ end
1381
2559
 
1382
2560
  ### Return type
1383
2561
 
1384
- [**InlineResponse2001**](InlineResponse2001.md)
2562
+ [**UpdatePlayerTagsSuccessResponse**](UpdatePlayerTagsSuccessResponse.md)
2563
+
2564
+ ### Authorization
2565
+
2566
+ [app_key](../README.md#app_key)
2567
+
2568
+ ### HTTP request headers
2569
+
2570
+ - **Content-Type**: application/json
2571
+ - **Accept**: application/json
2572
+
2573
+
2574
+ ## update_subscription
2575
+
2576
+ > update_subscription(app_id, subscription_id, update_subscription_request_body)
2577
+
2578
+
2579
+
2580
+ Updates an existing Subscription’s properties.
2581
+
2582
+ ### Examples
2583
+
2584
+ ```ruby
2585
+ require 'onesignal'
2586
+ # setup authorization
2587
+ OneSignal.configure do |config|
2588
+ # Configure Bearer authorization: app_key
2589
+ config.app_key = 'YOUR_BEARER_TOKEN'
2590
+
2591
+ end
2592
+
2593
+ api_instance = OneSignal::DefaultApi.new
2594
+ app_id = 'app_id_example' # String |
2595
+ subscription_id = 'subscription_id_example' # String |
2596
+ update_subscription_request_body = OneSignal::UpdateSubscriptionRequestBody.new # UpdateSubscriptionRequestBody |
2597
+
2598
+ begin
2599
+
2600
+ api_instance.update_subscription(app_id, subscription_id, update_subscription_request_body)
2601
+ rescue OneSignal::ApiError => e
2602
+ puts "Error when calling DefaultApi->update_subscription: #{e}"
2603
+ end
2604
+ ```
2605
+
2606
+ #### Using the update_subscription_with_http_info variant
2607
+
2608
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
2609
+
2610
+ > <Array(nil, Integer, Hash)> update_subscription_with_http_info(app_id, subscription_id, update_subscription_request_body)
2611
+
2612
+ ```ruby
2613
+ begin
2614
+
2615
+ data, status_code, headers = api_instance.update_subscription_with_http_info(app_id, subscription_id, update_subscription_request_body)
2616
+ p status_code # => 2xx
2617
+ p headers # => { ... }
2618
+ p data # => nil
2619
+ rescue OneSignal::ApiError => e
2620
+ puts "Error when calling DefaultApi->update_subscription_with_http_info: #{e}"
2621
+ end
2622
+ ```
2623
+
2624
+ ### Parameters
2625
+
2626
+ | Name | Type | Description | Notes |
2627
+ | ---- | ---- | ----------- | ----- |
2628
+ | **app_id** | **String** | | |
2629
+ | **subscription_id** | **String** | | |
2630
+ | **update_subscription_request_body** | [**UpdateSubscriptionRequestBody**](UpdateSubscriptionRequestBody.md) | | |
2631
+
2632
+ ### Return type
2633
+
2634
+ nil (empty response body)
2635
+
2636
+ ### Authorization
2637
+
2638
+ [app_key](../README.md#app_key)
2639
+
2640
+ ### HTTP request headers
2641
+
2642
+ - **Content-Type**: application/json
2643
+ - **Accept**: application/json
2644
+
2645
+
2646
+ ## update_user
2647
+
2648
+ > <InlineResponse202> update_user(app_id, alias_label, alias_id, update_user_request)
2649
+
2650
+
2651
+
2652
+ Updates an existing User’s properties.
2653
+
2654
+ ### Examples
2655
+
2656
+ ```ruby
2657
+ require 'onesignal'
2658
+ # setup authorization
2659
+ OneSignal.configure do |config|
2660
+ # Configure Bearer authorization: app_key
2661
+ config.app_key = 'YOUR_BEARER_TOKEN'
2662
+
2663
+ end
2664
+
2665
+ api_instance = OneSignal::DefaultApi.new
2666
+ app_id = 'app_id_example' # String |
2667
+ alias_label = 'alias_label_example' # String |
2668
+ alias_id = 'alias_id_example' # String |
2669
+ update_user_request = OneSignal::UpdateUserRequest.new # UpdateUserRequest |
2670
+
2671
+ begin
2672
+
2673
+ result = api_instance.update_user(app_id, alias_label, alias_id, update_user_request)
2674
+ p result
2675
+ rescue OneSignal::ApiError => e
2676
+ puts "Error when calling DefaultApi->update_user: #{e}"
2677
+ end
2678
+ ```
2679
+
2680
+ #### Using the update_user_with_http_info variant
2681
+
2682
+ This returns an Array which contains the response data, status code and headers.
2683
+
2684
+ > <Array(<InlineResponse202>, Integer, Hash)> update_user_with_http_info(app_id, alias_label, alias_id, update_user_request)
2685
+
2686
+ ```ruby
2687
+ begin
2688
+
2689
+ data, status_code, headers = api_instance.update_user_with_http_info(app_id, alias_label, alias_id, update_user_request)
2690
+ p status_code # => 2xx
2691
+ p headers # => { ... }
2692
+ p data # => <InlineResponse202>
2693
+ rescue OneSignal::ApiError => e
2694
+ puts "Error when calling DefaultApi->update_user_with_http_info: #{e}"
2695
+ end
2696
+ ```
2697
+
2698
+ ### Parameters
2699
+
2700
+ | Name | Type | Description | Notes |
2701
+ | ---- | ---- | ----------- | ----- |
2702
+ | **app_id** | **String** | | |
2703
+ | **alias_label** | **String** | | |
2704
+ | **alias_id** | **String** | | |
2705
+ | **update_user_request** | [**UpdateUserRequest**](UpdateUserRequest.md) | | |
2706
+
2707
+ ### Return type
2708
+
2709
+ [**InlineResponse202**](InlineResponse202.md)
1385
2710
 
1386
2711
  ### Authorization
1387
2712