onesignal 5.13.0 → 5.15.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +3 -3
  5. data/docs/BasicNotification.md +6 -2
  6. data/docs/BasicNotificationAllOf.md +5 -1
  7. data/docs/DefaultApi.md +77 -0
  8. data/docs/EmailWarmUp.md +24 -0
  9. data/docs/EmailWarmUpRequest.md +20 -0
  10. data/docs/EmailWarmUpStage.md +24 -0
  11. data/docs/EstimateNotificationRecipientsRequest.md +28 -0
  12. data/docs/EstimateNotificationRecipientsRequestAllOf.md +24 -0
  13. data/docs/EstimateNotificationRecipientsSuccessResponse.md +26 -0
  14. data/docs/Notification.md +6 -2
  15. data/docs/NotificationTarget.md +1 -1
  16. data/docs/NotificationWithMeta.md +6 -2
  17. data/docs/NotificationWithMetaAllOf.md +3 -1
  18. data/docs/SegmentNotificationTarget.md +1 -1
  19. data/lib/onesignal/api/default_api.rb +68 -0
  20. data/lib/onesignal/api_client.rb +1 -1
  21. data/lib/onesignal/models/basic_notification.rb +36 -3
  22. data/lib/onesignal/models/basic_notification_all_of.rb +35 -2
  23. data/lib/onesignal/models/email_warm_up.rb +298 -0
  24. data/lib/onesignal/models/email_warm_up_request.rb +272 -0
  25. data/lib/onesignal/models/email_warm_up_stage.rb +284 -0
  26. data/lib/onesignal/models/estimate_notification_recipients_request.rb +326 -0
  27. data/lib/onesignal/models/estimate_notification_recipients_request_all_of.rb +288 -0
  28. data/lib/onesignal/models/estimate_notification_recipients_success_response.rb +260 -0
  29. data/lib/onesignal/models/notification.rb +36 -3
  30. data/lib/onesignal/models/notification_target.rb +1 -1
  31. data/lib/onesignal/models/notification_with_meta.rb +35 -3
  32. data/lib/onesignal/models/notification_with_meta_all_of.rb +14 -5
  33. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  34. data/lib/onesignal/version.rb +1 -1
  35. data/lib/onesignal.rb +6 -0
  36. data/spec/api/default_api_spec.rb +12 -0
  37. data/spec/models/basic_notification_all_of_spec.rb +16 -0
  38. data/spec/models/basic_notification_spec.rb +16 -0
  39. data/spec/models/email_warm_up_request_spec.rb +43 -0
  40. data/spec/models/email_warm_up_spec.rb +59 -0
  41. data/spec/models/email_warm_up_stage_spec.rb +51 -0
  42. data/spec/models/estimate_notification_recipients_request_all_of_spec.rb +55 -0
  43. data/spec/models/estimate_notification_recipients_request_spec.rb +67 -0
  44. data/spec/models/estimate_notification_recipients_success_response_spec.rb +57 -0
  45. data/spec/models/notification_spec.rb +16 -0
  46. data/spec/models/notification_with_meta_all_of_spec.rb +6 -0
  47. data/spec/models/notification_with_meta_spec.rb +16 -0
  48. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12484b4b8625118acab9f635ca17136c8826bef48db62697df3ce53f0b85f604
4
- data.tar.gz: 7b7f879c398aa7b241b8a8804c1cf95347ab6bbbafccb2bd5fc91248ad64a8ca
3
+ metadata.gz: 0b42ceaf3b0e632fc98ee99283fa94b807d0f50f90f77b33286030005ee274c7
4
+ data.tar.gz: e7cb4a761b751cfc90ad4d95daa1e87a7954878a669696572974a3471da5bfbf
5
5
  SHA512:
