onesignal 5.4.0 → 5.5.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 (161) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +3 -3
  4. data/docs/BasicNotification.md +4 -2
  5. data/docs/BasicNotificationAllOf.md +3 -1
  6. data/docs/CreateNotificationSuccessResponse.md +3 -3
  7. data/docs/CreateTemplateRequest.md +2 -0
  8. data/docs/DefaultApi.md +6 -2
  9. data/docs/Notification.md +4 -2
  10. data/docs/NotificationTarget.md +1 -1
  11. data/docs/NotificationWithMeta.md +7 -3
  12. data/docs/NotificationWithMetaAllOf.md +5 -1
  13. data/docs/StartLiveActivityRequest.md +1 -1
  14. data/docs/SubscriptionNotificationTarget.md +1 -1
  15. data/docs/UpdateTemplateRequest.md +2 -0
  16. data/lib/onesignal/api/default_api.rb +3 -3
  17. data/lib/onesignal/api_client.rb +2 -2
  18. data/lib/onesignal/api_error.rb +1 -1
  19. data/lib/onesignal/configuration.rb +1 -1
  20. data/lib/onesignal/models/api_key_token.rb +1 -1
  21. data/lib/onesignal/models/api_key_tokens_list_response.rb +1 -1
  22. data/lib/onesignal/models/app.rb +1 -1
  23. data/lib/onesignal/models/basic_notification.rb +32 -4
  24. data/lib/onesignal/models/basic_notification_all_of.rb +31 -3
  25. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  26. data/lib/onesignal/models/button.rb +1 -1
  27. data/lib/onesignal/models/copy_template_request.rb +1 -1
  28. data/lib/onesignal/models/create_api_key_request.rb +1 -1
  29. data/lib/onesignal/models/create_api_key_response.rb +1 -1
  30. data/lib/onesignal/models/create_notification_success_response.rb +4 -2
  31. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  32. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  33. data/lib/onesignal/models/create_template_request.rb +30 -2
  34. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  35. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  36. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  37. data/lib/onesignal/models/custom_event.rb +1 -1
  38. data/lib/onesignal/models/custom_events_request.rb +1 -1
  39. data/lib/onesignal/models/delivery_data.rb +1 -1
  40. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  41. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  42. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  43. data/lib/onesignal/models/filter.rb +1 -1
  44. data/lib/onesignal/models/filter_expression.rb +1 -1
  45. data/lib/onesignal/models/generic_error.rb +1 -1
  46. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  47. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  48. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  49. data/lib/onesignal/models/language_string_map.rb +1 -1
  50. data/lib/onesignal/models/notification.rb +32 -4
  51. data/lib/onesignal/models/notification_all_of.rb +1 -1
  52. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  53. data/lib/onesignal/models/notification_slice.rb +1 -1
  54. data/lib/onesignal/models/notification_target.rb +2 -2
  55. data/lib/onesignal/models/notification_with_meta.rb +31 -7
  56. data/lib/onesignal/models/notification_with_meta_all_of.rb +29 -5
  57. data/lib/onesignal/models/operator.rb +1 -1
  58. data/lib/onesignal/models/outcome_data.rb +1 -1
  59. data/lib/onesignal/models/outcomes_data.rb +1 -1
  60. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  61. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  62. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  63. data/lib/onesignal/models/properties_body.rb +1 -1
  64. data/lib/onesignal/models/properties_deltas.rb +1 -1
  65. data/lib/onesignal/models/properties_object.rb +1 -1
  66. data/lib/onesignal/models/purchase.rb +1 -1
  67. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  68. data/lib/onesignal/models/segment.rb +1 -1
  69. data/lib/onesignal/models/segment_data.rb +1 -1
  70. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  71. data/lib/onesignal/models/start_live_activity_request.rb +2 -2
  72. data/lib/onesignal/models/start_live_activity_success_response.rb +1 -1
  73. data/lib/onesignal/models/subscription.rb +1 -1
  74. data/lib/onesignal/models/subscription_body.rb +1 -1
  75. data/lib/onesignal/models/subscription_notification_target.rb +2 -2
  76. data/lib/onesignal/models/template_resource.rb +1 -1
  77. data/lib/onesignal/models/templates_list_response.rb +1 -1
  78. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  79. data/lib/onesignal/models/update_api_key_request.rb +1 -1
  80. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  81. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  82. data/lib/onesignal/models/update_template_request.rb +30 -2
  83. data/lib/onesignal/models/update_user_request.rb +1 -1
  84. data/lib/onesignal/models/user.rb +1 -1
  85. data/lib/onesignal/models/user_identity_body.rb +1 -1
  86. data/lib/onesignal/models/web_button.rb +1 -1
  87. data/lib/onesignal/version.rb +2 -2
  88. data/lib/onesignal.rb +1 -1
  89. data/onesignal.gemspec +1 -1
  90. data/spec/api/default_api_spec.rb +2 -2
  91. data/spec/api_client_spec.rb +1 -1
  92. data/spec/configuration_spec.rb +1 -1
  93. data/spec/models/api_key_token_spec.rb +1 -1
  94. data/spec/models/api_key_tokens_list_response_spec.rb +1 -1
  95. data/spec/models/app_spec.rb +1 -1
  96. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  97. data/spec/models/basic_notification_all_of_spec.rb +7 -1
  98. data/spec/models/basic_notification_spec.rb +7 -1
  99. data/spec/models/button_spec.rb +1 -1
  100. data/spec/models/copy_template_request_spec.rb +1 -1
  101. data/spec/models/create_api_key_request_spec.rb +1 -1
  102. data/spec/models/create_api_key_response_spec.rb +1 -1
  103. data/spec/models/create_notification_success_response_spec.rb +1 -1
  104. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  105. data/spec/models/create_segment_success_response_spec.rb +1 -1
  106. data/spec/models/create_template_request_spec.rb +7 -1
  107. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  108. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  109. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  110. data/spec/models/custom_event_spec.rb +1 -1
  111. data/spec/models/custom_events_request_spec.rb +1 -1
  112. data/spec/models/delivery_data_spec.rb +1 -1
  113. data/spec/models/export_events_success_response_spec.rb +1 -1
  114. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  115. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  116. data/spec/models/filter_expression_spec.rb +1 -1
  117. data/spec/models/filter_spec.rb +1 -1
  118. data/spec/models/generic_error_spec.rb +1 -1
  119. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  120. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  121. data/spec/models/get_segments_success_response_spec.rb +1 -1
  122. data/spec/models/language_string_map_spec.rb +1 -1
  123. data/spec/models/notification_all_of_spec.rb +1 -1
  124. data/spec/models/notification_history_success_response_spec.rb +1 -1
  125. data/spec/models/notification_slice_spec.rb +1 -1
  126. data/spec/models/notification_spec.rb +7 -1
  127. data/spec/models/notification_target_spec.rb +1 -1
  128. data/spec/models/notification_with_meta_all_of_spec.rb +13 -1
  129. data/spec/models/notification_with_meta_spec.rb +13 -1
  130. data/spec/models/operator_spec.rb +1 -1
  131. data/spec/models/outcome_data_spec.rb +1 -1
  132. data/spec/models/outcomes_data_spec.rb +1 -1
  133. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  134. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  135. data/spec/models/platform_delivery_data_spec.rb +1 -1
  136. data/spec/models/properties_body_spec.rb +1 -1
  137. data/spec/models/properties_deltas_spec.rb +1 -1
  138. data/spec/models/properties_object_spec.rb +1 -1
  139. data/spec/models/purchase_spec.rb +1 -1
  140. data/spec/models/rate_limit_error_spec.rb +1 -1
  141. data/spec/models/segment_data_spec.rb +1 -1
  142. data/spec/models/segment_notification_target_spec.rb +1 -1
  143. data/spec/models/segment_spec.rb +1 -1
  144. data/spec/models/start_live_activity_request_spec.rb +1 -1
  145. data/spec/models/start_live_activity_success_response_spec.rb +1 -1
  146. data/spec/models/subscription_body_spec.rb +1 -1
  147. data/spec/models/subscription_notification_target_spec.rb +1 -1
  148. data/spec/models/subscription_spec.rb +1 -1
  149. data/spec/models/template_resource_spec.rb +1 -1
  150. data/spec/models/templates_list_response_spec.rb +1 -1
  151. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  152. data/spec/models/update_api_key_request_spec.rb +1 -1
  153. data/spec/models/update_live_activity_request_spec.rb +1 -1
  154. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  155. data/spec/models/update_template_request_spec.rb +7 -1
  156. data/spec/models/update_user_request_spec.rb +1 -1
  157. data/spec/models/user_identity_body_spec.rb +1 -1
  158. data/spec/models/user_spec.rb +1 -1
  159. data/spec/models/web_button_spec.rb +1 -1
  160. data/spec/spec_helper.rb +1 -1
  161. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b822e8ac691cee158cc2ea0d95286eaae7d13eba0c01a3920a499948d1bc238
