onesignal 5.7.0 → 5.9.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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +66 -0
  3. data/CHANGELOG.md +14 -0
  4. data/CLAUDE.md +5 -0
  5. data/Gemfile.lock +1 -1
  6. data/README.md +5 -3
  7. data/docs/ApiKeyToken.md +6 -6
  8. data/docs/ApiKeyTokensListResponse.md +1 -1
  9. data/docs/App.md +34 -34
  10. data/docs/BasicNotification.md +117 -117
  11. data/docs/BasicNotificationAllOf.md +103 -103
  12. data/docs/BasicNotificationAllOfAndroidBackgroundLayout.md +3 -3
  13. data/docs/Button.md +3 -3
  14. data/docs/CopyTemplateRequest.md +1 -1
  15. data/docs/CreateApiKeyRequest.md +3 -3
  16. data/docs/CreateApiKeyResponse.md +2 -2
  17. data/docs/CreateNotificationSuccessResponse.md +4 -4
  18. data/docs/CreateSegmentConflictResponse.md +2 -2
  19. data/docs/CreateSegmentSuccessResponse.md +2 -2
  20. data/docs/CreateTemplateRequest.md +11 -11
  21. data/docs/CreateUserConflictResponse.md +1 -1
  22. data/docs/CreateUserConflictResponseErrorsInner.md +3 -3
  23. data/docs/CreateUserConflictResponseErrorsItemsMeta.md +1 -1
  24. data/docs/CustomEvent.md +5 -5
  25. data/docs/CustomEventsRequest.md +1 -1
  26. data/docs/DefaultApi.md +90 -86
  27. data/docs/DeliveryData.md +5 -5
  28. data/docs/ExportEventsSuccessResponse.md +1 -1
  29. data/docs/ExportSubscriptionsRequestBody.md +3 -3
  30. data/docs/ExportSubscriptionsSuccessResponse.md +1 -1
  31. data/docs/Filter.md +8 -8
  32. data/docs/GenericError.md +3 -3
  33. data/docs/GenericSuccessBoolResponse.md +1 -1
  34. data/docs/GetNotificationHistoryRequestBody.md +3 -3
  35. data/docs/GetSegmentsSuccessResponse.md +4 -4
  36. data/docs/LanguageStringMap.md +43 -43
  37. data/docs/Notification.md +118 -118
  38. data/docs/NotificationAllOf.md +1 -1
  39. data/docs/NotificationHistorySuccessResponse.md +2 -2
  40. data/docs/NotificationSlice.md +8 -4
  41. data/docs/NotificationTarget.md +14 -14
  42. data/docs/NotificationWithMeta.md +130 -130
  43. data/docs/NotificationWithMetaAllOf.md +14 -14
  44. data/docs/Operator.md +1 -1
  45. data/docs/OutcomeData.md +3 -3
  46. data/docs/OutcomesData.md +1 -1
  47. data/docs/PlatformDeliveryData.md +8 -8
  48. data/docs/PlatformDeliveryDataEmailAllOf.md +7 -7
  49. data/docs/PlatformDeliveryDataSmsAllOf.md +3 -3
  50. data/docs/PropertiesBody.md +1 -1
  51. data/docs/PropertiesDeltas.md +3 -3
  52. data/docs/PropertiesObject.md +11 -11
  53. data/docs/Purchase.md +4 -4
  54. data/docs/RateLimitError.md +2 -2
  55. data/docs/Segment.md +3 -3
  56. data/docs/SegmentData.md +7 -7
  57. data/docs/SegmentNotificationTarget.md +2 -2
  58. data/docs/StartLiveActivityRequest.md +16 -16
  59. data/docs/StartLiveActivitySuccessResponse.md +1 -1
  60. data/docs/Subscription.md +17 -17
  61. data/docs/SubscriptionBody.md +1 -1
  62. data/docs/SubscriptionNotificationTarget.md +12 -12
  63. data/docs/TemplateResource.md +6 -6
  64. data/docs/TemplatesListResponse.md +1 -1
  65. data/docs/TransferSubscriptionRequestBody.md +1 -1
  66. data/docs/UpdateApiKeyRequest.md +3 -3
  67. data/docs/UpdateLiveActivityRequest.md +9 -9
  68. data/docs/UpdateLiveActivitySuccessResponse.md +1 -1
  69. data/docs/UpdateTemplateRequest.md +10 -10
  70. data/docs/UpdateUserRequest.md +3 -3
  71. data/docs/User.md +3 -3
  72. data/docs/UserIdentityBody.md +1 -1
  73. data/docs/WebButton.md +4 -4
  74. data/lib/onesignal/api/default_api.rb +4 -1
  75. data/lib/onesignal/api_client.rb +2 -2
  76. data/lib/onesignal/api_error.rb +1 -1
  77. data/lib/onesignal/configuration.rb +1 -1
  78. data/lib/onesignal/helpers.rb +24 -0
  79. data/lib/onesignal/models/api_key_token.rb +1 -1
  80. data/lib/onesignal/models/api_key_tokens_list_response.rb +1 -1
  81. data/lib/onesignal/models/app.rb +1 -1
  82. data/lib/onesignal/models/basic_notification.rb +2 -1
  83. data/lib/onesignal/models/basic_notification_all_of.rb +2 -1
  84. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  85. data/lib/onesignal/models/button.rb +1 -1
  86. data/lib/onesignal/models/copy_template_request.rb +1 -1
  87. data/lib/onesignal/models/create_api_key_request.rb +1 -1
  88. data/lib/onesignal/models/create_api_key_response.rb +1 -1
  89. data/lib/onesignal/models/create_notification_success_response.rb +2 -2
  90. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  91. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  92. data/lib/onesignal/models/create_template_request.rb +1 -1
  93. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  94. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  95. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  96. data/lib/onesignal/models/custom_event.rb +1 -1
  97. data/lib/onesignal/models/custom_events_request.rb +1 -1
  98. data/lib/onesignal/models/delivery_data.rb +1 -1
  99. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  100. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  101. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  102. data/lib/onesignal/models/filter.rb +1 -1
  103. data/lib/onesignal/models/filter_expression.rb +1 -1
  104. data/lib/onesignal/models/generic_error.rb +1 -1
  105. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  106. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  107. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  108. data/lib/onesignal/models/language_string_map.rb +1 -1
  109. data/lib/onesignal/models/notification.rb +2 -1
  110. data/lib/onesignal/models/notification_all_of.rb +1 -1
  111. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  112. data/lib/onesignal/models/notification_slice.rb +22 -2
  113. data/lib/onesignal/models/notification_target.rb +1 -1
  114. data/lib/onesignal/models/notification_with_meta.rb +2 -1
  115. data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
  116. data/lib/onesignal/models/operator.rb +1 -1
  117. data/lib/onesignal/models/outcome_data.rb +1 -1
  118. data/lib/onesignal/models/outcomes_data.rb +1 -1
  119. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  120. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  121. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  122. data/lib/onesignal/models/properties_body.rb +1 -1
  123. data/lib/onesignal/models/properties_deltas.rb +1 -1
  124. data/lib/onesignal/models/properties_object.rb +1 -1
  125. data/lib/onesignal/models/purchase.rb +1 -1
  126. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  127. data/lib/onesignal/models/segment.rb +1 -1
  128. data/lib/onesignal/models/segment_data.rb +1 -1
  129. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  130. data/lib/onesignal/models/start_live_activity_request.rb +1 -1
  131. data/lib/onesignal/models/start_live_activity_success_response.rb +1 -1
  132. data/lib/onesignal/models/subscription.rb +1 -1
  133. data/lib/onesignal/models/subscription_body.rb +1 -1
  134. data/lib/onesignal/models/subscription_notification_target.rb +1 -1
  135. data/lib/onesignal/models/template_resource.rb +1 -1
  136. data/lib/onesignal/models/templates_list_response.rb +1 -1
  137. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  138. data/lib/onesignal/models/update_api_key_request.rb +1 -1
  139. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  140. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  141. data/lib/onesignal/models/update_template_request.rb +1 -1
  142. data/lib/onesignal/models/update_user_request.rb +1 -1
  143. data/lib/onesignal/models/user.rb +1 -1
  144. data/lib/onesignal/models/user_identity_body.rb +1 -1
  145. data/lib/onesignal/models/web_button.rb +1 -1
  146. data/lib/onesignal/version.rb +2 -2
  147. data/lib/onesignal.rb +1 -1
  148. data/onesignal.gemspec +1 -1
  149. data/spec/api/default_api_spec.rb +2 -1
  150. data/spec/api_client_spec.rb +1 -1
  151. data/spec/configuration_spec.rb +1 -1
  152. data/spec/models/api_key_token_spec.rb +1 -1
  153. data/spec/models/api_key_tokens_list_response_spec.rb +1 -1
  154. data/spec/models/app_spec.rb +1 -1
  155. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  156. data/spec/models/basic_notification_all_of_spec.rb +1 -1
  157. data/spec/models/basic_notification_spec.rb +1 -1
  158. data/spec/models/button_spec.rb +1 -1
  159. data/spec/models/copy_template_request_spec.rb +1 -1
  160. data/spec/models/create_api_key_request_spec.rb +1 -1
  161. data/spec/models/create_api_key_response_spec.rb +1 -1
  162. data/spec/models/create_notification_success_response_spec.rb +1 -1
  163. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  164. data/spec/models/create_segment_success_response_spec.rb +1 -1
  165. data/spec/models/create_template_request_spec.rb +1 -1
  166. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  167. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  168. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  169. data/spec/models/custom_event_spec.rb +1 -1
  170. data/spec/models/custom_events_request_spec.rb +1 -1
  171. data/spec/models/delivery_data_spec.rb +1 -1
  172. data/spec/models/export_events_success_response_spec.rb +1 -1
  173. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  174. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  175. data/spec/models/filter_expression_spec.rb +1 -1
  176. data/spec/models/filter_spec.rb +1 -1
  177. data/spec/models/generic_error_spec.rb +1 -1
  178. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  179. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  180. data/spec/models/get_segments_success_response_spec.rb +1 -1
  181. data/spec/models/language_string_map_spec.rb +1 -1
  182. data/spec/models/notification_all_of_spec.rb +1 -1
  183. data/spec/models/notification_history_success_response_spec.rb +1 -1
  184. data/spec/models/notification_slice_spec.rb +13 -1
  185. data/spec/models/notification_spec.rb +1 -1
  186. data/spec/models/notification_target_spec.rb +1 -1
  187. data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
  188. data/spec/models/notification_with_meta_spec.rb +1 -1
  189. data/spec/models/operator_spec.rb +1 -1
  190. data/spec/models/outcome_data_spec.rb +1 -1
  191. data/spec/models/outcomes_data_spec.rb +1 -1
  192. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  193. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  194. data/spec/models/platform_delivery_data_spec.rb +1 -1
  195. data/spec/models/properties_body_spec.rb +1 -1
  196. data/spec/models/properties_deltas_spec.rb +1 -1
  197. data/spec/models/properties_object_spec.rb +1 -1
  198. data/spec/models/purchase_spec.rb +1 -1
  199. data/spec/models/rate_limit_error_spec.rb +1 -1
  200. data/spec/models/segment_data_spec.rb +1 -1
  201. data/spec/models/segment_notification_target_spec.rb +1 -1
  202. data/spec/models/segment_spec.rb +1 -1
  203. data/spec/models/start_live_activity_request_spec.rb +1 -1
  204. data/spec/models/start_live_activity_success_response_spec.rb +1 -1
  205. data/spec/models/subscription_body_spec.rb +1 -1
  206. data/spec/models/subscription_notification_target_spec.rb +1 -1
  207. data/spec/models/subscription_spec.rb +1 -1
  208. data/spec/models/template_resource_spec.rb +1 -1
  209. data/spec/models/templates_list_response_spec.rb +1 -1
  210. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  211. data/spec/models/update_api_key_request_spec.rb +1 -1
  212. data/spec/models/update_live_activity_request_spec.rb +1 -1
  213. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  214. data/spec/models/update_template_request_spec.rb +1 -1
  215. data/spec/models/update_user_request_spec.rb +1 -1
  216. data/spec/models/user_identity_body_spec.rb +1 -1
  217. data/spec/models/user_spec.rb +1 -1
  218. data/spec/models/web_button_spec.rb +1 -1
  219. data/spec/spec_helper.rb +1 -1
  220. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  221. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  222. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  223. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  224. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  225. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  226. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  227. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  228. metadata +4 -2
