onesignal 1.0.1 → 2.2.1
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 +114 -88
- 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/{InlineResponse2005.md → CreatePlayerSuccessResponse.md} +2 -2
- data/docs/{InlineResponse4002.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 +1700 -301
- data/docs/DeletePlayerNotFoundResponse.md +18 -0
- data/docs/{InlineResponse2001.md → DeletePlayerSuccessResponse.md} +2 -2
- data/docs/DeleteSegmentNotFoundResponse.md +18 -0
- data/docs/DeleteSegmentSuccessResponse.md +18 -0
- data/docs/DeliveryData.md +5 -5
- data/docs/{InlineResponse2008.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 +18 -0
- data/docs/InlineResponse201.md +2 -4
- data/docs/InlineResponse202.md +18 -0
- data/docs/Notification.md +22 -30
- data/docs/NotificationAllOf.md +1 -175
- data/docs/{InlineResponse2002.md → NotificationHistorySuccessResponse.md} +2 -2
- data/docs/NotificationTarget.md +5 -25
- data/docs/NotificationWithMeta.md +21 -29
- data/docs/PlatformDeliveryData.md +5 -1
- data/docs/PlatformDeliveryDataEmailAllOf.md +30 -0
- data/docs/PlatformDeliveryDataSmsAllOf.md +22 -0
- data/docs/Player.md +1 -1
- data/docs/PlayerNotificationTarget.md +5 -1
- 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/SubscriptionObject.md +50 -0
- data/docs/TransferSubscriptionRequestBody.md +18 -0
- data/docs/UpdateLiveActivityRequest.md +24 -0
- data/docs/UpdateLiveActivitySuccessResponse.md +20 -0
- data/docs/{InlineResponse2007.md → UpdatePlayerSuccessResponse.md} +3 -3
- 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 +1583 -221
- data/lib/onesignal/api_client.rb +2 -2
- data/lib/onesignal/api_error.rb +1 -1
- data/lib/onesignal/configuration.rb +6 -6
- data/lib/onesignal/models/app.rb +57 -7
- 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} +4 -4
- data/lib/onesignal/models/begin_live_activity_request.rb +238 -0
- data/lib/onesignal/models/button.rb +1 -1
- 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_response2005.rb → create_player_success_response.rb} +4 -4
- data/lib/onesignal/models/{inline_response4002.rb → create_segment_conflict_response.rb} +4 -4
- 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} +6 -15
- 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} +4 -4
- 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 +6 -1
- data/lib/onesignal/models/{inline_response2008.rb → export_events_success_response.rb} +4 -4
- data/lib/onesignal/models/export_players_request_body.rb +3 -3
- data/lib/onesignal/models/export_players_success_response.rb +219 -0
- data/lib/onesignal/models/filter.rb +2 -2
- data/lib/onesignal/models/filter_expressions.rb +2 -2
- data/lib/onesignal/models/{inline_response400.rb → generic_error.rb} +5 -5
- data/lib/onesignal/models/generic_error_errors_inner.rb +228 -0
- data/lib/onesignal/models/get_notification_request_body.rb +1 -1
- data/lib/onesignal/models/inline_response200.rb +10 -46
- data/lib/onesignal/models/{inline_response4003.rb → inline_response2003.rb} +12 -12
- data/lib/onesignal/models/inline_response201.rb +8 -18
- data/lib/onesignal/models/inline_response202.rb +219 -0
- data/lib/onesignal/models/invalid_identifier_error.rb +1 -1
- data/lib/onesignal/models/notification.rb +173 -141
- data/lib/onesignal/models/notification200_errors.rb +1 -1
- data/lib/onesignal/models/notification_all_of.rb +6 -929
- data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb} +4 -4
- data/lib/onesignal/models/notification_slice.rb +1 -1
- data/lib/onesignal/models/notification_target.rb +60 -126
- data/lib/onesignal/models/notification_with_meta.rb +168 -137
- data/lib/onesignal/models/notification_with_meta_all_of.rb +2 -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 +25 -5
- 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 +9 -6
- data/lib/onesignal/models/player_notification_target.rb +60 -5
- data/lib/onesignal/models/player_notification_target_include_aliases.rb +221 -0
- data/lib/onesignal/models/player_slice.rb +1 -1
- data/lib/onesignal/models/properties_deltas.rb +239 -0
- data/lib/onesignal/models/properties_object.rb +313 -0
- data/lib/onesignal/models/purchase.rb +15 -6
- data/lib/onesignal/models/rate_limiter_error.rb +221 -0
- data/lib/onesignal/models/segment.rb +1 -1
- data/lib/onesignal/models/segment_notification_target.rb +1 -1
- data/lib/onesignal/models/string_map.rb +1 -1
- data/lib/onesignal/models/{filter_notification_target.rb → subscription_object.rb} +145 -78
- 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/{inline_response2007.rb → update_player_success_response.rb} +5 -5
- data/lib/onesignal/models/update_player_tags_request_body.rb +1 -1
- 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 +2 -2
- data/lib/onesignal.rb +43 -12
- data/onesignal.gemspec +1 -1
- data/spec/api/default_api_spec.rb +249 -12
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/app_spec.rb +25 -1
- data/spec/models/{notification_all_of_android_background_layout_spec.rb → basic_notification_all_of_android_background_layout_spec.rb} +7 -7
- 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 +1 -1
- 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_response2005_spec.rb → create_player_success_response_spec.rb} +7 -7
- data/spec/models/{inline_response4001_spec.rb → create_segment_conflict_response_spec.rb} +7 -7
- data/spec/models/{inline_response4002_spec.rb → create_segment_success_response_spec.rb} +8 -8
- 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} +7 -7
- 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 +1 -1
- data/spec/models/{inline_response2008_spec.rb → export_events_success_response_spec.rb} +7 -7
- data/spec/models/export_players_request_body_spec.rb +1 -1
- data/spec/models/export_players_success_response_spec.rb +34 -0
- data/spec/models/filter_expressions_spec.rb +1 -1
- data/spec/models/filter_spec.rb +1 -1
- data/spec/models/generic_error_errors_inner_spec.rb +40 -0
- data/spec/models/{inline_response4003_spec.rb → generic_error_spec.rb} +8 -8
- data/spec/models/get_notification_request_body_spec.rb +1 -1
- data/spec/models/{inline_response2007_spec.rb → inline_response2003_spec.rb} +8 -8
- data/spec/models/inline_response200_spec.rb +2 -20
- data/spec/models/inline_response201_spec.rb +2 -8
- data/spec/models/{inline_response400_spec.rb → inline_response202_spec.rb} +8 -8
- data/spec/models/invalid_identifier_error_spec.rb +1 -1
- data/spec/models/notification200_errors_spec.rb +1 -1
- data/spec/models/notification_all_of_spec.rb +1 -527
- data/spec/models/{inline_response2002_spec.rb → notification_history_success_response_spec.rb} +7 -7
- data/spec/models/notification_slice_spec.rb +1 -1
- data/spec/models/notification_spec.rb +56 -76
- data/spec/models/notification_target_spec.rb +17 -73
- data/spec/models/notification_with_meta_all_of_spec.rb +1 -1
- data/spec/models/notification_with_meta_spec.rb +56 -76
- 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 +70 -0
- data/spec/models/platform_delivery_data_sms_all_of_spec.rb +46 -0
- data/spec/models/platform_delivery_data_spec.rb +13 -1
- data/spec/models/player_notification_target_include_aliases_spec.rb +34 -0
- data/spec/models/player_notification_target_spec.rb +17 -1
- data/spec/models/player_slice_spec.rb +1 -1
- data/spec/models/player_spec.rb +1 -1
- data/spec/models/properties_deltas_spec.rb +46 -0
- data/spec/models/{filter_notification_target_spec.rb → properties_object_spec.rb} +18 -24
- data/spec/models/purchase_spec.rb +7 -1
- data/spec/models/rate_limiter_error_spec.rb +34 -0
- data/spec/models/segment_notification_target_spec.rb +1 -1
- data/spec/models/segment_spec.rb +1 -1
- data/spec/models/string_map_spec.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- metadata +193 -72
- data/docs/FilterNotificationTarget.md +0 -40
- data/docs/InlineResponse400.md +0 -18
- data/docs/InlineResponse4001.md +0 -20
- data/docs/InlineResponse4003.md +0 -18
data/lib/onesignal/models/{inline_response2002.rb → notification_history_success_response.rb}
RENAMED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OneSignal
|
17
|
-
class
|
17
|
+
class NotificationHistorySuccessResponse
|
18
18
|
attr_accessor :success
|
19
19
|
|
20
20
|
attr_accessor :destination_url
|
@@ -50,13 +50,13 @@ module OneSignal
|
|
50
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
51
|
def initialize(attributes = {})
|
52
52
|
if (!attributes.is_a?(Hash))
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OneSignal::NotificationHistorySuccessResponse` initialize method"
|
54
54
|
end
|
55
55
|
|
56
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OneSignal::NotificationHistorySuccessResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
60
|
end
|
61
61
|
h[k.to_sym] = v
|
62
62
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
Contact: devrel@onesignal.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 6.0.0-SNAPSHOT
|
@@ -21,42 +21,6 @@ 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
|
|
@@ -87,23 +51,37 @@ 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
|
+
|
58
|
+
class EnumAttributeValidator
|
59
|
+
attr_reader :datatype
|
60
|
+
attr_reader :allowable_values
|
61
|
+
|
62
|
+
def initialize(datatype, allowable_values)
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
64
|
+
case datatype.to_s
|
65
|
+
when /Integer/i
|
66
|
+
value.to_i
|
67
|
+
when /Float/i
|
68
|
+
value.to_f
|
69
|
+
else
|
70
|
+
value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def valid?(value)
|
76
|
+
!value || allowable_values.include?(value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
90
80
|
# Attribute mapping from ruby-style variable name to JSON key.
|
91
81
|
def self.attribute_map
|
92
82
|
{
|
93
83
|
:'included_segments' => :'included_segments',
|
94
84
|
:'excluded_segments' => :'excluded_segments',
|
95
|
-
:'last_session' => :'last_session',
|
96
|
-
:'first_session' => :'first_session',
|
97
|
-
:'session_count' => :'session_count',
|
98
|
-
:'session_time' => :'session_time',
|
99
|
-
:'amount_spent' => :'amount_spent',
|
100
|
-
:'bought_sku' => :'bought_sku',
|
101
|
-
:'tag' => :'tag',
|
102
|
-
:'language' => :'language',
|
103
|
-
:'app_version' => :'app_version',
|
104
|
-
:'location' => :'location',
|
105
|
-
:'email' => :'email',
|
106
|
-
:'country' => :'country',
|
107
85
|
:'include_player_ids' => :'include_player_ids',
|
108
86
|
:'include_external_user_ids' => :'include_external_user_ids',
|
109
87
|
:'include_email_tokens' => :'include_email_tokens',
|
@@ -113,7 +91,9 @@ module OneSignal
|
|
113
91
|
:'include_amazon_reg_ids' => :'include_amazon_reg_ids',
|
114
92
|
:'include_chrome_reg_ids' => :'include_chrome_reg_ids',
|
115
93
|
:'include_chrome_web_reg_ids' => :'include_chrome_web_reg_ids',
|
116
|
-
:'include_android_reg_ids' => :'include_android_reg_ids'
|
94
|
+
:'include_android_reg_ids' => :'include_android_reg_ids',
|
95
|
+
:'include_aliases' => :'include_aliases',
|
96
|
+
:'target_channel' => :'target_channel'
|
117
97
|
}
|
118
98
|
end
|
119
99
|
|
@@ -127,18 +107,6 @@ module OneSignal
|
|
127
107
|
{
|
128
108
|
:'included_segments' => :'Array<String>',
|
129
109
|
:'excluded_segments' => :'Array<String>',
|
130
|
-
:'last_session' => :'String',
|
131
|
-
:'first_session' => :'String',
|
132
|
-
:'session_count' => :'String',
|
133
|
-
:'session_time' => :'String',
|
134
|
-
:'amount_spent' => :'String',
|
135
|
-
:'bought_sku' => :'String',
|
136
|
-
:'tag' => :'String',
|
137
|
-
:'language' => :'String',
|
138
|
-
:'app_version' => :'String',
|
139
|
-
:'location' => :'String',
|
140
|
-
:'email' => :'String',
|
141
|
-
:'country' => :'String',
|
142
110
|
:'include_player_ids' => :'Array<String>',
|
143
111
|
:'include_external_user_ids' => :'Array<String>',
|
144
112
|
:'include_email_tokens' => :'Array<String>',
|
@@ -148,20 +116,24 @@ module OneSignal
|
|
148
116
|
:'include_amazon_reg_ids' => :'Array<String>',
|
149
117
|
:'include_chrome_reg_ids' => :'Array<String>',
|
150
118
|
:'include_chrome_web_reg_ids' => :'Array<String>',
|
151
|
-
:'include_android_reg_ids' => :'Array<String>'
|
119
|
+
:'include_android_reg_ids' => :'Array<String>',
|
120
|
+
:'include_aliases' => :'PlayerNotificationTargetIncludeAliases',
|
121
|
+
:'target_channel' => :'String'
|
152
122
|
}
|
153
123
|
end
|
154
124
|
|
155
125
|
# List of attributes with nullable: true
|
156
126
|
def self.openapi_nullable
|
157
127
|
Set.new([
|
128
|
+
:'include_player_ids',
|
129
|
+
:'include_external_user_ids',
|
130
|
+
:'include_aliases',
|
158
131
|
])
|
159
132
|
end
|
160
133
|
|
161
134
|
# List of class defined in anyOf (OpenAPI v3)
|
162
135
|
def self.openapi_any_of
|
163
136
|
[
|
164
|
-
:'FilterNotificationTarget',
|
165
137
|
:'PlayerNotificationTarget',
|
166
138
|
:'SegmentNotificationTarget'
|
167
139
|
]
|
@@ -194,54 +166,6 @@ module OneSignal
|
|
194
166
|
end
|
195
167
|
end
|
196
168
|
|
197
|
-
if attributes.key?(:'last_session')
|
198
|
-
self.last_session = attributes[:'last_session']
|
199
|
-
end
|
200
|
-
|
201
|
-
if attributes.key?(:'first_session')
|
202
|
-
self.first_session = attributes[:'first_session']
|
203
|
-
end
|
204
|
-
|
205
|
-
if attributes.key?(:'session_count')
|
206
|
-
self.session_count = attributes[:'session_count']
|
207
|
-
end
|
208
|
-
|
209
|
-
if attributes.key?(:'session_time')
|
210
|
-
self.session_time = attributes[:'session_time']
|
211
|
-
end
|
212
|
-
|
213
|
-
if attributes.key?(:'amount_spent')
|
214
|
-
self.amount_spent = attributes[:'amount_spent']
|
215
|
-
end
|
216
|
-
|
217
|
-
if attributes.key?(:'bought_sku')
|
218
|
-
self.bought_sku = attributes[:'bought_sku']
|
219
|
-
end
|
220
|
-
|
221
|
-
if attributes.key?(:'tag')
|
222
|
-
self.tag = attributes[:'tag']
|
223
|
-
end
|
224
|
-
|
225
|
-
if attributes.key?(:'language')
|
226
|
-
self.language = attributes[:'language']
|
227
|
-
end
|
228
|
-
|
229
|
-
if attributes.key?(:'app_version')
|
230
|
-
self.app_version = attributes[:'app_version']
|
231
|
-
end
|
232
|
-
|
233
|
-
if attributes.key?(:'location')
|
234
|
-
self.location = attributes[:'location']
|
235
|
-
end
|
236
|
-
|
237
|
-
if attributes.key?(:'email')
|
238
|
-
self.email = attributes[:'email']
|
239
|
-
end
|
240
|
-
|
241
|
-
if attributes.key?(:'country')
|
242
|
-
self.country = attributes[:'country']
|
243
|
-
end
|
244
|
-
|
245
169
|
if attributes.key?(:'include_player_ids')
|
246
170
|
if (value = attributes[:'include_player_ids']).is_a?(Array)
|
247
171
|
self.include_player_ids = value
|
@@ -301,6 +225,14 @@ module OneSignal
|
|
301
225
|
self.include_android_reg_ids = value
|
302
226
|
end
|
303
227
|
end
|
228
|
+
|
229
|
+
if attributes.key?(:'include_aliases')
|
230
|
+
self.include_aliases = attributes[:'include_aliases']
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'target_channel')
|
234
|
+
self.target_channel = attributes[:'target_channel']
|
235
|
+
end
|
304
236
|
end
|
305
237
|
|
306
238
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -313,6 +245,8 @@ module OneSignal
|
|
313
245
|
# Check to see if the all the properties in the model are valid
|
314
246
|
# @return true if the model is valid
|
315
247
|
def valid?
|
248
|
+
target_channel_validator = EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
249
|
+
return false unless target_channel_validator.valid?(@target_channel)
|
316
250
|
_any_of_found = false
|
317
251
|
self.class.openapi_any_of.each do |_class|
|
318
252
|
_any_of = OneSignal.const_get(_class).build_from_hash(self.to_hash)
|
@@ -328,6 +262,16 @@ module OneSignal
|
|
328
262
|
true
|
329
263
|
end
|
330
264
|
|
265
|
+
# Custom attribute writer method checking allowed values (enum).
|
266
|
+
# @param [Object] target_channel Object to be assigned
|
267
|
+
def target_channel=(target_channel)
|
268
|
+
validator = EnumAttributeValidator.new('String', ["push", "email", "sms"])
|
269
|
+
unless validator.valid?(target_channel)
|
270
|
+
fail ArgumentError, "invalid value for \"target_channel\", must be one of #{validator.allowable_values}."
|
271
|
+
end
|
272
|
+
@target_channel = target_channel
|
273
|
+
end
|
274
|
+
|
331
275
|
# Checks equality by comparing each attribute.
|
332
276
|
# @param [Object] Object to be compared
|
333
277
|
def ==(o)
|
@@ -335,18 +279,6 @@ module OneSignal
|
|
335
279
|
self.class == o.class &&
|
336
280
|
included_segments == o.included_segments &&
|
337
281
|
excluded_segments == o.excluded_segments &&
|
338
|
-
last_session == o.last_session &&
|
339
|
-
first_session == o.first_session &&
|
340
|
-
session_count == o.session_count &&
|
341
|
-
session_time == o.session_time &&
|
342
|
-
amount_spent == o.amount_spent &&
|
343
|
-
bought_sku == o.bought_sku &&
|
344
|
-
tag == o.tag &&
|
345
|
-
language == o.language &&
|
346
|
-
app_version == o.app_version &&
|
347
|
-
location == o.location &&
|
348
|
-
email == o.email &&
|
349
|
-
country == o.country &&
|
350
282
|
include_player_ids == o.include_player_ids &&
|
351
283
|
include_external_user_ids == o.include_external_user_ids &&
|
352
284
|
include_email_tokens == o.include_email_tokens &&
|
@@ -356,7 +288,9 @@ module OneSignal
|
|
356
288
|
include_amazon_reg_ids == o.include_amazon_reg_ids &&
|
357
289
|
include_chrome_reg_ids == o.include_chrome_reg_ids &&
|
358
290
|
include_chrome_web_reg_ids == o.include_chrome_web_reg_ids &&
|
359
|
-
include_android_reg_ids == o.include_android_reg_ids
|
291
|
+
include_android_reg_ids == o.include_android_reg_ids &&
|
292
|
+
include_aliases == o.include_aliases &&
|
293
|
+
target_channel == o.target_channel
|
360
294
|
end
|
361
295
|
|
362
296
|
# @see the `==` method
|
@@ -368,7 +302,7 @@ module OneSignal
|
|
368
302
|
# Calculates hash code according to all attributes.
|
369
303
|
# @return [Integer] Hash code
|
370
304
|
def hash
|
371
|
-
[included_segments, excluded_segments,
|
305
|
+
[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].hash
|
372
306
|
end
|
373
307
|
|
374
308
|
# Builds the object from hash
|