4
- data.tar.gz: 0ee3fb8b53514f2f03c125d0088556f058fd299df668d2b708066b5ad7842004
3
+ metadata.gz: 6e2a0e4d30e7deb7aa557bb055f0584d97c2fe1acce3c091635f364862fe7abf
4
+ data.tar.gz: 7a34c0144039ac9132079a3a1d2ad611a62cc450dace4044db9a98a8b684f960
5
5
  SHA512:
6
- metadata.gz: 81302a5cd1d63aec33b5014e637c716916506e593d442bed11d97f87fb59bcef9e8636a1609106de791cf5ebbf180202b3ac297dff8f6fac0abcc2f177592632
7
- data.tar.gz: '08301126ffffc8eeed569ea66ccf7b4a881c366c3e80d9d7c21fe2b3c982bff076aced450e146d4ab2cdad3ddf04ae386c708ac761146aee38b7da726b31710f'
6
+ metadata.gz: a7d44e55b919b92325a5106037e73a7a5d276a2f47cc55eb8931e4c95912a7b2eba424728fde9b8fffdd9aae12b6d7c6ed81cb4ac1cea1b9e0c3a99997d1b4c1
7
+ data.tar.gz: cd6a2e8b60ddc1c376024a4ee5620032a07b97b42ee04fbd98c45ce71a88f9532dc161d9d7983dd1eeb0d8cba0561311ed48f094bddd11c60b71650c549542f5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.5.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.4.0...v5.5.0) (2026-05-08)
4
+
5
+ ### Features
6
+
7
+ * add `email_bcc` and `bcc_sent` to Notification and Template models ([#84](https://github.com/OneSignal/onesignal-ruby-api/issues/84)) ([9cb235f](https://github.com/OneSignal/onesignal-ruby-api/commit/9cb235fcfd299fa58877733108eba660c86fc4ba))
8
+
3
9
  ## [5.4.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.3.0...v5.4.0) (2026-04-17)
4
10
 
5
11
  ### Features
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.4.0
8
- - Package version: 5.4.0
7
+ - API version: 5.5.0
8
+ - Package version: 5.5.0
9
9
 
10
10
  ## Installation
11
11
 
12
12
  Add to your `Gemfile`:
13
13
 
14
14
  ```ruby
15
- gem 'onesignal', '~> 5.4.0'
15
+ gem 'onesignal', '~> 5.5.0'
16
16
  ```
17
17
 
18
18
  Then run `bundle install`.
@@ -15,7 +15,7 @@
15
15
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
16
16
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
17
17
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
18
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
19
19
  | **target_channel** | **String** | | [optional] |
20
20
  | **id** | **String** | | [optional] |
21
21
  | **value** | **Integer** | | [optional][readonly] |
@@ -32,7 +32,7 @@
32
32
  | **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
33
33
  | **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] |
34
34
  | **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. | |
35
- | **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] |
35
+ | **external_id** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [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] |
36
36
  | **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] |