@@ -17,12 +17,12 @@
17
17
  require 'onesignal'
18
18
 
19
19
  instance = OneSignal::TemplateResource.new(
20
- id: null,
21
- name: null,
22
- created_at: null,
23
- updated_at: null,
24
- channel: null,
25
- content: null
20
+ id: nil,
21
+ name: nil,
22
+ created_at: nil,
23
+ updated_at: nil,
24
+ channel: nil,
25
+ content: nil
26
26
  )
27
27
  ```
28
28
 
@@ -12,7 +12,7 @@
12
12
  require 'onesignal'
13
13
 
14
14
  instance = OneSignal::TemplatesListResponse.new(
15
- templates: null
15
+ templates: nil
16
16
  )
17
17
  ```
18
18
 
@@ -12,7 +12,7 @@
12
12
  require 'onesignal'
13
13
 
14
14
  instance = OneSignal::TransferSubscriptionRequestBody.new(
15
- identity: null
15
+ identity: nil
16
16
  )
17
17
  ```
18
18
 
@@ -14,9 +14,9 @@
14
14
  require 'onesignal'
15
15
 
16
16
  instance = OneSignal::UpdateApiKeyRequest.new(
17
- name: null,
18
- ip_allowlist_mode: null,
19
- ip_allowlist: null
17
+ name: nil,
18
+ ip_allowlist_mode: nil,
19
+ ip_allowlist: nil
20
20
  )
21
21
  ```
