onesignal 2.2.0 → 5.1.0.pre.beta1

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 (211) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +42 -65
  3. data/docs/BasicNotification.md +18 -18
  4. data/docs/BasicNotificationAllOf.md +9 -7
  5. data/docs/CreateNotificationSuccessResponse.md +1 -3
  6. data/docs/DefaultApi.md +364 -874
  7. data/docs/{ExportPlayersRequestBody.md → ExportSubscriptionsRequestBody.md} +2 -2
  8. data/docs/{ExportPlayersSuccessResponse.md → ExportSubscriptionsSuccessResponse.md} +2 -2
  9. data/docs/Filter.md +10 -2
  10. data/docs/{Notification200Errors.md → FilterExpression.md} +9 -9
  11. data/docs/GenericError.md +6 -2
  12. data/docs/{DeletePlayerSuccessResponse.md → GenericSuccessBoolResponse.md} +2 -2
  13. data/docs/{GetNotificationRequestBody.md → GetNotificationHistoryRequestBody.md} +2 -2
  14. data/docs/GetSegmentsSuccessResponse.md +24 -0
  15. data/docs/{StringMap.md → LanguageStringMap.md} +2 -2
  16. data/docs/Notification.md +18 -18
  17. data/docs/NotificationTarget.md +9 -11
  18. data/docs/NotificationWithMeta.md +18 -18
  19. data/docs/{InlineResponse202.md → PropertiesBody.md} +2 -2
  20. data/docs/PropertiesDeltas.md +2 -2
  21. data/docs/PropertiesObject.md +2 -2
  22. data/docs/Purchase.md +1 -1
  23. data/docs/RateLimitError.md +20 -0
  24. data/docs/Segment.md +1 -1
  25. data/docs/SegmentData.md +30 -0
  26. data/docs/{SubscriptionObject.md → Subscription.md} +7 -7
  27. data/docs/SubscriptionBody.md +18 -0
  28. data/docs/SubscriptionNotificationTarget.md +38 -0
  29. data/docs/TransferSubscriptionRequestBody.md +1 -1
  30. data/docs/UpdateLiveActivityRequest.md +14 -4
  31. data/docs/UpdateLiveActivitySuccessResponse.md +2 -4
  32. data/docs/User.md +3 -5
  33. data/docs/{InlineResponse200.md → UserIdentityBody.md} +3 -3
  34. data/docs/WebButton.md +24 -0
  35. data/lib/onesignal/api/default_api.rb +382 -890
  36. data/lib/onesignal/api_client.rb +2 -2
  37. data/lib/onesignal/api_error.rb +1 -1
  38. data/lib/onesignal/configuration.rb +5 -5
  39. data/lib/onesignal/models/app.rb +1 -1
  40. data/lib/onesignal/models/basic_notification.rb +49 -47
  41. data/lib/onesignal/models/basic_notification_all_of.rb +29 -17
  42. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  43. data/lib/onesignal/models/button.rb +1 -1
  44. data/lib/onesignal/models/create_notification_success_response.rb +5 -13
  45. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  46. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  47. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  48. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  49. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  50. data/lib/onesignal/models/delivery_data.rb +1 -1
  51. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  52. data/lib/onesignal/models/{export_players_request_body.rb → export_subscriptions_request_body.rb} +4 -4
  53. data/lib/onesignal/models/{export_players_success_response.rb → export_subscriptions_success_response.rb} +4 -4
  54. data/lib/onesignal/models/filter.rb +44 -14
  55. data/lib/onesignal/models/{notification200_errors.rb → filter_expression.rb} +4 -4
  56. data/lib/onesignal/models/generic_error.rb +26 -8
  57. data/lib/onesignal/models/{update_player_success_response.rb → generic_success_bool_response.rb} +4 -4
  58. data/lib/onesignal/models/{get_notification_request_body.rb → get_notification_history_request_body.rb} +4 -4
  59. data/lib/onesignal/models/{player_slice.rb → get_segments_success_response.rb} +16 -12
  60. data/lib/onesignal/models/{string_map.rb → language_string_map.rb} +4 -4
  61. data/lib/onesignal/models/notification.rb +49 -47
  62. data/lib/onesignal/models/notification_all_of.rb +1 -1
  63. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  64. data/lib/onesignal/models/notification_slice.rb +1 -1
  65. data/lib/onesignal/models/notification_target.rb +24 -34
  66. data/lib/onesignal/models/notification_with_meta.rb +49 -47
  67. data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
  68. data/lib/onesignal/models/operator.rb +1 -1
  69. data/lib/onesignal/models/outcome_data.rb +1 -1
  70. data/lib/onesignal/models/outcomes_data.rb +1 -1
  71. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  72. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  73. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  74. data/lib/onesignal/models/{inline_response202.rb → properties_body.rb} +4 -4
  75. data/lib/onesignal/models/properties_deltas.rb +3 -3
  76. data/lib/onesignal/models/properties_object.rb +3 -3
  77. data/lib/onesignal/models/purchase.rb +2 -2
  78. data/lib/onesignal/models/{rate_limiter_error.rb → rate_limit_error.rb} +17 -8
  79. data/lib/onesignal/models/segment.rb +2 -2
  80. data/lib/onesignal/models/{begin_live_activity_request.rb → segment_data.rb} +69 -27
  81. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  82. data/lib/onesignal/models/{subscription_object.rb → subscription.rb} +9 -9
  83. data/lib/onesignal/models/{inline_response201.rb → subscription_body.rb} +5 -5
  84. data/lib/onesignal/models/{player_notification_target.rb → subscription_notification_target.rb} +25 -35
  85. data/lib/onesignal/models/transfer_subscription_request_body.rb +26 -2
  86. data/lib/onesignal/models/update_live_activity_request.rb +59 -22
  87. data/lib/onesignal/models/update_live_activity_success_response.rb +8 -17
  88. data/lib/onesignal/models/update_user_request.rb +1 -1
  89. data/lib/onesignal/models/user.rb +6 -15
  90. data/lib/onesignal/models/{inline_response200.rb → user_identity_body.rb} +5 -5
  91. data/lib/onesignal/models/{create_player_success_response.rb → web_button.rb} +40 -17
  92. data/lib/onesignal/version.rb +2 -2
  93. data/lib/onesignal.rb +16 -34
  94. data/onesignal.gemspec +1 -1
  95. data/spec/api/default_api_spec.rb +82 -174
  96. data/spec/api_client_spec.rb +1 -1
  97. data/spec/configuration_spec.rb +1 -1
  98. data/spec/models/app_spec.rb +1 -1
  99. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  100. data/spec/models/basic_notification_all_of_spec.rb +13 -7
  101. data/spec/models/basic_notification_spec.rb +14 -14
  102. data/spec/models/button_spec.rb +1 -1
  103. data/spec/models/create_notification_success_response_spec.rb +1 -7
  104. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  105. data/spec/models/create_segment_success_response_spec.rb +1 -1
  106. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  107. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  108. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  109. data/spec/models/delivery_data_spec.rb +1 -1
  110. data/spec/models/export_events_success_response_spec.rb +1 -1
  111. data/spec/models/{export_players_request_body_spec.rb → export_subscriptions_request_body_spec.rb} +7 -7
  112. data/spec/models/{export_players_success_response_spec.rb → export_subscriptions_success_response_spec.rb} +7 -7
  113. data/spec/models/{notification200_errors_spec.rb → filter_expression_spec.rb} +3 -3
  114. data/spec/models/filter_spec.rb +25 -1
  115. data/spec/models/generic_error_spec.rb +13 -1
  116. data/spec/models/{delete_player_success_response_spec.rb → generic_success_bool_response_spec.rb} +7 -7
  117. data/spec/models/{get_notification_request_body_spec.rb → get_notification_history_request_body_spec.rb} +7 -7
  118. data/spec/models/{player_slice_spec.rb → get_segments_success_response_spec.rb} +8 -8
  119. data/spec/models/{string_map_spec.rb → language_string_map_spec.rb} +7 -7
  120. data/spec/models/notification_all_of_spec.rb +1 -1
  121. data/spec/models/notification_history_success_response_spec.rb +1 -1
  122. data/spec/models/notification_slice_spec.rb +1 -1
  123. data/spec/models/notification_spec.rb +14 -14
  124. data/spec/models/notification_target_spec.rb +2 -8
  125. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  126. data/spec/models/notification_with_meta_spec.rb +14 -14
  127. data/spec/models/operator_spec.rb +1 -1
  128. data/spec/models/outcome_data_spec.rb +1 -1
  129. data/spec/models/outcomes_data_spec.rb +1 -1
  130. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  131. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  132. data/spec/models/platform_delivery_data_spec.rb +1 -1
  133. data/spec/models/{inline_response202_spec.rb → properties_body_spec.rb} +7 -7
  134. data/spec/models/properties_deltas_spec.rb +1 -1
  135. data/spec/models/properties_object_spec.rb +1 -1
  136. data/spec/models/purchase_spec.rb +1 -1
  137. data/spec/models/{generic_error_errors_inner_spec.rb → rate_limit_error_spec.rb} +9 -9
  138. data/spec/models/{filter_expressions_spec.rb → segment_data_spec.rb} +24 -20
  139. data/spec/models/segment_notification_target_spec.rb +1 -1
  140. data/spec/models/segment_spec.rb +1 -1
  141. data/spec/models/{inline_response201_spec.rb → subscription_body_spec.rb} +7 -7
  142. data/spec/models/{player_notification_target_spec.rb → subscription_notification_target_spec.rb} +8 -14
  143. data/spec/models/{subscription_object_spec.rb → subscription_spec.rb} +7 -7
  144. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  145. data/spec/models/update_live_activity_request_spec.rb +32 -6
  146. data/spec/models/update_live_activity_success_response_spec.rb +2 -8
  147. data/spec/models/update_user_request_spec.rb +1 -1
  148. data/spec/models/{user_identity_response_spec.rb → user_identity_body_spec.rb} +7 -7
  149. data/spec/models/user_spec.rb +1 -7
  150. data/spec/models/{create_player_success_response_spec.rb → web_button_spec.rb} +21 -9
  151. data/spec/spec_helper.rb +1 -1
  152. metadata +97 -171
  153. data/Gemfile.lock +0 -74
  154. data/docs/BeginLiveActivityRequest.md +0 -20
  155. data/docs/CancelNotificationSuccessResponse.md +0 -18
  156. data/docs/CreatePlayerSuccessResponse.md +0 -20
  157. data/docs/CreateSubscriptionRequestBody.md +0 -20
  158. data/docs/DeletePlayerNotFoundResponse.md +0 -18
  159. data/docs/DeleteSegmentNotFoundResponse.md +0 -18
  160. data/docs/DeleteSegmentSuccessResponse.md +0 -18
  161. data/docs/FilterExpressions.md +0 -26
  162. data/docs/InlineResponse2003.md +0 -18
  163. data/docs/InlineResponse201.md +0 -18
  164. data/docs/InvalidIdentifierError.md +0 -20
  165. data/docs/Player.md +0 -70
  166. data/docs/PlayerNotificationTarget.md +0 -40
  167. data/docs/PlayerNotificationTargetIncludeAliases.md +0 -18
  168. data/docs/PlayerSlice.md +0 -24
  169. data/docs/UpdatePlayerSuccessResponse.md +0 -18
  170. data/docs/UpdatePlayerTagsRequestBody.md +0 -18
  171. data/docs/UpdatePlayerTagsSuccessResponse.md +0 -18
  172. data/docs/UpdateSubscriptionRequestBody.md +0 -18
  173. data/docs/UserIdentityRequestBody.md +0 -18
  174. data/docs/UserIdentityResponse.md +0 -18
  175. data/docs/UserSubscriptionOptions.md +0 -18
  176. data/lib/onesignal/models/cancel_notification_success_response.rb +0 -219
  177. data/lib/onesignal/models/create_subscription_request_body.rb +0 -228
  178. data/lib/onesignal/models/delete_player_not_found_response.rb +0 -219
  179. data/lib/onesignal/models/delete_player_success_response.rb +0 -219
  180. data/lib/onesignal/models/delete_segment_not_found_response.rb +0 -219
  181. data/lib/onesignal/models/delete_segment_success_response.rb +0 -219
  182. data/lib/onesignal/models/filter_expressions.rb +0 -336
  183. data/lib/onesignal/models/generic_error_errors_inner.rb +0 -228
  184. data/lib/onesignal/models/inline_response2003.rb +0 -221
  185. data/lib/onesignal/models/invalid_identifier_error.rb +0 -234
  186. data/lib/onesignal/models/player.rb +0 -494
  187. data/lib/onesignal/models/player_notification_target_include_aliases.rb +0 -221
  188. data/lib/onesignal/models/update_player_tags_request_body.rb +0 -220
  189. data/lib/onesignal/models/update_player_tags_success_response.rb +0 -219
  190. data/lib/onesignal/models/update_subscription_request_body.rb +0 -219
  191. data/lib/onesignal/models/user_identity_request_body.rb +0 -221
  192. data/lib/onesignal/models/user_identity_response.rb +0 -221
  193. data/lib/onesignal/models/user_subscription_options.rb +0 -219
  194. data/spec/models/begin_live_activity_request_spec.rb +0 -40
  195. data/spec/models/cancel_notification_success_response_spec.rb +0 -34
  196. data/spec/models/create_subscription_request_body_spec.rb +0 -40
  197. data/spec/models/delete_player_not_found_response_spec.rb +0 -34
  198. data/spec/models/delete_segment_not_found_response_spec.rb +0 -34
  199. data/spec/models/delete_segment_success_response_spec.rb +0 -34
  200. data/spec/models/inline_response2003_spec.rb +0 -34
  201. data/spec/models/inline_response200_spec.rb +0 -34
  202. data/spec/models/invalid_identifier_error_spec.rb +0 -40
  203. data/spec/models/player_notification_target_include_aliases_spec.rb +0 -34
  204. data/spec/models/player_spec.rb +0 -190
  205. data/spec/models/rate_limiter_error_spec.rb +0 -34
  206. data/spec/models/update_player_success_response_spec.rb +0 -34
  207. data/spec/models/update_player_tags_request_body_spec.rb +0 -34
  208. data/spec/models/update_player_tags_success_response_spec.rb +0 -34
  209. data/spec/models/update_subscription_request_body_spec.rb +0 -34
  210. data/spec/models/user_identity_request_body_spec.rb +0 -34
  211. data/spec/models/user_subscription_options_spec.rb +0 -34