37
37
  | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
38
38
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
@@ -109,6 +109,7 @@
109
109
  | **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] |
110
110
  | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
111
111
  | **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] |
112
+ | **email_bcc** | **Array<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
112
113
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
113
114
  | **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] |
114
115
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -230,6 +231,7 @@ instance = OneSignal::BasicNotification.new(
230
231
  email_preheader: null,
231
232
  disable_email_click_tracking: null,
232
233
  include_unsubscribed: null,
234
+ email_bcc: null,
233
235
  sms_from: null,
234
236
  sms_media_urls: null,
235
237
  filters: null,
@@ -19,7 +19,7 @@
19
19
  | **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
20
20
  | **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] |
21
21
  | **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. | [optional] |
22
- | **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] |
22
+ | **external_id** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [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] |
23
23
  | **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] |
24
24
  | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
25
25
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
@@ -96,6 +96,7 @@
96
96
  | **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] |
97
97
  | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
98
98
  | **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] |
99
+ | **email_bcc** | **Array<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
99
100
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
100
101
  | **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] |
101
102
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -204,6 +205,7 @@ instance = OneSignal::BasicNotificationAllOf.new(
204
205
  email_preheader: null,
205
206
  disable_email_click_tracking: null,
206
207
  include_unsubscribed: null,
208
+ email_bcc: null,
207
209
  sms_from: null,
208
210
  sms_media_urls: null,
209
211
  filters: null,
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
8
- | **external_id** | **String** | | [optional] |
9
- | **errors** | **Object** | Errors include the identifiers that are invalid, or that there are no subscribers. | [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). | [optional] |
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
+ | **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
 
11
11
  ## Example
12
12
 
@@ -12,6 +12,7 @@
12
12
  | **is_email** | **Boolean** | Set true for an Email template. | [optional] |
13
13
  | **email_subject** | **String** | Subject of the email. | [optional] |
14
14
  | **email_body** | **String** | Body of the email (HTML supported). | [optional] |
15
+ | **email_bcc** | **Array<String>** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
15
16
  | **is_sms** | **Boolean** | Set true for an SMS template. | [optional] |
16
17
  | **dynamic_content** | **String** | JSON string for dynamic content personalization. | [optional] |
17
18
 
@@ -29,6 +30,7 @@ instance = OneSignal::CreateTemplateRequest.new(
29
30
  is_email: null,
30
31
  email_subject: null,
31
32
  email_body: null,
33
+ email_bcc: null,
32
34
  is_sms: null,
33
35
  dynamic_content: null
34
36
  )
data/docs/DefaultApi.md CHANGED
@@ -559,7 +559,7 @@ end
559
559
 
560
560
  Create notification
561
561
 
562
- Sends notifications to your users
562
+ Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request.
563
563
 
564
564
  ### Examples
565
565
 
@@ -573,7 +573,11 @@ OneSignal.configure do |config|
573
573
  end
574
574
 
575
575
  api_instance = OneSignal::DefaultApi.new
576
- notification = OneSignal::Notification.new({app_id: 'app_id_example'}) # Notification |
576
+ notification = OneSignal::Notification.new
577
+ notification.app_id = 'YOUR_APP_ID'
578
+ notification.contents = OneSignal::LanguageStringMap.new({ en: 'Hello from OneSignal!' })
579
+ notification.include_aliases = { 'external_id' => ['YOUR_USER_EXTERNAL_ID'] }
580
+ notification.target_channel = 'push'
577
581
 
578
582
  begin
579
583
  # Create notification
data/docs/Notification.md CHANGED
@@ -15,7 +15,7 @@
15
15
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
16
16
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
17
17
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
18
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
19
19
  | **target_channel** | **String** | | [optional] |
20
20
  | **id** | **String** | | [optional] |
21
21
  | **value** | **Integer** | | [optional][readonly] |
@@ -32,7 +32,7 @@
32
32
  | **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
33
33
  | **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] |