6
- metadata.gz: b0de961cf9d2f5dbe09758b5224ba2a1c2890d5893e5af4642c03886beca7c697b23fb9adcd249cb6a10ae455dd0bb56905e415183f85c5e210e8a239a6292bd
7
- data.tar.gz: 4ff0128dabbd88b0d6a1daf59edd3951596df235a99ca1549e699ecc9338db0c20152d909a2655161732f89003d96f8624831b78eba303826ce7b039c907f821
6
+ metadata.gz: 8889f13555a918742eab686312061d53501d20e76d65d7e4f495cf41d009885ffc1b9d52158c6e557efc489317dfa93438d903142419f565779fbcd625089f64
7
+ data.tar.gz: b55524df6758ae04f50cc30f2b08fc723fa5fcf451d37d6326420603cb1f417912052c4bbd33b3421a182b7498c9c6de4a001d41448c468b911d92971645f347
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.14.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.13.0...v5.14.0) (2026-08-28)
4
+
5
+ ### Features
6
+
7
+ * add v5.14.0 package updates ([f5bef49](https://github.com/OneSignal/onesignal-ruby-api/commit/f5bef49250856e178d685c0844c92b1f236dec09))
8
+ * add v5.14.0 package updates ([#126](https://github.com/OneSignal/onesignal-ruby-api/issues/126)) ([a65294e](https://github.com/OneSignal/onesignal-ruby-api/commit/a65294ef20e67e16116d27dadb87111ed2a33c1c)), closes [OneSignal/api-client-libraries#452](https://github.com/OneSignal/api-client-libraries/issues/452)
9
+
10
+ ## [5.13.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.12.0...v5.13.0) (2026-08-25)
11
+
12
+ ### Features
13
+
14
+ * add v5.13.0 package updates ([#124](https://github.com/OneSignal/onesignal-ruby-api/issues/124)) ([ad773c7](https://github.com/OneSignal/onesignal-ruby-api/commit/ad773c7ac6083eb23355b80a1a225734811f4c52))
15
+
3
16
  ## [5.12.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.11.2...v5.12.0) (2026-08-20)
4
17
 
5
18
  ### Features
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onesignal (5.13.0)
4
+ onesignal (5.15.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -6,15 +6,15 @@ OneSignal - the Ruby gem for OneSignal
6
6
 
7
7
  A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
8
8
 
9
- - API version: 5.13.0
10
- - Package version: 5.13.0
9
+ - API version: 5.15.0
10
+ - Package version: 5.15.0
11
11
 
12
12
  ## Installation
13
13
 
14
14
  Add to your `Gemfile`:
15
15
 
16
16
  ```ruby
17
- gem 'onesignal', '~> 5.13.0'
17
+ gem 'onesignal', '~> 5.15.0'
18
18
  ```
19
19
 
20
20
  Then run `bundle install`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
7
+ | **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] `\"All\"` is a shorthand for every subscribed user: if the array includes the string `\"All\"` and the app has no segment actually named `All`, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
8
  | **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
9
9
  | **include_subscription_ids** | **Array<String>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] |
10
10
  | **include_email_tokens** | **Array<String>** | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] |
@@ -103,7 +103,7 @@
103
103
  | **summary_arg_count** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] |
104
104
  | **ios_relevance_score** | **Float** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
105
105
  | **ios_interruption_level** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] |
106
- | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
106
+ | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
107
107
  | **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
108
108
  | **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
109
109
  | **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
@@ -113,6 +113,8 @@
113
113
  | **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] |
114
114
  | **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] |
115
115
  | **email_sender_domain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
116
+ | **kind** | **String** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] |
117
+ | **email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] |
116
118
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
117
119
  | **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] |
118
120
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -238,6 +240,8 @@ instance = OneSignal::BasicNotification.new(
238
240
  include_unsubscribed: nil,
239
241
  email_bcc: nil,
240
242
  email_sender_domain: nil,
243
+ kind: nil,
244
+ email_warm_up: nil,
241
245
  sms_from: nil,
242
246
  sms_media_urls: nil,
243
247
  filters: nil,
@@ -89,7 +89,7 @@
89
89
  | **summary_arg_count** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] |
90
90
  | **ios_relevance_score** | **Float** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
91
91
  | **ios_interruption_level** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] |
92
- | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
92
+ | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
93
93
  | **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
94
94
  | **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
95
95
  | **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
@@ -99,6 +99,8 @@
99
99
  | **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] |
100
100
  | **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] |
101
101
  | **email_sender_domain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
102
+ | **kind** | **String** | Channel: Email Set to \"warmup\" to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don't have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, `email_warm_up` is required and describes the campaign's stages and (optionally) its scheduling strategy. `send_after` cannot be combined with `kind: \"warmup\"`. The campaign will be scheduled to begin at its first stage's `start` time. Only supported for Email notifications. | [optional] |
103
+ | **email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] |
102
104
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
103
105
  | **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] |
