onesignal 1.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +74 -0
  3. data/README.md +112 -88
  4. data/docs/App.md +9 -1
  5. data/docs/BasicNotification.md +230 -0
  6. data/docs/BasicNotificationAllOf.md +202 -0
  7. data/docs/{NotificationAllOfAndroidBackgroundLayout.md → BasicNotificationAllOfAndroidBackgroundLayout.md} +2 -2
  8. data/docs/BeginLiveActivityRequest.md +20 -0
  9. data/docs/CancelNotificationSuccessResponse.md +18 -0
  10. data/docs/CreateNotificationSuccessResponse.md +24 -0
  11. data/docs/{InlineResponse2005.md → CreatePlayerSuccessResponse.md} +2 -2
  12. data/docs/{InlineResponse4002.md → CreateSegmentConflictResponse.md} +2 -2
  13. data/docs/CreateSegmentSuccessResponse.md +20 -0
  14. data/docs/CreateSubscriptionRequestBody.md +20 -0
  15. data/docs/CreateUserConflictResponse.md +18 -0
  16. data/docs/CreateUserConflictResponseErrorsInner.md +22 -0
  17. data/docs/CreateUserConflictResponseErrorsItemsMeta.md +18 -0
  18. data/docs/DefaultApi.md +1591 -266
  19. data/docs/DeletePlayerNotFoundResponse.md +18 -0
  20. data/docs/{InlineResponse2001.md → DeletePlayerSuccessResponse.md} +2 -2
  21. data/docs/DeleteSegmentNotFoundResponse.md +18 -0
  22. data/docs/DeleteSegmentSuccessResponse.md +18 -0
  23. data/docs/DeliveryData.md +5 -5
  24. data/docs/{InlineResponse2008.md → ExportEventsSuccessResponse.md} +2 -2
  25. data/docs/ExportPlayersRequestBody.md +2 -2
  26. data/docs/ExportPlayersSuccessResponse.md +18 -0
  27. data/docs/Filter.md +1 -1
  28. data/docs/FilterExpressions.md +1 -1
  29. data/docs/GenericError.md +18 -0
  30. data/docs/GenericErrorErrorsInner.md +20 -0
  31. data/docs/InlineResponse200.md +2 -8
  32. data/docs/InlineResponse2003.md +18 -0
  33. data/docs/InlineResponse201.md +2 -4
  34. data/docs/InlineResponse202.md +18 -0
  35. data/docs/Notification.md +22 -30
  36. data/docs/NotificationAllOf.md +1 -175
  37. data/docs/{InlineResponse2002.md → NotificationHistorySuccessResponse.md} +2 -2
  38. data/docs/NotificationTarget.md +5 -25
  39. data/docs/NotificationWithMeta.md +21 -29
  40. data/docs/PlatformDeliveryData.md +5 -1
  41. data/docs/PlatformDeliveryDataEmailAllOf.md +30 -0
  42. data/docs/PlatformDeliveryDataSmsAllOf.md +22 -0
  43. data/docs/Player.md +1 -1
  44. data/docs/PlayerNotificationTarget.md +5 -1
  45. data/docs/PlayerNotificationTargetIncludeAliases.md +18 -0
  46. data/docs/PropertiesDeltas.md +22 -0
  47. data/docs/PropertiesObject.md +38 -0
  48. data/docs/Purchase.md +4 -2
  49. data/docs/RateLimiterError.md +18 -0
  50. data/docs/SubscriptionObject.md +50 -0
  51. data/docs/TransferSubscriptionRequestBody.md +18 -0
  52. data/docs/UpdateLiveActivityRequest.md +24 -0
  53. data/docs/UpdateLiveActivitySuccessResponse.md +20 -0
  54. data/docs/{InlineResponse2007.md → UpdatePlayerSuccessResponse.md} +3 -3
  55. data/docs/UpdatePlayerTagsSuccessResponse.md +18 -0
  56. data/docs/UpdateSubscriptionRequestBody.md +18 -0
  57. data/docs/UpdateUserRequest.md +22 -0
  58. data/docs/User.md +24 -0
  59. data/docs/UserIdentityRequestBody.md +18 -0
  60. data/docs/UserIdentityResponse.md +18 -0
  61. data/docs/UserSubscriptionOptions.md +18 -0
  62. data/lib/onesignal/api/default_api.rb +1583 -221
  63. data/lib/onesignal/api_client.rb +2 -2
  64. data/lib/onesignal/api_error.rb +1 -1
  65. data/lib/onesignal/configuration.rb +6 -6
  66. data/lib/onesignal/models/app.rb +57 -7
  67. data/lib/onesignal/models/basic_notification.rb +1442 -0
  68. data/lib/onesignal/models/basic_notification_all_of.rb +1252 -0
  69. data/lib/onesignal/models/{notification_all_of_android_background_layout.rb → basic_notification_all_of_android_background_layout.rb} +4 -4
  70. data/lib/onesignal/models/begin_live_activity_request.rb +238 -0
  71. data/lib/onesignal/models/button.rb +1 -1
  72. data/lib/onesignal/models/cancel_notification_success_response.rb +219 -0
  73. data/lib/onesignal/models/create_notification_success_response.rb +248 -0
  74. data/lib/onesignal/models/{inline_response2005.rb → create_player_success_response.rb} +4 -4
  75. data/lib/onesignal/models/{inline_response4002.rb → create_segment_conflict_response.rb} +4 -4
  76. data/lib/onesignal/models/create_segment_success_response.rb +229 -0
  77. data/lib/onesignal/models/create_subscription_request_body.rb +228 -0
  78. data/lib/onesignal/models/{inline_response4001.rb → create_user_conflict_response.rb} +6 -15
  79. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +237 -0
  80. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +219 -0
  81. data/lib/onesignal/models/delete_player_not_found_response.rb +219 -0
  82. data/lib/onesignal/models/{inline_response2001.rb → delete_player_success_response.rb} +4 -4
  83. data/lib/onesignal/models/delete_segment_not_found_response.rb +219 -0
  84. data/lib/onesignal/models/delete_segment_success_response.rb +219 -0
  85. data/lib/onesignal/models/delivery_data.rb +6 -1
  86. data/lib/onesignal/models/{inline_response2008.rb → export_events_success_response.rb} +4 -4
  87. data/lib/onesignal/models/export_players_request_body.rb +3 -3
  88. data/lib/onesignal/models/export_players_success_response.rb +219 -0
  89. data/lib/onesignal/models/filter.rb +2 -2
  90. data/lib/onesignal/models/filter_expressions.rb +2 -2
  91. data/lib/onesignal/models/{inline_response400.rb → generic_error.rb} +5 -5
  92. data/lib/onesignal/models/generic_error_errors_inner.rb +228 -0
  93. data/lib/onesignal/models/get_notification_request_body.rb +1 -1
  94. data/lib/onesignal/models/inline_response200.rb +10 -46
  95. data/lib/onesignal/models/{inline_response4003.rb → inline_response2003.rb} +12 -12
  96. data/lib/onesignal/models/inline_response201.rb +8 -18
  97. data/lib/onesignal/models/inline_response202.rb +219 -0
  98. data/lib/onesignal/models/invalid_identifier_error.rb +1 -1
  99. data/lib/onesignal/models/notification.rb +173 -141
  100. data/lib/onesignal/models/notification200_errors.rb +1 -1
  101. data/lib/onesignal/models/notification_all_of.rb +6 -929
  102. data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb} +4 -4
  103. data/lib/onesignal/models/notification_slice.rb +1 -1
  104. data/lib/onesignal/models/notification_target.rb +60 -126
  105. data/lib/onesignal/models/notification_with_meta.rb +168 -137
  106. data/lib/onesignal/models/notification_with_meta_all_of.rb +2 -1
  107. data/lib/onesignal/models/operator.rb +1 -1
  108. data/lib/onesignal/models/outcome_data.rb +1 -1
  109. data/lib/onesignal/models/outcomes_data.rb +1 -1
  110. data/lib/onesignal/models/platform_delivery_data.rb +25 -5
  111. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +287 -0
  112. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +243 -0
  113. data/lib/onesignal/models/player.rb +9 -6
  114. data/lib/onesignal/models/player_notification_target.rb +60 -5
  115. data/lib/onesignal/models/player_notification_target_include_aliases.rb +221 -0
  116. data/lib/onesignal/models/player_slice.rb +1 -1
  117. data/lib/onesignal/models/properties_deltas.rb +239 -0
  118. data/lib/onesignal/models/properties_object.rb +313 -0
  119. data/lib/onesignal/models/purchase.rb +15 -6
  120. data/lib/onesignal/models/rate_limiter_error.rb +221 -0
  121. data/lib/onesignal/models/segment.rb +1 -1
  122. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  123. data/lib/onesignal/models/string_map.rb +1 -1
  124. data/lib/onesignal/models/{filter_notification_target.rb → subscription_object.rb} +145 -78
  125. data/lib/onesignal/models/transfer_subscription_request_body.rb +221 -0
  126. data/lib/onesignal/models/update_live_activity_request.rb +309 -0
  127. data/lib/onesignal/models/update_live_activity_success_response.rb +228 -0
  128. data/lib/onesignal/models/{inline_response2007.rb → update_player_success_response.rb} +5 -5
  129. data/lib/onesignal/models/update_player_tags_request_body.rb +1 -1
  130. data/lib/onesignal/models/update_player_tags_success_response.rb +219 -0
  131. data/lib/onesignal/models/update_subscription_request_body.rb +219 -0
  132. data/lib/onesignal/models/update_user_request.rb +239 -0
  133. data/lib/onesignal/models/user.rb +250 -0
  134. data/lib/onesignal/models/user_identity_request_body.rb +221 -0
  135. data/lib/onesignal/models/user_identity_response.rb +221 -0
  136. data/lib/onesignal/models/user_subscription_options.rb +219 -0
  137. data/lib/onesignal/version.rb +2 -2
  138. data/lib/onesignal.rb +43 -12
  139. data/onesignal.gemspec +1 -1
  140. data/spec/api/default_api_spec.rb +249 -12
  141. data/spec/api_client_spec.rb +1 -1
  142. data/spec/configuration_spec.rb +4 -4
  143. data/spec/models/app_spec.rb +25 -1
  144. data/spec/models/{notification_all_of_android_background_layout_spec.rb → basic_notification_all_of_android_background_layout_spec.rb} +7 -7
  145. data/spec/models/basic_notification_all_of_spec.rb +590 -0
  146. data/spec/models/basic_notification_spec.rb +678 -0
  147. data/spec/models/begin_live_activity_request_spec.rb +40 -0
  148. data/spec/models/button_spec.rb +1 -1
  149. data/spec/models/cancel_notification_success_response_spec.rb +34 -0
  150. data/spec/models/create_notification_success_response_spec.rb +52 -0
  151. data/spec/models/{inline_response2005_spec.rb → create_player_success_response_spec.rb} +7 -7
  152. data/spec/models/{inline_response4001_spec.rb → create_segment_conflict_response_spec.rb} +7 -7
  153. data/spec/models/{inline_response4002_spec.rb → create_segment_success_response_spec.rb} +8 -8
  154. data/spec/models/create_subscription_request_body_spec.rb +40 -0
  155. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +46 -0
  156. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +34 -0
  157. data/spec/models/create_user_conflict_response_spec.rb +34 -0
  158. data/spec/models/delete_player_not_found_response_spec.rb +34 -0
  159. data/spec/models/{inline_response2001_spec.rb → delete_player_success_response_spec.rb} +7 -7
  160. data/spec/models/delete_segment_not_found_response_spec.rb +34 -0
  161. data/spec/models/delete_segment_success_response_spec.rb +34 -0
  162. data/spec/models/delivery_data_spec.rb +1 -1
  163. data/spec/models/{inline_response2008_spec.rb → export_events_success_response_spec.rb} +7 -7
  164. data/spec/models/export_players_request_body_spec.rb +1 -1
  165. data/spec/models/export_players_success_response_spec.rb +34 -0
  166. data/spec/models/filter_expressions_spec.rb +1 -1
  167. data/spec/models/filter_spec.rb +1 -1
  168. data/spec/models/generic_error_errors_inner_spec.rb +40 -0
  169. data/spec/models/{inline_response4003_spec.rb → generic_error_spec.rb} +8 -8
  170. data/spec/models/get_notification_request_body_spec.rb +1 -1
  171. data/spec/models/{inline_response2007_spec.rb → inline_response2003_spec.rb} +8 -8
  172. data/spec/models/inline_response200_spec.rb +2 -20
  173. data/spec/models/inline_response201_spec.rb +2 -8
  174. data/spec/models/{inline_response400_spec.rb → inline_response202_spec.rb} +8 -8
  175. data/spec/models/invalid_identifier_error_spec.rb +1 -1
  176. data/spec/models/notification200_errors_spec.rb +1 -1
  177. data/spec/models/notification_all_of_spec.rb +1 -527
  178. data/spec/models/{inline_response2002_spec.rb → notification_history_success_response_spec.rb} +7 -7
  179. data/spec/models/notification_slice_spec.rb +1 -1
  180. data/spec/models/notification_spec.rb +56 -76
  181. data/spec/models/notification_target_spec.rb +17 -73
  182. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  183. data/spec/models/notification_with_meta_spec.rb +56 -76
  184. data/spec/models/operator_spec.rb +1 -1
  185. data/spec/models/outcome_data_spec.rb +1 -1
  186. data/spec/models/outcomes_data_spec.rb +1 -1
  187. data/spec/models/platform_delivery_data_email_all_of_spec.rb +70 -0
  188. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +46 -0
  189. data/spec/models/platform_delivery_data_spec.rb +13 -1
  190. data/spec/models/player_notification_target_include_aliases_spec.rb +34 -0
  191. data/spec/models/player_notification_target_spec.rb +17 -1
  192. data/spec/models/player_slice_spec.rb +1 -1
  193. data/spec/models/player_spec.rb +1 -1
  194. data/spec/models/properties_deltas_spec.rb +46 -0
  195. data/spec/models/{filter_notification_target_spec.rb → properties_object_spec.rb} +18 -24
  196. data/spec/models/purchase_spec.rb +7 -1
  197. data/spec/models/rate_limiter_error_spec.rb +34 -0
  198. data/spec/models/segment_notification_target_spec.rb +1 -1
  199. data/spec/models/segment_spec.rb +1 -1
  200. data/spec/models/string_map_spec.rb +1 -1
  201. data/spec/models/subscription_object_spec.rb +134 -0
  202. data/spec/models/transfer_subscription_request_body_spec.rb +34 -0
  203. data/spec/models/update_live_activity_request_spec.rb +60 -0
  204. data/spec/models/update_live_activity_success_response_spec.rb +40 -0
  205. data/spec/models/update_player_success_response_spec.rb +34 -0
  206. data/spec/models/update_player_tags_request_body_spec.rb +1 -1
  207. data/spec/models/update_player_tags_success_response_spec.rb +34 -0
  208. data/spec/models/update_subscription_request_body_spec.rb +34 -0
  209. data/spec/models/update_user_request_spec.rb +46 -0
  210. data/spec/models/user_identity_request_body_spec.rb +34 -0
  211. data/spec/models/user_identity_response_spec.rb +34 -0
  212. data/spec/models/user_spec.rb +52 -0
  213. data/spec/models/user_subscription_options_spec.rb +34 -0
  214. data/spec/spec_helper.rb +1 -1
  215. metadata +178 -53
  216. data/docs/FilterNotificationTarget.md +0 -40
  217. data/docs/InlineResponse400.md +0 -18
  218. data/docs/InlineResponse4001.md +0 -20
  219. data/docs/InlineResponse4003.md +0 -18