34
34
  | **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. | |
35
- | **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] |
35
+ | **external_id** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [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] |
36
36
  | **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] |
37
37
  | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
38
38
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
@@ -109,6 +109,7 @@
109
109
  | **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] |
110
110
  | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
111
111
  | **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] |
112
+ | **email_bcc** | **Array<String>** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
112
113
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
113
114
  | **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] |
114
115
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -231,6 +232,7 @@ instance = OneSignal::Notification.new(
231
232
  email_preheader: null,
232
233
  disable_email_click_tracking: null,
233
234
  include_unsubscribed: null,
235
+ email_bcc: null,
234
236
  sms_from: null,
235
237
  sms_media_urls: null,
236
238
  filters: null,
@@ -15,7 +15,7 @@
15
15
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
16
16
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
17
17
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
18
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
19
19
  | **target_channel** | **String** | | [optional] |
20
20
 
21
21
  ## Example
@@ -15,7 +15,7 @@
15
15
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
16
16
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
17
17
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
18
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
19
19
  | **target_channel** | **String** | | [optional] |
20
20
  | **id** | **String** | | [optional] |
21
21
  | **value** | **Integer** | | [optional][readonly] |
@@ -32,7 +32,7 @@
32
32
  | **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
33
33
  | **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] |
34
34
  | **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. | |