104
106
  | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
@@ -210,6 +212,8 @@ instance = OneSignal::BasicNotificationAllOf.new(
210
212
  include_unsubscribed: nil,
211
213
  email_bcc: nil,
212
214
  email_sender_domain: nil,
215
+ kind: nil,
216
+ email_warm_up: nil,
213
217
  sms_from: nil,
214
218
  sms_media_urls: nil,
215
219
  filters: nil,
data/docs/DefaultApi.md CHANGED
@@ -24,6 +24,7 @@ All URIs are relative to *https://api.onesignal.com*
24
24
  | [**delete_subscription**](DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | |
25
25
  | [**delete_template**](DefaultApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete template |
26
26
  | [**delete_user**](DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
27
+ | [**estimate_notification_recipients**](DefaultApi.md#estimate_notification_recipients) | **POST** /notifications/count-unsaved | Estimate notification recipients |
27
28
  | [**export_events**](DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events | Export CSV of Events |
28
29
  | [**export_subscriptions**](DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions |
29
30
  | [**get_aliases**](DefaultApi.md#get_aliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | |
@@ -1737,6 +1738,82 @@ nil (empty response body)
1737
1738
  - **Accept**: application/json
1738
1739
 
1739
1740
 
1741
+ ## estimate_notification_recipients
1742
+
1743
+ > <EstimateNotificationRecipientsSuccessResponse> estimate_notification_recipients(estimate_notification_recipients_request)
1744
+
1745
+ Estimate notification recipients
1746
+
1747
+ Returns the estimated number of recipients for a notification's targeting, without creating or sending anything. The returned `count` reflects the same audience-size estimate you would see under \"Choose your target audience\" when composing a message. It is based on the user targeting method you've set and the specific platforms the message is targeted to send to. This endpoint only supports a subset of targeting parameters: `included_segments` is required (its `\"All\"` shorthand targets every subscriber), and `excluded_segments`, `filters`, `include_aliases`, and `target_channel` narrow that audience further. Use `target_channel` to select platforms. `include_subscription_ids` and the other raw subscription id/token fields, and the individual `isIos` / `isAndroid` / etc. platform flags, are not supported. All other notification fields (content, delivery options, and so on) are accepted, but ignored.
1748
+
1749
+ ### Examples
1750
+
1751
+ ```ruby
1752
+ require 'onesignal'
1753
+ # setup authorization
1754
+ OneSignal.configure do |config|
1755
+ # Configure Bearer authorization: rest_api_key
1756
+ config.rest_api_key = 'YOUR_REST_API_KEY'
1757
+
1758
+ end
1759
+
1760
+ api_instance = OneSignal::DefaultApi.new
1761
+ estimate_notification_recipients_request = OneSignal::EstimateNotificationRecipientsRequest.new({app_id: 'app_id_example'}) # EstimateNotificationRecipientsRequest |
1762
+
1763
+ begin
1764
+ # Estimate notification recipients
1765
+ result = api_instance.estimate_notification_recipients(estimate_notification_recipients_request)
1766
+ p result
1767
+ rescue OneSignal::ApiError => e
1768
+ puts "Error when calling DefaultApi->estimate_notification_recipients: #{e}"
1769
+ puts "Status Code: #{e.code}"
1770
+ # `e.error_messages` flattens any error-envelope shape to an Array<String>;
1771
+ # the raw body remains on `e.response_body`.
1772
+ puts "Error Messages: #{e.error_messages}"
1773
+ puts "Response Body: #{e.response_body}"
1774
+ end
1775
+ ```
1776
+
1777
+ #### Using the estimate_notification_recipients_with_http_info variant
1778
+
1779
+ This returns an Array which contains the response data, status code and headers.
1780
+
1781
+ > <Array(<EstimateNotificationRecipientsSuccessResponse>, Integer, Hash)> estimate_notification_recipients_with_http_info(estimate_notification_recipients_request)
1782
+
1783
+ ```ruby
1784
+ begin
1785
+ # Estimate notification recipients
1786
+ data, status_code, headers = api_instance.estimate_notification_recipients_with_http_info(estimate_notification_recipients_request)
1787
+ p status_code # => 2xx
1788
+ p headers # => { ... }
1789
+ p data # => <EstimateNotificationRecipientsSuccessResponse>
1790
+ rescue OneSignal::ApiError => e
1791
+ puts "Error when calling DefaultApi->estimate_notification_recipients_with_http_info: #{e}"
1792
+ puts "Status Code: #{e.code}"
1793
+ puts "Response Body: #{e.response_body}"
1794
+ end
1795
+ ```
1796
+
1797
+ ### Parameters
1798
+
1799
+ | Name | Type | Description | Notes |
1800
+ | ---- | ---- | ----------- | ----- |
1801
+ | **estimate_notification_recipients_request** | [**EstimateNotificationRecipientsRequest**](EstimateNotificationRecipientsRequest.md) | | |
1802
+
1803
+ ### Return type
1804
+
1805
+ [**EstimateNotificationRecipientsSuccessResponse**](EstimateNotificationRecipientsSuccessResponse.md)
1806
+
1807
+ ### Authorization
1808
+
1809
+ [rest_api_key](https://github.com/OneSignal/onesignal-ruby-api#configuration)
1810
+
1811
+ ### HTTP request headers
1812
+
1813
+ - **Content-Type**: application/json
1814
+ - **Accept**: application/json
1815
+
1816
+
1740
1817
  ## export_events
1741
1818
 
1742
1819
  > <ExportEventsSuccessResponse> export_events(notification_id, app_id)
@@ -0,0 +1,24 @@
1
+ # OneSignal::EmailWarmUp
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **stages** | [**Array&lt;EmailWarmUpStage&gt;**](EmailWarmUpStage.md) | The campaign&#39;s sending schedule, stage by stage. | [optional] |
8
+ | **strategy** | **String** | How the stage schedule was produced: * &#x60;recommended&#x60; - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * &#x60;custom&#x60; - The stages were provided as-is in the create request. | [optional] |
9
+ | **status** | **String** | Current status of the campaign: * &#x60;initializing&#x60; - The stages have been submitted and the schedule is being set up. * &#x60;draft&#x60; - The campaign has been created but has not started sending. * &#x60;active&#x60; - The campaign is currently working through its stages. * &#x60;finished&#x60; - All stages have completed. * &#x60;canceled&#x60; - The campaign was canceled before finishing. | [optional] |
10
+ | **is_live** | **Boolean** | Whether the campaign is currently live (actively sending). | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::EmailWarmUp.new(
18
+ stages: nil,
19
+ strategy: nil,
20
+ status: nil,
21
+ is_live: nil
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # OneSignal::EmailWarmUpRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **stages** | [**Array&lt;EmailWarmUpStage&gt;**](EmailWarmUpStage.md) | Required. The ordered stages that make up the campaign&#39;s sending schedule. | |
8
+ | **strategy** | **String** | How the stage schedule should be treated: * &#x60;recommended&#x60; - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * &#x60;custom&#x60; - The stages provided are sent as-is. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'onesignal'
14
+
15
+ instance = OneSignal::EmailWarmUpRequest.new(
16
+ stages: nil,
17
+ strategy: nil
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # OneSignal::EmailWarmUpStage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **start** | **Time** | ISO 8601 timestamp for the start of this stage. Sending for this stage will not begin before this time. | |
8
+ | **_end** | **Time** | ISO 8601 timestamp for the end of this stage. This stage&#39;s quota is expected to be sent by this time. | |
9
+ | **quota** | **Integer** | Number of emails to send during this stage. | |
10
+ | **acked** | **Boolean** | Whether this stage has been picked up and acknowledged by the warm-up scheduler. Not accepted on create. This is only present when reading back a campaign. | [optional][readonly] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::EmailWarmUpStage.new(
18
+ start: nil,
19
+ _end: nil,
20
+ quota: nil,
21
+ acked: nil
22
+ )
23
+ ```
24
+
@@ -0,0 +1,28 @@
1
+ # OneSignal::EstimateNotificationRecipientsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] &#x60;\&quot;All\&quot;&#x60; is a shorthand for every subscribed user: if the array includes the string &#x60;\&quot;All\&quot;&#x60; and the app has no segment actually named &#x60;All&#x60;, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
+ | **excluded_segments** | **Array&lt;String&gt;** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
9
+ | **app_id** | **String** | The OneSignal App ID for your app, which can be found in Keys &amp; IDs. | |
10
+ | **filters** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
11
+ | **include_aliases** | **Hash&lt;String, Array&lt;String&gt;&gt;** | 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: { \&quot;external_id\&quot;: [\&quot;exId1\&quot;, \&quot;extId2\&quot;], \&quot;internal_label\&quot;: [\&quot;id1\&quot;, \&quot;id2\&quot;] } Keys must match API spellings exactly (for example the label for External ID is the string &#x60;external_id&#x60;; 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] |
12
+ | **target_channel** | **String** | Which platforms to count recipients for. Selects the same default platforms Create notification would use for the channel. Individual platform flags (&#x60;isIos&#x60;, &#x60;isAndroid&#x60;, etc.) are not supported by this endpoint. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'onesignal'
18
+
19
+ instance = OneSignal::EstimateNotificationRecipientsRequest.new(
20
+ included_segments: nil,
21
+ excluded_segments: nil,
22
+ app_id: nil,
23
+ filters: nil,
24
+ include_aliases: nil,
25
+ target_channel: nil
26
+ )
27
+ ```
28
+
@@ -0,0 +1,24 @@
1
+ # OneSignal::EstimateNotificationRecipientsRequestAllOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **app_id** | **String** | The OneSignal App ID for your app, which can be found in Keys &amp; IDs. | [optional] |
8
+ | **filters** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
9
+ | **include_aliases** | **Hash&lt;String, Array&lt;String&gt;&gt;** | 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: { \&quot;external_id\&quot;: [\&quot;exId1\&quot;, \&quot;extId2\&quot;], \&quot;internal_label\&quot;: [\&quot;id1\&quot;, \&quot;id2\&quot;] } Keys must match API spellings exactly (for example the label for External ID is the string &#x60;external_id&#x60;; 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] |
10
+ | **target_channel** | **String** | Which platforms to count recipients for. Selects the same default platforms Create notification would use for the channel. Individual platform flags (&#x60;isIos&#x60;, &#x60;isAndroid&#x60;, etc.) are not supported by this endpoint. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'onesignal'
16
+
17
+ instance = OneSignal::EstimateNotificationRecipientsRequestAllOf.new(
18
+ app_id: nil,
19
+ filters: nil,
20
+ include_aliases: nil,
21
+ target_channel: nil
22
+ )
23
+ ```
24
+
@@ -0,0 +1,26 @@
1
+ # OneSignal::EstimateNotificationRecipientsSuccessResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **count** | **Integer** | The estimated audience size based on the user targeting method you&#39;ve set on the message, and the specific platforms the message is targeted to send to. | [optional] |
8
+ | **uncapped_count** | **Integer** | The estimated audience size before the plan&#39;s web push subscriber cap is applied. Present only when &#x60;cap_applied&#x60; is &#x60;true&#x60;; &#x60;null&#x60; otherwise. | [optional] |
9
+ | **cap_applied** | **Boolean** | Whether &#x60;count&#x60; was reduced because the app is on a plan that caps the number of web push subscribers it can send to. | [optional] |
10
+ | **mobile_suppressed** | **Boolean** | The mobile equivalent of &#x60;cap_applied&#x60;. Whether mobile push deliveries will be dropped for this send because the org is over its plan&#39;s mobile push subscriber cap. &#x60;false&#x60; when the notification doesn&#39;t target any mobile push platforms. | [optional] |
11
+ | **mobile_excluded_count** | **Integer** | How many mobile push recipients the &#x60;count&#x60; excludes due to the plan&#39;s mobile push subscriber cap. &#x60;0&#x60; when &#x60;mobile_suppressed&#x60; is &#x60;false&#x60;. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'onesignal'
17
+
18
+ instance = OneSignal::EstimateNotificationRecipientsSuccessResponse.new(
19
+ count: nil,
20
+ uncapped_count: nil,
21
+ cap_applied: nil,
22
+ mobile_suppressed: nil,
23
+ mobile_excluded_count: nil
24
+ )
25
+ ```
26
+
data/docs/Notification.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
7
+ | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] &#x60;\&quot;All\&quot;&#x60; is a shorthand for every subscribed user: if the array includes the string &#x60;\&quot;All\&quot;&#x60; and the app has no segment actually named &#x60;All&#x60;, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
8
  | **excluded_segments** | **Array&lt;String&gt;** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
9
9
  | **include_subscription_ids** | **Array&lt;String&gt;** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\&quot;1dd608f2-c6a1-11e3-851d-000c2940e62c\&quot;] Limit of 2,000 entries per REST API call | [optional] |
10
10
  | **include_email_tokens** | **Array&lt;String&gt;** | Deprecated alias for &#x60;email_to&#x60;. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer &#x60;email_to&#x60; in new integrations. | [optional] |
@@ -103,7 +103,7 @@
103
103
  | **summary_arg_count** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count &#x3D; 2, the new total will be 14 and the summary will be \&quot;14 more notifications from summary_arg\&quot; | [optional] |
104
104
  | **ios_relevance_score** | **Float** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
105
105
  | **ios_interruption_level** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \&quot;interrupt\&quot; the user. Can choose from options: [&#39;active&#39;, &#39;passive&#39;, &#39;time_sensitive&#39;, &#39;critical&#39;]. Default is active. | [optional] |
106
- | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
106
+ | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
107
107
  | **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an &lt;a&gt; tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
108
108
  | **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
109
109
  | **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
@@ -113,6 +113,8 @@
113
113
  | **include_unsubscribed** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
114
114
  | **email_bcc** | **Array&lt;String&gt;** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
115
115
  | **email_sender_domain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
116
+ | **kind** | **String** | Channel: Email Set to \&quot;warmup\&quot; to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don&#39;t have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, &#x60;email_warm_up&#x60; is required and describes the campaign&#39;s stages and (optionally) its scheduling strategy. &#x60;send_after&#x60; cannot be combined with &#x60;kind: \&quot;warmup\&quot;&#x60;. The campaign will be scheduled to begin at its first stage&#39;s &#x60;start&#x60; time. Only supported for Email notifications. | [optional] |
117
+ | **email_warm_up** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] |
116
118
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
117
119
  | **sms_media_urls** | **Array&lt;String&gt;** | 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] |
118
120
  | **filters** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
@@ -239,6 +241,8 @@ instance = OneSignal::Notification.new(
239
241
  include_unsubscribed: nil,
240
242
  email_bcc: nil,
241
243
  email_sender_domain: nil,
244
+ kind: nil,
245
+ email_warm_up: nil,
242
246
  sms_from: nil,
243
247
  sms_media_urls: nil,
244
248
  filters: nil,
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
7
+ | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] &#x60;\&quot;All\&quot;&#x60; is a shorthand for every subscribed user: if the array includes the string &#x60;\&quot;All\&quot;&#x60; and the app has no segment actually named &#x60;All&#x60;, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
8
  | **excluded_segments** | **Array&lt;String&gt;** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
9
9
  | **include_subscription_ids** | **Array&lt;String&gt;** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\&quot;1dd608f2-c6a1-11e3-851d-000c2940e62c\&quot;] Limit of 2,000 entries per REST API call | [optional] |
10
10
  | **include_email_tokens** | **Array&lt;String&gt;** | Deprecated alias for &#x60;email_to&#x60;. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer &#x60;email_to&#x60; in new integrations. | [optional] |
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
7
+ | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] &#x60;\&quot;All\&quot;&#x60; is a shorthand for every subscribed user: if the array includes the string &#x60;\&quot;All\&quot;&#x60; and the app has no segment actually named &#x60;All&#x60;, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
8
  | **excluded_segments** | **Array&lt;String&gt;** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
9
9
  | **include_subscription_ids** | **Array&lt;String&gt;** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\&quot;1dd608f2-c6a1-11e3-851d-000c2940e62c\&quot;] Limit of 2,000 entries per REST API call | [optional] |
10
10
  | **include_email_tokens** | **Array&lt;String&gt;** | Deprecated alias for &#x60;email_to&#x60;. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer &#x60;email_to&#x60; in new integrations. | [optional] |
@@ -103,7 +103,7 @@
103
103
  | **summary_arg_count** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count &#x3D; 2, the new total will be 14 and the summary will be \&quot;14 more notifications from summary_arg\&quot; | [optional] |
104
104
  | **ios_relevance_score** | **Float** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
105
105
  | **ios_interruption_level** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \&quot;interrupt\&quot; the user. Can choose from options: [&#39;active&#39;, &#39;passive&#39;, &#39;time_sensitive&#39;, &#39;critical&#39;]. Default is active. | [optional] |
106
- | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
106
+ | **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
107
107
  | **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an &lt;a&gt; tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
108
108
  | **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
109
109
  | **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
@@ -113,6 +113,8 @@
113
113
  | **include_unsubscribed** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
114
114
  | **email_bcc** | **Array&lt;String&gt;** | BCC recipients that were set on this email notification. | [optional] |
115
115
  | **email_sender_domain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
116
+ | **kind** | **String** | Channel: Email Set to \&quot;warmup\&quot; to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don&#39;t have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, &#x60;email_warm_up&#x60; is required and describes the campaign&#39;s stages and (optionally) its scheduling strategy. &#x60;send_after&#x60; cannot be combined with &#x60;kind: \&quot;warmup\&quot;&#x60;. The campaign will be scheduled to begin at its first stage&#39;s &#x60;start&#x60; time. Only supported for Email notifications. | [optional] |
117
+ | **email_warm_up** | [**EmailWarmUp**](EmailWarmUp.md) | | [optional] |
116
118
  | **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
117
119
  | **sms_media_urls** | **Array&lt;String&gt;** | 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] |
118
120
  | **filters** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
@@ -251,6 +253,8 @@ instance = OneSignal::NotificationWithMeta.new(
251
253
  include_unsubscribed: nil,
252
254
  email_bcc: nil,
253
255
  email_sender_domain: nil,
256
+ kind: nil,
257
+ email_warm_up: nil,
254
258
  sms_from: nil,
255
259
  sms_media_urls: nil,
256
260
  filters: nil,
@@ -18,6 +18,7 @@
18
18
  | **canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] |
19
19
  | **email_bcc** | **Array&lt;String&gt;** | BCC recipients that were set on this email notification. | [optional] |
20
20
  | **bcc_sent** | **Integer** | Number of BCC copies successfully sent for this notification. | [optional] |
21
+ | **email_warm_up** | [**EmailWarmUp**](EmailWarmUp.md) | | [optional] |
21
22
 
22
23
  ## Example
23
24
 
@@ -38,7 +39,8 @@ instance = OneSignal::NotificationWithMetaAllOf.new(
38
39
  throttle_rate_per_minute: nil,
39
40
  canceled: nil,
40
41
  email_bcc: nil,
41
- bcc_sent: nil
42
+ bcc_sent: nil,
43
+ email_warm_up: nil
42
44
  )
43
45
  ```
44
46
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
7
+ | **included_segments** | **Array&lt;String&gt;** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] &#x60;\&quot;All\&quot;&#x60; is a shorthand for every subscribed user: if the array includes the string &#x60;\&quot;All\&quot;&#x60; and the app has no segment actually named &#x60;All&#x60;, it targets all subscribers instead of a literal segment lookup. | [optional] |
8
8
  | **excluded_segments** | **Array&lt;String&gt;** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\&quot;Active Users\&quot;, \&quot;Inactive Users\&quot;] | [optional] |
9
9
 
10
10
  ## Example
@@ -1479,6 +1479,74 @@ module OneSignal
1479
1479
  return data, status_code, headers
1480
1480
  end
1481
1481
 
1482
+ # Estimate notification recipients
1483
+ # Returns the estimated number of recipients for a notification's targeting, without creating or sending anything. The returned `count` reflects the same audience-size estimate you would see under \"Choose your target audience\" when composing a message. It is based on the user targeting method you've set and the specific platforms the message is targeted to send to. This endpoint only supports a subset of targeting parameters: `included_segments` is required (its `\"All\"` shorthand targets every subscriber), and `excluded_segments`, `filters`, `include_aliases`, and `target_channel` narrow that audience further. Use `target_channel` to select platforms. `include_subscription_ids` and the other raw subscription id/token fields, and the individual `isIos` / `isAndroid` / etc. platform flags, are not supported. All other notification fields (content, delivery options, and so on) are accepted, but ignored.
1484
+ # @param estimate_notification_recipients_request [EstimateNotificationRecipientsRequest]
1485
+ # @param [Hash] opts the optional parameters
1486
+ # @return [EstimateNotificationRecipientsSuccessResponse]
1487
+ def estimate_notification_recipients(estimate_notification_recipients_request, opts = {})
1488
+ data, _status_code, _headers = estimate_notification_recipients_with_http_info(estimate_notification_recipients_request, opts)
1489
+ data
1490
+ end
1491
+
1492
+ # Estimate notification recipients
1493
+ # Returns the estimated number of recipients for a notification&#39;s targeting, without creating or sending anything. The returned &#x60;count&#x60; reflects the same audience-size estimate you would see under \&quot;Choose your target audience\&quot; when composing a message. It is based on the user targeting method you&#39;ve set and the specific platforms the message is targeted to send to. This endpoint only supports a subset of targeting parameters: &#x60;included_segments&#x60; is required (its &#x60;\&quot;All\&quot;&#x60; shorthand targets every subscriber), and &#x60;excluded_segments&#x60;, &#x60;filters&#x60;, &#x60;include_aliases&#x60;, and &#x60;target_channel&#x60; narrow that audience further. Use &#x60;target_channel&#x60; to select platforms. &#x60;include_subscription_ids&#x60; and the other raw subscription id/token fields, and the individual &#x60;isIos&#x60; / &#x60;isAndroid&#x60; / etc. platform flags, are not supported. All other notification fields (content, delivery options, and so on) are accepted, but ignored.
1494
+ # @param estimate_notification_recipients_request [EstimateNotificationRecipientsRequest]
1495
+ # @param [Hash] opts the optional parameters
1496
+ # @return [Array<(EstimateNotificationRecipientsSuccessResponse, Integer, Hash)>] EstimateNotificationRecipientsSuccessResponse data, response status code and response headers
1497
+ def estimate_notification_recipients_with_http_info(estimate_notification_recipients_request, opts = {})
1498
+ if @api_client.config.debugging
1499
+ @api_client.config.logger.debug 'Calling API: DefaultApi.estimate_notification_recipients ...'
1500
+ end
1501
+ # verify the required parameter 'estimate_notification_recipients_request' is set
1502
+ if @api_client.config.client_side_validation && estimate_notification_recipients_request.nil?
1503
+ fail ArgumentError, "Missing the required parameter 'estimate_notification_recipients_request' when calling DefaultApi.estimate_notification_recipients"
1504
+ end
1505
+ # resource path
1506
+ local_var_path = '/notifications/count-unsaved'
1507
+
1508
+ # query parameters
1509
+ query_params = opts[:query_params] || {}
1510
+
1511
+ # header parameters
1512
+ header_params = opts[:header_params] || {}
1513
+ # HTTP header 'Accept' (if needed)
1514
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1515
+ # HTTP header 'Content-Type'
1516
+ content_type = @api_client.select_header_content_type(['application/json'])
1517
+ if !content_type.nil?
1518
+ header_params['Content-Type'] = content_type
1519
+ end
1520
+
1521
+ # form parameters
1522
+ form_params = opts[:form_params] || {}
1523
+
1524
+ # http body (model)
1525
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(estimate_notification_recipients_request)
1526
+
1527
+ # return_type
1528
+ return_type = opts[:debug_return_type] || 'EstimateNotificationRecipientsSuccessResponse'
1529
+
1530
+ # auth_names
1531
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
1532
+
1533
+ new_options = opts.merge(
1534
+ :operation => :"DefaultApi.estimate_notification_recipients",
1535
+ :header_params => header_params,
1536
+ :query_params => query_params,
1537
+ :form_params => form_params,
1538
+ :body => post_body,
1539
+ :auth_names => auth_names,
1540
+ :return_type => return_type
1541
+ )
1542
+
1543
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1544
+ if @api_client.config.debugging
1545
+ @api_client.config.logger.debug "API called: DefaultApi#estimate_notification_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1546
+ end
1547
+ return data, status_code, headers
1548
+ end
1549
+
1482
1550
  # Export CSV of Events
1483
1551
  # Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
1484
1552
  # @param notification_id [String] The ID of the notification to export events from.
@@ -89,7 +89,7 @@ module OneSignal
89
89
  url = build_request_url(path, opts)
90
90
  http_method = http_method.to_sym.downcase
91
91
 
92
- opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.13.0'
92
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.15.0'
93
93
  header_params = @default_headers.merge(opts[:header_params] || {})
94
94
  query_params = opts[:query_params] || {}
95
95
  form_params = opts[:form_params] || {}