onesignal 5.7.0 → 5.8.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 (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +3 -3
  5. data/docs/CreateNotificationSuccessResponse.md +1 -1
  6. data/docs/DefaultApi.md +3 -1
  7. data/docs/NotificationSlice.md +4 -0
  8. data/lib/onesignal/api/default_api.rb +4 -1
  9. data/lib/onesignal/api_client.rb +2 -2
  10. data/lib/onesignal/api_error.rb +1 -1
  11. data/lib/onesignal/configuration.rb +1 -1
  12. data/lib/onesignal/helpers.rb +24 -0
  13. data/lib/onesignal/models/api_key_token.rb +1 -1
  14. data/lib/onesignal/models/api_key_tokens_list_response.rb +1 -1
  15. data/lib/onesignal/models/app.rb +1 -1
  16. data/lib/onesignal/models/basic_notification.rb +1 -1
  17. data/lib/onesignal/models/basic_notification_all_of.rb +1 -1
  18. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  19. data/lib/onesignal/models/button.rb +1 -1
  20. data/lib/onesignal/models/copy_template_request.rb +1 -1
  21. data/lib/onesignal/models/create_api_key_request.rb +1 -1
  22. data/lib/onesignal/models/create_api_key_response.rb +1 -1
  23. data/lib/onesignal/models/create_notification_success_response.rb +2 -2
  24. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  25. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  26. data/lib/onesignal/models/create_template_request.rb +1 -1
  27. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  28. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  29. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  30. data/lib/onesignal/models/custom_event.rb +1 -1
  31. data/lib/onesignal/models/custom_events_request.rb +1 -1
  32. data/lib/onesignal/models/delivery_data.rb +1 -1
  33. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  34. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  35. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  36. data/lib/onesignal/models/filter.rb +1 -1
  37. data/lib/onesignal/models/filter_expression.rb +1 -1
  38. data/lib/onesignal/models/generic_error.rb +1 -1
  39. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  40. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  41. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  42. data/lib/onesignal/models/language_string_map.rb +1 -1
  43. data/lib/onesignal/models/notification.rb +1 -1
  44. data/lib/onesignal/models/notification_all_of.rb +1 -1
  45. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  46. data/lib/onesignal/models/notification_slice.rb +22 -2
  47. data/lib/onesignal/models/notification_target.rb +1 -1
  48. data/lib/onesignal/models/notification_with_meta.rb +1 -1
  49. data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
  50. data/lib/onesignal/models/operator.rb +1 -1
  51. data/lib/onesignal/models/outcome_data.rb +1 -1
  52. data/lib/onesignal/models/outcomes_data.rb +1 -1
  53. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  54. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  55. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  56. data/lib/onesignal/models/properties_body.rb +1 -1
  57. data/lib/onesignal/models/properties_deltas.rb +1 -1
  58. data/lib/onesignal/models/properties_object.rb +1 -1
  59. data/lib/onesignal/models/purchase.rb +1 -1
  60. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  61. data/lib/onesignal/models/segment.rb +1 -1
  62. data/lib/onesignal/models/segment_data.rb +1 -1
  63. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  64. data/lib/onesignal/models/start_live_activity_request.rb +1 -1
  65. data/lib/onesignal/models/start_live_activity_success_response.rb +1 -1
  66. data/lib/onesignal/models/subscription.rb +1 -1
  67. data/lib/onesignal/models/subscription_body.rb +1 -1
  68. data/lib/onesignal/models/subscription_notification_target.rb +1 -1
  69. data/lib/onesignal/models/template_resource.rb +1 -1
  70. data/lib/onesignal/models/templates_list_response.rb +1 -1
  71. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  72. data/lib/onesignal/models/update_api_key_request.rb +1 -1
  73. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  74. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  75. data/lib/onesignal/models/update_template_request.rb +1 -1
  76. data/lib/onesignal/models/update_user_request.rb +1 -1
  77. data/lib/onesignal/models/user.rb +1 -1
  78. data/lib/onesignal/models/user_identity_body.rb +1 -1
  79. data/lib/onesignal/models/web_button.rb +1 -1
  80. data/lib/onesignal/version.rb +2 -2
  81. data/lib/onesignal.rb +1 -1
  82. data/onesignal.gemspec +1 -1
  83. data/spec/api/default_api_spec.rb +2 -1
  84. data/spec/api_client_spec.rb +1 -1
  85. data/spec/configuration_spec.rb +1 -1
  86. data/spec/models/api_key_token_spec.rb +1 -1
  87. data/spec/models/api_key_tokens_list_response_spec.rb +1 -1
  88. data/spec/models/app_spec.rb +1 -1
  89. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  90. data/spec/models/basic_notification_all_of_spec.rb +1 -1
  91. data/spec/models/basic_notification_spec.rb +1 -1
  92. data/spec/models/button_spec.rb +1 -1
  93. data/spec/models/copy_template_request_spec.rb +1 -1
  94. data/spec/models/create_api_key_request_spec.rb +1 -1
  95. data/spec/models/create_api_key_response_spec.rb +1 -1
  96. data/spec/models/create_notification_success_response_spec.rb +1 -1
  97. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  98. data/spec/models/create_segment_success_response_spec.rb +1 -1
  99. data/spec/models/create_template_request_spec.rb +1 -1
  100. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  101. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  102. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  103. data/spec/models/custom_event_spec.rb +1 -1
  104. data/spec/models/custom_events_request_spec.rb +1 -1
  105. data/spec/models/delivery_data_spec.rb +1 -1
  106. data/spec/models/export_events_success_response_spec.rb +1 -1
  107. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  108. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  109. data/spec/models/filter_expression_spec.rb +1 -1
  110. data/spec/models/filter_spec.rb +1 -1
  111. data/spec/models/generic_error_spec.rb +1 -1
  112. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  113. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  114. data/spec/models/get_segments_success_response_spec.rb +1 -1
  115. data/spec/models/language_string_map_spec.rb +1 -1
  116. data/spec/models/notification_all_of_spec.rb +1 -1
  117. data/spec/models/notification_history_success_response_spec.rb +1 -1
  118. data/spec/models/notification_slice_spec.rb +13 -1
  119. data/spec/models/notification_spec.rb +1 -1
  120. data/spec/models/notification_target_spec.rb +1 -1
  121. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  122. data/spec/models/notification_with_meta_spec.rb +1 -1
  123. data/spec/models/operator_spec.rb +1 -1
  124. data/spec/models/outcome_data_spec.rb +1 -1
  125. data/spec/models/outcomes_data_spec.rb +1 -1
  126. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  127. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  128. data/spec/models/platform_delivery_data_spec.rb +1 -1
  129. data/spec/models/properties_body_spec.rb +1 -1
  130. data/spec/models/properties_deltas_spec.rb +1 -1
  131. data/spec/models/properties_object_spec.rb +1 -1
  132. data/spec/models/purchase_spec.rb +1 -1
  133. data/spec/models/rate_limit_error_spec.rb +1 -1
  134. data/spec/models/segment_data_spec.rb +1 -1
  135. data/spec/models/segment_notification_target_spec.rb +1 -1
  136. data/spec/models/segment_spec.rb +1 -1
  137. data/spec/models/start_live_activity_request_spec.rb +1 -1
  138. data/spec/models/start_live_activity_success_response_spec.rb +1 -1
  139. data/spec/models/subscription_body_spec.rb +1 -1
  140. data/spec/models/subscription_notification_target_spec.rb +1 -1
  141. data/spec/models/subscription_spec.rb +1 -1
  142. data/spec/models/template_resource_spec.rb +1 -1
  143. data/spec/models/templates_list_response_spec.rb +1 -1
  144. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  145. data/spec/models/update_api_key_request_spec.rb +1 -1
  146. data/spec/models/update_live_activity_request_spec.rb +1 -1
  147. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  148. data/spec/models/update_template_request_spec.rb +1 -1
  149. data/spec/models/update_user_request_spec.rb +1 -1
  150. data/spec/models/user_identity_body_spec.rb +1 -1
  151. data/spec/models/user_spec.rb +1 -1
  152. data/spec/models/web_button_spec.rb +1 -1
  153. data/spec/spec_helper.rb +1 -1
  154. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d0cc126ea3cc61f2362406bc807bb541c3f8d6f8c1dc802a8a914f1f37b6fc6
4
- data.tar.gz: ef495aaade2557f0a8c9cb430d8d48f35054abf5a26f1595466f8a70293466c1
3
+ metadata.gz: c5f21652919d2dee3326e3cf1caa4d61af452c293c03267c10ffd8ba49204712
4
+ data.tar.gz: aab106e37eefe2a2434cce59310f49e18c17e7b1374c98b70b08d86235aade79
5
5
  SHA512:
6
- metadata.gz: aa78d73ed8f677e39d793ebcdeeb103ea915d56a1814eaa001e80caf9e0a227704fa1f35c0ccf10ba53a658203ffd03d33e064ca1a2a923397414615866b4872
7
- data.tar.gz: 3ce98d987cd9034e4360ab5bb50eef6b3bbed55448a34abf35b41061ee850e5aa8849cf64449f7d970123a8755b14022e29987bd44aee16a0dd10e1d6d77959f
6
+ metadata.gz: 1f316f47a20766af759310551a103afbdf209bbbb0a55c27199cbc94e3c7545481d66b18f16148dbc29d4141c6728263e9ea88485c49909e103aa94af94c8dae
7
+ data.tar.gz: ce896ee973a613861cde622de00802077df6d15379835bc532206888139410f4125c0929a979bdd5a1523892b7d2924ee5f19136a8864bf887c97dd451556fab
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.7.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.6.0...v5.7.0) (2026-06-18)
4
+
5
+ ### Features
6
+
7
+ * add v5.7.0 package updates ([f1fdea6](https://github.com/OneSignal/onesignal-ruby-api/commit/f1fdea6f6e6f6b6ca1b599e3ed9bef70cfb7b749))
8
+ * add v5.7.0 package updates ([#102](https://github.com/OneSignal/onesignal-ruby-api/issues/102)) ([07743e2](https://github.com/OneSignal/onesignal-ruby-api/commit/07743e2a070f89ea055f1a97a9f9e8c179172dc5))
9
+
3
10
  ## [5.6.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.5.0...v5.6.0) (2026-05-20)
4
11
 
5
12
  ### Features
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onesignal (5.7.0)
4
+ onesignal (5.8.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -4,15 +4,15 @@ OneSignal - the Ruby gem for OneSignal
4
4
 
5
5
  A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
6
6
 
7
- - API version: 5.7.0
8
- - Package version: 5.7.0
7
+ - API version: 5.8.0
8
+ - Package version: 5.8.0
9
9
 
10
10
  ## Installation
11
11
 
12
12
  Add to your `Gemfile`:
13
13
 
14
14
  ```ruby
15
- gem 'onesignal', '~> 5.7.0'
15
+ gem 'onesignal', '~> 5.8.0'
16
16
  ```
17
17
 
18
18
  Then run `bundle install`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). | [optional] |
7
+ | **id** | **String** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly. | [optional] |
8
8
  | **external_id** | **String** | Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`). | [optional] |
9
9
  | **errors** | **Object** | Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize. | [optional] |
10
10
 
data/docs/DefaultApi.md CHANGED
@@ -2214,7 +2214,8 @@ app_id = '00000000-0000-0000-0000-000000000000' # String | The app ID that you w
2214
2214
  opts = {
2215
2215
  limit: 10, # Integer | How many notifications to return. Max is 50. Default is 50.
2216
2216
  offset: 0, # Integer | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
2217
- kind: 0 # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
2217
+ kind: 0, # Integer | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
2218
+ time_offset: '2025-01-01T00:00:00.000Z' # String | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned.
2218
2219
  }
2219
2220
 
2220
2221
  begin
@@ -2259,6 +2260,7 @@ end
2259
2260
  | **limit** | **Integer** | How many notifications to return. Max is 50. Default is 50. | [optional] |
2260
2261
  | **offset** | **Integer** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional] |
2261
2262
  | **kind** | **Integer** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional] |
2263
+ | **time_offset** | **String** | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. | [optional] |
2262
2264
 
2263
2265
  ### Return type
2264
2266
 
@@ -7,6 +7,8 @@
7
7
  | **total_count** | **Integer** | | [optional] |
8
8
  | **offset** | **Integer** | | [optional] |
9
9
  | **limit** | **Integer** | | [optional] |
10
+ | **time_offset** | **String** | The time_offset cursor specified in the request, if any. | [optional] |
11
+ | **next_time_offset** | **String** | An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating. | [optional] |
10
12
  | **notifications** | [**Array<NotificationWithMeta>**](NotificationWithMeta.md) | | [optional] |
11
13
 
12
14
  ## Example
@@ -18,6 +20,8 @@ instance = OneSignal::NotificationSlice.new(
18
20
  total_count: null,
19
21
  offset: null,
20
22
  limit: null,
23
+ time_offset: null,
24
+ next_time_offset: null,
21
25
  notifications: null
22
26
  )
23
27
  ```
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -1888,6 +1888,7 @@ module OneSignal
1888
1888
  # @option opts [Integer] :limit How many notifications to return. Max is 50. Default is 50.
1889
1889
  # @option opts [Integer] :offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
1890
1890
  # @option opts [Integer] :kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
1891
+ # @option opts [String] :time_offset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned.
1891
1892
  # @return [NotificationSlice]
1892
1893
  def get_notifications(app_id, opts = {})
1893
1894
  data, _status_code, _headers = get_notifications_with_http_info(app_id, opts)
@@ -1901,6 +1902,7 @@ module OneSignal
1901
1902
  # @option opts [Integer] :limit How many notifications to return. Max is 50. Default is 50.
1902
1903
  # @option opts [Integer] :offset Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
1903
1904
  # @option opts [Integer] :kind Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
1905
+ # @option opts [String] :time_offset Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned.
1904
1906
  # @return [Array<(NotificationSlice, Integer, Hash)>] NotificationSlice data, response status code and response headers
1905
1907
  def get_notifications_with_http_info(app_id, opts = {})
1906
1908
  if @api_client.config.debugging
@@ -1923,6 +1925,7 @@ module OneSignal
1923
1925
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1924
1926
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1925
1927
  query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
1928
+ query_params[:'time_offset'] = opts[:'time_offset'] if !opts[:'time_offset'].nil?
1926
1929
 
1927
1930
  # header parameters
1928
1931
  header_params = opts[:header_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -90,7 +90,7 @@ module OneSignal
90
90
  url = build_request_url(path, opts)
91
91
  http_method = http_method.to_sym.downcase
92
92
 
93
- opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.7.0'
93
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.8.0'
94
94
  header_params = @default_headers.merge(opts[:header_params] || {})
95
95
  query_params = opts[:query_params] || {}
96
96
  form_params = opts[:form_params] || {}
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -54,6 +54,30 @@ module OneSignal
54
54
  end
55
55
  end
56
56
 
57
+ # Whether a POST /notifications 200 response is the "message sent" branch.
58
+ #
59
+ # POST /notifications returns 200 in two cases that share the
60
+ # CreateNotificationSuccessResponse shape: a notification was created
61
+ # (non-empty +id+), or none was (empty +id+, with +errors+ carrying the
62
+ # reason). Prefer this guard over inspecting +id+ directly.
63
+ #
64
+ # @param response [CreateNotificationSuccessResponse]
65
+ # @return [Boolean] true when a notification was created
66
+ def self.message_sent?(response)
67
+ id = response.respond_to?(:id) ? response.id : nil
68
+ id.is_a?(String) && !id.empty?
69
+ end
70
+
71
+ # Whether a POST /notifications 200 response is the "message not sent"
72
+ # branch -- no notification was created (+id+ absent or empty); inspect
73
+ # +errors+ for why.
74
+ #
75
+ # @param response [CreateNotificationSuccessResponse]
76
+ # @return [Boolean] true when no notification was created
77
+ def self.message_not_sent?(response)
78
+ !message_sent?(response)
79
+ end
80
+
57
81
  def self.header_value(headers, name)
58
82
  return nil unless headers.respond_to?(:each_pair)
59
83
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module OneSignal
17
17
  class CreateNotificationSuccessResponse
18
- # Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200).
18
+ # Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly.
19
19
  attr_accessor :id
20
20
 
21
21
  # Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`).
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5
5
 
6
- The version of the OpenAPI document: 5.7.0
6
+ The version of the OpenAPI document: 5.8.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -21,6 +21,12 @@ module OneSignal
21
21
 
22
22
  attr_accessor :limit
23
23
 
24
+ # The time_offset cursor specified in the request, if any.
25
+ attr_accessor :time_offset
26
+
27
+ # An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating.
28
+ attr_accessor :next_time_offset
29
+
24
30
  attr_accessor :notifications
25
31
 
26
32
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -29,6 +35,8 @@ module OneSignal
29
35
  :'total_count' => :'total_count',
30
36
  :'offset' => :'offset',
31
37
  :'limit' => :'limit',
38
+ :'time_offset' => :'time_offset',
39
+ :'next_time_offset' => :'next_time_offset',
32
40
  :'notifications' => :'notifications'
33
41
  }
34
42
  end
@@ -44,6 +52,8 @@ module OneSignal
44
52
  :'total_count' => :'Integer',
45
53
  :'offset' => :'Integer',
46
54
  :'limit' => :'Integer',
55
+ :'time_offset' => :'String',
56
+ :'next_time_offset' => :'String',
47
57
  :'notifications' => :'Array<NotificationWithMeta>'
48
58
  }
49
59
  end
@@ -81,6 +91,14 @@ module OneSignal
81
91
  self.limit = attributes[:'limit']
82
92
  end
83
93
 
94
+ if attributes.key?(:'time_offset')
95
+ self.time_offset = attributes[:'time_offset']
96
+ end
97
+
98
+ if attributes.key?(:'next_time_offset')
99
+ self.next_time_offset = attributes[:'next_time_offset']
100
+ end
101
+
84
102
  if attributes.key?(:'notifications')
85
103
  if (value = attributes[:'notifications']).is_a?(Array)
86
104
  self.notifications = value
@@ -109,6 +127,8 @@ module OneSignal
109
127
  total_count == o.total_count &&
110
128
  offset == o.offset &&
111
129
  limit == o.limit &&
130
+ time_offset == o.time_offset &&
131
+ next_time_offset == o.next_time_offset &&
112
132
  notifications == o.notifications
113
133
  end
114
134
 
@@ -121,7 +141,7 @@ module OneSignal
121
141
  # Calculates hash code according to all attributes.
122
142
  # @return [Integer] Hash code
123
143
  def hash
124
- [total_count, offset, limit, notifications].hash
144
+ [total_count, offset, limit, time_offset, next_time_offset, notifications].hash
125
145
  end
126
146
 
127
147
  # Builds the object from hash