35
- | **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] |
35
+ | **external_id** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [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] |
36
36
  | **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] |
37
37
  | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
38
38
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
@@ -109,6 +109,7 @@
109
109
  | **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] |
110
110
  | **disable_email_click_tracking** | **Boolean** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] |
111
111
  | **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] |
112
+ | **email_bcc** | **Array<String>** | BCC recipients that were set on this email notification. | [optional] |
112
113
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
113
114
  | **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] |
114
115
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -130,6 +131,7 @@
130
131
  | **completed_at** | **Integer** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] |
131
132
  | **platform_delivery_stats** | [**PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] |
132
133
  | **canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] |
134
+ | **bcc_sent** | **Integer** | Number of BCC copies successfully sent for this notification. | [optional] |
133
135
 
134
136
  ## Example
135
137
 
@@ -242,6 +244,7 @@ instance = OneSignal::NotificationWithMeta.new(
242
244
  email_preheader: null,
243
245
  disable_email_click_tracking: null,
244
246
  include_unsubscribed: null,
247
+ email_bcc: null,
245
248
  sms_from: null,
246
249
  sms_media_urls: null,
247
250
  filters: null,
@@ -262,7 +265,8 @@ instance = OneSignal::NotificationWithMeta.new(
262
265
  send_after: null,
263
266
  completed_at: null,
264
267
  platform_delivery_stats: null,
265
- canceled: null
268
+ canceled: null,
269
+ bcc_sent: null
266
270
  )
267
271
  ```
268
272
 
@@ -16,6 +16,8 @@
16
16
  | **received** | **Integer** | Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0. | [optional] |
17
17
  | **throttle_rate_per_minute** | **Integer** | number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the notification, and for free accounts, null is returned. Refer to Throttling for more details. | [optional] |
18
18
  | **canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] |
19
+ | **email_bcc** | **Array<String>** | BCC recipients that were set on this email notification. | [optional] |
20
+ | **bcc_sent** | **Integer** | Number of BCC copies successfully sent for this notification. | [optional] |
19
21
 
20
22
  ## Example
21
23
 
@@ -34,7 +36,9 @@ instance = OneSignal::NotificationWithMetaAllOf.new(
34
36
  platform_delivery_stats: null,
35
37
  received: null,
36
38
  throttle_rate_per_minute: null,
37
- canceled: null
39
+ canceled: null,
40
+ email_bcc: null,
41
+ bcc_sent: null
38
42
  )
39
43
  ```
40
44
 
@@ -15,7 +15,7 @@
15
15
  | **priority** | **Integer** | Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. | [optional] |
16
16
  | **ios_relevance_score** | **Float** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] |
17
17
  | **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] |
18
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
19
19
  | **include_subscription_ids** | **Array<String>** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] |
20
20
  | **included_segments** | **Array<String>** | Segment names to include. Only compatible with excluded_segments. | [optional] |
21
21
  | **excluded_segments** | **Array<String>** | Segment names to exclude. Only compatible with included_segments. | [optional] |