@@ -0,0 +1,18 @@
1
+ # OneSignal::DeletePlayerNotFoundResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::DeletePlayerNotFoundResponse.new(
15
+ success: null
16
+ )
17
+ ```
18
+
@@ -1,4 +1,4 @@
1
- # OneSignal::InlineResponse2001
1
+ # OneSignal::DeletePlayerSuccessResponse
2
2
 
3
3
  ## Properties
4
4
 
@@ -11,7 +11,7 @@
11
11
  ```ruby
12
12
  require 'onesignal'
13
13
 
14
- instance = OneSignal::InlineResponse2001.new(
14
+ instance = OneSignal::DeletePlayerSuccessResponse.new(
15
15
  success: null
16
16
  )
17
17
  ```
@@ -0,0 +1,18 @@
1
+ # OneSignal::DeleteSegmentNotFoundResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::DeleteSegmentNotFoundResponse.new(
15
+ success: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::DeleteSegmentSuccessResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::DeleteSegmentSuccessResponse.new(
15
+ success: null
16
+ )
17
+ ```
18
+
data/docs/DeliveryData.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **successful** | **Integer** | | [optional] |
8
- | **failed** | **Integer** | | [optional] |
9
- | **errored** | **Integer** | | [optional] |
10
- | **converted** | **Integer** | | [optional] |
11
- | **received** | **Integer** | | [optional] |
7
+ | **successful** | **Integer** | Number of messages delivered to push servers, mobile carriers, or email service providers. | [optional] |
8
+ | **failed** | **Integer** | Number of messages sent to unsubscribed devices. | [optional] |
9
+ | **errored** | **Integer** | Number of errors reported. | [optional] |
10
+ | **converted** | **Integer** | Number of messages that were clicked. | [optional] |
11
+ | **received** | **Integer** | Number of devices that received the message. | [optional] |
12
12
 
13
13
  ## Example
14
14
 
@@ -1,4 +1,4 @@
1
- # OneSignal::InlineResponse2008
1
+ # OneSignal::ExportEventsSuccessResponse
2
2
 
3
3
  ## Properties
4
4
 
@@ -11,7 +11,7 @@
11
11
  ```ruby
12
12
  require 'onesignal'
13
13
 
14
- instance = OneSignal::InlineResponse2008.new(
14
+ instance = OneSignal::ExportEventsSuccessResponse.new(
15
15
  csv_file_url: null
16
16
  )
17
17
  ```
@@ -5,8 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **extra_fields** | **Array<String>** | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. | [optional] |
8
- | **last_active_since** | **Integer** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] |
9
- | **segment_name** | **String** | Export al ldevices belonging to the segment. | [optional] |
8
+ | **last_active_since** | **String** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] |
9
+ | **segment_name** | **String** | Export all devices belonging to the segment. | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -0,0 +1,18 @@
1
+ # OneSignal::ExportPlayersSuccessResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **csv_file_url** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::ExportPlayersSuccessResponse.new(
15
+ csv_file_url: null
16
+ )
17
+ ```
18
+
data/docs/Filter.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
8
8
  | **key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
9
- | **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
9
+ | **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
10
10
  | **relation** | **String** | Operator of a filter expression. | |
11
11
 
12
12
  ## Example
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **field** | **String** | Name of the field to use as the first operand in the filter expression. | |
8
8
  | **key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
9
- | **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
9
+ | **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
10
10
  | **relation** | **String** | Operator of a filter expression. | |
11
11
  | **operator** | **String** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] |
12
12
 
@@ -0,0 +1,18 @@
1
+ # OneSignal::GenericError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **errors** | [**Array<GenericErrorErrorsInner>**](GenericErrorErrorsInner.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::GenericError.new(
15
+ errors: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::GenericErrorErrorsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | | [optional] |
8
+ | **title** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::GenericErrorErrorsInner.new(
16
+ code: null,
17
+ title: null
18
+ )
19
+ ```
20
+
@@ -4,10 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | |
8
- | **recipients** | **Integer** | Estimated number of subscribers targetted by notification. | |
9
- | **external_id** | **String** | | [optional] |
10
- | **errors** | [**Notification200Errors**](Notification200Errors.md) | | [optional] |
7
+ | **identity** | **Hash<String, Object>** | | [optional] |
11
8
 
