onesignal 1.0.0.beta1 → 2.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/Gemfile.lock +74 -0
- data/LICENSE +24 -0
- data/README.md +77 -23
- data/RELEASE_INSTRUCTIONS.md +11 -0
- data/docs/App.md +9 -1
- data/docs/BasicNotification.md +230 -0
- data/docs/BasicNotificationAllOf.md +202 -0
- data/docs/{NotificationAllOfAndroidBackgroundLayout.md → BasicNotificationAllOfAndroidBackgroundLayout.md} +2 -2
- data/docs/BeginLiveActivityRequest.md +20 -0
- data/docs/CancelNotificationSuccessResponse.md +18 -0
- data/docs/CreateNotificationSuccessResponse.md +24 -0
- data/docs/{InlineResponse2004.md → CreatePlayerSuccessResponse.md} +2 -2
- data/docs/{InlineResponse409.md → CreateSegmentConflictResponse.md} +2 -2
- data/docs/CreateSegmentSuccessResponse.md +20 -0
- data/docs/CreateSubscriptionRequestBody.md +20 -0
- data/docs/CreateUserConflictResponse.md +18 -0
- data/docs/CreateUserConflictResponseErrorsInner.md +22 -0
- data/docs/CreateUserConflictResponseErrorsItemsMeta.md +18 -0
- data/docs/DefaultApi.md +1629 -304
- data/docs/DeletePlayerNotFoundResponse.md +18 -0
- data/docs/{InlineResponse2001.md → DeletePlayerSuccessResponse.md} +3 -3
- data/docs/DeleteSegmentNotFoundResponse.md +18 -0
- data/docs/DeleteSegmentSuccessResponse.md +18 -0
- data/docs/DeliveryData.md +5 -5
- data/docs/{InlineResponse2005.md → ExportEventsSuccessResponse.md} +2 -2
- data/docs/ExportPlayersRequestBody.md +2 -2
- data/docs/ExportPlayersSuccessResponse.md +18 -0
- data/docs/Filter.md +1 -1
- data/docs/FilterExpressions.md +1 -1
- data/docs/GenericError.md +18 -0
- data/docs/GenericErrorErrorsInner.md +20 -0
- data/docs/InlineResponse200.md +2 -8
- data/docs/InlineResponse2003.md +2 -2
- data/docs/InlineResponse201.md +2 -4
- data/docs/InlineResponse202.md +18 -0
- data/docs/InvalidIdentifierError.md +20 -0
- data/docs/Notification.md +33 -41
- data/docs/Notification200Errors.md +49 -0
- data/docs/NotificationAllOf.md +2 -176
- data/docs/{InlineResponse2002.md → NotificationHistorySuccessResponse.md} +3 -3
- data/docs/NotificationSlice.md +1 -1
- data/docs/NotificationTarget.md +6 -26
- data/docs/NotificationWithMeta.md +252 -0
- data/docs/NotificationWithMetaAllOf.md +38 -0
- data/docs/OutcomesData.md +18 -0
- data/docs/PlatformDeliveryData.md +5 -1
- data/docs/PlatformDeliveryDataEmailAllOf.md +30 -0
- data/docs/PlatformDeliveryDataSmsAllOf.md +22 -0
- data/docs/Player.md +3 -3
- data/docs/PlayerNotificationTarget.md +6 -2
- data/docs/PlayerNotificationTargetIncludeAliases.md +18 -0
- data/docs/PropertiesDeltas.md +22 -0
- data/docs/PropertiesObject.md +38 -0
- data/docs/Purchase.md +4 -2
- data/docs/RateLimiterError.md +18 -0
- data/docs/StringMap.md +1 -1
- data/docs/SubscriptionObject.md +50 -0
- data/docs/TransferSubscriptionRequestBody.md +18 -0
- data/docs/UpdateLiveActivityRequest.md +24 -0
- data/docs/UpdateLiveActivitySuccessResponse.md +20 -0
- data/docs/UpdatePlayerSuccessResponse.md +18 -0
- data/docs/UpdatePlayerTagsSuccessResponse.md +18 -0
- data/docs/UpdateSubscriptionRequestBody.md +18 -0
- data/docs/UpdateUserRequest.md +22 -0
- data/docs/User.md +24 -0
- data/docs/UserIdentityRequestBody.md +18 -0
- data/docs/UserIdentityResponse.md +18 -0
- data/docs/UserSubscriptionOptions.md +18 -0
- data/lib/onesignal/api/default_api.rb +1657 -268
- data/lib/onesignal/api_client.rb +9 -7
- data/lib/onesignal/api_error.rb +2 -2
- data/lib/onesignal/configuration.rb +11 -8
- data/lib/onesignal/models/app.rb +59 -8
- data/lib/onesignal/models/basic_notification.rb +1442 -0
- data/lib/onesignal/models/basic_notification_all_of.rb +1252 -0
- data/lib/onesignal/models/{notification_all_of_android_background_layout.rb → basic_notification_all_of_android_background_layout.rb} +6 -5
- data/lib/onesignal/models/begin_live_activity_request.rb +238 -0
- data/lib/onesignal/models/button.rb +3 -2
- data/lib/onesignal/models/cancel_notification_success_response.rb +219 -0
- data/lib/onesignal/models/create_notification_success_response.rb +248 -0
- data/lib/onesignal/models/{inline_response2004.rb → create_player_success_response.rb} +6 -5
- data/lib/onesignal/models/{inline_response409.rb → create_segment_conflict_response.rb} +6 -5
- data/lib/onesignal/models/create_segment_success_response.rb +229 -0
- data/lib/onesignal/models/create_subscription_request_body.rb +228 -0
- data/lib/onesignal/models/{inline_response4001.rb → create_user_conflict_response.rb} +8 -16
- data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +237 -0
- data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +219 -0
- data/lib/onesignal/models/delete_player_not_found_response.rb +219 -0
- data/lib/onesignal/models/{inline_response2001.rb → delete_player_success_response.rb} +7 -6
- data/lib/onesignal/models/delete_segment_not_found_response.rb +219 -0
- data/lib/onesignal/models/delete_segment_success_response.rb +219 -0
- data/lib/onesignal/models/delivery_data.rb +13 -2
- data/lib/onesignal/models/{inline_response2005.rb → export_events_success_response.rb} +6 -5
- data/lib/onesignal/models/export_players_request_body.rb +5 -4
- data/lib/onesignal/models/export_players_success_response.rb +219 -0
- data/lib/onesignal/models/filter.rb +4 -3
- data/lib/onesignal/models/filter_expressions.rb +4 -3
- data/lib/onesignal/models/{inline_response400.rb → generic_error.rb} +7 -6
- data/lib/onesignal/models/generic_error_errors_inner.rb +228 -0
- data/lib/onesignal/models/get_notification_request_body.rb +3 -2
- data/lib/onesignal/models/inline_response200.rb +12 -47
- data/lib/onesignal/models/inline_response2003.rb +12 -9
- data/lib/onesignal/models/inline_response201.rb +10 -19
- data/lib/onesignal/models/{inline_response4002.rb → inline_response202.rb} +13 -14
- data/lib/onesignal/models/invalid_identifier_error.rb +234 -0
- data/lib/onesignal/models/notification.rb +209 -157
- data/lib/onesignal/models/notification200_errors.rb +105 -0
- data/lib/onesignal/models/notification_all_of.rb +8 -911
- data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb} +7 -6
- data/lib/onesignal/models/notification_slice.rb +4 -3
- data/lib/onesignal/models/notification_target.rb +63 -128
- data/lib/onesignal/models/notification_with_meta.rb +1557 -0
- data/lib/onesignal/models/notification_with_meta_all_of.rb +323 -0
- data/lib/onesignal/models/operator.rb +3 -2
- data/lib/onesignal/models/outcome_data.rb +3 -2
- data/lib/onesignal/models/outcomes_data.rb +221 -0
- data/lib/onesignal/models/platform_delivery_data.rb +27 -6
- data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +287 -0
- data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +243 -0
- data/lib/onesignal/models/player.rb +14 -13
- data/lib/onesignal/models/player_notification_target.rb +63 -7
- data/lib/onesignal/models/player_notification_target_include_aliases.rb +221 -0
- data/lib/onesignal/models/player_slice.rb +3 -2
- data/lib/onesignal/models/properties_deltas.rb +239 -0
- data/lib/onesignal/models/properties_object.rb +313 -0
- data/lib/onesignal/models/purchase.rb +17 -7
- data/lib/onesignal/models/rate_limiter_error.rb +221 -0
- data/lib/onesignal/models/segment.rb +3 -2
- data/lib/onesignal/models/segment_notification_target.rb +3 -2
- data/lib/onesignal/models/string_map.rb +3 -7
- data/lib/onesignal/models/{filter_notification_target.rb → subscription_object.rb} +147 -79
- data/lib/onesignal/models/transfer_subscription_request_body.rb +221 -0
- data/lib/onesignal/models/update_live_activity_request.rb +309 -0
- data/lib/onesignal/models/update_live_activity_success_response.rb +228 -0
- data/lib/onesignal/models/update_player_success_response.rb +219 -0
- data/lib/onesignal/models/update_player_tags_request_body.rb +3 -2
- data/lib/onesignal/models/update_player_tags_success_response.rb +219 -0
- data/lib/onesignal/models/update_subscription_request_body.rb +219 -0
- data/lib/onesignal/models/update_user_request.rb +239 -0
- data/lib/onesignal/models/user.rb +250 -0
- data/lib/onesignal/models/user_identity_request_body.rb +221 -0
- data/lib/onesignal/models/user_identity_response.rb +221 -0
- data/lib/onesignal/models/user_subscription_options.rb +219 -0
- data/lib/onesignal/version.rb +3 -3
- data/lib/onesignal.rb +111 -0
- data/onesignal.gemspec +5 -4
- data/spec/api/default_api_spec.rb +263 -26
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/app_spec.rb +26 -2
- data/spec/models/{notification_all_of_android_background_layout_spec.rb → basic_notification_all_of_android_background_layout_spec.rb} +8 -8
- data/spec/models/basic_notification_all_of_spec.rb +590 -0
- data/spec/models/basic_notification_spec.rb +678 -0
- data/spec/models/begin_live_activity_request_spec.rb +40 -0
- data/spec/models/button_spec.rb +2 -2
- data/spec/models/cancel_notification_success_response_spec.rb +34 -0
- data/spec/models/create_notification_success_response_spec.rb +52 -0
- data/spec/models/{inline_response2004_spec.rb → create_player_success_response_spec.rb} +8 -8
- data/spec/models/{inline_response4001_spec.rb → create_segment_conflict_response_spec.rb} +8 -8
- data/spec/models/{inline_response409_spec.rb → create_segment_success_response_spec.rb} +9 -9
- data/spec/models/create_subscription_request_body_spec.rb +40 -0
- data/spec/models/create_user_conflict_response_errors_inner_spec.rb +46 -0
- data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +34 -0
- data/spec/models/create_user_conflict_response_spec.rb +34 -0
- data/spec/models/delete_player_not_found_response_spec.rb +34 -0
- data/spec/models/{inline_response2001_spec.rb → delete_player_success_response_spec.rb} +8 -8
- data/spec/models/delete_segment_not_found_response_spec.rb +34 -0
- data/spec/models/delete_segment_success_response_spec.rb +34 -0
- data/spec/models/delivery_data_spec.rb +2 -2
- data/spec/models/{inline_response2005_spec.rb → export_events_success_response_spec.rb} +8 -8
- data/spec/models/export_players_request_body_spec.rb +2 -2
- data/spec/models/export_players_success_response_spec.rb +34 -0
- data/spec/models/filter_expressions_spec.rb +2 -2
- data/spec/models/filter_spec.rb +2 -2
- data/spec/models/generic_error_errors_inner_spec.rb +40 -0
- data/spec/models/{inline_response4002_spec.rb → generic_error_spec.rb} +9 -9
- data/spec/models/get_notification_request_body_spec.rb +2 -2
- data/spec/models/inline_response2003_spec.rb +3 -3
- data/spec/models/inline_response200_spec.rb +3 -21
- data/spec/models/inline_response201_spec.rb +3 -9
- data/spec/models/{inline_response400_spec.rb → inline_response202_spec.rb} +9 -9
- data/spec/models/invalid_identifier_error_spec.rb +40 -0
- data/spec/models/notification200_errors_spec.rb +31 -0
- data/spec/models/notification_all_of_spec.rb +2 -528
- data/spec/models/{inline_response2002_spec.rb → notification_history_success_response_spec.rb} +8 -8
- data/spec/models/notification_slice_spec.rb +2 -2
- data/spec/models/notification_spec.rb +58 -78
- data/spec/models/notification_target_spec.rb +18 -74
- data/spec/models/notification_with_meta_all_of_spec.rb +94 -0
- data/spec/models/notification_with_meta_spec.rb +744 -0
- data/spec/models/operator_spec.rb +2 -2
- data/spec/models/outcome_data_spec.rb +2 -2
- data/spec/models/outcomes_data_spec.rb +34 -0
- data/spec/models/platform_delivery_data_email_all_of_spec.rb +70 -0
- data/spec/models/platform_delivery_data_sms_all_of_spec.rb +46 -0
- data/spec/models/platform_delivery_data_spec.rb +14 -2
- data/spec/models/player_notification_target_include_aliases_spec.rb +34 -0
- data/spec/models/player_notification_target_spec.rb +18 -2
- data/spec/models/player_slice_spec.rb +2 -2
- data/spec/models/player_spec.rb +2 -2
- data/spec/models/properties_deltas_spec.rb +46 -0
- data/spec/models/{filter_notification_target_spec.rb → properties_object_spec.rb} +19 -25
- data/spec/models/purchase_spec.rb +8 -2
- data/spec/models/rate_limiter_error_spec.rb +34 -0
- data/spec/models/segment_notification_target_spec.rb +2 -2
- data/spec/models/segment_spec.rb +2 -2
- data/spec/models/string_map_spec.rb +2 -2
- data/spec/models/subscription_object_spec.rb +134 -0
- data/spec/models/transfer_subscription_request_body_spec.rb +34 -0
- data/spec/models/update_live_activity_request_spec.rb +60 -0
- data/spec/models/update_live_activity_success_response_spec.rb +40 -0
- data/spec/models/update_player_success_response_spec.rb +34 -0
- data/spec/models/update_player_tags_request_body_spec.rb +2 -2
- data/spec/models/update_player_tags_success_response_spec.rb +34 -0
- data/spec/models/update_subscription_request_body_spec.rb +34 -0
- data/spec/models/update_user_request_spec.rb +46 -0
- data/spec/models/user_identity_request_body_spec.rb +34 -0
- data/spec/models/user_identity_response_spec.rb +34 -0
- data/spec/models/user_spec.rb +52 -0
- data/spec/models/user_subscription_options_spec.rb +34 -0
- data/spec/spec_helper.rb +2 -2
- metadata +198 -51
- data/docs/FilterNotificationTarget.md +0 -40
- data/docs/InlineResponse400.md +0 -18
- data/docs/InlineResponse4001.md +0 -20
- data/docs/InlineResponse4002.md +0 -18
- data/git_push.sh +0 -58
- data/lib/OneSignal.rb +0 -75
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.4.0
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,46 +21,10 @@ module OneSignal
|
|
21
21
|
# 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\"]
|
22
22
|
attr_accessor :excluded_segments
|
23
23
|
|
24
|
-
# relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\"
|
25
|
-
attr_accessor :last_session
|
26
|
-
|
27
|
-
# relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\"
|
28
|
-
attr_accessor :first_session
|
29
|
-
|
30
|
-
# relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\"
|
31
|
-
attr_accessor :session_count
|
32
|
-
|
33
|
-
# relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\"
|
34
|
-
attr_accessor :session_time
|
35
|
-
|
36
|
-
# relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\"
|
37
|
-
attr_accessor :amount_spent
|
38
|
-
|
39
|
-
# relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\"
|
40
|
-
attr_accessor :bought_sku
|
41
|
-
|
42
|
-
# relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters
|
43
|
-
attr_accessor :tag
|
44
|
-
|
45
|
-
# relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization.
|
46
|
-
attr_accessor :language
|
47
|
-
|
48
|
-
# relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\"
|
49
|
-
attr_accessor :app_version
|
50
|
-
|
51
|
-
# radius = in meters lat = latitude long = longitude
|
52
|
-
attr_accessor :location
|
53
|
-
|
54
|
-
# value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter
|
55
|
-
attr_accessor :email
|
56
|
-
|
57
|
-
# relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\"
|
58
|
-
attr_accessor :country
|
59
|
-
|
60
24
|
# Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
|
61
25
|
attr_accessor :include_player_ids
|
62
26
|
|
63
|
-
# Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [
|
27
|
+
# 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.
|
64
28
|
attr_accessor :include_external_user_ids
|
65
29
|
|
66
30
|
# 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
|
@@ -87,10 +51,17 @@ module OneSignal
|
|
87
51
|
# Not Recommended: Please consider using include_player_ids or include_external_user_ids 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
|
88
52
|
attr_accessor :include_android_reg_ids
|
89
53
|
|
54
|
+
attr_accessor :include_aliases
|
55
|
+
|
56
|
+
attr_accessor :target_channel
|
57
|
+
|
90
58
|
attr_accessor :id
|
91
59
|
|
92
60
|
attr_accessor :value
|
93
61
|
|
62
|
+
# Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.
|
63
|
+
attr_accessor :name
|
64
|
+
|
94
65
|
attr_accessor :aggregation
|
95
66
|
|
96
67
|
# Indicates whether to send to all devices registered under your app's Apple iOS platform.
|
@@ -129,9 +100,12 @@ module OneSignal
|
|
129
100
|
# 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.
|
130
101
|
attr_accessor :app_id
|
131
102
|
|
132
|
-
# 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
|
103
|
+
# [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
|
133
104
|
attr_accessor :external_id
|
134
105
|
|
106
|
+
# 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
|
107
|
+
attr_accessor :idempotency_key
|
108
|
+
|
135
109
|
attr_accessor :contents
|
136
110
|
|
137
111
|
attr_accessor :headings
|
@@ -239,34 +213,34 @@ module OneSignal
|
|
239
213
|
# Channel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: \"notification.wav\"
|
240
214
|
attr_accessor :ios_sound
|
241
215
|
|
242
|
-
# Channel: Push Notifications Platform: Android
|
216
|
+
# Channel: Push Notifications Platform: Android ⚠️Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\"
|
243
217
|
attr_accessor :android_sound
|
244
218
|
|
245
|
-
# Channel: Push Notifications Platform: Huawei
|
219
|
+
# Channel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: \"/res/raw/notification\"
|
246
220
|
attr_accessor :huawei_sound
|
247
221
|
|
248
|
-
# Channel: Push Notifications Platform: Amazon
|
222
|
+
# Channel: Push Notifications Platform: Amazon ⚠️Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\"
|
249
223
|
attr_accessor :adm_sound
|
250
224
|
|
251
225
|
# Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\"
|
252
226
|
attr_accessor :wp_wns_sound
|
253
227
|
|
254
|
-
# Channel: Push Notifications Platform: Android
|
228
|
+
# Channel: Push Notifications Platform: Android ⚠️Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): \"FF0000FF\"
|
255
229
|
attr_accessor :android_led_color
|
256
230
|
|
257
|
-
# Channel: Push Notifications Platform: Huawei
|
231
|
+
# Channel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): \"0000FF\"
|
258
232
|
attr_accessor :huawei_led_color
|
259
233
|
|
260
234
|
# Channel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): \"FFFF0000\"
|
261
235
|
attr_accessor :android_accent_color
|
262
236
|
|
263
|
-
# Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device
|
237
|
+
# Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device's theme color if not set.
|
264
238
|
attr_accessor :huawei_accent_color
|
265
239
|
|
266
|
-
# Channel: Push Notifications Platform: Android 5.0_
|
240
|
+
# Channel: Push Notifications Platform: Android 5.0_ ⚠️Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
|
267
241
|
attr_accessor :android_visibility
|
268
242
|
|
269
|
-
# Channel: Push Notifications Platform: Huawei
|
243
|
+
# Channel: Push Notifications Platform: Huawei ⚠️Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all)
|
270
244
|
attr_accessor :huawei_visibility
|
271
245
|
|
272
246
|
# Channel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app's iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. `None` leaves the count unaffected. `SetTo` directly sets the badge count to the number specified in ios_badgeCount. `Increase` adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count.
|
@@ -284,9 +258,6 @@ module OneSignal
|
|
284
258
|
# Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more.
|
285
259
|
attr_accessor :apns_alert
|
286
260
|
|
287
|
-
# 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.
|
288
|
-
attr_accessor :send_after
|
289
|
-
|
290
261
|
# Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed.
|
291
262
|
attr_accessor :delayed_option
|
292
263
|
|
@@ -327,7 +298,7 @@ module OneSignal
|
|
327
298
|
attr_accessor :summary_arg_count
|
328
299
|
|
329
300
|
# Channel: Email Required. The subject of the email.
|
330
|
-
attr_accessor :
|
301
|
+
attr_accessor :email_subject
|
331
302
|
|
332
303
|
# 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.
|
333
304
|
attr_accessor :email_body
|
@@ -338,12 +309,26 @@ module OneSignal
|
|
338
309
|
# Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings.
|
339
310
|
attr_accessor :email_from_address
|
340
311
|
|
312
|
+
# 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.
|
313
|
+
attr_accessor :email_preheader
|
314
|
+
|
315
|
+
# 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.
|
316
|
+
attr_accessor :include_unsubscribed
|
317
|
+
|
341
318
|
# Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
|
342
319
|
attr_accessor :sms_from
|
343
320
|
|
344
321
|
# 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.
|
345
322
|
attr_accessor :sms_media_urls
|
346
323
|
|
324
|
+
attr_accessor :filters
|
325
|
+
|
326
|
+
# 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}
|
327
|
+
attr_accessor :custom_data
|
328
|
+
|
329
|
+
# 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.
|
330
|
+
attr_accessor :send_after
|
331
|
+
|
347
332
|
class EnumAttributeValidator
|
348
333
|
attr_reader :datatype
|
349
334
|
attr_reader :allowable_values
|
@@ -371,18 +356,6 @@ module OneSignal
|
|
371
356
|
{
|
372
357
|
:'included_segments' => :'included_segments',
|
373
358
|
:'excluded_segments' => :'excluded_segments',
|
374
|
-
:'last_session' => :'last_session',
|
375
|
-
:'first_session' => :'first_session',
|
376
|
-
:'session_count' => :'session_count',
|
377
|
-
:'session_time' => :'session_time',
|
378
|
-
:'amount_spent' => :'amount_spent',
|
379
|
-
:'bought_sku' => :'bought_sku',
|
380
|
-
:'tag' => :'tag',
|
381
|
-
:'language' => :'language',
|
382
|
-
:'app_version' => :'app_version',
|
383
|
-
:'location' => :'location',
|
384
|
-
:'email' => :'email',
|
385
|
-
:'country' => :'country',
|
386
359
|
:'include_player_ids' => :'include_player_ids',
|
387
360
|
:'include_external_user_ids' => :'include_external_user_ids',
|
388
361
|
:'include_email_tokens' => :'include_email_tokens',
|
@@ -393,8 +366,11 @@ module OneSignal
|
|
393
366
|
:'include_chrome_reg_ids' => :'include_chrome_reg_ids',
|
394
367
|
:'include_chrome_web_reg_ids' => :'include_chrome_web_reg_ids',
|
395
368
|
:'include_android_reg_ids' => :'include_android_reg_ids',
|
369
|
+
:'include_aliases' => :'include_aliases',
|
370
|
+
:'target_channel' => :'target_channel',
|
396
371
|
:'id' => :'id',
|
397
372
|
:'value' => :'value',
|
373
|
+
:'name' => :'name',
|
398
374
|
:'aggregation' => :'aggregation',
|
399
375
|
:'is_ios' => :'isIos',
|
400
376
|
:'is_android' => :'isAndroid',
|
@@ -409,6 +385,7 @@ module OneSignal
|
|
409
385
|
:'channel_for_external_user_ids' => :'channel_for_external_user_ids',
|
410
386
|
:'app_id' => :'app_id',
|
411
387
|
:'external_id' => :'external_id',
|
388
|
+
:'idempotency_key' => :'idempotency_key',
|
412
389
|
:'contents' => :'contents',
|
413
390
|
:'headings' => :'headings',
|
414
391
|
:'subtitle' => :'subtitle',
|
@@ -461,7 +438,6 @@ module OneSignal
|
|
461
438
|
:'collapse_id' => :'collapse_id',
|
462
439
|
:'web_push_topic' => :'web_push_topic',
|
463
440
|
:'apns_alert' => :'apns_alert',
|
464
|
-
:'send_after' => :'send_after',
|
465
441
|
:'delayed_option' => :'delayed_option',
|
466
442
|
:'delivery_time_of_day' => :'delivery_time_of_day',
|
467
443
|
:'ttl' => :'ttl',
|
@@ -475,12 +451,17 @@ module OneSignal
|
|
475
451
|
:'thread_id' => :'thread_id',
|
476
452
|
:'summary_arg' => :'summary_arg',
|
477
453
|
:'summary_arg_count' => :'summary_arg_count',
|
478
|
-
:'
|
454
|
+
:'email_subject' => :'email_subject',
|
479
455
|
:'email_body' => :'email_body',
|
480
456
|
:'email_from_name' => :'email_from_name',
|
481
457
|
:'email_from_address' => :'email_from_address',
|
458
|
+
:'email_preheader' => :'email_preheader',
|
459
|
+
:'include_unsubscribed' => :'include_unsubscribed',
|
482
460
|
:'sms_from' => :'sms_from',
|
483
|
-
:'sms_media_urls' => :'sms_media_urls'
|
461
|
+
:'sms_media_urls' => :'sms_media_urls',
|
462
|
+
:'filters' => :'filters',
|
463
|
+
:'custom_data' => :'custom_data',
|
464
|
+
:'send_after' => :'send_after'
|
484
465
|
}
|
485
466
|
end
|
486
467
|
|
@@ -494,18 +475,6 @@ module OneSignal
|
|
494
475
|
{
|
495
476
|
:'included_segments' => :'Array<String>',
|
496
477
|
:'excluded_segments' => :'Array<String>',
|
497
|
-
:'last_session' => :'String',
|
498
|
-
:'first_session' => :'String',
|
499
|
-
:'session_count' => :'String',
|
500
|
-
:'session_time' => :'String',
|
501
|
-
:'amount_spent' => :'String',
|
502
|
-
:'bought_sku' => :'String',
|
503
|
-
:'tag' => :'String',
|
504
|
-
:'language' => :'String',
|
505
|
-
:'app_version' => :'String',
|
506
|
-
:'location' => :'String',
|
507
|
-
:'email' => :'String',
|
508
|
-
:'country' => :'String',
|
509
478
|
:'include_player_ids' => :'Array<String>',
|
510
479
|
:'include_external_user_ids' => :'Array<String>',
|
511
480
|
:'include_email_tokens' => :'Array<String>',
|
@@ -516,8 +485,11 @@ module OneSignal
|
|
516
485
|
:'include_chrome_reg_ids' => :'Array<String>',
|
517
486
|
:'include_chrome_web_reg_ids' => :'Array<String>',
|
518
487
|
:'include_android_reg_ids' => :'Array<String>',
|
488
|
+
:'include_aliases' => :'PlayerNotificationTargetIncludeAliases',
|
489
|
+
:'target_channel' => :'String',
|
519
490
|
:'id' => :'String',
|
520
491
|
:'value' => :'Integer',
|
492
|
+
:'name' => :'String',
|
521
493
|
:'aggregation' => :'String',
|
522
494
|
:'is_ios' => :'Boolean',
|
523
495
|
:'is_android' => :'Boolean',
|
@@ -532,6 +504,7 @@ module OneSignal
|
|
532
504
|
:'channel_for_external_user_ids' => :'String',
|
533
505
|
:'app_id' => :'String',
|
534
506
|
:'external_id' => :'String',
|
507
|
+
:'idempotency_key' => :'String',
|
535
508
|
:'contents' => :'StringMap',
|
536
509
|
:'headings' => :'StringMap',
|
537
510
|
:'subtitle' => :'StringMap',
|
@@ -557,7 +530,7 @@ module OneSignal
|
|
557
530
|
:'huawei_channel_id' => :'String',
|
558
531
|
:'existing_android_channel_id' => :'String',
|
559
532
|
:'huawei_existing_channel_id' => :'String',
|
560
|
-
:'android_background_layout' => :'
|
533
|
+
:'android_background_layout' => :'BasicNotificationAllOfAndroidBackgroundLayout',
|
561
534
|
:'small_icon' => :'String',
|
562
535
|
:'huawei_small_icon' => :'String',
|
563
536
|
:'large_icon' => :'String',
|
@@ -584,7 +557,6 @@ module OneSignal
|
|
584
557
|
:'collapse_id' => :'String',
|
585
558
|
:'web_push_topic' => :'String',
|
586
559
|
:'apns_alert' => :'Object',
|
587
|
-
:'send_after' => :'String',
|
588
560
|
:'delayed_option' => :'String',
|
589
561
|
:'delivery_time_of_day' => :'String',
|
590
562
|
:'ttl' => :'Integer',
|
@@ -598,26 +570,113 @@ module OneSignal
|
|
598
570
|
:'thread_id' => :'String',
|
599
571
|
:'summary_arg' => :'String',
|
600
572
|
:'summary_arg_count' => :'Integer',
|
601
|
-
:'
|
573
|
+
:'email_subject' => :'String',
|
602
574
|
:'email_body' => :'String',
|
603
575
|
:'email_from_name' => :'String',
|
604
576
|
:'email_from_address' => :'String',
|
577
|
+
:'email_preheader' => :'String',
|
578
|
+
:'include_unsubscribed' => :'Boolean',
|
605
579
|
:'sms_from' => :'String',
|
606
|
-
:'sms_media_urls' => :'Array<String>'
|
580
|
+
:'sms_media_urls' => :'Array<String>',
|
581
|
+
:'filters' => :'Array<Filter>',
|
582
|
+
:'custom_data' => :'Object',
|
583
|
+
:'send_after' => :'Time'
|
607
584
|
}
|
608
585
|
end
|
609
586
|
|
610
587
|
# List of attributes with nullable: true
|
611
588
|
def self.openapi_nullable
|
612
589
|
Set.new([
|
590
|
+
:'include_player_ids',
|
591
|
+
:'include_external_user_ids',
|
592
|
+
:'include_aliases',
|
593
|
+
:'name',
|
594
|
+
:'is_ios',
|
595
|
+
:'is_android',
|
596
|
+
:'is_huawei',
|
597
|
+
:'is_any_web',
|
598
|
+
:'is_chrome_web',
|
599
|
+
:'is_firefox',
|
600
|
+
:'is_safari',
|
601
|
+
:'is_wp_wns',
|
602
|
+
:'is_adm',
|
603
|
+
:'is_chrome',
|
604
|
+
:'external_id',
|
605
|
+
:'idempotency_key',
|
606
|
+
:'contents',
|
607
|
+
:'headings',
|
608
|
+
:'subtitle',
|
609
|
+
:'data',
|
610
|
+
:'huawei_msg_type',
|
611
|
+
:'url',
|
612
|
+
:'web_url',
|
613
|
+
:'app_url',
|
614
|
+
:'ios_attachments',
|
615
|
+
:'template_id',
|
616
|
+
:'content_available',
|
617
|
+
:'target_content_identifier',
|
618
|
+
:'big_picture',
|
619
|
+
:'huawei_big_picture',
|
620
|
+
:'adm_big_picture',
|
621
|
+
:'chrome_big_picture',
|
622
|
+
:'chrome_web_image',
|
623
|
+
:'buttons',
|
624
|
+
:'web_buttons',
|
625
|
+
:'ios_category',
|
626
|
+
:'huawei_channel_id',
|
627
|
+
:'huawei_existing_channel_id',
|
628
|
+
:'small_icon',
|
629
|
+
:'huawei_small_icon',
|
630
|
+
:'large_icon',
|
631
|
+
:'huawei_large_icon',
|
632
|
+
:'adm_small_icon',
|
633
|
+
:'adm_large_icon',
|
634
|
+
:'chrome_web_icon',
|
635
|
+
:'chrome_web_badge',
|
636
|
+
:'firefox_icon',
|
637
|
+
:'chrome_icon',
|
638
|
+
:'ios_sound',
|
639
|
+
:'android_sound',
|
640
|
+
:'huawei_sound',
|
641
|
+
:'adm_sound',
|
642
|
+
:'wp_wns_sound',
|
643
|
+
:'android_led_color',
|
644
|
+
:'huawei_led_color',
|
645
|
+
:'android_accent_color',
|
646
|
+
:'huawei_accent_color',
|
647
|
+
:'android_visibility',
|
648
|
+
:'huawei_visibility',
|
649
|
+
:'ios_badge_type',
|
650
|
+
:'ios_badge_count',
|
651
|
+
:'web_push_topic',
|
652
|
+
:'apns_alert',
|
653
|
+
:'delayed_option',
|
654
|
+
:'delivery_time_of_day',
|
655
|
+
:'ttl',
|
656
|
+
:'priority',
|
657
|
+
:'throttle_rate_per_minute',
|
658
|
+
:'android_group',
|
659
|
+
:'android_group_message',
|
660
|
+
:'adm_group',
|
661
|
+
:'adm_group_message',
|
662
|
+
:'thread_id',
|
663
|
+
:'email_subject',
|
664
|
+
:'email_from_name',
|
665
|
+
:'email_from_address',
|
666
|
+
:'email_preheader',
|
667
|
+
:'sms_from',
|
668
|
+
:'sms_media_urls',
|
669
|
+
:'filters',
|
670
|
+
:'custom_data',
|
671
|
+
:'send_after'
|
613
672
|
])
|
614
673
|
end
|
615
674
|
|
616
675
|
# List of class defined in allOf (OpenAPI v3)
|
617
676
|
def self.openapi_all_of
|
618
677
|
[
|
619
|
-
:'
|
620
|
-
:'
|
678
|
+
:'BasicNotification',
|
679
|
+
:'NotificationAllOf'
|
621
680
|
]
|
622
681
|
end
|
623
682
|
|
@@ -648,54 +707,6 @@ module OneSignal
|
|
648
707
|
end
|
649
708
|
end
|
650
709
|
|
651
|
-
if attributes.key?(:'last_session')
|
652
|
-
self.last_session = attributes[:'last_session']
|
653
|
-
end
|
654
|
-
|
655
|
-
if attributes.key?(:'first_session')
|
656
|
-
self.first_session = attributes[:'first_session']
|
657
|
-
end
|
658
|
-
|
659
|
-
if attributes.key?(:'session_count')
|
660
|
-
self.session_count = attributes[:'session_count']
|
661
|
-
end
|
662
|
-
|
663
|
-
if attributes.key?(:'session_time')
|
664
|
-
self.session_time = attributes[:'session_time']
|
665
|
-
end
|
666
|
-
|
667
|
-
if attributes.key?(:'amount_spent')
|
668
|
-
self.amount_spent = attributes[:'amount_spent']
|
669
|
-
end
|
670
|
-
|
671
|
-
if attributes.key?(:'bought_sku')
|
672
|
-
self.bought_sku = attributes[:'bought_sku']
|
673
|
-
end
|
674
|
-
|
675
|
-
if attributes.key?(:'tag')
|
676
|
-
self.tag = attributes[:'tag']
|
677
|
-
end
|
678
|
-
|
679
|
-
if attributes.key?(:'language')
|
680
|
-
self.language = attributes[:'language']
|
681
|
-
end
|
682
|
-
|
683
|
-
if attributes.key?(:'app_version')
|
684
|
-
self.app_version = attributes[:'app_version']
|
685
|
-
end
|
686
|
-
|
687
|
-
if attributes.key?(:'location')
|
688
|
-
self.location = attributes[:'location']
|
689
|
-
end
|
690
|
-
|
691
|
-
if attributes.key?(:'email')
|
692
|
-
self.email = attributes[:'email']
|
693
|
-
end
|
694
|
-
|
695
|
-
if attributes.key?(:'country')
|
696
|
-
self.country = attributes[:'country']
|
697
|
-
end
|
698
|
-
|
699
710
|
if attributes.key?(:'include_player_ids')
|
700
711
|
if (value = attributes[:'include_player_ids']).is_a?(Array)
|
701
712
|
self.include_player_ids = value
|
@@ -756,6 +767,14 @@ module OneSignal
|
|
756
767
|
end
|
757
768
|
end
|
758
769
|
|
770
|
+
if attributes.key?(:'include_aliases')
|
771
|
+
self.include_aliases = attributes[:'include_aliases']
|
772
|
+
end
|
773
|
+
|
774
|
+
if attributes.key?(:'target_channel')
|
775
|
+
self.target_channel = attributes[:'target_channel']
|
776
|
+
end
|
777
|
+
|
759
778
|
if attributes.key?(:'id')
|
760
779
|
self.id = attributes[:'id']
|
761
780
|
end
|
@@ -764,14 +783,16 @@ module OneSignal
|
|
764
783
|
self.value = attributes[:'value']
|
765
784
|
end
|
766
785
|
|
786
|
+
if attributes.key?(:'name')
|
787
|
+
self.name = attributes[:'name']
|
788
|
+
end
|
789
|
+
|
767
790
|
if attributes.key?(:'aggregation')
|
768
791
|
self.aggregation = attributes[:'aggregation']
|
769
792
|
end
|
770
793
|
|
771
794
|
if attributes.key?(:'is_ios')
|
772
795
|
self.is_ios = attributes[:'is_ios']
|
773
|
-
else
|
774
|
-
self.is_ios = true
|
775
796
|
end
|
776
797
|
|
777
798
|
if attributes.key?(:'is_android')
|
@@ -822,6 +843,10 @@ module OneSignal
|
|
822
843
|
self.external_id = attributes[:'external_id']
|
823
844
|
end
|
824
845
|
|
846
|
+
if attributes.key?(:'idempotency_key')
|
847
|
+
self.idempotency_key = attributes[:'idempotency_key']
|
848
|
+
end
|
849
|
+
|
825
850
|
if attributes.key?(:'contents')
|
826
851
|
self.contents = attributes[:'contents']
|
827
852
|
end
|
@@ -1034,10 +1059,6 @@ module OneSignal
|
|
1034
1059
|
self.apns_alert = attributes[:'apns_alert']
|
1035
1060
|
end
|
1036
1061
|
|
1037
|
-
if attributes.key?(:'send_after')
|
1038
|
-
self.send_after = attributes[:'send_after']
|
1039
|
-
end
|
1040
|
-
|
1041
1062
|
if attributes.key?(:'delayed_option')
|
1042
1063
|
self.delayed_option = attributes[:'delayed_option']
|
1043
1064
|
end
|
@@ -1090,8 +1111,8 @@ module OneSignal
|
|
1090
1111
|
self.summary_arg_count = attributes[:'summary_arg_count']
|
1091
1112
|
end
|
1092
1113
|
|
1093
|
-
if attributes.key?(:'
|
1094
|
-
self.
|
1114
|
+
if attributes.key?(:'email_subject')
|
1115
|
+
self.email_subject = attributes[:'email_subject']
|
1095
1116
|
end
|
1096
1117
|
|
1097
1118
|
if attributes.key?(:'email_body')
|
@@ -1106,6 +1127,14 @@ module OneSignal
|
|
1106
1127
|
self.email_from_address = attributes[:'email_from_address']
|
1107
1128
|
end
|
1108
1129
|
|
1130
|
+
if attributes.key?(:'email_preheader')
|
1131
|
+
self.email_preheader = attributes[:'email_preheader']
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
if attributes.key?(:'include_unsubscribed')
|
1135
|
+
self.include_unsubscribed = attributes[:'include_unsubscribed']
|
1136
|
+
end
|
1137
|
+
|
1109
1138
|
if attributes.key?(:'sms_from')
|
1110
1139
|
self.sms_from = attributes[:'sms_from']
|
1111
1140
|
end
|
@@ -1115,6 +1144,20 @@ module OneSignal
|
|
1115
1144
|
self.sms_media_urls = value
|
1116
1145
|
end
|
1117
1146
|
end
|
1147
|
+
|
1148
|
+
if attributes.key?(:'filters')
|
1149
|
+
if (value = attributes[:'filters']).is_a?(Array)
|
1150
|
+
self.filters = value
|
1151
|
+
end
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
if attributes.key?(:'custom_data')
|
1155
|
+
self.custom_data = attributes[:'custom_data']
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
if attributes.key?(:'send_after')
|
1159
|
+
self.send_after = attributes[:'send_after']
|
1160
|
+
end
|
1118
1161
|
end
|
1119
1162
|
|
1120
1163
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -1131,12 +1174,24 @@ module OneSignal
|
|
1131
1174
|
# Check to see if the all the properties in the model are valid
|
1132
1175
|
# @return true if the model is valid
|
1133
1176
|
def valid?
|
1177
|
+
target_channel_validator = EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
1178
|
+
return false unless target_channel_validator.valid?(@target_channel)
|
1134
1179
|
aggregation_validator = EnumAttributeValidator.new('String', ["sum", "count"])
|
1135
1180
|
return false unless aggregation_validator.valid?(@aggregation)
|
1136
1181
|
return false if @app_id.nil?
|
1137
1182
|
true
|
1138
1183
|
end
|
1139
1184
|
|
1185
|
+
# Custom attribute writer method checking allowed values (enum).
|
1186
|
+
# @param [Object] target_channel Object to be assigned
|
1187
|
+
def target_channel=(target_channel)
|
1188
|
+
validator = EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
1189
|
+
unless validator.valid?(target_channel)
|
1190
|
+
fail ArgumentError, "invalid value for \"target_channel\", must be one of #{validator.allowable_values}."
|
1191
|
+
end
|
1192
|
+
@target_channel = target_channel
|
1193
|
+
end
|
1194
|
+
|
1140
1195
|
# Custom attribute writer method checking allowed values (enum).
|
1141
1196
|
# @param [Object] aggregation Object to be assigned
|
1142
1197
|
def aggregation=(aggregation)
|
@@ -1154,18 +1209,6 @@ module OneSignal
|
|
1154
1209
|
self.class == o.class &&
|
1155
1210
|
included_segments == o.included_segments &&
|
1156
1211
|
excluded_segments == o.excluded_segments &&
|
1157
|
-
last_session == o.last_session &&
|
1158
|
-
first_session == o.first_session &&
|
1159
|
-
session_count == o.session_count &&
|
1160
|
-
session_time == o.session_time &&
|
1161
|
-
amount_spent == o.amount_spent &&
|
1162
|
-
bought_sku == o.bought_sku &&
|
1163
|
-
tag == o.tag &&
|
1164
|
-
language == o.language &&
|
1165
|
-
app_version == o.app_version &&
|
1166
|
-
location == o.location &&
|
1167
|
-
email == o.email &&
|
1168
|
-
country == o.country &&
|
1169
1212
|
include_player_ids == o.include_player_ids &&
|
1170
1213
|
include_external_user_ids == o.include_external_user_ids &&
|
1171
1214
|
include_email_tokens == o.include_email_tokens &&
|
@@ -1176,8 +1219,11 @@ module OneSignal
|
|
1176
1219
|
include_chrome_reg_ids == o.include_chrome_reg_ids &&
|
1177
1220
|
include_chrome_web_reg_ids == o.include_chrome_web_reg_ids &&
|
1178
1221
|
include_android_reg_ids == o.include_android_reg_ids &&
|
1222
|
+
include_aliases == o.include_aliases &&
|
1223
|
+
target_channel == o.target_channel &&
|
1179
1224
|
id == o.id &&
|
1180
1225
|
value == o.value &&
|
1226
|
+
name == o.name &&
|
1181
1227
|
aggregation == o.aggregation &&
|
1182
1228
|
is_ios == o.is_ios &&
|
1183
1229
|
is_android == o.is_android &&
|
@@ -1192,6 +1238,7 @@ module OneSignal
|
|
1192
1238
|
channel_for_external_user_ids == o.channel_for_external_user_ids &&
|
1193
1239
|
app_id == o.app_id &&
|
1194
1240
|
external_id == o.external_id &&
|
1241
|
+
idempotency_key == o.idempotency_key &&
|
1195
1242
|
contents == o.contents &&
|
1196
1243
|
headings == o.headings &&
|
1197
1244
|
subtitle == o.subtitle &&
|
@@ -1244,7 +1291,6 @@ module OneSignal
|
|
1244
1291
|
collapse_id == o.collapse_id &&
|
1245
1292
|
web_push_topic == o.web_push_topic &&
|
1246
1293
|
apns_alert == o.apns_alert &&
|
1247
|
-
send_after == o.send_after &&
|
1248
1294
|
delayed_option == o.delayed_option &&
|
1249
1295
|
delivery_time_of_day == o.delivery_time_of_day &&
|
1250
1296
|
ttl == o.ttl &&
|
@@ -1258,12 +1304,17 @@ module OneSignal
|
|
1258
1304
|
thread_id == o.thread_id &&
|
1259
1305
|
summary_arg == o.summary_arg &&
|
1260
1306
|
summary_arg_count == o.summary_arg_count &&
|
1261
|
-
|
1307
|
+
email_subject == o.email_subject &&
|
1262
1308
|
email_body == o.email_body &&
|
1263
1309
|
email_from_name == o.email_from_name &&
|
1264
1310
|
email_from_address == o.email_from_address &&
|
1311
|
+
email_preheader == o.email_preheader &&
|
1312
|
+
include_unsubscribed == o.include_unsubscribed &&
|
1265
1313
|
sms_from == o.sms_from &&
|
1266
|
-
sms_media_urls == o.sms_media_urls
|
1314
|
+
sms_media_urls == o.sms_media_urls &&
|
1315
|
+
filters == o.filters &&
|
1316
|
+
custom_data == o.custom_data &&
|
1317
|
+
send_after == o.send_after
|
1267
1318
|
end
|
1268
1319
|
|
1269
1320
|
# @see the `==` method
|
@@ -1275,7 +1326,7 @@ module OneSignal
|
|
1275
1326
|
# Calculates hash code according to all attributes.
|
1276
1327
|
# @return [Integer] Hash code
|
1277
1328
|
def hash
|
1278
|
-
[included_segments, excluded_segments,
|
1329
|
+
[included_segments, excluded_segments, include_player_ids, include_external_user_ids, include_email_tokens, include_phone_numbers, include_ios_tokens, include_wp_wns_uris, include_amazon_reg_ids, include_chrome_reg_ids, include_chrome_web_reg_ids, include_android_reg_ids, include_aliases, target_channel, id, value, name, aggregation, is_ios, is_android, is_huawei, is_any_web, is_chrome_web, is_firefox, is_safari, is_wp_wns, is_adm, is_chrome, channel_for_external_user_ids, app_id, external_id, idempotency_key, contents, headings, subtitle, data, huawei_msg_type, url, web_url, app_url, ios_attachments, template_id, content_available, mutable_content, target_content_identifier, big_picture, huawei_big_picture, adm_big_picture, chrome_big_picture, chrome_web_image, buttons, web_buttons, ios_category, android_channel_id, huawei_channel_id, existing_android_channel_id, huawei_existing_channel_id, android_background_layout, small_icon, huawei_small_icon, large_icon, huawei_large_icon, adm_small_icon, adm_large_icon, chrome_web_icon, chrome_web_badge, firefox_icon, chrome_icon, ios_sound, android_sound, huawei_sound, adm_sound, wp_wns_sound, android_led_color, huawei_led_color, android_accent_color, huawei_accent_color, android_visibility, huawei_visibility, ios_badge_type, ios_badge_count, collapse_id, web_push_topic, apns_alert, delayed_option, delivery_time_of_day, ttl, priority, apns_push_type_override, throttle_rate_per_minute, android_group, android_group_message, adm_group, adm_group_message, thread_id, summary_arg, summary_arg_count, email_subject, email_body, email_from_name, email_from_address, email_preheader, include_unsubscribed, sms_from, sms_media_urls, filters, custom_data, send_after].hash
|
1279
1330
|
end
|
1280
1331
|
|
1281
1332
|
# Builds the object from hash
|
@@ -1290,6 +1341,7 @@ module OneSignal
|
|
1290
1341
|
# @return [Object] Returns the model itself
|
1291
1342
|
def build_from_hash(attributes)
|
1292
1343
|
return nil unless attributes.is_a?(Hash)
|
1344
|
+
attributes = attributes.transform_keys(&:to_sym)
|
1293
1345
|
self.class.openapi_types.each_pair do |key, type|
|
1294
1346
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
1295
1347
|
self.send("#{key}=", nil)
|