@@ -13,7 +13,7 @@
13
13
  | **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
14
14
  | **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
15
15
  | **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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] |
16
- | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
16
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] |
17
17
  | **target_channel** | **String** | | [optional] |
18
18
 
19
19
  ## Example
@@ -11,6 +11,7 @@
11
11
  | **is_email** | **Boolean** | Set true for an Email template. | [optional] |
12
12
  | **email_subject** | **String** | Subject of the email. | [optional] |
13
13
  | **email_body** | **String** | Body of the email (HTML supported). | [optional] |
14
+ | **email_bcc** | **Array<String>** | BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
14
15
  | **is_sms** | **Boolean** | Set true for an SMS template. | [optional] |
15
16
  | **dynamic_content** | **String** | JSON string for dynamic content personalization. | [optional] |
16
17
 
@@ -27,6 +28,7 @@ instance = OneSignal::UpdateTemplateRequest.new(
27
28
  is_email: null,
28
29
  email_subject: null,
29
30
  email_body: null,
31
+ email_bcc: null,
30
32
  is_sms: null,
31
33
  dynamic_content: null
32
34
  )
@@ -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.4.0
6
+ The version of the OpenAPI document: 5.5.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -549,7 +549,7 @@ module OneSignal
549
549
  end
550
550
 
551
551
  # Create notification
552
- # Sends notifications to your users
552
+ # Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request.
553
553
  # @param notification [Notification]
554
554
  # @param [Hash] opts the optional parameters
555
555
  # @return [CreateNotificationSuccessResponse]
@@ -559,7 +559,7 @@ module OneSignal
559
559
  end
560
560
 
561
561
  # Create notification
562
- # Sends notifications to your users
562
+ # Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request.
563
563
  # @param notification [Notification]
564
564
  # @param [Hash] opts the optional parameters
565
565
  # @return [Array<(CreateNotificationSuccessResponse, Integer, Hash)>] CreateNotificationSuccessResponse data, response status code and response headers
@@ -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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0'
93
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.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.4.0
6
+ The version of the OpenAPI document: 5.5.0
7
7
  Contact: devrel@onesignal.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -48,7 +48,7 @@ module OneSignal
48
48
  # Not Recommended: Please consider using include_subscription_ids or include_aliases 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
49
49
  attr_accessor :include_android_reg_ids
50
50
 
51
- # Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.
51
+ # Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.
52
52
  attr_accessor :include_aliases
53
53
 
54
54
  attr_accessor :target_channel
@@ -95,7 +95,7 @@ module OneSignal
95
95
  # 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.
96
96
  attr_accessor :app_id
97
97
 
98
- # [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
98
+ # This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [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
99
99
  attr_accessor :external_id
100
100
 
101
101
  # 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
@@ -322,6 +322,9 @@ module OneSignal
322
322
  # 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.
323
323
  attr_accessor :include_unsubscribed
324
324
 
325
+ # Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email.
326
+ attr_accessor :email_bcc
327
+
325
328
  # Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
326
329
  attr_accessor :sms_from
327
330
 
@@ -478,6 +481,7 @@ module OneSignal
478
481
  :'email_preheader' => :'email_preheader',
479
482
  :'disable_email_click_tracking' => :'disable_email_click_tracking',
480
483
  :'include_unsubscribed' => :'include_unsubscribed',
484
+ :'email_bcc' => :'email_bcc',
481
485
  :'sms_from' => :'sms_from',
482
486
  :'sms_media_urls' => :'sms_media_urls',
483
487
  :'filters' => :'filters',
@@ -603,6 +607,7 @@ module OneSignal
603
607
  :'email_preheader' => :'String',
604
608
  :'disable_email_click_tracking' => :'Boolean',
605
609
  :'include_unsubscribed' => :'Boolean',
610
+ :'email_bcc' => :'Array<String>',
606
611
  :'sms_from' => :'String',
607
612
  :'sms_media_urls' => :'Array<String>',
608
613
  :'filters' => :'Array<FilterExpression>',