12
9
  ## Example
13
10
 
@@ -15,10 +12,7 @@
15
12
  require 'onesignal'
16
13
 
17
14
  instance = OneSignal::InlineResponse200.new(
18
- id: null,
19
- recipients: null,
20
- external_id: null,
21
- errors: null
15
+ identity: null
22
16
  )
23
17
  ```
24
18
 
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse2003
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **in_app_messages** | **Array<Object>** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse2003.new(
15
+ in_app_messages: null
16
+ )
17
+ ```
18
+
@@ -4,8 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **success** | **Boolean** | | [optional] |
8
- | **id** | **String** | UUID of created segment | [optional] |
7
+ | **subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] |
9
8
 
10
9
  ## Example
11
10
 
@@ -13,8 +12,7 @@
13
12
  require 'onesignal'
14
13
 
15
14
  instance = OneSignal::InlineResponse201.new(
16
- success: null,
17
- id: null
15
+ subscription: null
18
16
  )
19
17
  ```
20
18
 
@@ -0,0 +1,18 @@
1
+ # OneSignal::InlineResponse202
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **properties** | [**PropertiesObject**](PropertiesObject.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::InlineResponse202.new(
15
+ properties: null
16
+ )
17
+ ```
18
+
data/docs/Notification.md CHANGED
@@ -6,18 +6,6 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
8
8
  | **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