22
22
 
@@ -20,15 +20,15 @@
20
20
  require 'onesignal'
21
21
 
22
22
  instance = OneSignal::UpdateLiveActivityRequest.new(
23
- name: null,
24
- event: null,
25
- event_updates: null,
26
- contents: null,
27
- headings: null,
28
- sound: null,
29
- stale_date: null,
30
- dismissal_date: null,
31
- priority: null
23
+ name: nil,
24
+ event: nil,
25
+ event_updates: nil,
26
+ contents: nil,
27
+ headings: nil,
28
+ sound: nil,
29
+ stale_date: nil,
30
+ dismissal_date: nil,
31
+ priority: nil
32
32
  )
33
33
  ```
34
34
 
@@ -12,7 +12,7 @@
12
12
  require 'onesignal'
13
13
 
14
14
  instance = OneSignal::UpdateLiveActivitySuccessResponse.new(
15
- id: null
15
+ id: nil
16
16
  )
17
17
  ```
18
18
 
@@ -21,16 +21,16 @@
21
21
  require 'onesignal'
22
22
 
23
23
  instance = OneSignal::UpdateTemplateRequest.new(
24
- name: null,
25
- contents: null,
26
- headings: null,
27
- subtitle: null,
28
- is_email: null,
29
- email_subject: null,
30
- email_body: null,
31
- email_bcc: null,
32
- is_sms: null,
33
- dynamic_content: null
24
+ name: nil,
25
+ contents: nil,
26
+ headings: nil,
27
+ subtitle: nil,
28
+ is_email: nil,
29
+ email_subject: nil,
30
+ email_body: nil,
31
+ email_bcc: nil,
32
+ is_sms: nil,
33
+ dynamic_content: nil
34
34
  )
