onesignal 2.2.1 → 5.2.0.pre.beta1
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.
- checksums.yaml +4 -4
- data/README.md +42 -67
- data/docs/BasicNotification.md +20 -18
- data/docs/BasicNotificationAllOf.md +11 -7
- data/docs/CreateNotificationSuccessResponse.md +1 -3
- data/docs/DefaultApi.md +364 -948
- data/docs/{ExportPlayersRequestBody.md → ExportSubscriptionsRequestBody.md} +2 -2
- data/docs/{ExportPlayersSuccessResponse.md → ExportSubscriptionsSuccessResponse.md} +2 -2
- data/docs/Filter.md +10 -2
- data/docs/{Notification200Errors.md → FilterExpression.md} +9 -9
- data/docs/GenericError.md +6 -2
- data/docs/{DeletePlayerSuccessResponse.md → GenericSuccessBoolResponse.md} +2 -2
- data/docs/{GetNotificationRequestBody.md → GetNotificationHistoryRequestBody.md} +2 -2
- data/docs/GetSegmentsSuccessResponse.md +24 -0
- data/docs/{StringMap.md → LanguageStringMap.md} +2 -2
- data/docs/Notification.md +20 -18
- data/docs/NotificationTarget.md +9 -11
- data/docs/NotificationWithMeta.md +20 -18
- data/docs/{InlineResponse202.md → PropertiesBody.md} +2 -2
- data/docs/PropertiesDeltas.md +2 -2
- data/docs/PropertiesObject.md +2 -2
- data/docs/Purchase.md +1 -1
- data/docs/RateLimitError.md +20 -0
- data/docs/Segment.md +1 -1
- data/docs/SegmentData.md +30 -0
- data/docs/{SubscriptionObject.md → Subscription.md} +6 -6
- data/docs/SubscriptionBody.md +18 -0
- data/docs/SubscriptionNotificationTarget.md +38 -0
- data/docs/TransferSubscriptionRequestBody.md +1 -1
- data/docs/UpdateLiveActivityRequest.md +14 -4
- data/docs/UpdateLiveActivitySuccessResponse.md +2 -4
- data/docs/User.md +3 -5
- data/docs/{InlineResponse200.md → UserIdentityBody.md} +3 -3
- data/docs/WebButton.md +24 -0
- data/lib/onesignal/api/default_api.rb +382 -890
- data/lib/onesignal/api_client.rb +2 -2
- data/lib/onesignal/api_error.rb +1 -1
- data/lib/onesignal/configuration.rb +5 -5
- data/lib/onesignal/models/app.rb +1 -1
- data/lib/onesignal/models/basic_notification.rb +60 -47
- data/lib/onesignal/models/basic_notification_all_of.rb +40 -17
- data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
- data/lib/onesignal/models/button.rb +1 -1
- data/lib/onesignal/models/create_notification_success_response.rb +5 -13
- data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
- data/lib/onesignal/models/create_segment_success_response.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
- data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
- data/lib/onesignal/models/delivery_data.rb +1 -1
- data/lib/onesignal/models/export_events_success_response.rb +1 -1
- data/lib/onesignal/models/{export_players_request_body.rb → export_subscriptions_request_body.rb} +4 -4
- data/lib/onesignal/models/{export_players_success_response.rb → export_subscriptions_success_response.rb} +4 -4
- data/lib/onesignal/models/filter.rb +44 -14
- data/lib/onesignal/models/{notification200_errors.rb → filter_expression.rb} +4 -4
- data/lib/onesignal/models/generic_error.rb +26 -8
- data/lib/onesignal/models/{update_player_success_response.rb → generic_success_bool_response.rb} +4 -4
- data/lib/onesignal/models/{get_notification_request_body.rb → get_notification_history_request_body.rb} +4 -4
- data/lib/onesignal/models/{player_slice.rb → get_segments_success_response.rb} +16 -12
- data/lib/onesignal/models/{string_map.rb → language_string_map.rb} +4 -4
- data/lib/onesignal/models/notification.rb +60 -47
- data/lib/onesignal/models/notification_all_of.rb +1 -1
- data/lib/onesignal/models/notification_history_success_response.rb +1 -1
- data/lib/onesignal/models/notification_slice.rb +1 -1
- data/lib/onesignal/models/notification_target.rb +24 -34
- data/lib/onesignal/models/notification_with_meta.rb +60 -47
- data/lib/onesignal/models/notification_with_meta_all_of.rb +1 -1
- data/lib/onesignal/models/operator.rb +1 -1
- data/lib/onesignal/models/outcome_data.rb +1 -1
- data/lib/onesignal/models/outcomes_data.rb +1 -1
- data/lib/onesignal/models/platform_delivery_data.rb +1 -1
- data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
- data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
- data/lib/onesignal/models/{inline_response202.rb → properties_body.rb} +4 -4
- data/lib/onesignal/models/properties_deltas.rb +3 -3
- data/lib/onesignal/models/properties_object.rb +3 -3
- data/lib/onesignal/models/purchase.rb +2 -2
- data/lib/onesignal/models/{rate_limiter_error.rb → rate_limit_error.rb} +17 -8
- data/lib/onesignal/models/segment.rb +2 -2
- data/lib/onesignal/models/{begin_live_activity_request.rb → segment_data.rb} +69 -27
- data/lib/onesignal/models/segment_notification_target.rb +1 -1
- data/lib/onesignal/models/{subscription_object.rb → subscription.rb} +8 -8
- data/lib/onesignal/models/{inline_response201.rb → subscription_body.rb} +5 -5
- data/lib/onesignal/models/{player_notification_target.rb → subscription_notification_target.rb} +25 -35
- data/lib/onesignal/models/transfer_subscription_request_body.rb +26 -2
- data/lib/onesignal/models/update_live_activity_request.rb +59 -22
- data/lib/onesignal/models/update_live_activity_success_response.rb +8 -17
- data/lib/onesignal/models/update_user_request.rb +1 -1
- data/lib/onesignal/models/user.rb +6 -15
- data/lib/onesignal/models/{inline_response200.rb → user_identity_body.rb} +5 -5
- data/lib/onesignal/models/{create_player_success_response.rb → web_button.rb} +40 -17
- data/lib/onesignal/version.rb +2 -2
- data/lib/onesignal.rb +16 -34
- data/onesignal.gemspec +1 -1
- data/spec/api/default_api_spec.rb +82 -174
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/app_spec.rb +1 -1
- data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
- data/spec/models/basic_notification_all_of_spec.rb +19 -7
- data/spec/models/basic_notification_spec.rb +20 -14
- data/spec/models/button_spec.rb +1 -1
- data/spec/models/create_notification_success_response_spec.rb +1 -7
- data/spec/models/create_segment_conflict_response_spec.rb +1 -1
- data/spec/models/create_segment_success_response_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
- data/spec/models/create_user_conflict_response_spec.rb +1 -1
- data/spec/models/delivery_data_spec.rb +1 -1
- data/spec/models/export_events_success_response_spec.rb +1 -1
- data/spec/models/{export_players_request_body_spec.rb → export_subscriptions_request_body_spec.rb} +7 -7
- data/spec/models/{export_players_success_response_spec.rb → export_subscriptions_success_response_spec.rb} +7 -7
- data/spec/models/{notification200_errors_spec.rb → filter_expression_spec.rb} +3 -3
- data/spec/models/filter_spec.rb +25 -1
- data/spec/models/generic_error_spec.rb +13 -1
- data/spec/models/{delete_player_success_response_spec.rb → generic_success_bool_response_spec.rb} +7 -7
- data/spec/models/{get_notification_request_body_spec.rb → get_notification_history_request_body_spec.rb} +7 -7
- data/spec/models/{player_slice_spec.rb → get_segments_success_response_spec.rb} +8 -8
- data/spec/models/{string_map_spec.rb → language_string_map_spec.rb} +7 -7
- data/spec/models/notification_all_of_spec.rb +1 -1
- data/spec/models/notification_history_success_response_spec.rb +1 -1
- data/spec/models/notification_slice_spec.rb +1 -1
- data/spec/models/notification_spec.rb +20 -14
- data/spec/models/notification_target_spec.rb +2 -8
- data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
- data/spec/models/notification_with_meta_spec.rb +20 -14
- data/spec/models/operator_spec.rb +1 -1
- data/spec/models/outcome_data_spec.rb +1 -1
- data/spec/models/outcomes_data_spec.rb +1 -1
- data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
- data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
- data/spec/models/platform_delivery_data_spec.rb +1 -1
- data/spec/models/{inline_response202_spec.rb → properties_body_spec.rb} +7 -7
- data/spec/models/properties_deltas_spec.rb +1 -1
- data/spec/models/properties_object_spec.rb +1 -1
- data/spec/models/purchase_spec.rb +1 -1
- data/spec/models/{generic_error_errors_inner_spec.rb → rate_limit_error_spec.rb} +9 -9
- data/spec/models/{filter_expressions_spec.rb → segment_data_spec.rb} +24 -20
- data/spec/models/segment_notification_target_spec.rb +1 -1
- data/spec/models/segment_spec.rb +1 -1
- data/spec/models/{inline_response201_spec.rb → subscription_body_spec.rb} +7 -7
- data/spec/models/{player_notification_target_spec.rb → subscription_notification_target_spec.rb} +8 -14
- data/spec/models/{subscription_object_spec.rb → subscription_spec.rb} +7 -7
- data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
- data/spec/models/update_live_activity_request_spec.rb +32 -6
- data/spec/models/update_live_activity_success_response_spec.rb +2 -8
- data/spec/models/update_user_request_spec.rb +1 -1
- data/spec/models/{user_identity_response_spec.rb → user_identity_body_spec.rb} +7 -7
- data/spec/models/user_spec.rb +1 -7
- data/spec/models/{create_player_success_response_spec.rb → web_button_spec.rb} +21 -9
- data/spec/spec_helper.rb +1 -1
- metadata +61 -133
- data/docs/BeginLiveActivityRequest.md +0 -20
- data/docs/CancelNotificationSuccessResponse.md +0 -18
- data/docs/CreatePlayerSuccessResponse.md +0 -20
- data/docs/CreateSubscriptionRequestBody.md +0 -20
- data/docs/DeletePlayerNotFoundResponse.md +0 -18
- data/docs/DeleteSegmentNotFoundResponse.md +0 -18
- data/docs/DeleteSegmentSuccessResponse.md +0 -18
- data/docs/FilterExpressions.md +0 -26
- data/docs/GenericErrorErrorsInner.md +0 -20
- data/docs/InlineResponse2003.md +0 -18
- data/docs/InlineResponse201.md +0 -18
- data/docs/InvalidIdentifierError.md +0 -20
- data/docs/Player.md +0 -70
- data/docs/PlayerNotificationTarget.md +0 -40
- data/docs/PlayerNotificationTargetIncludeAliases.md +0 -18
- data/docs/PlayerSlice.md +0 -24
- data/docs/RateLimiterError.md +0 -18
- data/docs/UpdatePlayerSuccessResponse.md +0 -18
- data/docs/UpdatePlayerTagsRequestBody.md +0 -18
- data/docs/UpdatePlayerTagsSuccessResponse.md +0 -18
- data/docs/UpdateSubscriptionRequestBody.md +0 -18
- data/docs/UserIdentityRequestBody.md +0 -18
- data/docs/UserIdentityResponse.md +0 -18
- data/docs/UserSubscriptionOptions.md +0 -18
- data/lib/onesignal/models/cancel_notification_success_response.rb +0 -219
- data/lib/onesignal/models/create_subscription_request_body.rb +0 -228
- data/lib/onesignal/models/delete_player_not_found_response.rb +0 -219
- data/lib/onesignal/models/delete_player_success_response.rb +0 -219
- data/lib/onesignal/models/delete_segment_not_found_response.rb +0 -219
- data/lib/onesignal/models/delete_segment_success_response.rb +0 -219
- data/lib/onesignal/models/filter_expressions.rb +0 -336
- data/lib/onesignal/models/generic_error_errors_inner.rb +0 -228
- data/lib/onesignal/models/inline_response2003.rb +0 -221
- data/lib/onesignal/models/invalid_identifier_error.rb +0 -234
- data/lib/onesignal/models/player.rb +0 -494
- data/lib/onesignal/models/player_notification_target_include_aliases.rb +0 -221
- data/lib/onesignal/models/update_player_tags_request_body.rb +0 -220
- data/lib/onesignal/models/update_player_tags_success_response.rb +0 -219
- data/lib/onesignal/models/update_subscription_request_body.rb +0 -219
- data/lib/onesignal/models/user_identity_request_body.rb +0 -221
- data/lib/onesignal/models/user_identity_response.rb +0 -221
- data/lib/onesignal/models/user_subscription_options.rb +0 -219
- data/spec/models/begin_live_activity_request_spec.rb +0 -40
- data/spec/models/cancel_notification_success_response_spec.rb +0 -34
- data/spec/models/create_subscription_request_body_spec.rb +0 -40
- data/spec/models/delete_player_not_found_response_spec.rb +0 -34
- data/spec/models/delete_segment_not_found_response_spec.rb +0 -34
- data/spec/models/delete_segment_success_response_spec.rb +0 -34
- data/spec/models/inline_response2003_spec.rb +0 -34
- data/spec/models/inline_response200_spec.rb +0 -34
- data/spec/models/invalid_identifier_error_spec.rb +0 -40
- data/spec/models/player_notification_target_include_aliases_spec.rb +0 -34
- data/spec/models/player_spec.rb +0 -190
- data/spec/models/rate_limiter_error_spec.rb +0 -34
- data/spec/models/update_player_success_response_spec.rb +0 -34
- data/spec/models/update_player_tags_request_body_spec.rb +0 -34
- data/spec/models/update_player_tags_success_response_spec.rb +0 -34
- data/spec/models/update_subscription_request_body_spec.rb +0 -34
- data/spec/models/user_identity_request_body_spec.rb +0 -34
- data/spec/models/user_subscription_options_spec.rb +0 -34
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::ExportSubscriptionsRequestBody
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
```ruby
|
14
14
|
require 'onesignal'
|
15
15
|
|
16
|
-
instance = OneSignal::
|
16
|
+
instance = OneSignal::ExportSubscriptionsRequestBody.new(
|
17
17
|
extra_fields: null,
|
18
18
|
last_active_since: null,
|
19
19
|
segment_name: null
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::ExportSubscriptionsSuccessResponse
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
```ruby
|
12
12
|
require 'onesignal'
|
13
13
|
|
14
|
-
instance = OneSignal::
|
14
|
+
instance = OneSignal::ExportSubscriptionsSuccessResponse.new(
|
15
15
|
csv_file_url: null
|
16
16
|
)
|
17
17
|
```
|
data/docs/Filter.md
CHANGED
@@ -4,10 +4,14 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **field** | **String** | Name of the field to use as the first operand in the filter expression. |
|
7
|
+
| **field** | **String** | Required. Name of the field to use as the first operand in the filter expression. | [optional] |
|
8
8
|
| **key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
|
9
9
|
| **value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
|
10
|
-
| **
|
10
|
+
| **hours_ago** | **String** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] |
|
11
|
+
| **radius** | **Float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] |
|
12
|
+
| **lat** | **Float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] |
|
13
|
+
| **long** | **Float** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] |
|
14
|
+
| **relation** | **String** | Required. Operator of a filter expression. | [optional] |
|
11
15
|
|
12
16
|
## Example
|
13
17
|
|
@@ -18,6 +22,10 @@ instance = OneSignal::Filter.new(
|
|
18
22
|
field: null,
|
19
23
|
key: null,
|
20
24
|
value: null,
|
25
|
+
hours_ago: null,
|
26
|
+
radius: null,
|
27
|
+
lat: null,
|
28
|
+
long: null,
|
21
29
|
relation: null
|
22
30
|
)
|
23
31
|
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::FilterExpression
|
2
2
|
|
3
3
|
## Class instance methods
|
4
4
|
|
@@ -11,11 +11,11 @@ Returns the list of classes defined in oneOf.
|
|
11
11
|
```ruby
|
12
12
|
require 'onesignal'
|
13
13
|
|
14
|
-
OneSignal::
|
14
|
+
OneSignal::FilterExpression.openapi_one_of
|
15
15
|
# =>
|
16
16
|
# [
|
17
|
-
# :'
|
18
|
-
# :'
|
17
|
+
# :'Filter',
|
18
|
+
# :'Operator'
|
19
19
|
# ]
|
20
20
|
```
|
21
21
|
|
@@ -28,10 +28,10 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
|
|
28
28
|
```ruby
|
29
29
|
require 'onesignal'
|
30
30
|
|
31
|
-
OneSignal::
|
32
|
-
# => #<
|
31
|
+
OneSignal::FilterExpression.build(data)
|
32
|
+
# => #<Filter:0x00007fdd4aab02a0>
|
33
33
|
|
34
|
-
OneSignal::
|
34
|
+
OneSignal::FilterExpression.build(data_that_doesnt_match)
|
35
35
|
# => nil
|
36
36
|
```
|
37
37
|
|
@@ -43,7 +43,7 @@ OneSignal::Notification200Errors.build(data_that_doesnt_match)
|
|
43
43
|
|
44
44
|
#### Return type
|
45
45
|
|
46
|
-
- `
|
47
|
-
- `
|
46
|
+
- `Filter`
|
47
|
+
- `Operator`
|
48
48
|
- `nil` (if no type matches)
|
49
49
|
|
data/docs/GenericError.md
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **errors** |
|
7
|
+
| **errors** | **Object** | | [optional] |
|
8
|
+
| **success** | **Boolean** | | [optional] |
|
9
|
+
| **reference** | **Object** | | [optional] |
|
8
10
|
|
9
11
|
## Example
|
10
12
|
|
@@ -12,7 +14,9 @@
|
|
12
14
|
require 'onesignal'
|
13
15
|
|
14
16
|
instance = OneSignal::GenericError.new(
|
15
|
-
errors: null
|
17
|
+
errors: null,
|
18
|
+
success: null,
|
19
|
+
reference: null
|
16
20
|
)
|
17
21
|
```
|
18
22
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::GenericSuccessBoolResponse
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
```ruby
|
12
12
|
require 'onesignal'
|
13
13
|
|
14
|
-
instance = OneSignal::
|
14
|
+
instance = OneSignal::GenericSuccessBoolResponse.new(
|
15
15
|
success: null
|
16
16
|
)
|
17
17
|
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::GetNotificationHistoryRequestBody
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
```ruby
|
14
14
|
require 'onesignal'
|
15
15
|
|
16
|
-
instance = OneSignal::
|
16
|
+
instance = OneSignal::GetNotificationHistoryRequestBody.new(
|
17
17
|
events: null,
|
18
18
|
email: null,
|
19
19
|
app_id: null
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# OneSignal::GetSegmentsSuccessResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **total_count** | **Integer** | The number of Segments in the response. | [optional] |
|
8
|
+
| **offset** | **Integer** | Set with the offset query parameter. Default 0. | [optional] |
|
9
|
+
| **limit** | **Integer** | Maximum number of Segments returned. Default 300. | [optional] |
|
10
|
+
| **segments** | [**Array<SegmentData>**](SegmentData.md) | An array containing the Segment information. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'onesignal'
|
16
|
+
|
17
|
+
instance = OneSignal::GetSegmentsSuccessResponse.new(
|
18
|
+
total_count: null,
|
19
|
+
offset: null,
|
20
|
+
limit: null,
|
21
|
+
segments: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::LanguageStringMap
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -53,7 +53,7 @@
|
|
53
53
|
```ruby
|
54
54
|
require 'onesignal'
|
55
55
|
|
56
|
-
instance = OneSignal::
|
56
|
+
instance = OneSignal::LanguageStringMap.new(
|
57
57
|
en: null,
|
58
58
|
ar: null,
|
59
59
|
bs: null,
|
data/docs/Notification.md
CHANGED
@@ -6,17 +6,16 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
8
8
|
| **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
9
|
-
| **
|
10
|
-
| **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
|
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] |
|
11
10
|
| **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
|
12
11
|
| **include_phone_numbers** | **Array<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] |
|
13
|
-
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using
|
14
|
-
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using
|
15
|
-
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
16
|
-
| **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
17
|
-
| **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
18
|
-
| **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
19
|
-
| **include_aliases** | [
|
12
|
+
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] |
|
13
|
+
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] |
|
14
|
+
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] |
|
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
|
+
| **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
|
+
| **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] |
|
20
19
|
| **target_channel** | **String** | | [optional] |
|
21
20
|
| **id** | **String** | | [optional] |
|
22
21
|
| **value** | **Integer** | | [optional][readonly] |
|
@@ -32,13 +31,12 @@
|
|
32
31
|
| **is_wp_wns** | **Boolean** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] |
|
33
32
|
| **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
|
34
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] |
|
35
|
-
| **channel_for_external_user_ids** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] |
|
36
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. | |
|
37
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] |
|
38
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] |
|
39
|
-
| **contents** | [**
|
40
|
-
| **headings** | [**
|
41
|
-
| **subtitle** | [**
|
37
|
+
| **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
38
|
+
| **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
39
|
+
| **subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
42
40
|
| **data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] |
|
43
41
|
| **huawei_msg_type** | **String** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] |
|
44
42
|
| **url** | **String** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] |
|
@@ -55,7 +53,7 @@
|
|
55
53
|
| **chrome_big_picture** | **String** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] |
|
56
54
|
| **chrome_web_image** | **String** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] |
|
57
55
|
| **buttons** | [**Array<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] |
|
58
|
-
| **web_buttons** | [**Array<
|
56
|
+
| **web_buttons** | [**Array<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] |
|
59
57
|
| **ios_category** | **String** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] |
|
60
58
|
| **android_channel_id** | **String** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] |
|
61
59
|
| **huawei_channel_id** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] |
|
@@ -101,15 +99,18 @@
|
|
101
99
|
| **thread_id** | **String** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] |
|
102
100
|
| **summary_arg** | **String** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] |
|
103
101
|
| **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] |
|
102
|
+
| **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] |
|
103
|
+
| **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] |
|
104
104
|
| **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|
105
105
|
| **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|
106
106
|
| **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
107
107
|
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
108
108
|
| **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] |
|
109
|
+
| **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] |
|
109
110
|
| **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] |
|
110
111
|
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
|
111
112
|
| **sms_media_urls** | **Array<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|
112
|
-
| **filters** | [**Array<
|
113
|
+
| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
|
113
114
|
| **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] |
|
114
115
|
| **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] |
|
115
116
|
|
@@ -121,8 +122,7 @@ require 'onesignal'
|
|
121
122
|
instance = OneSignal::Notification.new(
|
122
123
|
included_segments: null,
|
123
124
|
excluded_segments: null,
|
124
|
-
|
125
|
-
include_external_user_ids: null,
|
125
|
+
include_subscription_ids: null,
|
126
126
|
include_email_tokens: null,
|
127
127
|
include_phone_numbers: null,
|
128
128
|
include_ios_tokens: null,
|
@@ -147,7 +147,6 @@ instance = OneSignal::Notification.new(
|
|
147
147
|
is_wp_wns: null,
|
148
148
|
is_adm: null,
|
149
149
|
is_chrome: null,
|
150
|
-
channel_for_external_user_ids: null,
|
151
150
|
app_id: null,
|
152
151
|
external_id: null,
|
153
152
|
idempotency_key: null,
|
@@ -216,11 +215,14 @@ instance = OneSignal::Notification.new(
|
|
216
215
|
thread_id: null,
|
217
216
|
summary_arg: null,
|
218
217
|
summary_arg_count: null,
|
218
|
+
ios_relevance_score: null,
|
219
|
+
ios_interruption_level: null,
|
219
220
|
email_subject: null,
|
220
221
|
email_body: null,
|
221
222
|
email_from_name: null,
|
222
223
|
email_from_address: null,
|
223
224
|
email_preheader: null,
|
225
|
+
disable_email_click_tracking: null,
|
224
226
|
include_unsubscribed: null,
|
225
227
|
sms_from: null,
|
226
228
|
sms_media_urls: null,
|
data/docs/NotificationTarget.md
CHANGED
@@ -6,17 +6,16 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
8
8
|
| **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
9
|
-
| **
|
10
|
-
| **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
|
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] |
|
11
10
|
| **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
|
12
11
|
| **include_phone_numbers** | **Array<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] |
|
13
|
-
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using
|
14
|
-
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using
|
15
|
-
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
16
|
-
| **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
17
|
-
| **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
18
|
-
| **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
19
|
-
| **include_aliases** | [
|
12
|
+
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] |
|
13
|
+
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] |
|
14
|
+
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] |
|
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
|
+
| **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
|
+
| **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] |
|
20
19
|
| **target_channel** | **String** | | [optional] |
|
21
20
|
|
22
21
|
## Example
|
@@ -27,8 +26,7 @@ require 'onesignal'
|
|
27
26
|
instance = OneSignal::NotificationTarget.new(
|
28
27
|
included_segments: null,
|
29
28
|
excluded_segments: null,
|
30
|
-
|
31
|
-
include_external_user_ids: null,
|
29
|
+
include_subscription_ids: null,
|
32
30
|
include_email_tokens: null,
|
33
31
|
include_phone_numbers: null,
|
34
32
|
include_ios_tokens: null,
|
@@ -6,17 +6,16 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **included_segments** | **Array<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
8
8
|
| **excluded_segments** | **Array<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] |
|
9
|
-
| **
|
10
|
-
| **include_external_user_ids** | **Array<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] |
|
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] |
|
11
10
|
| **include_email_tokens** | **Array<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] |
|
12
11
|
| **include_phone_numbers** | **Array<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] |
|
13
|
-
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using
|
14
|
-
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using
|
15
|
-
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
16
|
-
| **include_chrome_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
17
|
-
| **include_chrome_web_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
18
|
-
| **include_android_reg_ids** | **Array<String>** | Not Recommended: Please consider using
|
19
|
-
| **include_aliases** | [
|
12
|
+
| **include_ios_tokens** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] |
|
13
|
+
| **include_wp_wns_uris** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] |
|
14
|
+
| **include_amazon_reg_ids** | **Array<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] |
|
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
|
+
| **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
|
+
| **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] |
|
20
19
|
| **target_channel** | **String** | | [optional] |
|
21
20
|
| **id** | **String** | | [optional] |
|
22
21
|
| **value** | **Integer** | | [optional][readonly] |
|
@@ -32,13 +31,12 @@
|
|
32
31
|
| **is_wp_wns** | **Boolean** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] |
|
33
32
|
| **is_adm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] |
|
34
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] |
|
35
|
-
| **channel_for_external_user_ids** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] |
|
36
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. | |
|
37
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] |
|
38
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] |
|
39
|
-
| **contents** | [**
|
40
|
-
| **headings** | [**
|
41
|
-
| **subtitle** | [**
|
37
|
+
| **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
38
|
+
| **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
39
|
+
| **subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
|
42
40
|
| **data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] |
|
43
41
|
| **huawei_msg_type** | **String** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] |
|
44
42
|
| **url** | **String** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] |
|
@@ -55,7 +53,7 @@
|
|
55
53
|
| **chrome_big_picture** | **String** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] |
|
56
54
|
| **chrome_web_image** | **String** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] |
|
57
55
|
| **buttons** | [**Array<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] |
|
58
|
-
| **web_buttons** | [**Array<
|
56
|
+
| **web_buttons** | [**Array<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] |
|
59
57
|
| **ios_category** | **String** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] |
|
60
58
|
| **android_channel_id** | **String** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] |
|
61
59
|
| **huawei_channel_id** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] |
|
@@ -101,15 +99,18 @@
|
|
101
99
|
| **thread_id** | **String** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] |
|
102
100
|
| **summary_arg** | **String** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] |
|
103
101
|
| **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] |
|
102
|
+
| **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] |
|
103
|
+
| **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] |
|
104
104
|
| **email_subject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|
105
105
|
| **email_body** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|
106
106
|
| **email_from_name** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
107
107
|
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] |
|
108
108
|
| **email_preheader** | **String** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] |
|
109
|
+
| **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] |
|
109
110
|
| **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] |
|
110
111
|
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
|
111
112
|
| **sms_media_urls** | **Array<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|
112
|
-
| **filters** | [**Array<
|
113
|
+
| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
|
113
114
|
| **custom_data** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] |
|
114
115
|
| **successful** | **Integer** | Number of notifications that were successfully delivered. | [optional] |
|
115
116
|
| **failed** | **Integer** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] |
|
@@ -131,8 +132,7 @@ require 'onesignal'
|
|
131
132
|
instance = OneSignal::NotificationWithMeta.new(
|
132
133
|
included_segments: null,
|
133
134
|
excluded_segments: null,
|
134
|
-
|
135
|
-
include_external_user_ids: null,
|
135
|
+
include_subscription_ids: null,
|
136
136
|
include_email_tokens: null,
|
137
137
|
include_phone_numbers: null,
|
138
138
|
include_ios_tokens: null,
|
@@ -157,7 +157,6 @@ instance = OneSignal::NotificationWithMeta.new(
|
|
157
157
|
is_wp_wns: null,
|
158
158
|
is_adm: null,
|
159
159
|
is_chrome: null,
|
160
|
-
channel_for_external_user_ids: null,
|
161
160
|
app_id: null,
|
162
161
|
external_id: null,
|
163
162
|
idempotency_key: null,
|
@@ -226,11 +225,14 @@ instance = OneSignal::NotificationWithMeta.new(
|
|
226
225
|
thread_id: null,
|
227
226
|
summary_arg: null,
|
228
227
|
summary_arg_count: null,
|
228
|
+
ios_relevance_score: null,
|
229
|
+
ios_interruption_level: null,
|
229
230
|
email_subject: null,
|
230
231
|
email_body: null,
|
231
232
|
email_from_name: null,
|
232
233
|
email_from_address: null,
|
233
234
|
email_preheader: null,
|
235
|
+
disable_email_click_tracking: null,
|
234
236
|
include_unsubscribed: null,
|
235
237
|
sms_from: null,
|
236
238
|
sms_media_urls: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OneSignal::
|
1
|
+
# OneSignal::PropertiesBody
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
```ruby
|
12
12
|
require 'onesignal'
|
13
13
|
|
14
|
-
instance = OneSignal::
|
14
|
+
instance = OneSignal::PropertiesBody.new(
|
15
15
|
properties: null
|
16
16
|
)
|
17
17
|
```
|
data/docs/PropertiesDeltas.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **session_time** | **
|
8
|
-
| **session_count** | **
|
7
|
+
| **session_time** | **Integer** | | [optional] |
|
8
|
+
| **session_count** | **Integer** | | [optional] |
|
9
9
|
| **purchases** | [**Array<Purchase>**](Purchase.md) | | [optional] |
|
10
10
|
|
11
11
|
## Example
|
data/docs/PropertiesObject.md
CHANGED
@@ -10,8 +10,8 @@
|
|
10
10
|
| **lat** | **Float** | | [optional] |
|
11
11
|
| **long** | **Float** | | [optional] |
|
12
12
|
| **country** | **String** | | [optional] |
|
13
|
-
| **first_active** | **
|
14
|
-
| **last_active** | **
|
13
|
+
| **first_active** | **Integer** | | [optional] |
|
14
|
+
| **last_active** | **Integer** | | [optional] |
|
15
15
|
| **amount_spent** | **Float** | | [optional] |
|
16
16
|
| **purchases** | [**Array<Purchase>**](Purchase.md) | | [optional] |
|
17
17
|
| **ip** | **String** | | [optional] |
|
data/docs/Purchase.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
| **sku** | **String** | The unique identifier of the purchased item. | |
|
8
8
|
| **amount** | **String** | The amount, in USD, spent purchasing the item. | |
|
9
9
|
| **iso** | **String** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | |
|
10
|
-
| **count** | **
|
10
|
+
| **count** | **Integer** | | [optional] |
|
11
11
|
|
12
12
|
## Example
|
13
13
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OneSignal::RateLimitError
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **errors** | **Array<String>** | | [optional] |
|
8
|
+
| **limit** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'onesignal'
|
14
|
+
|
15
|
+
instance = OneSignal::RateLimitError.new(
|
16
|
+
errors: null,
|
17
|
+
limit: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Segment.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **id** | **String** | UUID of the segment. If left empty, it will be assigned automaticaly. | [optional] |
|
8
8
|
| **name** | **String** | Name of the segment. You'll see this name on the Web UI. | |
|
9
|
-
| **filters** | [**Array<
|
9
|
+
| **filters** | [**Array<FilterExpression>**](FilterExpression.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
data/docs/SegmentData.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# OneSignal::SegmentData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | The segment ID | [optional] |
|
8
|
+
| **name** | **String** | The segment name | [optional] |
|
9
|
+
| **created_at** | **String** | Date segment created | [optional] |
|
10
|
+
| **updated_at** | **String** | Date segment last updated | [optional] |
|
11
|
+
| **app_id** | **String** | The app id | [optional] |
|
12
|
+
| **read_only** | **Boolean** | Is the segment read only? | [optional] |
|
13
|
+
| **is_active** | **Boolean** | Is the segment active? | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'onesignal'
|
19
|
+
|
20
|
+
instance = OneSignal::SegmentData.new(
|
21
|
+
id: null,
|
22
|
+
name: null,
|
23
|
+
created_at: null,
|
24
|
+
updated_at: null,
|
25
|
+
app_id: null,
|
26
|
+
read_only: null,
|
27
|
+
is_active: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|