9
- | **last_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\" | [optional] |
10
- | **first_session** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\" | [optional] |
11
- | **session_count** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\" | [optional] |
12
- | **session_time** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\" | [optional] |
13
- | **amount_spent** | **String** | relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\" | [optional] |
14
- | **bought_sku** | **String** | relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\" | [optional] |
15
- | **tag** | **String** | relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters | [optional] |
16
- | **language** | **String** | relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization. | [optional] |
17
- | **app_version** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\" | [optional] |
18
- | **location** | **String** | radius = in meters lat = latitude long = longitude | [optional] |
19
- | **email** | **String** | value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter | [optional] |
20
- | **country** | **String** | relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\" | [optional] |
21
9
  | **include_player_ids** | **Array<String>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] |
22
10
  | **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
23
11
  | **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
@@ -28,10 +16,13 @@
28
16
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
29
17
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
30
18
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] |
19
+ | **include_aliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] |
20
+ | **target_channel** | **String** | | [optional] |
31
21
  | **id** | **String** | | [optional] |
32
22
  | **value** | **Integer** | | [optional][readonly] |
23
+ | **name** | **String** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] |
33
24
  | **aggregation** | **String** | | [optional][readonly] |
34
- | **is_ios** | **Boolean** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional][default to true] |
25
+ | **is_ios** | **Boolean** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] |
35
26
  | **is_android** | **Boolean** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] |