35
35
  ```
36
36
 
@@ -14,9 +14,9 @@
14
14
  require 'onesignal'
15
15
 
16
16
  instance = OneSignal::UpdateUserRequest.new(
17
- properties: null,
18
- refresh_device_metadata: null,
19
- deltas: null
17
+ properties: nil,
18
+ refresh_device_metadata: nil,
19
+ deltas: nil
20
20
  )
21
21
  ```
22
22
 
data/docs/User.md CHANGED
@@ -14,9 +14,9 @@
14
14
  require 'onesignal'
15
15
 
16
16
  instance = OneSignal::User.new(
17
- properties: null,
18
- identity: null,
19
- subscriptions: null
17
+ properties: nil,
18
+ identity: {"external_id":"YOUR_USER_EXTERNAL_ID"},
19
+ subscriptions: nil
20
20
  )
21
21
  ```
22
22
 
@@ -12,7 +12,7 @@
12
12
  require 'onesignal'
13
13
 
14
14
  instance = OneSignal::UserIdentityBody.new(
15
- identity: null
15
+ identity: {"external_id":"YOUR_USER_EXTERNAL_ID"}
16
16
  )
17
17
  ```
18
18
 
data/docs/WebButton.md CHANGED
@@ -15,10 +15,10 @@
15
15
  require 'onesignal'
16
16
 
17
17
  instance = OneSignal::WebButton.new(
18
- id: null,
19
- text: null,
20
- icon: null,
21
- url: null
18
+ id: nil,
19
+ text: nil,
20
+ icon: nil,
21
+ url: nil
22
22
  )
23
23
  ```
24
24
 
@@ -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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -715,6 +715,7 @@ module OneSignal
715
715
  :'email_reply_to_address',
716
716
  :'email_preheader',
717
717
  :'disable_email_click_tracking',
718
+ :'include_unsubscribed',
718
719
  :'email_bcc',
719
720
  :'email_sender_domain',
720
721
  :'sms_from',
@@ -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.9.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -644,6 +644,7 @@ module OneSignal
644
644
  :'email_reply_to_address',
645
645
  :'email_preheader',
646
646
  :'disable_email_click_tracking',
647
+ :'include_unsubscribed',
647
648
  :'email_bcc',
648
649
  :'email_sender_domain',
649
650
  :'sms_from',
@@ -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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -720,6 +720,7 @@ module OneSignal
720
720
  :'email_reply_to_address',
721
721
  :'email_preheader',
722
722
  :'disable_email_click_tracking',
723
+ :'include_unsubscribed',
723
724
  :'email_bcc',
724
725
  :'email_sender_domain',
725
726
  :'sms_from',
@@ -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.9.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT