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
data/lib/onesignal/api_client.rb
CHANGED
@@ -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
|
|
@@ -90,10 +90,11 @@ module OneSignal
|
|
90
90
|
url = build_request_url(path, opts)
|
91
91
|
http_method = http_method.to_sym.downcase
|
92
92
|
|
93
|
+
opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=2.2.0'
|
93
94
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
94
|
-
header_params['OS-Usage-Data'] = 'kind=sdk, name=onesignal-ruby, version=1.0.0'
|
95
95
|
query_params = opts[:query_params] || {}
|
96
96
|
form_params = opts[:form_params] || {}
|
97
|
+
follow_location = opts[:follow_location] || true
|
97
98
|
|
98
99
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
99
100
|
|
@@ -110,7 +111,8 @@ module OneSignal
|
|
110
111
|
:ssl_verifyhost => _verify_ssl_host,
|
111
112
|
:sslcert => @config.cert_file,
|
112
113
|
:sslkey => @config.key_file,
|
113
|
-
:verbose => @config.debugging
|
114
|
+
:verbose => @config.debugging,
|
115
|
+
:followlocation => follow_location
|
114
116
|
}
|
115
117
|
|
116
118
|
# set custom cert, if provided
|
@@ -297,7 +299,7 @@ module OneSignal
|
|
297
299
|
@config.base_url(opts[:operation]) + path
|
298
300
|
end
|
299
301
|
|
300
|
-
# Update
|
302
|
+
# Update header and query params based on authentication settings.
|
301
303
|
#
|
302
304
|
# @param [Hash] header_params Header parameters
|
303
305
|
# @param [Hash] query_params Query parameters
|
@@ -336,8 +338,8 @@ module OneSignal
|
|
336
338
|
# @param [Array] content_types array for Content-Type
|
337
339
|
# @return [String] the Content-Type header (e.g. application/json)
|
338
340
|
def select_header_content_type(content_types)
|
339
|
-
#
|
340
|
-
return
|
341
|
+
# return nil by default
|
342
|
+
return if content_types.nil? || content_types.empty?
|
341
343
|
# use JSON when present, otherwise use the first one
|
342
344
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
343
345
|
json_content_type || content_types.first
|
data/lib/onesignal/api_error.rb
CHANGED
@@ -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
|
|
@@ -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
|
|
@@ -110,14 +110,15 @@ module OneSignal
|
|
110
110
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
111
111
|
attr_accessor :params_encoding
|
112
112
|
|
113
|
+
|
113
114
|
attr_accessor :inject_format
|
114
115
|
|
115
116
|
attr_accessor :force_ending_format
|
116
117
|
|
117
118
|
def initialize
|
118
119
|
@scheme = 'https'
|
119
|
-
@host = 'onesignal.com'
|
120
|
-
@base_path = '
|
120
|
+
@host = 'api.onesignal.com'
|
121
|
+
@base_path = ''
|
121
122
|
@server_index = 0
|
122
123
|
@server_operation_index = {}
|
123
124
|
@server_variables = {}
|
@@ -126,9 +127,10 @@ module OneSignal
|
|
126
127
|
@client_side_validation = true
|
127
128
|
@verify_ssl = true
|
128
129
|
@verify_ssl_host = true
|
129
|
-
@params_encoding = nil
|
130
130
|
@cert_file = nil
|
131
131
|
@key_file = nil
|
132
|
+
@timeout = 0
|
133
|
+
@params_encoding = nil
|
132
134
|
@debugging = false
|
133
135
|
@inject_format = false
|
134
136
|
@force_ending_format = false
|
@@ -178,14 +180,14 @@ module OneSignal
|
|
178
180
|
type: 'bearer',
|
179
181
|
in: 'header',
|
180
182
|
key: 'Authorization',
|
181
|
-
value: "
|
183
|
+
value: "Key token=\"#{ app_key }\""
|
182
184
|
},
|
183
185
|
'user_key' =>
|
184
186
|
{
|
185
187
|
type: 'bearer',
|
186
188
|
in: 'header',
|
187
189
|
key: 'Authorization',
|
188
|
-
value: "
|
190
|
+
value: "Key token=\"#{ user_key }\""
|
189
191
|
},
|
190
192
|
}
|
191
193
|
end
|
@@ -194,7 +196,7 @@ module OneSignal
|
|
194
196
|
def server_settings
|
195
197
|
[
|
196
198
|
{
|
197
|
-
url: "https://onesignal.com
|
199
|
+
url: "https://api.onesignal.com",
|
198
200
|
description: "No description provided",
|
199
201
|
}
|
200
202
|
]
|
@@ -238,5 +240,6 @@ module OneSignal
|
|
238
240
|
|
239
241
|
url
|
240
242
|
end
|
243
|
+
|
241
244
|
end
|
242
245
|
end
|
data/lib/onesignal/models/app.rb
CHANGED
@@ -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
|
|
@@ -65,6 +65,18 @@ module OneSignal
|
|
65
65
|
# Safari: Password for safari_apns_p12 file
|
66
66
|
attr_accessor :safari_apns_p12_password
|
67
67
|
|
68
|
+
# iOS: Required if using p8. Unique identifier for the p8 authentication key.
|
69
|
+
attr_accessor :apns_key_id
|
70
|
+
|
71
|
+
# iOS: Required if using p8. Team ID generated by Apple for your developer account.
|
72
|
+
attr_accessor :apns_team_id
|
73
|
+
|
74
|
+
# iOS: Required if using p8. Bundle ID for your app in the Apple ecosystem.
|
75
|
+
attr_accessor :apns_bundle_id
|
76
|
+
|
77
|
+
# iOS: Required if using p8. Base64 encoded p8 key
|
78
|
+
attr_accessor :apns_p8
|
79
|
+
|
68
80
|
# Safari (Recommended): The hostname to your website including http(s)://
|
69
81
|
attr_accessor :safari_site_origin
|
70
82
|
|
@@ -136,6 +148,10 @@ module OneSignal
|
|
136
148
|
:'safari_apns_certificates' => :'safari_apns_certificates',
|
137
149
|
:'safari_apns_p12' => :'safari_apns_p12',
|
138
150
|
:'safari_apns_p12_password' => :'safari_apns_p12_password',
|
151
|
+
:'apns_key_id' => :'apns_key_id',
|
152
|
+
:'apns_team_id' => :'apns_team_id',
|
153
|
+
:'apns_bundle_id' => :'apns_bundle_id',
|
154
|
+
:'apns_p8' => :'apns_p8',
|
139
155
|
:'safari_site_origin' => :'safari_site_origin',
|
140
156
|
:'safari_push_id' => :'safari_push_id',
|
141
157
|
:'safari_icon_16_16' => :'safari_icon_16_16',
|
@@ -177,6 +193,10 @@ module OneSignal
|
|
177
193
|
:'safari_apns_certificates' => :'String',
|
178
194
|
:'safari_apns_p12' => :'String',
|
179
195
|
:'safari_apns_p12_password' => :'String',
|
196
|
+
:'apns_key_id' => :'String',
|
197
|
+
:'apns_team_id' => :'String',
|
198
|
+
:'apns_bundle_id' => :'String',
|
199
|
+
:'apns_p8' => :'String',
|
180
200
|
:'safari_site_origin' => :'String',
|
181
201
|
:'safari_push_id' => :'String',
|
182
202
|
:'safari_icon_16_16' => :'String',
|
@@ -194,6 +214,21 @@ module OneSignal
|
|
194
214
|
# List of attributes with nullable: true
|
195
215
|
def self.openapi_nullable
|
196
216
|
Set.new([
|
217
|
+
:'gcm_key',
|
218
|
+
:'chrome_web_origin',
|
219
|
+
:'chrome_key',
|
220
|
+
:'chrome_web_default_notification_icon',
|
221
|
+
:'chrome_web_sub_domain',
|
222
|
+
:'apns_env',
|
223
|
+
:'apns_certificates',
|
224
|
+
:'apns_key_id',
|
225
|
+
:'apns_team_id',
|
226
|
+
:'apns_bundle_id',
|
227
|
+
:'apns_p8',
|
228
|
+
:'safari_site_origin',
|
229
|
+
:'safari_push_id',
|
230
|
+
:'site_name',
|
231
|
+
:'basic_auth_key',
|
197
232
|
])
|
198
233
|
end
|
199
234
|
|
@@ -288,6 +323,22 @@ module OneSignal
|
|
288
323
|
self.safari_apns_p12_password = attributes[:'safari_apns_p12_password']
|
289
324
|
end
|
290
325
|
|
326
|
+
if attributes.key?(:'apns_key_id')
|
327
|
+
self.apns_key_id = attributes[:'apns_key_id']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.key?(:'apns_team_id')
|
331
|
+
self.apns_team_id = attributes[:'apns_team_id']
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes.key?(:'apns_bundle_id')
|
335
|
+
self.apns_bundle_id = attributes[:'apns_bundle_id']
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes.key?(:'apns_p8')
|
339
|
+
self.apns_p8 = attributes[:'apns_p8']
|
340
|
+
end
|
341
|
+
|
291
342
|
if attributes.key?(:'safari_site_origin')
|
292
343
|
self.safari_site_origin = attributes[:'safari_site_origin']
|
293
344
|
end
|
@@ -337,17 +388,12 @@ module OneSignal
|
|
337
388
|
# @return Array for valid properties with the reasons
|
338
389
|
def list_invalid_properties
|
339
390
|
invalid_properties = Array.new
|
340
|
-
if @id.nil?
|
341
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
342
|
-
end
|
343
|
-
|
344
391
|
invalid_properties
|
345
392
|
end
|
346
393
|
|
347
394
|
# Check to see if the all the properties in the model are valid
|
348
395
|
# @return true if the model is valid
|
349
396
|
def valid?
|
350
|
-
return false if @id.nil?
|
351
397
|
apns_env_validator = EnumAttributeValidator.new('String', ["sandbox", "production"])
|
352
398
|
return false unless apns_env_validator.valid?(@apns_env)
|
353
399
|
true
|
@@ -387,6 +433,10 @@ module OneSignal
|
|
387
433
|
safari_apns_certificates == o.safari_apns_certificates &&
|
388
434
|
safari_apns_p12 == o.safari_apns_p12 &&
|
389
435
|
safari_apns_p12_password == o.safari_apns_p12_password &&
|
436
|
+
apns_key_id == o.apns_key_id &&
|
437
|
+
apns_team_id == o.apns_team_id &&
|
438
|
+
apns_bundle_id == o.apns_bundle_id &&
|
439
|
+
apns_p8 == o.apns_p8 &&
|
390
440
|
safari_site_origin == o.safari_site_origin &&
|
391
441
|
safari_push_id == o.safari_push_id &&
|
392
442
|
safari_icon_16_16 == o.safari_icon_16_16 &&
|
@@ -409,7 +459,7 @@ module OneSignal
|
|
409
459
|
# Calculates hash code according to all attributes.
|
410
460
|
# @return [Integer] Hash code
|
411
461
|
def hash
|
412
|
-
[id, name, players, messageable_players, updated_at, created_at, android_gcm_sender_id, gcm_key, chrome_web_origin, chrome_key, chrome_web_default_notification_icon, chrome_web_sub_domain, apns_env, apns_p12, apns_p12_password, apns_certificates, safari_apns_certificates, safari_apns_p12, safari_apns_p12_password, safari_site_origin, safari_push_id, safari_icon_16_16, safari_icon_32_32, safari_icon_64_64, safari_icon_128_128, safari_icon_256_256, site_name, basic_auth_key, organization_id, additional_data_is_root_payload].hash
|
462
|
+
[id, name, players, messageable_players, updated_at, created_at, android_gcm_sender_id, gcm_key, chrome_web_origin, chrome_key, chrome_web_default_notification_icon, chrome_web_sub_domain, apns_env, apns_p12, apns_p12_password, apns_certificates, safari_apns_certificates, safari_apns_p12, safari_apns_p12_password, apns_key_id, apns_team_id, apns_bundle_id, apns_p8, safari_site_origin, safari_push_id, safari_icon_16_16, safari_icon_32_32, safari_icon_64_64, safari_icon_128_128, safari_icon_256_256, site_name, basic_auth_key, organization_id, additional_data_is_root_payload].hash
|
413
463
|
end
|
414
464
|
|
415
465
|
# Builds the object from hash
|
@@ -424,6 +474,7 @@ module OneSignal
|
|
424
474
|
# @return [Object] Returns the model itself
|
425
475
|
def build_from_hash(attributes)
|
426
476
|
return nil unless attributes.is_a?(Hash)
|
477
|
+
attributes = attributes.transform_keys(&:to_sym)
|
427
478
|
self.class.openapi_types.each_pair do |key, type|
|
428
479
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
429
480
|
self.send("#{key}=", nil)
|