36
27
  | **is_huawei** | **Boolean** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] |
37
28
  | **is_any_web** | **Boolean** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] |
@@ -43,7 +34,8 @@
43
34
  | **is_chrome** | **Boolean** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] |
44
35
  | **channel_for_external_user_ids** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] |
45
36
  | **app_id** | **String** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | |
46
- | **external_id** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] |
37
+ | **external_id** | **String** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] |
38
+ | **idempotency_key** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] |
47
39
  | **contents** | [**StringMap**](StringMap.md) | | [optional] |
48
40
  | **headings** | [**StringMap**](StringMap.md) | | [optional] |
49
41
  | **subtitle** | [**StringMap**](StringMap.md) | | [optional] |
@@ -69,7 +61,7 @@
69
61
  | **huawei_channel_id** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] |
70
62
  | **existing_android_channel_id** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] |
71
63
  | **huawei_existing_channel_id** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] |
72
- | **android_background_layout** | [**NotificationAllOfAndroidBackgroundLayout**](NotificationAllOfAndroidBackgroundLayout.md) | | [optional] |
64
+ | **android_background_layout** | [**BasicNotificationAllOfAndroidBackgroundLayout**](BasicNotificationAllOfAndroidBackgroundLayout.md) | | [optional] |
73
65
  | **small_icon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] |