@@ -700,6 +705,7 @@ module OneSignal
700
705
  :'email_reply_to_address',
701
706
  :'email_preheader',
702
707
  :'disable_email_click_tracking',
708
+ :'email_bcc',
703
709
  :'sms_from',
704
710
  :'sms_media_urls',
705
711
  :'filters',
@@ -1183,6 +1189,12 @@ module OneSignal
1183
1189
  self.include_unsubscribed = attributes[:'include_unsubscribed']
1184
1190
  end
1185
1191
 
1192
+ if attributes.key?(:'email_bcc')
1193
+ if (value = attributes[:'email_bcc']).is_a?(Array)
1194
+ self.email_bcc = value
1195
+ end
1196
+ end
1197
+
1186
1198
  if attributes.key?(:'sms_from')
1187
1199
  self.sms_from = attributes[:'sms_from']
1188
1200
  end
@@ -1232,6 +1244,10 @@ module OneSignal
1232
1244
  invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
1233
1245
  end
1234
1246
 
1247
+ if !@email_bcc.nil? && @email_bcc.length > 5
1248
+ invalid_properties.push('invalid value for "email_bcc", number of items must be less than or equal to 5.')
1249
+ end
1250
+
1235
1251
  invalid_properties
1236
1252
  end
1237
1253
 
@@ -1243,6 +1259,7 @@ module OneSignal
1243
1259
  aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"])
1244
1260
  return false unless aggregation_validator.valid?(@aggregation)
1245
1261
  return false if @app_id.nil?
1262
+ return false if !@email_bcc.nil? && @email_bcc.length > 5
1246
1263
  huawei_category_validator = EnumAttributeValidator.new('String', ["IM", "VOIP", "SUBSCRIPTION", "TRAVEL", "HEALTH", "WORK", "ACCOUNT", "EXPRESS", "FINANCE", "DEVICE_REMINDER", "MAIL", "MARKETING"])
1247
1264
  return false unless huawei_category_validator.valid?(@huawei_category)
1248
1265
  true
@@ -1268,6 +1285,16 @@ module OneSignal
1268
1285
  @aggregation = aggregation
1269
1286
  end
1270
1287
 
1288
+ # Custom attribute writer method with validation
1289
+ # @param [Object] email_bcc Value to be assigned
1290
+ def email_bcc=(email_bcc)
1291
+ if !email_bcc.nil? && email_bcc.length > 5
1292
+ fail ArgumentError, 'invalid value for "email_bcc", number of items must be less than or equal to 5.'
1293
+ end
1294
+
1295
+ @email_bcc = email_bcc
1296
+ end
1297
+
1271
1298
  # Custom attribute writer method checking allowed values (enum).
1272
1299
  # @param [Object] huawei_category Object to be assigned
1273
1300
  def huawei_category=(huawei_category)
@@ -1388,6 +1415,7 @@ module OneSignal
1388
1415
  email_preheader == o.email_preheader &&
1389
1416
  disable_email_click_tracking == o.disable_email_click_tracking &&
1390
1417
  include_unsubscribed == o.include_unsubscribed &&
1418
+ email_bcc == o.email_bcc &&
1391
1419
  sms_from == o.sms_from &&
1392
1420
  sms_media_urls == o.sms_media_urls &&
1393
1421
  filters == o.filters &&
@@ -1408,7 +1436,7 @@ module OneSignal
1408
1436
  # Calculates hash code according to all attributes.
1409
1437
  # @return [Integer] Hash code
1410
1438
  def hash
1411
- [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag].hash
1439
+ [included_segments, excluded_segments, include_subscription_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, ios_relevance_score, ios_interruption_level, email_subject, email_body, email_from_name, email_from_address, email_reply_to_address, email_preheader, disable_email_click_tracking, include_unsubscribed, email_bcc, sms_from, sms_media_urls, filters, custom_data, huawei_badge_class, huawei_badge_add_num, huawei_badge_set_num, huawei_category, huawei_bi_tag].hash
1412
1440
  end
1413
1441
 
1414
1442
  # Builds the object from hash