data/docs/DefaultApi.md CHANGED
@@ -4,52 +4,45 @@ 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 |
8
7
  | [**cancel_notification**](DefaultApi.md#cancel_notification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification |
8
+ | [**create_alias**](DefaultApi.md#create_alias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
9
+ | [**create_alias_by_subscription**](DefaultApi.md#create_alias_by_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
9
10
  | [**create_app**](DefaultApi.md#create_app) | **POST** /apps | Create an app |
10
11
  | [**create_notification**](DefaultApi.md#create_notification) | **POST** /notifications | Create notification |
11
- | [**create_player**](DefaultApi.md#create_player) | **POST** /players | Add a device |
12
- | [**create_segments**](DefaultApi.md#create_segments) | **POST** /apps/{app_id}/segments | Create Segments |
12
+ | [**create_segment**](DefaultApi.md#create_segment) | **POST** /apps/{app_id}/segments | Create Segment |
13
13
  | [**create_subscription**](DefaultApi.md#create_subscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | |
14
14
  | [**create_user**](DefaultApi.md#create_user) | **POST** /apps/{app_id}/users | |
15
15
  | [**delete_alias**](DefaultApi.md#delete_alias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | |
16
- | [**delete_player**](DefaultApi.md#delete_player) | **DELETE** /players/{player_id} | Delete a user record |
17
- | [**delete_segments**](DefaultApi.md#delete_segments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments |
16
+ | [**delete_segment**](DefaultApi.md#delete_segment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment |
18
17
  | [**delete_subscription**](DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | |
19
18
  | [**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
19
  | [**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 | |
20
+ | [**export_subscriptions**](DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions |
21
+ | [**get_aliases**](DefaultApi.md#get_aliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
22
+ | [**get_aliases_by_subscription**](DefaultApi.md#get_aliases_by_subscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | |
26
23
  | [**get_app**](DefaultApi.md#get_app) | **GET** /apps/{app_id} | View an app |
27
24
  | [**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 | |
29
25
  | [**get_notification**](DefaultApi.md#get_notification) | **GET** /notifications/{notification_id} | View notification |
30
26
  | [**get_notification_history**](DefaultApi.md#get_notification_history) | **POST** /notifications/{notification_id}/history | Notification History |
31
27
  | [**get_notifications**](DefaultApi.md#get_notifications) | **GET** /notifications | View notifications |
32
28
  | [**get_outcomes**](DefaultApi.md#get_outcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes |
33
- | [**get_player**](DefaultApi.md#get_player) | **GET** /players/{player_id} | View device |
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 | |
29
+ | [**get_segments**](DefaultApi.md#get_segments) | **GET** /apps/{app_id}/segments | Get Segments |
30
+ | [**get_user**](DefaultApi.md#get_user) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
37
31
  | [**transfer_subscription**](DefaultApi.md#transfer_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | |
32
+ | [**unsubscribe_email_with_token**](DefaultApi.md#unsubscribe_email_with_token) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token |
38
33
  | [**update_app**](DefaultApi.md#update_app) | **PUT** /apps/{app_id} | Update an app |
39
34
  | [**update_live_activity**](DefaultApi.md#update_live_activity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push |
40
- | [**update_player**](DefaultApi.md#update_player) | **PUT** /players/{player_id} | Edit device |
41
- | [**update_player_tags**](DefaultApi.md#update_player_tags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id |
42
35
  | [**update_subscription**](DefaultApi.md#update_subscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | |
43
36
  | [**update_user**](DefaultApi.md#update_user) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
44
37
 
45
38
 
46
- ## begin_live_activity
39
+ ## cancel_notification
47
40
 
48
- > begin_live_activity(app_id, activity_id, begin_live_activity_request)
41
+ > <GenericSuccessBoolResponse> cancel_notification(app_id, notification_id)
49
42
 
50
- Start Live Activity
43
+ Stop a scheduled or currently outgoing notification
51
44
 
52
- Starts a Live Activity
45
+ Used to stop a scheduled or currently outgoing notification
53
46
 
54
47
  ### Examples
55
48
 
@@ -57,39 +50,39 @@ Starts a Live Activity
57
50
  require 'onesignal'
58
51
  # setup authorization
59
52
  OneSignal.configure do |config|
60
- # Configure Bearer authorization: app_key
61
- config.app_key = 'YOUR_BEARER_TOKEN'
53
+ # Configure Bearer authorization: rest_api_key
54
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
62
55
 
63
56
  end
64
57
 
65
58
  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 |
59
+ app_id = 'app_id_example' # String |
60
+ notification_id = 'notification_id_example' # String |
69
61
 
70
62
  begin
71
- # Start Live Activity
72
- api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
63
+ # Stop a scheduled or currently outgoing notification
64
+ result = api_instance.cancel_notification(app_id, notification_id)
65
+ p result
73
66
  rescue OneSignal::ApiError => e
74
- puts "Error when calling DefaultApi->begin_live_activity: #{e}"
67
+ puts "Error when calling DefaultApi->cancel_notification: #{e}"
75
68
  end
76
69
  ```
77
70
 
78
- #### Using the begin_live_activity_with_http_info variant
71
+ #### Using the cancel_notification_with_http_info variant
79
72
 
80
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
73
+ This returns an Array which contains the response data, status code and headers.
81
74
 
82
- > <Array(nil, Integer, Hash)> begin_live_activity_with_http_info(app_id, activity_id, begin_live_activity_request)
75
+ > <Array(<GenericSuccessBoolResponse>, Integer, Hash)> cancel_notification_with_http_info(app_id, notification_id)
83
76
 
84
77
  ```ruby
85
78
  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)
79
+ # Stop a scheduled or currently outgoing notification
80
+ data, status_code, headers = api_instance.cancel_notification_with_http_info(app_id, notification_id)
88
81
  p status_code # => 2xx
89
82
  p headers # => { ... }
90
- p data # => nil
83
+ p data # => <GenericSuccessBoolResponse>
91
84
  rescue OneSignal::ApiError => e
92
- puts "Error when calling DefaultApi->begin_live_activity_with_http_info: #{e}"
85
+ puts "Error when calling DefaultApi->cancel_notification_with_http_info: #{e}"
93
86
  end
94
87
  ```
95
88
 
@@ -97,31 +90,30 @@ end
97
90
 
98
91
  | Name | Type | Description | Notes |
99
92
  | ---- | ---- | ----------- | ----- |
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) | | |
93
+ | **app_id** | **String** | | |
94
+ | **notification_id** | **String** | | |
103
95
 
104
96
  ### Return type
105
97
 
106
- nil (empty response body)
98
+ [**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md)
107
99
 
108
100
  ### Authorization
109
101
 
110
- [app_key](../README.md#app_key)
102
+ [rest_api_key](../README.md#rest_api_key)
111
103
 
112
104
  ### HTTP request headers
113
105
 
114
- - **Content-Type**: application/json
106
+ - **Content-Type**: Not defined
115
107
  - **Accept**: application/json
116
108
 
117
109
 
118
- ## cancel_notification
110
+ ## create_alias
119
111
 
120
- > <CancelNotificationSuccessResponse> cancel_notification(app_id, notification_id)
112
+ > <UserIdentityBody> create_alias(app_id, alias_label, alias_id, user_identity_body)
121
113
 
122
- Stop a scheduled or currently outgoing notification
123
114
 
124
- Used to stop a scheduled or currently outgoing notification
115
+
116
+ Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
125
117
 
126
118
  ### Examples
127
119
 
@@ -129,39 +121,41 @@ Used to stop a scheduled or currently outgoing notification
129
121
  require 'onesignal'
130
122
  # setup authorization
131
123
  OneSignal.configure do |config|
132
- # Configure Bearer authorization: app_key
133
- config.app_key = 'YOUR_BEARER_TOKEN'
124
+ # Configure Bearer authorization: rest_api_key
125
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
134
126
 
135
127
  end
136
128
 
137
129
  api_instance = OneSignal::DefaultApi.new
138
130
  app_id = 'app_id_example' # String |
139
- notification_id = 'notification_id_example' # String |
131
+ alias_label = 'alias_label_example' # String |
132
+ alias_id = 'alias_id_example' # String |
133
+ user_identity_body = OneSignal::UserIdentityBody.new # UserIdentityBody |
140
134
 
141
135
  begin
142
- # Stop a scheduled or currently outgoing notification
143
- result = api_instance.cancel_notification(app_id, notification_id)
136
+
137
+ result = api_instance.create_alias(app_id, alias_label, alias_id, user_identity_body)
144
138
  p result
145
139
  rescue OneSignal::ApiError => e
146
- puts "Error when calling DefaultApi->cancel_notification: #{e}"
140
+ puts "Error when calling DefaultApi->create_alias: #{e}"
147
141
  end
148
142
  ```
149
143
 
150
- #### Using the cancel_notification_with_http_info variant
144
+ #### Using the create_alias_with_http_info variant
151
145
 
152
146
  This returns an Array which contains the response data, status code and headers.
153
147
 
154
- > <Array(<CancelNotificationSuccessResponse>, Integer, Hash)> cancel_notification_with_http_info(app_id, notification_id)
148
+ > <Array(<UserIdentityBody>, Integer, Hash)> create_alias_with_http_info(app_id, alias_label, alias_id, user_identity_body)
155
149
 
156
150
  ```ruby
157
151
  begin
158
- # Stop a scheduled or currently outgoing notification
159
- data, status_code, headers = api_instance.cancel_notification_with_http_info(app_id, notification_id)
152
+
153
+ data, status_code, headers = api_instance.create_alias_with_http_info(app_id, alias_label, alias_id, user_identity_body)
160
154
  p status_code # => 2xx
161
155
  p headers # => { ... }
162
- p data # => <CancelNotificationSuccessResponse>
156
+ p data # => <UserIdentityBody>
163
157
  rescue OneSignal::ApiError => e
164
- puts "Error when calling DefaultApi->cancel_notification_with_http_info: #{e}"
158
+ puts "Error when calling DefaultApi->create_alias_with_http_info: #{e}"
165
159
  end
166
160
  ```
167
161
 
@@ -170,29 +164,31 @@ end
170
164
  | Name | Type | Description | Notes |
171
165
  | ---- | ---- | ----------- | ----- |
172
166
  | **app_id** | **String** | | |
173
- | **notification_id** | **String** | | |
167
+ | **alias_label** | **String** | | |
168
+ | **alias_id** | **String** | | |
169
+ | **user_identity_body** | [**UserIdentityBody**](UserIdentityBody.md) | | |
174
170
 
175
171
  ### Return type
176
172
 
177
- [**CancelNotificationSuccessResponse**](CancelNotificationSuccessResponse.md)
173
+ [**UserIdentityBody**](UserIdentityBody.md)
178
174
 
179
175
  ### Authorization
180
176
 
181
- [app_key](../README.md#app_key)
177
+ [rest_api_key](../README.md#rest_api_key)
182
178
 
183
179
  ### HTTP request headers
184
180
 
185
- - **Content-Type**: Not defined
181
+ - **Content-Type**: application/json
186
182
  - **Accept**: application/json
187
183
 
188
184
 
189
- ## create_app
185
+ ## create_alias_by_subscription
190
186
 
191
- > <App> create_app(app)
187
+ > <UserIdentityBody> create_alias_by_subscription(app_id, subscription_id, user_identity_body)
192
188
 
193
- Create an app
194
189
 
195
- Creates a new OneSignal app
190
+
191
+ Upserts one or more Aliases for the User identified by :subscription_id.
196
192
 
197
193
  ### Examples
198
194
 
@@ -200,38 +196,40 @@ Creates a new OneSignal app
200
196
  require 'onesignal'
201
197
  # setup authorization
202
198
  OneSignal.configure do |config|
203
- # Configure Bearer authorization: user_key
204
- config.user_key = 'YOUR_BEARER_TOKEN'
199
+ # Configure Bearer authorization: rest_api_key
200
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
205
201
 
206
202
  end
207
203
 
208
204
  api_instance = OneSignal::DefaultApi.new
209
- app = OneSignal::App.new # App |
205
+ app_id = 'app_id_example' # String |
206
+ subscription_id = 'subscription_id_example' # String |
207
+ user_identity_body = OneSignal::UserIdentityBody.new # UserIdentityBody |
210
208
 
211
209
  begin
212
- # Create an app
213
- result = api_instance.create_app(app)
210
+
211
+ result = api_instance.create_alias_by_subscription(app_id, subscription_id, user_identity_body)
214
212
  p result
215
213
  rescue OneSignal::ApiError => e
216
- puts "Error when calling DefaultApi->create_app: #{e}"
214
+ puts "Error when calling DefaultApi->create_alias_by_subscription: #{e}"
217
215
  end
218
216
  ```
219
217
 
220
- #### Using the create_app_with_http_info variant
218
+ #### Using the create_alias_by_subscription_with_http_info variant
221
219
 
222
220
  This returns an Array which contains the response data, status code and headers.
223
221
 
224
- > <Array(<App>, Integer, Hash)> create_app_with_http_info(app)
222
+ > <Array(<UserIdentityBody>, Integer, Hash)> create_alias_by_subscription_with_http_info(app_id, subscription_id, user_identity_body)
225
223
 
226
224
  ```ruby
227
225
  begin
228
- # Create an app
229
- data, status_code, headers = api_instance.create_app_with_http_info(app)
226
+
227
+ data, status_code, headers = api_instance.create_alias_by_subscription_with_http_info(app_id, subscription_id, user_identity_body)
230
228
  p status_code # => 2xx
231
229
  p headers # => { ... }
232
- p data # => <App>
230
+ p data # => <UserIdentityBody>
233
231
  rescue OneSignal::ApiError => e
234
- puts "Error when calling DefaultApi->create_app_with_http_info: #{e}"
232
+ puts "Error when calling DefaultApi->create_alias_by_subscription_with_http_info: #{e}"
235
233
  end
236
234
  ```
237
235
 
@@ -239,15 +237,17 @@ end
239
237
 
240
238
  | Name | Type | Description | Notes |
241
239
  | ---- | ---- | ----------- | ----- |
242
- | **app** | [**App**](App.md) | | |
240
+ | **app_id** | **String** | | |
241
+ | **subscription_id** | **String** | | |
242
+ | **user_identity_body** | [**UserIdentityBody**](UserIdentityBody.md) | | |
243
243
 
244
244
  ### Return type
245
245
 
246
- [**App**](App.md)
246
+ [**UserIdentityBody**](UserIdentityBody.md)
247
247
 
248
248
  ### Authorization
249
249
 
250
- [user_key](../README.md#user_key)
250
+ [rest_api_key](../README.md#rest_api_key)
251
251
 
252
252
  ### HTTP request headers
253
253
 
@@ -255,13 +255,13 @@ end
255
255
  - **Accept**: application/json
256
256
 
257
257
 
258
- ## create_notification
258
+ ## create_app
259
259
 
260
- > <CreateNotificationSuccessResponse> create_notification(notification)
260
+ > <App> create_app(app)
261
261
 
262
- Create notification
262
+ Create an app
263
263
 
264
- Sends notifications to your users
264
+ Creates a new OneSignal app
265
265
 
266
266
  ### Examples
267
267
 
@@ -269,38 +269,38 @@ Sends notifications to your users
269
269
  require 'onesignal'
270
270
  # setup authorization
271
271
  OneSignal.configure do |config|
272
- # Configure Bearer authorization: app_key
273
- config.app_key = 'YOUR_BEARER_TOKEN'
272
+ # Configure Bearer authorization: organization_api_key
273
+ config.organization_api_key = 'YOUR_BEARER_TOKEN'
274
274
 
275
275
  end
276
276
 
277
277
  api_instance = OneSignal::DefaultApi.new
278
- notification = OneSignal::Notification.new({app_id: 'app_id_example'}) # Notification |
278
+ app = OneSignal::App.new # App |
279
279
 
280
280
  begin
281
- # Create notification
282
- result = api_instance.create_notification(notification)
281
+ # Create an app
282
+ result = api_instance.create_app(app)
283
283
  p result
284
284
  rescue OneSignal::ApiError => e
285
- puts "Error when calling DefaultApi->create_notification: #{e}"
285
+ puts "Error when calling DefaultApi->create_app: #{e}"
286
286
  end
287
287
  ```
288
288
 
289
- #### Using the create_notification_with_http_info variant
289
+ #### Using the create_app_with_http_info variant
290
290
 
291
291
  This returns an Array which contains the response data, status code and headers.
292
292
 
293
- > <Array(<CreateNotificationSuccessResponse>, Integer, Hash)> create_notification_with_http_info(notification)
293
+ > <Array(<App>, Integer, Hash)> create_app_with_http_info(app)
294
294
 
295
295
  ```ruby
296
296
  begin
297
- # Create notification
298
- data, status_code, headers = api_instance.create_notification_with_http_info(notification)
297
+ # Create an app
298
+ data, status_code, headers = api_instance.create_app_with_http_info(app)
299
299
  p status_code # => 2xx
300
300
  p headers # => { ... }
301
- p data # => <CreateNotificationSuccessResponse>
301
+ p data # => <App>
302
302
  rescue OneSignal::ApiError => e
303
- puts "Error when calling DefaultApi->create_notification_with_http_info: #{e}"
303
+ puts "Error when calling DefaultApi->create_app_with_http_info: #{e}"
304
304
  end
305
305
  ```
306
306
 
@@ -308,15 +308,15 @@ end
308
308
 
309
309
  | Name | Type | Description | Notes |
310
310
  | ---- | ---- | ----------- | ----- |
311
- | **notification** | [**Notification**](Notification.md) | | |
311
+ | **app** | [**App**](App.md) | | |
312
312
 
313
313
  ### Return type
314
314
 
315
- [**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md)
315
+ [**App**](App.md)
316
316
 
317
317
  ### Authorization
318
318
 
319
- [app_key](../README.md#app_key)
319
+ [organization_api_key](../README.md#organization_api_key)
320
320
 
321
321
  ### HTTP request headers
322
322
 
@@ -324,13 +324,13 @@ end
324
324
  - **Accept**: application/json
325
325
 
326
326
 
327
- ## create_player
327
+ ## create_notification
328
328
 
329
- > <CreatePlayerSuccessResponse> create_player(player)
329
+ > <CreateNotificationSuccessResponse> create_notification(notification)
330
330
 
331
- Add a device
331
+ Create notification
332
332
 
333
- Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
333
+ Sends notifications to your users
334
334
 
335
335
  ### Examples
336
336
 
@@ -338,38 +338,38 @@ Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this Thi
338
338
  require 'onesignal'
339
339
  # setup authorization
340
340
  OneSignal.configure do |config|
341
- # Configure Bearer authorization: app_key
342
- config.app_key = 'YOUR_BEARER_TOKEN'
341
+ # Configure Bearer authorization: rest_api_key
342
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
343
343
 
344
344
  end
345
345
 
346
346
  api_instance = OneSignal::DefaultApi.new
347
- player = OneSignal::Player.new({device_type: 37}) # Player |
347
+ notification = OneSignal::Notification.new({app_id: 'app_id_example'}) # Notification |
348
348
 
349
349
  begin
350
- # Add a device
351
- result = api_instance.create_player(player)
350
+ # Create notification
351
+ result = api_instance.create_notification(notification)
352
352
  p result
353
353
  rescue OneSignal::ApiError => e
354
- puts "Error when calling DefaultApi->create_player: #{e}"
354
+ puts "Error when calling DefaultApi->create_notification: #{e}"
355
355
  end
356
356
  ```
357
357
 
358
- #### Using the create_player_with_http_info variant
358
+ #### Using the create_notification_with_http_info variant
359
359
 
360
360
  This returns an Array which contains the response data, status code and headers.
361
361
 
362
- > <Array(<CreatePlayerSuccessResponse>, Integer, Hash)> create_player_with_http_info(player)
362
+ > <Array(<CreateNotificationSuccessResponse>, Integer, Hash)> create_notification_with_http_info(notification)
363
363
 
364
364
  ```ruby
365
365
  begin
366
- # Add a device
367
- data, status_code, headers = api_instance.create_player_with_http_info(player)
366
+ # Create notification
367
+ data, status_code, headers = api_instance.create_notification_with_http_info(notification)
368
368
  p status_code # => 2xx
369
369
  p headers # => { ... }
370
- p data # => <CreatePlayerSuccessResponse>
370
+ p data # => <CreateNotificationSuccessResponse>
371
371
  rescue OneSignal::ApiError => e
372
- puts "Error when calling DefaultApi->create_player_with_http_info: #{e}"
372
+ puts "Error when calling DefaultApi->create_notification_with_http_info: #{e}"
373
373
  end
374
374
  ```
375
375
 
@@ -377,15 +377,15 @@ end
377
377
 
378
378
  | Name | Type | Description | Notes |
379
379
  | ---- | ---- | ----------- | ----- |
380
- | **player** | [**Player**](Player.md) | | |
380
+ | **notification** | [**Notification**](Notification.md) | | |
381
381
 
382
382
  ### Return type
383
383
 
384
- [**CreatePlayerSuccessResponse**](CreatePlayerSuccessResponse.md)
384
+ [**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md)
385
385
 
386
386
  ### Authorization
387
387
 
388
- [app_key](../README.md#app_key)
388
+ [rest_api_key](../README.md#rest_api_key)
389
389
 
390
390
  ### HTTP request headers
391
391
 
@@ -393,13 +393,13 @@ end
393
393
  - **Accept**: application/json
394
394
 
395
395
 
396
- ## create_segments
396
+ ## create_segment
397
397
 
398
- > <CreateSegmentSuccessResponse> create_segments(app_id, opts)
398
+ > <CreateSegmentSuccessResponse> create_segment(app_id, opts)
399
399
 
400
- Create Segments
400
+ Create Segment
401
401
 
402
- Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
402
+ Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit.
403
403
 
404
404
  ### Examples
405
405
 
@@ -407,41 +407,41 @@ Create segments visible and usable in the dashboard and API - Required: OneSigna
407
407
  require 'onesignal'
408
408
  # setup authorization
409
409
  OneSignal.configure do |config|
410
- # Configure Bearer authorization: app_key
411
- config.app_key = 'YOUR_BEARER_TOKEN'
410
+ # Configure Bearer authorization: rest_api_key
411
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
412
412
 
413
413
  end
414
414
 
415
415
  api_instance = OneSignal::DefaultApi.new
416
416
  app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
417
417
  opts = {
418
- segment: OneSignal::Segment.new({name: 'name_example', filters: [OneSignal::FilterExpressions.new({field: 'field_example', relation: '>'})]}) # Segment |
418
+ segment: OneSignal::Segment.new({name: 'name_example', filters: [OneSignal::Filter.new]}) # Segment |
419
419
  }
420
420
 
421
421
  begin
422
- # Create Segments
423
- result = api_instance.create_segments(app_id, opts)
422
+ # Create Segment
423
+ result = api_instance.create_segment(app_id, opts)
424
424
  p result
425
425
  rescue OneSignal::ApiError => e
426
- puts "Error when calling DefaultApi->create_segments: #{e}"
426
+ puts "Error when calling DefaultApi->create_segment: #{e}"
427
427
  end
428
428
  ```
429
429
 
430
- #### Using the create_segments_with_http_info variant
430
+ #### Using the create_segment_with_http_info variant
431
431
 
432
432
  This returns an Array which contains the response data, status code and headers.
433
433
 
434
- > <Array(<CreateSegmentSuccessResponse>, Integer, Hash)> create_segments_with_http_info(app_id, opts)
434
+ > <Array(<CreateSegmentSuccessResponse>, Integer, Hash)> create_segment_with_http_info(app_id, opts)
435
435
 
436
436
  ```ruby
437
437
  begin
438
- # Create Segments
439
- data, status_code, headers = api_instance.create_segments_with_http_info(app_id, opts)
438
+ # Create Segment
439
+ data, status_code, headers = api_instance.create_segment_with_http_info(app_id, opts)
440
440
  p status_code # => 2xx
441
441
  p headers # => { ... }
442
442
  p data # => <CreateSegmentSuccessResponse>
443
443
  rescue OneSignal::ApiError => e
444
- puts "Error when calling DefaultApi->create_segments_with_http_info: #{e}"
444
+ puts "Error when calling DefaultApi->create_segment_with_http_info: #{e}"
445
445
  end
446
446
  ```
447
447
 
@@ -458,7 +458,7 @@ end
458
458
 
459
459
  ### Authorization
460
460
 
461
- [app_key](../README.md#app_key)
461
+ [rest_api_key](../README.md#rest_api_key)
462
462
 
463
463
  ### HTTP request headers
464
464
 
@@ -468,7 +468,7 @@ end
468
468
 
469
469
  ## create_subscription
470
470
 
471
- > <InlineResponse201> create_subscription(app_id, alias_label, alias_id, create_subscription_request_body)
471
+ > <SubscriptionBody> create_subscription(app_id, alias_label, alias_id, subscription_body)
472
472
 
473
473
 
474
474
 
@@ -480,8 +480,8 @@ Creates a new Subscription under the User provided. Useful to add email addresse
480
480
  require 'onesignal'
481
481
  # setup authorization
482
482
  OneSignal.configure do |config|
483
- # Configure Bearer authorization: app_key
484
- config.app_key = 'YOUR_BEARER_TOKEN'
483
+ # Configure Bearer authorization: rest_api_key
484
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
485
485
 
486
486
  end
487
487
 
@@ -489,11 +489,11 @@ api_instance = OneSignal::DefaultApi.new
489
489
  app_id = 'app_id_example' # String |
490
490
  alias_label = 'alias_label_example' # String |
491
491
  alias_id = 'alias_id_example' # String |
492
- create_subscription_request_body = OneSignal::CreateSubscriptionRequestBody.new # CreateSubscriptionRequestBody |
492
+ subscription_body = OneSignal::SubscriptionBody.new # SubscriptionBody |
493
493
 
494
494
  begin
495
495
 
496
- result = api_instance.create_subscription(app_id, alias_label, alias_id, create_subscription_request_body)
496
+ result = api_instance.create_subscription(app_id, alias_label, alias_id, subscription_body)
497
497
  p result
498
498
  rescue OneSignal::ApiError => e
499
499
  puts "Error when calling DefaultApi->create_subscription: #{e}"
@@ -504,15 +504,15 @@ end
504
504
 
505
505
  This returns an Array which contains the response data, status code and headers.
506
506
 
507
- > <Array(<InlineResponse201>, Integer, Hash)> create_subscription_with_http_info(app_id, alias_label, alias_id, create_subscription_request_body)
507
+ > <Array(<SubscriptionBody>, Integer, Hash)> create_subscription_with_http_info(app_id, alias_label, alias_id, subscription_body)
508
508
 
509
509
  ```ruby
510
510
  begin
511
511
 
512
- data, status_code, headers = api_instance.create_subscription_with_http_info(app_id, alias_label, alias_id, create_subscription_request_body)
512
+ data, status_code, headers = api_instance.create_subscription_with_http_info(app_id, alias_label, alias_id, subscription_body)
513
513
  p status_code # => 2xx
514
514
  p headers # => { ... }
515
- p data # => <InlineResponse201>
515
+ p data # => <SubscriptionBody>
516
516
  rescue OneSignal::ApiError => e
517
517
  puts "Error when calling DefaultApi->create_subscription_with_http_info: #{e}"
518
518
  end
@@ -525,15 +525,15 @@ end
525
525
  | **app_id** | **String** | | |
526
526
  | **alias_label** | **String** | | |
527
527
  | **alias_id** | **String** | | |
528
- | **create_subscription_request_body** | [**CreateSubscriptionRequestBody**](CreateSubscriptionRequestBody.md) | | |
528
+ | **subscription_body** | [**SubscriptionBody**](SubscriptionBody.md) | | |
529
529
 
530
530
  ### Return type
531
531
 
532
- [**InlineResponse201**](InlineResponse201.md)
532
+ [**SubscriptionBody**](SubscriptionBody.md)
533
533
 
534
534
  ### Authorization
535
535
 
536
- [app_key](../README.md#app_key)
536
+ [rest_api_key](../README.md#rest_api_key)
537
537
 
538
538
  ### HTTP request headers
539
539
 
@@ -555,8 +555,8 @@ Creates a User, optionally Subscriptions owned by the User as well as Aliases. A
555
555
  require 'onesignal'
556
556
  # setup authorization
557
557
  OneSignal.configure do |config|
558
- # Configure Bearer authorization: app_key
559
- config.app_key = 'YOUR_BEARER_TOKEN'
558
+ # Configure Bearer authorization: rest_api_key
559
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
560
560
 
561
561
  end
562
562
 
@@ -604,7 +604,7 @@ end
604
604
 
605
605
  ### Authorization
606
606
 
607
- [app_key](../README.md#app_key)
607
+ [rest_api_key](../README.md#rest_api_key)
608
608
 
609
609
  ### HTTP request headers
610
610
 
@@ -614,7 +614,7 @@ end
614
614
 
615
615
  ## delete_alias
616
616
 
617
- > <InlineResponse200> delete_alias(app_id, alias_label, alias_id, alias_label_to_delete)
617
+ > <UserIdentityBody> delete_alias(app_id, alias_label, alias_id, alias_label_to_delete)
618
618
 
619
619
 
620
620
 
@@ -626,8 +626,8 @@ Deletes an alias by alias label
626
626
  require 'onesignal'
627
627
  # setup authorization
628
628
  OneSignal.configure do |config|
629
- # Configure Bearer authorization: app_key
630
- config.app_key = 'YOUR_BEARER_TOKEN'
629
+ # Configure Bearer authorization: rest_api_key
630
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
631
631
 
632
632
  end
633
633
 
@@ -650,7 +650,7 @@ end
650
650
 
651
651
  This returns an Array which contains the response data, status code and headers.
652
652
 
653
- > <Array(<InlineResponse200>, Integer, Hash)> delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete)
653
+ > <Array(<UserIdentityBody>, Integer, Hash)> delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete)
654
654
 
655
655
  ```ruby
656
656
  begin
@@ -658,7 +658,7 @@ begin
658
658
  data, status_code, headers = api_instance.delete_alias_with_http_info(app_id, alias_label, alias_id, alias_label_to_delete)
659
659
  p status_code # => 2xx
660
660
  p headers # => { ... }
661
- p data # => <InlineResponse200>
661
+ p data # => <UserIdentityBody>
662
662
  rescue OneSignal::ApiError => e
663
663
  puts "Error when calling DefaultApi->delete_alias_with_http_info: #{e}"
664
664
  end
@@ -675,82 +675,11 @@ end
675
675
 
676
676
  ### Return type
677
677
 
678
- [**InlineResponse200**](InlineResponse200.md)
679
-
680
- ### Authorization
681
-
682
- [app_key](../README.md#app_key)
683
-
684
- ### HTTP request headers
685
-
686
- - **Content-Type**: Not defined
687
- - **Accept**: application/json
688
-
689
-
690
- ## delete_player
691
-
692
- > <DeletePlayerSuccessResponse> delete_player(app_id, player_id)
693
-
694
- Delete a user record
695
-
696
- Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
697
-
698
- ### Examples
699
-
700
- ```ruby
701
- require 'onesignal'
702
- # setup authorization
703
- OneSignal.configure do |config|
704
- # Configure Bearer authorization: app_key
705
- config.app_key = 'YOUR_BEARER_TOKEN'
706
-
707
- end
708
-
709
- api_instance = OneSignal::DefaultApi.new
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
712
-
713
- begin
714
- # Delete a user record
715
- result = api_instance.delete_player(app_id, player_id)
716
- p result
717
- rescue OneSignal::ApiError => e
718
- puts "Error when calling DefaultApi->delete_player: #{e}"
719
- end
720
- ```
721
-
722
- #### Using the delete_player_with_http_info variant
723
-
724
- This returns an Array which contains the response data, status code and headers.
725
-
726
- > <Array(<DeletePlayerSuccessResponse>, Integer, Hash)> delete_player_with_http_info(app_id, player_id)
727
-
728
- ```ruby
729
- begin
730
- # Delete a user record
731
- data, status_code, headers = api_instance.delete_player_with_http_info(app_id, player_id)
732
- p status_code # => 2xx
733
- p headers # => { ... }
734
- p data # => <DeletePlayerSuccessResponse>
735
- rescue OneSignal::ApiError => e
736
- puts "Error when calling DefaultApi->delete_player_with_http_info: #{e}"
737
- end
738
- ```
739
-
740
- ### Parameters
741
-
742
- | Name | Type | Description | Notes |
743
- | ---- | ---- | ----------- | ----- |
744
- | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
745
- | **player_id** | **String** | The OneSignal player_id | |
746
-
747
- ### Return type
748
-
749
- [**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md)
678
+ [**UserIdentityBody**](UserIdentityBody.md)
750
679
 
751
680
  ### Authorization
752
681
 
753
- [app_key](../README.md#app_key)
682
+ [rest_api_key](../README.md#rest_api_key)
754
683
 
755
684
  ### HTTP request headers
756
685
 
@@ -758,13 +687,13 @@ end
758
687
  - **Accept**: application/json
759
688
 
760
689
 
761
- ## delete_segments
690
+ ## delete_segment
762
691
 
763
- > <DeleteSegmentSuccessResponse> delete_segments(app_id, segment_id)
692
+ > <GenericSuccessBoolResponse> delete_segment(app_id, segment_id)
764
693
 
765
- Delete Segments
694
+ Delete Segment
766
695
 
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.
696
+ Delete a segment (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.
768
697
 
769
698
  ### Examples
770
699
 
@@ -772,8 +701,8 @@ Delete segments (not user devices) - Required: OneSignal Paid Plan You can delet
772
701
  require 'onesignal'
773
702
  # setup authorization
774
703
  OneSignal.configure do |config|
775
- # Configure Bearer authorization: app_key
776
- config.app_key = 'YOUR_BEARER_TOKEN'
704
+ # Configure Bearer authorization: rest_api_key
705
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
777
706
 
778
707
  end
779
708
 
@@ -782,29 +711,29 @@ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Availab
782
711
  segment_id = 'segment_id_example' # String | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
783
712
 
784
713
  begin
785
- # Delete Segments
786
- result = api_instance.delete_segments(app_id, segment_id)
714
+ # Delete Segment
715
+ result = api_instance.delete_segment(app_id, segment_id)
787
716
  p result
788
717
  rescue OneSignal::ApiError => e
789
- puts "Error when calling DefaultApi->delete_segments: #{e}"
718
+ puts "Error when calling DefaultApi->delete_segment: #{e}"
790
719
  end
791
720
  ```
792
721
 
793
- #### Using the delete_segments_with_http_info variant
722
+ #### Using the delete_segment_with_http_info variant
794
723
 
795
724
  This returns an Array which contains the response data, status code and headers.
796
725
 
797
- > <Array(<DeleteSegmentSuccessResponse>, Integer, Hash)> delete_segments_with_http_info(app_id, segment_id)
726
+ > <Array(<GenericSuccessBoolResponse>, Integer, Hash)> delete_segment_with_http_info(app_id, segment_id)
798
727
 
799
728
  ```ruby
800
729
  begin
801
- # Delete Segments
802
- data, status_code, headers = api_instance.delete_segments_with_http_info(app_id, segment_id)
730
+ # Delete Segment
731
+ data, status_code, headers = api_instance.delete_segment_with_http_info(app_id, segment_id)
803
732
  p status_code # => 2xx
804
733
  p headers # => { ... }
805
- p data # => <DeleteSegmentSuccessResponse>
734
+ p data # => <GenericSuccessBoolResponse>
806
735
  rescue OneSignal::ApiError => e
807
- puts "Error when calling DefaultApi->delete_segments_with_http_info: #{e}"
736
+ puts "Error when calling DefaultApi->delete_segment_with_http_info: #{e}"
808
737
  end
809
738
  ```
810
739
 
@@ -817,11 +746,11 @@ end
817
746
 
818
747
  ### Return type
819
748
 
820
- [**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md)
749
+ [**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md)
821
750
 
822
751
  ### Authorization
823
752
 
824
- [app_key](../README.md#app_key)
753
+ [rest_api_key](../README.md#rest_api_key)
825
754
 
826
755
  ### HTTP request headers
827
756
 
@@ -843,8 +772,8 @@ Deletes the Subscription.
843
772
  require 'onesignal'
844
773
  # setup authorization
845
774
  OneSignal.configure do |config|
846
- # Configure Bearer authorization: app_key
847
- config.app_key = 'YOUR_BEARER_TOKEN'
775
+ # Configure Bearer authorization: rest_api_key
776
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
848
777
 
849
778
  end
850
779
 
@@ -891,7 +820,7 @@ nil (empty response body)
891
820
 
892
821
  ### Authorization
893
822
 
894
- [app_key](../README.md#app_key)
823
+ [rest_api_key](../README.md#rest_api_key)
895
824
 
896
825
  ### HTTP request headers
897
826
 
@@ -913,8 +842,8 @@ Removes the User identified by (:alias_label, :alias_id), and all Subscriptions
913
842
  require 'onesignal'
914
843
  # setup authorization
915
844
  OneSignal.configure do |config|
916
- # Configure Bearer authorization: app_key
917
- config.app_key = 'YOUR_BEARER_TOKEN'
845
+ # Configure Bearer authorization: rest_api_key
846
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
918
847
 
919
848
  end
920
849
 
@@ -963,79 +892,7 @@ nil (empty response body)
963
892
 
964
893
  ### Authorization
965
894
 
966
- [app_key](../README.md#app_key)
967
-
968
- ### HTTP request headers
969
-
970
- - **Content-Type**: Not defined
971
- - **Accept**: application/json
972
-
973
-
974
- ## end_live_activity
975
-
976
- > end_live_activity(app_id, activity_id, subscription_id)
977
-
978
- Stop Live Activity
979
-
980
- Stops a Live Activity
981
-
982
- ### Examples
983
-
984
- ```ruby
985
- require 'onesignal'
986
- # setup authorization
987
- OneSignal.configure do |config|
988
- # Configure Bearer authorization: app_key
989
- config.app_key = 'YOUR_BEARER_TOKEN'
990
-
991
- end
992
-
993
- api_instance = OneSignal::DefaultApi.new
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
997
-
998
- begin
999
- # Stop Live Activity
1000
- api_instance.end_live_activity(app_id, activity_id, subscription_id)
1001
- rescue OneSignal::ApiError => e
1002
- puts "Error when calling DefaultApi->end_live_activity: #{e}"
1003
- end
1004
- ```
1005
-
1006
- #### Using the end_live_activity_with_http_info variant
1007
-
1008
- This returns an Array which contains the response data (`nil` in this case), status code and headers.
1009
-
1010
- > <Array(nil, Integer, Hash)> end_live_activity_with_http_info(app_id, activity_id, subscription_id)
1011
-
1012
- ```ruby
1013
- begin
1014
- # Stop Live Activity
1015
- data, status_code, headers = api_instance.end_live_activity_with_http_info(app_id, activity_id, subscription_id)
1016
- p status_code # => 2xx
1017
- p headers # => { ... }
1018
- p data # => nil
1019
- rescue OneSignal::ApiError => e
1020
- puts "Error when calling DefaultApi->end_live_activity_with_http_info: #{e}"
1021
- end
1022
- ```
1023
-
1024
- ### Parameters
1025
-
1026
- | Name | Type | Description | Notes |
1027
- | ---- | ---- | ----------- | ----- |
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)
895
+ [rest_api_key](../README.md#rest_api_key)
1039
896
 
1040
897
  ### HTTP request headers
1041
898
 
@@ -1057,8 +914,8 @@ Generate a compressed CSV report of all of the events data for a notification. T
1057
914
  require 'onesignal'
1058
915
  # setup authorization
1059
916
  OneSignal.configure do |config|
1060
- # Configure Bearer authorization: app_key
1061
- config.app_key = 'YOUR_BEARER_TOKEN'
917
+ # Configure Bearer authorization: rest_api_key
918
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1062
919
 
1063
920
  end
1064
921
 
@@ -1106,7 +963,7 @@ end
1106
963
 
1107
964
  ### Authorization
1108
965
 
1109
- [app_key](../README.md#app_key)
966
+ [rest_api_key](../README.md#rest_api_key)
1110
967
 
1111
968
  ### HTTP request headers
1112
969
 
@@ -1114,11 +971,11 @@ end
1114
971
  - **Accept**: application/json
1115
972
 
1116
973
 
1117
- ## export_players
974
+ ## export_subscriptions
1118
975
 
1119
- > <ExportPlayersSuccessResponse> export_players(app_id, opts)
976
+ > <ExportSubscriptionsSuccessResponse> export_subscriptions(app_id, opts)
1120
977
 
1121
- Export CSV of Players
978
+ Export CSV of Subscriptions
1122
979
 
1123
980
  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
981
 
@@ -1128,41 +985,41 @@ Generate a compressed CSV export of all of your current user data This method ca
1128
985
  require 'onesignal'
1129
986
  # setup authorization
1130
987
  OneSignal.configure do |config|
1131
- # Configure Bearer authorization: app_key
1132
- config.app_key = 'YOUR_BEARER_TOKEN'
988
+ # Configure Bearer authorization: rest_api_key
989
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1133
990
 
1134
991
  end
1135
992
 
1136
993
  api_instance = OneSignal::DefaultApi.new
1137
994
  app_id = 'app_id_example' # String | The app ID that you want to export devices from
1138
995
  opts = {
1139
- export_players_request_body: OneSignal::ExportPlayersRequestBody.new # ExportPlayersRequestBody |
996
+ export_subscriptions_request_body: OneSignal::ExportSubscriptionsRequestBody.new # ExportSubscriptionsRequestBody |
1140
997
  }
1141
998
 
1142
999
  begin
1143
- # Export CSV of Players
1144
- result = api_instance.export_players(app_id, opts)
1000
+ # Export CSV of Subscriptions
1001
+ result = api_instance.export_subscriptions(app_id, opts)
1145
1002
  p result
1146
1003
  rescue OneSignal::ApiError => e
1147
- puts "Error when calling DefaultApi->export_players: #{e}"
1004
+ puts "Error when calling DefaultApi->export_subscriptions: #{e}"
1148
1005
  end
1149
1006
  ```
1150
1007
 
1151
- #### Using the export_players_with_http_info variant
1008
+ #### Using the export_subscriptions_with_http_info variant
1152
1009
 
1153
1010
  This returns an Array which contains the response data, status code and headers.
1154
1011
 
1155
- > <Array(<ExportPlayersSuccessResponse>, Integer, Hash)> export_players_with_http_info(app_id, opts)
1012
+ > <Array(<ExportSubscriptionsSuccessResponse>, Integer, Hash)> export_subscriptions_with_http_info(app_id, opts)
1156
1013
 
1157
1014
  ```ruby
1158
1015
  begin
1159
- # Export CSV of Players
1160
- data, status_code, headers = api_instance.export_players_with_http_info(app_id, opts)
1016
+ # Export CSV of Subscriptions
1017
+ data, status_code, headers = api_instance.export_subscriptions_with_http_info(app_id, opts)
1161
1018
  p status_code # => 2xx
1162
1019
  p headers # => { ... }
1163
- p data # => <ExportPlayersSuccessResponse>
1020
+ p data # => <ExportSubscriptionsSuccessResponse>
1164
1021
  rescue OneSignal::ApiError => e
1165
- puts "Error when calling DefaultApi->export_players_with_http_info: #{e}"
1022
+ puts "Error when calling DefaultApi->export_subscriptions_with_http_info: #{e}"
1166
1023
  end
1167
1024
  ```
1168
1025
 
@@ -1171,15 +1028,15 @@ end
1171
1028
  | Name | Type | Description | Notes |
1172
1029
  | ---- | ---- | ----------- | ----- |
1173
1030
  | **app_id** | **String** | The app ID that you want to export devices from | |
1174
- | **export_players_request_body** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | [optional] |
1031
+ | **export_subscriptions_request_body** | [**ExportSubscriptionsRequestBody**](ExportSubscriptionsRequestBody.md) | | [optional] |
1175
1032
 
1176
1033
  ### Return type
1177
1034
 
1178
- [**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md)
1035
+ [**ExportSubscriptionsSuccessResponse**](ExportSubscriptionsSuccessResponse.md)
1179
1036
 
1180
1037
  ### Authorization
1181
1038
 
1182
- [app_key](../README.md#app_key)
1039
+ [rest_api_key](../README.md#rest_api_key)
1183
1040
 
1184
1041
  ### HTTP request headers
1185
1042
 
@@ -1187,13 +1044,13 @@ end
1187
1044
  - **Accept**: application/json
1188
1045
 
1189
1046
 
1190
- ## fetch_aliases
1047
+ ## get_aliases
1191
1048
 
1192
- > <UserIdentityResponse> fetch_aliases(app_id, subscription_id)
1049
+ > <UserIdentityBody> get_aliases(app_id, alias_label, alias_id)
1193
1050
 
1194
1051
 
1195
1052
 
1196
- Lists all Aliases for the User identified by :subscription_id.
1053
+ Lists all Aliases for the User identified by (:alias_label, :alias_id).
1197
1054
 
1198
1055
  ### Examples
1199
1056
 
@@ -1201,39 +1058,40 @@ Lists all Aliases for the User identified by :subscription_id.
1201
1058
  require 'onesignal'
1202
1059
  # setup authorization
1203
1060
  OneSignal.configure do |config|
1204
- # Configure Bearer authorization: app_key
1205
- config.app_key = 'YOUR_BEARER_TOKEN'
1061
+ # Configure Bearer authorization: rest_api_key
1062
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1206
1063
 
1207
1064
  end
1208
1065
 
1209
1066
  api_instance = OneSignal::DefaultApi.new
1210
1067
  app_id = 'app_id_example' # String |
1211
- subscription_id = 'subscription_id_example' # String |
1068
+ alias_label = 'alias_label_example' # String |
1069
+ alias_id = 'alias_id_example' # String |
1212
1070
 
1213
1071
  begin
1214
1072
 
1215
- result = api_instance.fetch_aliases(app_id, subscription_id)
1073
+ result = api_instance.get_aliases(app_id, alias_label, alias_id)
1216
1074
  p result
1217
1075
  rescue OneSignal::ApiError => e
1218
- puts "Error when calling DefaultApi->fetch_aliases: #{e}"
1076
+ puts "Error when calling DefaultApi->get_aliases: #{e}"
1219
1077
  end
1220
1078
  ```
1221
1079
 
1222
- #### Using the fetch_aliases_with_http_info variant
1080
+ #### Using the get_aliases_with_http_info variant
1223
1081
 
1224
1082
  This returns an Array which contains the response data, status code and headers.
1225
1083
 
1226
- > <Array(<UserIdentityResponse>, Integer, Hash)> fetch_aliases_with_http_info(app_id, subscription_id)
1084
+ > <Array(<UserIdentityBody>, Integer, Hash)> get_aliases_with_http_info(app_id, alias_label, alias_id)
1227
1085
 
1228
1086
  ```ruby
1229
1087
  begin
1230
1088
 
1231
- data, status_code, headers = api_instance.fetch_aliases_with_http_info(app_id, subscription_id)
1089
+ data, status_code, headers = api_instance.get_aliases_with_http_info(app_id, alias_label, alias_id)
1232
1090
  p status_code # => 2xx
1233
1091
  p headers # => { ... }
1234
- p data # => <UserIdentityResponse>
1092
+ p data # => <UserIdentityBody>
1235
1093
  rescue OneSignal::ApiError => e
1236
- puts "Error when calling DefaultApi->fetch_aliases_with_http_info: #{e}"
1094
+ puts "Error when calling DefaultApi->get_aliases_with_http_info: #{e}"
1237
1095
  end
1238
1096
  ```
1239
1097
 
@@ -1242,15 +1100,16 @@ end
1242
1100
  | Name | Type | Description | Notes |
1243
1101
  | ---- | ---- | ----------- | ----- |
1244
1102
  | **app_id** | **String** | | |
1245
- | **subscription_id** | **String** | | |
1103
+ | **alias_label** | **String** | | |
1104
+ | **alias_id** | **String** | | |
1246
1105
 
1247
1106
  ### Return type
1248
1107
 
1249
- [**UserIdentityResponse**](UserIdentityResponse.md)
1108
+ [**UserIdentityBody**](UserIdentityBody.md)
1250
1109
 
1251
1110
  ### Authorization
1252
1111
 
1253
- [app_key](../README.md#app_key)
1112
+ [rest_api_key](../README.md#rest_api_key)
1254
1113
 
1255
1114
  ### HTTP request headers
1256
1115
 
@@ -1258,13 +1117,13 @@ end
1258
1117
  - **Accept**: application/json
1259
1118
 
1260
1119
 
1261
- ## fetch_user
1120
+ ## get_aliases_by_subscription
1262
1121
 
1263
- > <User> fetch_user(app_id, alias_label, alias_id)
1122
+ > <UserIdentityBody> get_aliases_by_subscription(app_id, subscription_id)
1264
1123
 
1265
1124
 
1266
1125
 
1267
- Returns the User’s properties, Aliases, and Subscriptions.
1126
+ Lists all Aliases for the User identified by :subscription_id.
1268
1127
 
1269
1128
  ### Examples
1270
1129
 
@@ -1272,40 +1131,39 @@ Returns the User’s properties, Aliases, and Subscriptions.
1272
1131
  require 'onesignal'
1273
1132
  # setup authorization
1274
1133
  OneSignal.configure do |config|
1275
- # Configure Bearer authorization: app_key
1276
- config.app_key = 'YOUR_BEARER_TOKEN'
1134
+ # Configure Bearer authorization: rest_api_key
1135
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1277
1136
 
1278
1137
  end
1279
1138
 
1280
1139
  api_instance = OneSignal::DefaultApi.new
1281
1140
  app_id = 'app_id_example' # String |
1282
- alias_label = 'alias_label_example' # String |
1283
- alias_id = 'alias_id_example' # String |
1141
+ subscription_id = 'subscription_id_example' # String |
1284
1142
 
1285
1143
  begin
1286
1144
 
1287
- result = api_instance.fetch_user(app_id, alias_label, alias_id)
1145
+ result = api_instance.get_aliases_by_subscription(app_id, subscription_id)
1288
1146
  p result
1289
1147
  rescue OneSignal::ApiError => e
1290
- puts "Error when calling DefaultApi->fetch_user: #{e}"
1148
+ puts "Error when calling DefaultApi->get_aliases_by_subscription: #{e}"
1291
1149
  end
1292
1150
  ```
1293
1151
 
1294
- #### Using the fetch_user_with_http_info variant
1152
+ #### Using the get_aliases_by_subscription_with_http_info variant
1295
1153
 
1296
1154
  This returns an Array which contains the response data, status code and headers.
1297
1155
 
1298
- > <Array(<User>, Integer, Hash)> fetch_user_with_http_info(app_id, alias_label, alias_id)
1156
+ > <Array(<UserIdentityBody>, Integer, Hash)> get_aliases_by_subscription_with_http_info(app_id, subscription_id)
1299
1157
 
1300
1158
  ```ruby
1301
1159
  begin
1302
1160
 
1303
- data, status_code, headers = api_instance.fetch_user_with_http_info(app_id, alias_label, alias_id)
1161
+ data, status_code, headers = api_instance.get_aliases_by_subscription_with_http_info(app_id, subscription_id)
1304
1162
  p status_code # => 2xx
1305
1163
  p headers # => { ... }
1306
- p data # => <User>
1164
+ p data # => <UserIdentityBody>
1307
1165
  rescue OneSignal::ApiError => e
1308
- puts "Error when calling DefaultApi->fetch_user_with_http_info: #{e}"
1166
+ puts "Error when calling DefaultApi->get_aliases_by_subscription_with_http_info: #{e}"
1309
1167
  end
1310
1168
  ```
1311
1169
 
@@ -1314,16 +1172,15 @@ end
1314
1172
  | Name | Type | Description | Notes |
1315
1173
  | ---- | ---- | ----------- | ----- |
1316
1174
  | **app_id** | **String** | | |
1317
- | **alias_label** | **String** | | |
1318
- | **alias_id** | **String** | | |
1175
+ | **subscription_id** | **String** | | |
1319
1176
 
1320
1177
  ### Return type
1321
1178
 
1322
- [**User**](User.md)
1179
+ [**UserIdentityBody**](UserIdentityBody.md)
1323
1180
 
1324
1181
  ### Authorization
1325
1182
 
1326
- [app_key](../README.md#app_key)
1183
+ [rest_api_key](../README.md#rest_api_key)
1327
1184
 
1328
1185
  ### HTTP request headers
1329
1186
 
@@ -1331,13 +1188,13 @@ end
1331
1188
  - **Accept**: application/json
1332
1189
 
1333
1190
 
1334
- ## fetch_user_identity
1335
-
1336
- > <InlineResponse200> fetch_user_identity(app_id, alias_label, alias_id)
1191
+ ## get_app
1337
1192
 
1193
+ > <App> get_app(app_id)
1338
1194
 
1195
+ View an app
1339
1196
 
1340
- Lists all Aliases for the User identified by (:alias_label, :alias_id).
1197
+ View the details of a single OneSignal app
1341
1198
 
1342
1199
  ### Examples
1343
1200
 
@@ -1345,86 +1202,13 @@ Lists all Aliases for the User identified by (:alias_label, :alias_id).
1345
1202
  require 'onesignal'
1346
1203
  # setup authorization
1347
1204
  OneSignal.configure do |config|
1348
- # Configure Bearer authorization: app_key
1349
- config.app_key = 'YOUR_BEARER_TOKEN'
1205
+ # Configure Bearer authorization: organization_api_key
1206
+ config.organization_api_key = 'YOUR_BEARER_TOKEN'
1350
1207
 
1351
1208
  end
1352
1209
 
1353
1210
  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
1211
+ app_id = 'app_id_example' # String | An app id
1428
1212
 
1429
1213
  begin
1430
1214
  # View an app
@@ -1465,7 +1249,7 @@ end
1465
1249
 
1466
1250
  ### Authorization
1467
1251
 
1468
- [user_key](../README.md#user_key)
1252
+ [organization_api_key](../README.md#organization_api_key)
1469
1253
 
1470
1254
  ### HTTP request headers
1471
1255
 
@@ -1487,8 +1271,8 @@ View the details of all of your current OneSignal apps
1487
1271
  require 'onesignal'
1488
1272
  # setup authorization
1489
1273
  OneSignal.configure do |config|
1490
- # Configure Bearer authorization: user_key
1491
- config.user_key = 'YOUR_BEARER_TOKEN'
1274
+ # Configure Bearer authorization: organization_api_key
1275
+ config.organization_api_key = 'YOUR_BEARER_TOKEN'
1492
1276
 
1493
1277
  end
1494
1278
 
@@ -1531,78 +1315,7 @@ This endpoint does not need any parameter.
1531
1315
 
1532
1316
  ### Authorization
1533
1317
 
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)
1318
+ [organization_api_key](../README.md#organization_api_key)
1606
1319
 
1607
1320
  ### HTTP request headers
1608
1321
 
@@ -1624,8 +1337,8 @@ View the details of a single notification and outcomes associated with it
1624
1337
  require 'onesignal'
1625
1338
  # setup authorization
1626
1339
  OneSignal.configure do |config|
1627
- # Configure Bearer authorization: app_key
1628
- config.app_key = 'YOUR_BEARER_TOKEN'
1340
+ # Configure Bearer authorization: rest_api_key
1341
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1629
1342
 
1630
1343
  end
1631
1344
 
@@ -1673,7 +1386,7 @@ end
1673
1386
 
1674
1387
  ### Authorization
1675
1388
 
1676
- [app_key](../README.md#app_key)
1389
+ [rest_api_key](../README.md#rest_api_key)
1677
1390
 
1678
1391
  ### HTTP request headers
1679
1392
 
@@ -1683,7 +1396,7 @@ end
1683
1396
 
1684
1397
  ## get_notification_history
1685
1398
 
1686
- > <NotificationHistorySuccessResponse> get_notification_history(notification_id, get_notification_request_body)
1399
+ > <NotificationHistorySuccessResponse> get_notification_history(notification_id, get_notification_history_request_body)
1687
1400
 
1688
1401
  Notification History
1689
1402
 
@@ -1695,18 +1408,18 @@ Notification History
1695
1408
  require 'onesignal'
1696
1409
  # setup authorization
1697
1410
  OneSignal.configure do |config|
1698
- # Configure Bearer authorization: app_key
1699
- config.app_key = 'YOUR_BEARER_TOKEN'
1411
+ # Configure Bearer authorization: rest_api_key
1412
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1700
1413
 
1701
1414
  end
1702
1415
 
1703
1416
  api_instance = OneSignal::DefaultApi.new
1704
1417
  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 |
1418
+ get_notification_history_request_body = OneSignal::GetNotificationHistoryRequestBody.new # GetNotificationHistoryRequestBody |
1706
1419
 
1707
1420
  begin
1708
1421
  # Notification History
1709
- result = api_instance.get_notification_history(notification_id, get_notification_request_body)
1422
+ result = api_instance.get_notification_history(notification_id, get_notification_history_request_body)
1710
1423
  p result
1711
1424
  rescue OneSignal::ApiError => e
1712
1425
  puts "Error when calling DefaultApi->get_notification_history: #{e}"
@@ -1717,12 +1430,12 @@ end
1717
1430
 
1718
1431
  This returns an Array which contains the response data, status code and headers.
1719
1432
 
1720
- > <Array(<NotificationHistorySuccessResponse>, Integer, Hash)> get_notification_history_with_http_info(notification_id, get_notification_request_body)
1433
+ > <Array(<NotificationHistorySuccessResponse>, Integer, Hash)> get_notification_history_with_http_info(notification_id, get_notification_history_request_body)
1721
1434
 
1722
1435
  ```ruby
1723
1436
  begin
1724
1437
  # Notification History
1725
- data, status_code, headers = api_instance.get_notification_history_with_http_info(notification_id, get_notification_request_body)
1438
+ data, status_code, headers = api_instance.get_notification_history_with_http_info(notification_id, get_notification_history_request_body)
1726
1439
  p status_code # => 2xx
1727
1440
  p headers # => { ... }
1728
1441
  p data # => <NotificationHistorySuccessResponse>
@@ -1736,7 +1449,7 @@ end
1736
1449
  | Name | Type | Description | Notes |
1737
1450
  | ---- | ---- | ----------- | ----- |
1738
1451
  | **notification_id** | **String** | The \&quot;id\&quot; of the message found in the Notification object | |
1739
- | **get_notification_request_body** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | |
1452
+ | **get_notification_history_request_body** | [**GetNotificationHistoryRequestBody**](GetNotificationHistoryRequestBody.md) | | |
1740
1453
 
1741
1454
  ### Return type
1742
1455
 
@@ -1744,7 +1457,7 @@ end
1744
1457
 
1745
1458
  ### Authorization
1746
1459
 
1747
- [app_key](../README.md#app_key)
1460
+ [rest_api_key](../README.md#rest_api_key)
1748
1461
 
1749
1462
  ### HTTP request headers
1750
1463
 
@@ -1766,8 +1479,8 @@ View the details of multiple notifications
1766
1479
  require 'onesignal'
1767
1480
  # setup authorization
1768
1481
  OneSignal.configure do |config|
1769
- # Configure Bearer authorization: app_key
1770
- config.app_key = 'YOUR_BEARER_TOKEN'
1482
+ # Configure Bearer authorization: rest_api_key
1483
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1771
1484
 
1772
1485
  end
1773
1486
 
@@ -1821,7 +1534,7 @@ end
1821
1534
 
1822
1535
  ### Authorization
1823
1536
 
1824
- [app_key](../README.md#app_key)
1537
+ [rest_api_key](../README.md#rest_api_key)
1825
1538
 
1826
1539
  ### HTTP request headers
1827
1540
 
@@ -1843,8 +1556,8 @@ View the details of all the outcomes associated with your app &#x1F6A7; Require
1843
1556
  require 'onesignal'
1844
1557
  # setup authorization
1845
1558
  OneSignal.configure do |config|
1846
- # Configure Bearer authorization: app_key
1847
- config.app_key = 'YOUR_BEARER_TOKEN'
1559
+ # Configure Bearer authorization: rest_api_key
1560
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1848
1561
 
1849
1562
  end
1850
1563
 
@@ -1902,7 +1615,7 @@ end
1902
1615
 
1903
1616
  ### Authorization
1904
1617
 
1905
- [app_key](../README.md#app_key)
1618
+ [rest_api_key](../README.md#rest_api_key)
1906
1619
 
1907
1620
  ### HTTP request headers
1908
1621
 
@@ -1910,13 +1623,13 @@ end
1910
1623
  - **Accept**: application/json
1911
1624
 
1912
1625
 
1913
- ## get_player
1626
+ ## get_segments
1914
1627
 
1915
- > <Player> get_player(app_id, player_id, opts)
1628
+ > <GetSegmentsSuccessResponse> get_segments(app_id, opts)
1916
1629
 
1917
- View device
1630
+ Get Segments
1918
1631
 
1919
- View the details of an existing device in one of your OneSignal apps
1632
+ Returns an array of segments from an app.
1920
1633
 
1921
1634
  ### Examples
1922
1635
 
@@ -1924,117 +1637,42 @@ View the details of an existing device in one of your OneSignal apps
1924
1637
  require 'onesignal'
1925
1638
  # setup authorization
1926
1639
  OneSignal.configure do |config|
1927
- # Configure Bearer authorization: app_key
1928
- config.app_key = 'YOUR_BEARER_TOKEN'
1640
+ # Configure Bearer authorization: rest_api_key
1641
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
1929
1642
 
1930
1643
  end
1931
1644
 
1932
1645
  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
1646
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
2009
1647
  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;
1648
+ offset: 56, # Integer | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments.
1649
+ limit: 56 # Integer | The amount of Segments in the response. Maximum 300.
2012
1650
  }
2013
1651
 
2014
1652
  begin
2015
- # View devices
2016
- result = api_instance.get_players(app_id, opts)
1653
+ # Get Segments
1654
+ result = api_instance.get_segments(app_id, opts)
2017
1655
  p result
2018
1656
  rescue OneSignal::ApiError => e
2019
- puts "Error when calling DefaultApi->get_players: #{e}"
1657
+ puts "Error when calling DefaultApi->get_segments: #{e}"
2020
1658
  end
2021
1659
  ```
2022
1660
 
2023
- #### Using the get_players_with_http_info variant
1661
+ #### Using the get_segments_with_http_info variant
2024
1662
 
2025
1663
  This returns an Array which contains the response data, status code and headers.
2026
1664
 
2027
- > <Array(<PlayerSlice>, Integer, Hash)> get_players_with_http_info(app_id, opts)
1665
+ > <Array(<GetSegmentsSuccessResponse>, Integer, Hash)> get_segments_with_http_info(app_id, opts)
2028
1666
 
2029
1667
  ```ruby
2030
1668
  begin
2031
- # View devices
2032
- data, status_code, headers = api_instance.get_players_with_http_info(app_id, opts)
1669
+ # Get Segments
1670
+ data, status_code, headers = api_instance.get_segments_with_http_info(app_id, opts)
2033
1671
  p status_code # => 2xx
2034
1672
  p headers # => { ... }
2035
- p data # => <PlayerSlice>
1673
+ p data # => <GetSegmentsSuccessResponse>
2036
1674
  rescue OneSignal::ApiError => e
2037
- puts "Error when calling DefaultApi->get_players_with_http_info: #{e}"
1675
+ puts "Error when calling DefaultApi->get_segments_with_http_info: #{e}"
2038
1676
  end
2039
1677
  ```
2040
1678
 
@@ -2042,17 +1680,17 @@ end
2042
1680
 
2043
1681
  | Name | Type | Description | Notes |
2044
1682
  | ---- | ---- | ----------- | ----- |
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] |
1683
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
1684
+ | **offset** | **Integer** | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. | [optional] |
1685
+ | **limit** | **Integer** | The amount of Segments in the response. Maximum 300. | [optional] |
2048
1686
 
2049
1687
  ### Return type
2050
1688
 
2051
- [**PlayerSlice**](PlayerSlice.md)
1689
+ [**GetSegmentsSuccessResponse**](GetSegmentsSuccessResponse.md)
2052
1690
 
2053
1691
  ### Authorization
2054
1692
 
2055
- [app_key](../README.md#app_key)
1693
+ [rest_api_key](../README.md#rest_api_key)
2056
1694
 
2057
1695
  ### HTTP request headers
2058
1696
 
@@ -2060,13 +1698,13 @@ end
2060
1698
  - **Accept**: application/json
2061
1699
 
2062
1700
 
2063
- ## identify_user_by_alias
1701
+ ## get_user
2064
1702
 
2065
- > <InlineResponse200> identify_user_by_alias(app_id, alias_label, alias_id, user_identity_request_body)
1703
+ > <User> get_user(app_id, alias_label, alias_id)
2066
1704
 
2067
1705
 
2068
1706
 
2069
- Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
1707
+ Returns the User’s properties, Aliases, and Subscriptions.
2070
1708
 
2071
1709
  ### Examples
2072
1710
 
@@ -2074,8 +1712,8 @@ Upserts one or more Aliases to an existing User identified by (:alias_label, :al
2074
1712
  require 'onesignal'
2075
1713
  # setup authorization
2076
1714
  OneSignal.configure do |config|
2077
- # Configure Bearer authorization: app_key
2078
- config.app_key = 'YOUR_BEARER_TOKEN'
1715
+ # Configure Bearer authorization: rest_api_key
1716
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2079
1717
 
2080
1718
  end
2081
1719
 
@@ -2083,32 +1721,31 @@ api_instance = OneSignal::DefaultApi.new
2083
1721
  app_id = 'app_id_example' # String |
2084
1722
  alias_label = 'alias_label_example' # String |
2085
1723
  alias_id = 'alias_id_example' # String |
2086
- user_identity_request_body = OneSignal::UserIdentityRequestBody.new # UserIdentityRequestBody |
2087
1724
 
2088
1725
  begin
2089
1726
 
2090
- result = api_instance.identify_user_by_alias(app_id, alias_label, alias_id, user_identity_request_body)
1727
+ result = api_instance.get_user(app_id, alias_label, alias_id)
2091
1728
  p result
2092
1729
  rescue OneSignal::ApiError => e
2093
- puts "Error when calling DefaultApi->identify_user_by_alias: #{e}"
1730
+ puts "Error when calling DefaultApi->get_user: #{e}"
2094
1731
  end
2095
1732
  ```
2096
1733
 
2097
- #### Using the identify_user_by_alias_with_http_info variant
1734
+ #### Using the get_user_with_http_info variant
2098
1735
 
2099
1736
  This returns an Array which contains the response data, status code and headers.
2100
1737
 
2101
- > <Array(<InlineResponse200>, Integer, Hash)> identify_user_by_alias_with_http_info(app_id, alias_label, alias_id, user_identity_request_body)
1738
+ > <Array(<User>, Integer, Hash)> get_user_with_http_info(app_id, alias_label, alias_id)
2102
1739
 
2103
1740
  ```ruby
2104
1741
  begin
2105
1742
 
2106
- data, status_code, headers = api_instance.identify_user_by_alias_with_http_info(app_id, alias_label, alias_id, user_identity_request_body)
1743
+ data, status_code, headers = api_instance.get_user_with_http_info(app_id, alias_label, alias_id)
2107
1744
  p status_code # => 2xx
2108
1745
  p headers # => { ... }
2109
- p data # => <InlineResponse200>
1746
+ p data # => <User>
2110
1747
  rescue OneSignal::ApiError => e
2111
- puts "Error when calling DefaultApi->identify_user_by_alias_with_http_info: #{e}"
1748
+ puts "Error when calling DefaultApi->get_user_with_http_info: #{e}"
2112
1749
  end
2113
1750
  ```
2114
1751
 
@@ -2119,29 +1756,28 @@ end
2119
1756
  | **app_id** | **String** | | |
2120
1757
  | **alias_label** | **String** | | |
2121
1758
  | **alias_id** | **String** | | |
2122
- | **user_identity_request_body** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | |
2123
1759
 
2124
1760
  ### Return type
2125
1761
 
2126
- [**InlineResponse200**](InlineResponse200.md)
1762
+ [**User**](User.md)
2127
1763
 
2128
1764
  ### Authorization
2129
1765
 
2130
- [app_key](../README.md#app_key)
1766
+ [rest_api_key](../README.md#rest_api_key)
2131
1767
 
2132
1768
  ### HTTP request headers
2133
1769
 
2134
- - **Content-Type**: application/json
1770
+ - **Content-Type**: Not defined
2135
1771
  - **Accept**: application/json
2136
1772
 
2137
1773
 
2138
- ## identify_user_by_subscription_id
1774
+ ## transfer_subscription
2139
1775
 
2140
- > <UserIdentityResponse> identify_user_by_subscription_id(app_id, subscription_id, user_identity_request_body)
1776
+ > <UserIdentityBody> transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
2141
1777
 
2142
1778
 
2143
1779
 
2144
- Upserts one or more Aliases for the User identified by :subscription_id.
1780
+ Transfers this Subscription to the User identified by the identity in the payload.
2145
1781
 
2146
1782
  ### Examples
2147
1783
 
@@ -2149,40 +1785,40 @@ Upserts one or more Aliases for the User identified by :subscription_id.
2149
1785
  require 'onesignal'
2150
1786
  # setup authorization
2151
1787
  OneSignal.configure do |config|
2152
- # Configure Bearer authorization: app_key
2153
- config.app_key = 'YOUR_BEARER_TOKEN'
1788
+ # Configure Bearer authorization: rest_api_key
1789
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2154
1790
 
2155
1791
  end
2156
1792
 
2157
1793
  api_instance = OneSignal::DefaultApi.new
2158
1794
  app_id = 'app_id_example' # String |
2159
1795
  subscription_id = 'subscription_id_example' # String |
2160
- user_identity_request_body = OneSignal::UserIdentityRequestBody.new # UserIdentityRequestBody |
1796
+ transfer_subscription_request_body = OneSignal::TransferSubscriptionRequestBody.new # TransferSubscriptionRequestBody |
2161
1797
 
2162
1798
  begin
2163
1799
 
2164
- result = api_instance.identify_user_by_subscription_id(app_id, subscription_id, user_identity_request_body)
1800
+ result = api_instance.transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
2165
1801
  p result
2166
1802
  rescue OneSignal::ApiError => e
2167
- puts "Error when calling DefaultApi->identify_user_by_subscription_id: #{e}"
1803
+ puts "Error when calling DefaultApi->transfer_subscription: #{e}"
2168
1804
  end
2169
1805
  ```
2170
1806
 
2171
- #### Using the identify_user_by_subscription_id_with_http_info variant
1807
+ #### Using the transfer_subscription_with_http_info variant
2172
1808
 
2173
1809
  This returns an Array which contains the response data, status code and headers.
2174
1810
 
2175
- > <Array(<UserIdentityResponse>, Integer, Hash)> identify_user_by_subscription_id_with_http_info(app_id, subscription_id, user_identity_request_body)
1811
+ > <Array(<UserIdentityBody>, Integer, Hash)> transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
2176
1812
 
2177
1813
  ```ruby
2178
1814
  begin
2179
1815
 
2180
- data, status_code, headers = api_instance.identify_user_by_subscription_id_with_http_info(app_id, subscription_id, user_identity_request_body)
1816
+ data, status_code, headers = api_instance.transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
2181
1817
  p status_code # => 2xx
2182
1818
  p headers # => { ... }
2183
- p data # => <UserIdentityResponse>
1819
+ p data # => <UserIdentityBody>
2184
1820
  rescue OneSignal::ApiError => e
2185
- puts "Error when calling DefaultApi->identify_user_by_subscription_id_with_http_info: #{e}"
1821
+ puts "Error when calling DefaultApi->transfer_subscription_with_http_info: #{e}"
2186
1822
  end
2187
1823
  ```
2188
1824
 
@@ -2192,15 +1828,15 @@ end
2192
1828
  | ---- | ---- | ----------- | ----- |
2193
1829
  | **app_id** | **String** | | |
2194
1830
  | **subscription_id** | **String** | | |
2195
- | **user_identity_request_body** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md) | | |
1831
+ | **transfer_subscription_request_body** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md) | | |
2196
1832
 
2197
1833
  ### Return type
2198
1834
 
2199
- [**UserIdentityResponse**](UserIdentityResponse.md)
1835
+ [**UserIdentityBody**](UserIdentityBody.md)
2200
1836
 
2201
1837
  ### Authorization
2202
1838
 
2203
- [app_key](../README.md#app_key)
1839
+ [rest_api_key](../README.md#rest_api_key)
2204
1840
 
2205
1841
  ### HTTP request headers
2206
1842
 
@@ -2208,13 +1844,13 @@ end
2208
1844
  - **Accept**: application/json
2209
1845
 
2210
1846
 
2211
- ## transfer_subscription
1847
+ ## unsubscribe_email_with_token
2212
1848
 
2213
- > <UserIdentityResponse> transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
1849
+ > <GenericSuccessBoolResponse> unsubscribe_email_with_token(app_id, notification_id, token)
2214
1850
 
1851
+ Unsubscribe with token
2215
1852
 
2216
-
2217
- Transfers this Subscription to the User identified by the identity in the payload.
1853
+ Unsubscribe an email with a token when using your own custom email unsubscribe landing page
2218
1854
 
2219
1855
  ### Examples
2220
1856
 
@@ -2222,40 +1858,40 @@ Transfers this Subscription to the User identified by the identity in the payloa
2222
1858
  require 'onesignal'
2223
1859
  # setup authorization
2224
1860
  OneSignal.configure do |config|
2225
- # Configure Bearer authorization: app_key
2226
- config.app_key = 'YOUR_BEARER_TOKEN'
1861
+ # Configure Bearer authorization: rest_api_key
1862
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2227
1863
 
2228
1864
  end
2229
1865
 
2230
1866
  api_instance = OneSignal::DefaultApi.new
2231
- app_id = 'app_id_example' # String |
2232
- subscription_id = 'subscription_id_example' # String |
2233
- transfer_subscription_request_body = OneSignal::TransferSubscriptionRequestBody.new # TransferSubscriptionRequestBody |
1867
+ app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
1868
+ notification_id = 'notification_id_example' # String | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
1869
+ token = 'token_example' # String | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
2234
1870
 
2235
1871
  begin
2236
-
2237
- result = api_instance.transfer_subscription(app_id, subscription_id, transfer_subscription_request_body)
1872
+ # Unsubscribe with token
1873
+ result = api_instance.unsubscribe_email_with_token(app_id, notification_id, token)
2238
1874
  p result
2239
1875
  rescue OneSignal::ApiError => e
2240
- puts "Error when calling DefaultApi->transfer_subscription: #{e}"
1876
+ puts "Error when calling DefaultApi->unsubscribe_email_with_token: #{e}"
2241
1877
  end
2242
1878
  ```
2243
1879
 
2244
- #### Using the transfer_subscription_with_http_info variant
1880
+ #### Using the unsubscribe_email_with_token_with_http_info variant
2245
1881
 
2246
1882
  This returns an Array which contains the response data, status code and headers.
2247
1883
 
2248
- > <Array(<UserIdentityResponse>, Integer, Hash)> transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
1884
+ > <Array(<GenericSuccessBoolResponse>, Integer, Hash)> unsubscribe_email_with_token_with_http_info(app_id, notification_id, token)
2249
1885
 
2250
1886
  ```ruby
2251
1887
  begin
2252
-
2253
- data, status_code, headers = api_instance.transfer_subscription_with_http_info(app_id, subscription_id, transfer_subscription_request_body)
1888
+ # Unsubscribe with token
1889
+ data, status_code, headers = api_instance.unsubscribe_email_with_token_with_http_info(app_id, notification_id, token)
2254
1890
  p status_code # => 2xx
2255
1891
  p headers # => { ... }
2256
- p data # => <UserIdentityResponse>
1892
+ p data # => <GenericSuccessBoolResponse>
2257
1893
  rescue OneSignal::ApiError => e
2258
- puts "Error when calling DefaultApi->transfer_subscription_with_http_info: #{e}"
1894
+ puts "Error when calling DefaultApi->unsubscribe_email_with_token_with_http_info: #{e}"
2259
1895
  end
2260
1896
  ```
2261
1897
 
@@ -2263,21 +1899,21 @@ end
2263
1899
 
2264
1900
  | Name | Type | Description | Notes |
2265
1901
  | ---- | ---- | ----------- | ----- |
2266
- | **app_id** | **String** | | |
2267
- | **subscription_id** | **String** | | |
2268
- | **transfer_subscription_request_body** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md) | | |
1902
+ | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
1903
+ | **notification_id** | **String** | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. | |
1904
+ | **token** | **String** | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. | |
2269
1905
 
2270
1906
  ### Return type
2271
1907
 
2272
- [**UserIdentityResponse**](UserIdentityResponse.md)
1908
+ [**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md)
2273
1909
 
2274
1910
  ### Authorization
2275
1911
 
2276
- [app_key](../README.md#app_key)
1912
+ [rest_api_key](../README.md#rest_api_key)
2277
1913
 
2278
1914
  ### HTTP request headers
2279
1915
 
2280
- - **Content-Type**: application/json
1916
+ - **Content-Type**: Not defined
2281
1917
  - **Accept**: application/json
2282
1918
 
2283
1919
 
@@ -2295,8 +1931,8 @@ Updates the name or configuration settings of an existing OneSignal app
2295
1931
  require 'onesignal'
2296
1932
  # setup authorization
2297
1933
  OneSignal.configure do |config|
2298
- # Configure Bearer authorization: user_key
2299
- config.user_key = 'YOUR_BEARER_TOKEN'
1934
+ # Configure Bearer authorization: organization_api_key
1935
+ config.organization_api_key = 'YOUR_BEARER_TOKEN'
2300
1936
 
2301
1937
  end
2302
1938
 
@@ -2344,7 +1980,7 @@ end
2344
1980
 
2345
1981
  ### Authorization
2346
1982
 
2347
- [user_key](../README.md#user_key)
1983
+ [organization_api_key](../README.md#organization_api_key)
2348
1984
 
2349
1985
  ### HTTP request headers
2350
1986
 
@@ -2366,15 +2002,15 @@ Updates a specified live activity.
2366
2002
  require 'onesignal'
2367
2003
  # setup authorization
2368
2004
  OneSignal.configure do |config|
2369
- # Configure Bearer authorization: app_key
2370
- config.app_key = 'YOUR_BEARER_TOKEN'
2005
+ # Configure Bearer authorization: rest_api_key
2006
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2371
2007
 
2372
2008
  end
2373
2009
 
2374
2010
  api_instance = OneSignal::DefaultApi.new
2375
2011
  app_id = 'app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
2376
2012
  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 |
2013
+ update_live_activity_request = OneSignal::UpdateLiveActivityRequest.new({name: 'name_example', event: 'update', event_updates: 3.56}) # UpdateLiveActivityRequest |
2378
2014
 
2379
2015
  begin
2380
2016
  # Update a Live Activity via Push
@@ -2417,153 +2053,7 @@ end
2417
2053
 
2418
2054
  ### Authorization
2419
2055
 
2420
- [app_key](../README.md#app_key)
2421
-
2422
- ### HTTP request headers
2423
-
2424
- - **Content-Type**: application/json
2425
- - **Accept**: application/json
2426
-
2427
-
2428
- ## update_player
2429
-
2430
- > <UpdatePlayerSuccessResponse> update_player(player_id, player)
2431
-
2432
- Edit device
2433
-
2434
- Update an existing device in one of your OneSignal apps
2435
-
2436
- ### Examples
2437
-
2438
- ```ruby
2439
- require 'onesignal'
2440
- # setup authorization
2441
- OneSignal.configure do |config|
2442
- # Configure Bearer authorization: app_key
2443
- config.app_key = 'YOUR_BEARER_TOKEN'
2444
-
2445
- end
2446
-
2447
- api_instance = OneSignal::DefaultApi.new
2448
- player_id = 'player_id_example' # String | Player's OneSignal ID
2449
- player = OneSignal::Player.new({device_type: 37}) # Player |
2450
-
2451
- begin
2452
- # Edit device
2453
- result = api_instance.update_player(player_id, player)
2454
- p result
2455
- rescue OneSignal::ApiError => e
2456
- puts "Error when calling DefaultApi->update_player: #{e}"
2457
- end
2458
- ```
2459
-
2460
- #### Using the update_player_with_http_info variant
2461
-
2462
- This returns an Array which contains the response data, status code and headers.
2463
-
2464
- > <Array(<UpdatePlayerSuccessResponse>, Integer, Hash)> update_player_with_http_info(player_id, player)
2465
-
2466
- ```ruby
2467
- begin
2468
- # Edit device
2469
- data, status_code, headers = api_instance.update_player_with_http_info(player_id, player)
2470
- p status_code # => 2xx
2471
- p headers # => { ... }
2472
- p data # => <UpdatePlayerSuccessResponse>
2473
- rescue OneSignal::ApiError => e
2474
- puts "Error when calling DefaultApi->update_player_with_http_info: #{e}"
2475
- end
2476
- ```
2477
-
2478
- ### Parameters
2479
-
2480
- | Name | Type | Description | Notes |
2481
- | ---- | ---- | ----------- | ----- |
2482
- | **player_id** | **String** | Player&#39;s OneSignal ID | |
2483
- | **player** | [**Player**](Player.md) | | |
2484
-
2485
- ### Return type
2486
-
2487
- [**UpdatePlayerSuccessResponse**](UpdatePlayerSuccessResponse.md)
2488
-
2489
- ### Authorization
2490
-
2491
- [app_key](../README.md#app_key)
2492
-
2493
- ### HTTP request headers
2494
-
2495
- - **Content-Type**: application/json
2496
- - **Accept**: application/json
2497
-
2498
-
2499
- ## update_player_tags
2500
-
2501
- > <UpdatePlayerTagsSuccessResponse> update_player_tags(app_id, external_user_id, opts)
2502
-
2503
- Edit tags with external user id
2504
-
2505
- Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
2506
-
2507
- ### Examples
2508
-
2509
- ```ruby
2510
- require 'onesignal'
2511
- # setup authorization
2512
- OneSignal.configure do |config|
2513
- # Configure Bearer authorization: app_key
2514
- config.app_key = 'YOUR_BEARER_TOKEN'
2515
-
2516
- end
2517
-
2518
- api_instance = OneSignal::DefaultApi.new
2519
- app_id = 'app_id_example' # String | The OneSignal App ID the user record is found under.
2520
- external_user_id = 'external_user_id_example' # String | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
2521
- opts = {
2522
- update_player_tags_request_body: OneSignal::UpdatePlayerTagsRequestBody.new # UpdatePlayerTagsRequestBody |
2523
- }
2524
-
2525
- begin
2526
- # Edit tags with external user id
2527
- result = api_instance.update_player_tags(app_id, external_user_id, opts)
2528
- p result
2529
- rescue OneSignal::ApiError => e
2530
- puts "Error when calling DefaultApi->update_player_tags: #{e}"
2531
- end
2532
- ```
2533
-
2534
- #### Using the update_player_tags_with_http_info variant
2535
-
2536
- This returns an Array which contains the response data, status code and headers.
2537
-
2538
- > <Array(<UpdatePlayerTagsSuccessResponse>, Integer, Hash)> update_player_tags_with_http_info(app_id, external_user_id, opts)
2539
-
2540
- ```ruby
2541
- begin
2542
- # Edit tags with external user id
2543
- data, status_code, headers = api_instance.update_player_tags_with_http_info(app_id, external_user_id, opts)
2544
- p status_code # => 2xx
2545
- p headers # => { ... }
2546
- p data # => <UpdatePlayerTagsSuccessResponse>
2547
- rescue OneSignal::ApiError => e
2548
- puts "Error when calling DefaultApi->update_player_tags_with_http_info: #{e}"
2549
- end
2550
- ```
2551
-
2552
- ### Parameters
2553
-
2554
- | Name | Type | Description | Notes |
2555
- | ---- | ---- | ----------- | ----- |
2556
- | **app_id** | **String** | The OneSignal App ID the user record is found under. | |
2557
- | **external_user_id** | **String** | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. | |
2558
- | **update_player_tags_request_body** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | [optional] |
2559
-
2560
- ### Return type
2561
-
2562
- [**UpdatePlayerTagsSuccessResponse**](UpdatePlayerTagsSuccessResponse.md)
2563
-
2564
- ### Authorization
2565
-
2566
- [app_key](../README.md#app_key)
2056
+ [rest_api_key](../README.md#rest_api_key)
2567
2057
 
2568
2058
  ### HTTP request headers
2569
2059
 
@@ -2573,7 +2063,7 @@ end
2573
2063
 
2574
2064
  ## update_subscription
2575
2065
 
2576
- > update_subscription(app_id, subscription_id, update_subscription_request_body)
2066
+ > update_subscription(app_id, subscription_id, subscription_body)
2577
2067
 
2578
2068
 
2579
2069
 
@@ -2585,19 +2075,19 @@ Updates an existing Subscription’s properties.
2585
2075
  require 'onesignal'
2586
2076
  # setup authorization
2587
2077
  OneSignal.configure do |config|
2588
- # Configure Bearer authorization: app_key
2589
- config.app_key = 'YOUR_BEARER_TOKEN'
2078
+ # Configure Bearer authorization: rest_api_key
2079
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2590
2080
 
2591
2081
  end
2592
2082
 
2593
2083
  api_instance = OneSignal::DefaultApi.new
2594
2084
  app_id = 'app_id_example' # String |
2595
2085
  subscription_id = 'subscription_id_example' # String |
2596
- update_subscription_request_body = OneSignal::UpdateSubscriptionRequestBody.new # UpdateSubscriptionRequestBody |
2086
+ subscription_body = OneSignal::SubscriptionBody.new # SubscriptionBody |
2597
2087
 
2598
2088
  begin
2599
2089
 
2600
- api_instance.update_subscription(app_id, subscription_id, update_subscription_request_body)
2090
+ api_instance.update_subscription(app_id, subscription_id, subscription_body)
2601
2091
  rescue OneSignal::ApiError => e
2602
2092
  puts "Error when calling DefaultApi->update_subscription: #{e}"
2603
2093
  end
@@ -2607,12 +2097,12 @@ end
2607
2097
 
2608
2098
  This returns an Array which contains the response data (`nil` in this case), status code and headers.
2609
2099
 
2610
- > <Array(nil, Integer, Hash)> update_subscription_with_http_info(app_id, subscription_id, update_subscription_request_body)
2100
+ > <Array(nil, Integer, Hash)> update_subscription_with_http_info(app_id, subscription_id, subscription_body)
2611
2101
 
2612
2102
  ```ruby
2613
2103
  begin
2614
2104
 
2615
- data, status_code, headers = api_instance.update_subscription_with_http_info(app_id, subscription_id, update_subscription_request_body)
2105
+ data, status_code, headers = api_instance.update_subscription_with_http_info(app_id, subscription_id, subscription_body)
2616
2106
  p status_code # => 2xx
2617
2107
  p headers # => { ... }
2618
2108
  p data # => nil
@@ -2627,7 +2117,7 @@ end
2627
2117
  | ---- | ---- | ----------- | ----- |
2628
2118
  | **app_id** | **String** | | |
2629
2119
  | **subscription_id** | **String** | | |
2630
- | **update_subscription_request_body** | [**UpdateSubscriptionRequestBody**](UpdateSubscriptionRequestBody.md) | | |
2120
+ | **subscription_body** | [**SubscriptionBody**](SubscriptionBody.md) | | |
2631
2121
 
2632
2122
  ### Return type
2633
2123
 
@@ -2635,7 +2125,7 @@ nil (empty response body)
2635
2125
 
2636
2126
  ### Authorization
2637
2127
 
2638
- [app_key](../README.md#app_key)
2128
+ [rest_api_key](../README.md#rest_api_key)
2639
2129
 
2640
2130
  ### HTTP request headers
2641
2131
 
@@ -2645,7 +2135,7 @@ nil (empty response body)
2645
2135
 
2646
2136
  ## update_user
2647
2137
 
2648
- > <InlineResponse202> update_user(app_id, alias_label, alias_id, update_user_request)
2138
+ > <PropertiesBody> update_user(app_id, alias_label, alias_id, update_user_request)
2649
2139
 
2650
2140
 
2651
2141
 
@@ -2657,8 +2147,8 @@ Updates an existing User’s properties.
2657
2147
  require 'onesignal'
2658
2148
  # setup authorization
2659
2149
  OneSignal.configure do |config|
2660
- # Configure Bearer authorization: app_key
2661
- config.app_key = 'YOUR_BEARER_TOKEN'
2150
+ # Configure Bearer authorization: rest_api_key
2151
+ config.rest_api_key = 'YOUR_BEARER_TOKEN'
2662
2152
 
2663
2153
  end
2664
2154
 
@@ -2681,7 +2171,7 @@ end
2681
2171
 
2682
2172
  This returns an Array which contains the response data, status code and headers.
2683
2173
 
2684
- > <Array(<InlineResponse202>, Integer, Hash)> update_user_with_http_info(app_id, alias_label, alias_id, update_user_request)
2174
+ > <Array(<PropertiesBody>, Integer, Hash)> update_user_with_http_info(app_id, alias_label, alias_id, update_user_request)
2685
2175
 
2686
2176
  ```ruby
2687
2177
  begin
@@ -2689,7 +2179,7 @@ begin
2689
2179
  data, status_code, headers = api_instance.update_user_with_http_info(app_id, alias_label, alias_id, update_user_request)
2690
2180
  p status_code # => 2xx
2691
2181
  p headers # => { ... }
2692
- p data # => <InlineResponse202>
2182
+ p data # => <PropertiesBody>
2693
2183
  rescue OneSignal::ApiError => e
2694
2184
  puts "Error when calling DefaultApi->update_user_with_http_info: #{e}"
2695
2185
  end
@@ -2706,11 +2196,11 @@ end
2706
2196
 
2707
2197
  ### Return type
2708
2198
 
2709
- [**InlineResponse202**](InlineResponse202.md)
2199
+ [**PropertiesBody**](PropertiesBody.md)
2710
2200
 
2711
2201
  ### Authorization
2712
2202
 
2713
- [app_key](../README.md#app_key)
2203
+ [rest_api_key](../README.md#rest_api_key)
2714
2204
 
2715
2205
  ### HTTP request headers
2716
2206