74
66
  | **huawei_small_icon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] |
75
67
  | **large_icon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] |
@@ -96,7 +88,6 @@
96
88
  | **collapse_id** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] |
97
89
  | **web_push_topic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] |
98
90
  | **apns_alert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] |
99
- | **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] |
100
91
  | **delayed_option** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] |
101
92
  | **delivery_time_of_day** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] |
102
93
  | **ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] |
@@ -114,8 +105,13 @@
114
105
  | **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
115
106
  | **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
116
107
  | **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
108
+ | **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] |
109
+ | **include_unsubscribed** | **Boolean** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] |
117
110
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
118
111
  | **sms_media_urls** | **Array<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
112
+ | **filters** | [**Array<Filter>**](Filter.md) | | [optional] |
113
+ | **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] |
114
+ | **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] |
119
115
 
120
116
  ## Example
121
117
 
@@ -125,18 +121,6 @@ require 'onesignal'
125
121
  instance = OneSignal::Notification.new(
126
122
  included_segments: null,
127
123
  excluded_segments: null,
128
- last_session: null,
129
- first_session: null,
130
- session_count: null,
131
- session_time: null,
132
- amount_spent: null,
133
- bought_sku: null,
134
- tag: null,
135
- language: null,
136
- app_version: null,
137
- location: null,
138
- email: null,
139
- country: null,
140
124
  include_player_ids: null,
141
125
  include_external_user_ids: null,
142
126
  include_email_tokens: null,
@@ -147,8 +131,11 @@ instance = OneSignal::Notification.new(
147
131
  include_chrome_reg_ids: null,
148
132
  include_chrome_web_reg_ids: null,
149
133
  include_android_reg_ids: null,
134
+ include_aliases: null,
135
+ target_channel: null,
150
136
  id: null,
151
137
  value: null,
138
+ name: null,
152
139
  aggregation: null,
153
140
  is_ios: null,
154
141
  is_android: null,
@@ -163,6 +150,7 @@ instance = OneSignal::Notification.new(
163
150
  channel_for_external_user_ids: null,
164
151
  app_id: null,
165
152
  external_id: null,
153
+ idempotency_key: null,
166
154
  contents: null,
167
155
  headings: null,
168
156
  subtitle: null,
@@ -215,7 +203,6 @@ instance = OneSignal::Notification.new(
215
203
  collapse_id: null,
216
204
  web_push_topic: null,
217
205
  apns_alert: null,
218
- send_after: null,
219
206
  delayed_option: null,
220
207
  delivery_time_of_day: null,
221
208
  ttl: null,
@@ -233,8 +220,13 @@ instance = OneSignal::Notification.new(
233
220
  email_body: null,
234
221
  email_from_name: null,
235
222
  email_from_address: null,
223
+ email_preheader: null,
224
+ include_unsubscribed: null,
236
225
  sms_from: null,
237
- sms_media_urls: null
226
+ sms_media_urls: null,
227
+ filters: null,
228
+ custom_data: null,
229
+ send_after: null
238
230
  )
239
231
  ```
240
232