notifo-io 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +245 -60
- data/docs/AddContributorDto.md +1 -1
- data/docs/AdminProfileDto.md +7 -0
- data/docs/AppsApi.md +1 -1
- data/docs/ChannelSendInfoDto.md +4 -0
- data/docs/ConfigsApi.md +1 -1
- data/docs/DiagnosticsApi.md +85 -0
- data/docs/EmailTemplatesApi.md +26 -26
- data/docs/EventDto.md +0 -2
- data/docs/EventsApi.md +1 -1
- data/docs/InfoDto.md +7 -0
- data/docs/IntegrationPropertyDto.md +1 -1
- data/docs/LogsApi.md +1 -1
- data/docs/MediaApi.md +154 -4
- data/docs/MessagingTemplatesApi.md +26 -26
- data/docs/MobilePushApi.md +1 -1
- data/docs/MobilePushTokenDto.md +1 -0
- data/docs/MobilePushTokenDto2.md +1 -0
- data/docs/NotificationsApi.md +131 -7
- data/docs/PingApi.md +85 -2
- data/docs/{IntegrationPropertyType.md → PropertyType.md} +1 -1
- data/docs/PublishDto.md +2 -0
- data/docs/RegisterMobileTokenDto.md +1 -0
- data/docs/SendConfiguration.md +6 -0
- data/docs/SmsTemplatesApi.md +26 -26
- data/docs/SystemUsersApi.md +5 -4
- data/docs/TemplatesApi.md +1 -1
- data/docs/TopicsApi.md +6 -6
- data/docs/TrackNotificationDto.md +1 -0
- data/docs/UserApi.md +41 -1
- data/docs/UserDto.md +1 -2
- data/docs/UserNotificationBaseDto.md +1 -0
- data/docs/UserNotificationDetailsDto.md +1 -0
- data/docs/UserNotificationDto.md +1 -0
- data/docs/UsersApi.md +101 -6
- data/docs/WebPushSubscriptionDto.md +7 -0
- data/lib/notifo/api/apps_api.rb +1 -1
- data/lib/notifo/api/configs_api.rb +1 -1
- data/lib/notifo/api/diagnostics_api.rb +116 -0
- data/lib/notifo/api/email_templates_api.rb +46 -46
- data/lib/notifo/api/events_api.rb +1 -1
- data/lib/notifo/api/logs_api.rb +1 -1
- data/lib/notifo/api/media_api.rb +197 -2
- data/lib/notifo/api/messaging_templates_api.rb +46 -46
- data/lib/notifo/api/mobile_push_api.rb +1 -1
- data/lib/notifo/api/notifications_api.rb +150 -3
- data/lib/notifo/api/ping_api.rb +102 -2
- data/lib/notifo/api/sms_templates_api.rb +46 -46
- data/lib/notifo/api/system_users_api.rb +6 -6
- data/lib/notifo/api/templates_api.rb +1 -1
- data/lib/notifo/api/topics_api.rb +10 -10
- data/lib/notifo/api/user_api.rb +49 -1
- data/lib/notifo/api/users_api.rb +139 -7
- data/lib/notifo/api_client.rb +1 -1
- data/lib/notifo/api_error.rb +1 -1
- data/lib/notifo/configuration.rb +3 -3
- data/lib/notifo/models/add_allowed_topic_dto.rb +1 -1
- data/lib/notifo/models/add_contributor_dto.rb +2 -6
- data/lib/notifo/models/admin_profile_dto.rb +208 -0
- data/lib/notifo/models/app_contributor_dto.rb +1 -1
- data/lib/notifo/models/app_details_dto.rb +1 -1
- data/lib/notifo/models/app_dto.rb +1 -1
- data/lib/notifo/models/app_id_media_body.rb +1 -1
- data/lib/notifo/models/channel_condition.rb +1 -1
- data/lib/notifo/models/channel_send.rb +1 -1
- data/lib/notifo/models/channel_send_info_dto.rb +48 -6
- data/lib/notifo/models/channel_setting_dto.rb +1 -1
- data/lib/notifo/models/channel_template_details_dto_of_email_template_dto.rb +1 -1
- data/lib/notifo/models/channel_template_details_dto_of_messaging_template_dto.rb +1 -1
- data/lib/notifo/models/channel_template_details_dto_of_sms_template_dto.rb +1 -1
- data/lib/notifo/models/channel_template_dto.rb +1 -1
- data/lib/notifo/models/configured_integration_dto.rb +1 -1
- data/lib/notifo/models/configured_integrations_dto.rb +1 -1
- data/lib/notifo/models/confirm_mode.rb +1 -1
- data/lib/notifo/models/create_channel_template_dto.rb +1 -1
- data/lib/notifo/models/create_channel_template_language_dto.rb +1 -1
- data/lib/notifo/models/create_integration_dto.rb +1 -1
- data/lib/notifo/models/create_system_user_dto.rb +1 -1
- data/lib/notifo/models/email_formatting_error.rb +1 -1
- data/lib/notifo/models/email_preview_dto.rb +1 -1
- data/lib/notifo/models/email_preview_request_dto.rb +1 -1
- data/lib/notifo/models/email_preview_type.rb +1 -1
- data/lib/notifo/models/email_template_dto.rb +1 -1
- data/lib/notifo/models/email_template_type.rb +1 -1
- data/lib/notifo/models/error_dto.rb +1 -1
- data/lib/notifo/models/event_dto.rb +2 -24
- data/lib/notifo/models/handled_info_dto.rb +1 -1
- data/lib/notifo/models/info_dto.rb +212 -0
- data/lib/notifo/models/integration_created_dto.rb +1 -1
- data/lib/notifo/models/integration_definition_dto.rb +1 -1
- data/lib/notifo/models/integration_property_dto.rb +1 -1
- data/lib/notifo/models/integration_status.rb +1 -1
- data/lib/notifo/models/iso_day_of_week.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_channel_template_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_event_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_media_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_mobile_push_token_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_system_user_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_template_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_topic_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_user_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_user_notification_details_dto.rb +1 -1
- data/lib/notifo/models/list_response_dto_of_user_notification_dto.rb +1 -1
- data/lib/notifo/models/localized_text.rb +1 -1
- data/lib/notifo/models/log_entry_dto.rb +1 -1
- data/lib/notifo/models/media_dto.rb +1 -1
- data/lib/notifo/models/media_metadata.rb +1 -1
- data/lib/notifo/models/media_type.rb +1 -1
- data/lib/notifo/models/messaging_template_dto.rb +1 -1
- data/lib/notifo/models/mobile_device_type.rb +1 -1
- data/lib/notifo/models/mobile_push_token_dto.rb +13 -2
- data/lib/notifo/models/mobile_push_token_dto2.rb +16 -5
- data/lib/notifo/models/notification_formatting_dto.rb +1 -1
- data/lib/notifo/models/notification_properties.rb +1 -1
- data/lib/notifo/models/process_status.rb +1 -1
- data/lib/notifo/models/profile_dto.rb +1 -1
- data/lib/notifo/models/{integration_property_type.rb → property_type.rb} +4 -4
- data/lib/notifo/models/publish_dto.rb +26 -2
- data/lib/notifo/models/publish_many_dto.rb +1 -1
- data/lib/notifo/models/register_mobile_token_dto.rb +16 -5
- data/lib/notifo/models/resize_mode.rb +1 -1
- data/lib/notifo/models/scheduling_dto.rb +1 -1
- data/lib/notifo/models/scheduling_type.rb +1 -1
- data/lib/notifo/models/send_configuration.rb +201 -0
- data/lib/notifo/models/sms_template_dto.rb +1 -1
- data/lib/notifo/models/subscribe_dto.rb +1 -1
- data/lib/notifo/models/subscribe_many_dto.rb +1 -1
- data/lib/notifo/models/subscription_dto.rb +1 -1
- data/lib/notifo/models/system_user_dto.rb +1 -1
- data/lib/notifo/models/template_dto.rb +1 -1
- data/lib/notifo/models/topic_channel.rb +2 -2
- data/lib/notifo/models/topic_dto.rb +1 -1
- data/lib/notifo/models/topic_query_scope.rb +1 -1
- data/lib/notifo/models/track_notification_dto.rb +12 -2
- data/lib/notifo/models/update_channel_template_dto_of_email_template_dto.rb +1 -1
- data/lib/notifo/models/update_channel_template_dto_of_messaging_template_dto.rb +1 -1
- data/lib/notifo/models/update_channel_template_dto_of_sms_template_dto.rb +1 -1
- data/lib/notifo/models/update_integration_dto.rb +1 -1
- data/lib/notifo/models/update_profile_dto.rb +1 -1
- data/lib/notifo/models/update_system_user_dto.rb +1 -1
- data/lib/notifo/models/upsert_app_dto.rb +1 -1
- data/lib/notifo/models/upsert_template_dto.rb +1 -1
- data/lib/notifo/models/upsert_templates_dto.rb +1 -1
- data/lib/notifo/models/upsert_topic_dto.rb +1 -1
- data/lib/notifo/models/upsert_topics_dto.rb +1 -1
- data/lib/notifo/models/upsert_user_dto.rb +1 -1
- data/lib/notifo/models/upsert_users_dto.rb +1 -1
- data/lib/notifo/models/user_dto.rb +19 -32
- data/lib/notifo/models/user_notification_base_dto.rb +13 -2
- data/lib/notifo/models/user_notification_channel_dto.rb +1 -1
- data/lib/notifo/models/user_notification_details_dto.rb +13 -2
- data/lib/notifo/models/user_notification_dto.rb +13 -2
- data/lib/notifo/models/user_property_dto.rb +1 -1
- data/lib/notifo/models/user_topic_dto.rb +1 -1
- data/lib/notifo/models/web_push_subscription_dto.rb +212 -0
- data/lib/notifo/version.rb +1 -1
- data/lib/notifo.rb +7 -2
- data/notifo.gemspec +2 -3
- data/spec/api/apps_api_spec.rb +1 -1
- data/spec/api/configs_api_spec.rb +1 -1
- data/spec/api/diagnostics_api_spec.rb +54 -0
- data/spec/api/email_templates_api_spec.rb +6 -6
- data/spec/api/events_api_spec.rb +1 -1
- data/spec/api/logs_api_spec.rb +1 -1
- data/spec/api/media_api_spec.rb +52 -1
- data/spec/api/messaging_templates_api_spec.rb +6 -6
- data/spec/api/mobile_push_api_spec.rb +1 -1
- data/spec/api/notifications_api_spec.rb +38 -2
- data/spec/api/ping_api_spec.rb +23 -1
- data/spec/api/sms_templates_api_spec.rb +6 -6
- data/spec/api/system_users_api_spec.rb +2 -2
- data/spec/api/templates_api_spec.rb +1 -1
- data/spec/api/topics_api_spec.rb +2 -2
- data/spec/api/user_api_spec.rb +11 -1
- data/spec/api/users_api_spec.rb +28 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/add_allowed_topic_dto_spec.rb +1 -1
- data/spec/models/add_contributor_dto_spec.rb +1 -1
- data/spec/models/admin_profile_dto_spec.rb +40 -0
- data/spec/models/app_contributor_dto_spec.rb +1 -1
- data/spec/models/app_details_dto_spec.rb +1 -1
- data/spec/models/app_dto_spec.rb +1 -1
- data/spec/models/app_id_media_body_spec.rb +1 -1
- data/spec/models/channel_condition_spec.rb +1 -1
- data/spec/models/channel_send_info_dto_spec.rb +25 -1
- data/spec/models/channel_send_spec.rb +1 -1
- data/spec/models/channel_setting_dto_spec.rb +1 -1
- data/spec/models/channel_template_details_dto_of_email_template_dto_spec.rb +1 -1
- data/spec/models/channel_template_details_dto_of_messaging_template_dto_spec.rb +1 -1
- data/spec/models/channel_template_details_dto_of_sms_template_dto_spec.rb +1 -1
- data/spec/models/channel_template_dto_spec.rb +1 -1
- data/spec/models/configured_integration_dto_spec.rb +1 -1
- data/spec/models/configured_integrations_dto_spec.rb +1 -1
- data/spec/models/confirm_mode_spec.rb +1 -1
- data/spec/models/create_channel_template_dto_spec.rb +1 -1
- data/spec/models/create_channel_template_language_dto_spec.rb +1 -1
- data/spec/models/create_integration_dto_spec.rb +1 -1
- data/spec/models/create_system_user_dto_spec.rb +1 -1
- data/spec/models/email_formatting_error_spec.rb +1 -1
- data/spec/models/email_preview_dto_spec.rb +1 -1
- data/spec/models/email_preview_request_dto_spec.rb +1 -1
- data/spec/models/email_preview_type_spec.rb +1 -1
- data/spec/models/email_template_dto_spec.rb +1 -1
- data/spec/models/email_template_type_spec.rb +1 -1
- data/spec/models/error_dto_spec.rb +1 -1
- data/spec/models/event_dto_spec.rb +1 -13
- data/spec/models/handled_info_dto_spec.rb +1 -1
- data/spec/models/info_dto_spec.rb +40 -0
- data/spec/models/integration_created_dto_spec.rb +1 -1
- data/spec/models/integration_definition_dto_spec.rb +1 -1
- data/spec/models/integration_property_dto_spec.rb +1 -1
- data/spec/models/integration_status_spec.rb +1 -1
- data/spec/models/iso_day_of_week_spec.rb +1 -1
- data/spec/models/list_response_dto_of_channel_template_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_event_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_media_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_mobile_push_token_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_system_user_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_template_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_user_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_user_notification_details_dto_spec.rb +1 -1
- data/spec/models/list_response_dto_of_user_notification_dto_spec.rb +1 -1
- data/spec/models/localized_text_spec.rb +1 -1
- data/spec/models/log_entry_dto_spec.rb +1 -1
- data/spec/models/media_dto_spec.rb +1 -1
- data/spec/models/media_metadata_spec.rb +1 -1
- data/spec/models/media_type_spec.rb +1 -1
- data/spec/models/messaging_template_dto_spec.rb +1 -1
- data/spec/models/mobile_device_type_spec.rb +1 -1
- data/spec/models/mobile_push_token_dto2_spec.rb +7 -1
- data/spec/models/mobile_push_token_dto_spec.rb +7 -1
- data/spec/models/notification_formatting_dto_spec.rb +1 -1
- data/spec/models/notification_properties_spec.rb +1 -1
- data/spec/models/process_status_spec.rb +1 -1
- data/spec/models/profile_dto_spec.rb +1 -1
- data/spec/models/{integration_property_type_spec.rb → property_type_spec.rb} +7 -7
- data/spec/models/publish_dto_spec.rb +13 -1
- data/spec/models/publish_many_dto_spec.rb +1 -1
- data/spec/models/register_mobile_token_dto_spec.rb +7 -1
- data/spec/models/resize_mode_spec.rb +1 -1
- data/spec/models/scheduling_dto_spec.rb +1 -1
- data/spec/models/scheduling_type_spec.rb +1 -1
- data/spec/models/send_configuration_spec.rb +34 -0
- data/spec/models/sms_template_dto_spec.rb +1 -1
- data/spec/models/subscribe_dto_spec.rb +1 -1
- data/spec/models/subscribe_many_dto_spec.rb +1 -1
- data/spec/models/subscription_dto_spec.rb +1 -1
- data/spec/models/system_user_dto_spec.rb +1 -1
- data/spec/models/template_dto_spec.rb +1 -1
- data/spec/models/topic_channel_spec.rb +1 -1
- data/spec/models/topic_dto_spec.rb +1 -1
- data/spec/models/topic_query_scope_spec.rb +1 -1
- data/spec/models/track_notification_dto_spec.rb +7 -1
- data/spec/models/update_channel_template_dto_of_email_template_dto_spec.rb +1 -1
- data/spec/models/update_channel_template_dto_of_messaging_template_dto_spec.rb +1 -1
- data/spec/models/update_channel_template_dto_of_sms_template_dto_spec.rb +1 -1
- data/spec/models/update_integration_dto_spec.rb +1 -1
- data/spec/models/update_profile_dto_spec.rb +1 -1
- data/spec/models/update_system_user_dto_spec.rb +1 -1
- data/spec/models/upsert_app_dto_spec.rb +1 -1
- data/spec/models/upsert_template_dto_spec.rb +1 -1
- data/spec/models/upsert_templates_dto_spec.rb +1 -1
- data/spec/models/upsert_topic_dto_spec.rb +1 -1
- data/spec/models/upsert_topics_dto_spec.rb +1 -1
- data/spec/models/upsert_user_dto_spec.rb +1 -1
- data/spec/models/upsert_users_dto_spec.rb +1 -1
- data/spec/models/user_dto_spec.rb +7 -13
- data/spec/models/user_notification_base_dto_spec.rb +7 -1
- data/spec/models/user_notification_channel_dto_spec.rb +1 -1
- data/spec/models/user_notification_details_dto_spec.rb +7 -1
- data/spec/models/user_notification_dto_spec.rb +7 -1
- data/spec/models/user_property_dto_spec.rb +1 -1
- data/spec/models/user_topic_dto_spec.rb +1 -1
- data/spec/models/web_push_subscription_dto_spec.rb +40 -0
- data/spec/spec_helper.rb +1 -1
- metadata +27 -7
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.
|
9
|
+
Swagger Codegen version: 3.0.36
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
@@ -28,12 +28,6 @@ module Notifo
|
|
28
28
|
# Additional user defined data.
|
29
29
|
attr_accessor :data
|
30
30
|
|
31
|
-
# The optional name of the Email template.
|
32
|
-
attr_accessor :email_template
|
33
|
-
|
34
|
-
# The optional name of the SMS template.
|
35
|
-
attr_accessor :sms_template
|
36
|
-
|
37
31
|
# The time when the event has been created.
|
38
32
|
attr_accessor :created
|
39
33
|
|
@@ -64,8 +58,6 @@ module Notifo
|
|
64
58
|
:'creator_id' => :'creatorId',
|
65
59
|
:'display_name' => :'displayName',
|
66
60
|
:'data' => :'data',
|
67
|
-
:'email_template' => :'emailTemplate',
|
68
|
-
:'sms_template' => :'smsTemplate',
|
69
61
|
:'created' => :'created',
|
70
62
|
:'formatting' => :'formatting',
|
71
63
|
:'settings' => :'settings',
|
@@ -85,8 +77,6 @@ module Notifo
|
|
85
77
|
:'creator_id' => :'Object',
|
86
78
|
:'display_name' => :'Object',
|
87
79
|
:'data' => :'Object',
|
88
|
-
:'email_template' => :'Object',
|
89
|
-
:'sms_template' => :'Object',
|
90
80
|
:'created' => :'Object',
|
91
81
|
:'formatting' => :'Object',
|
92
82
|
:'settings' => :'Object',
|
@@ -103,8 +93,6 @@ module Notifo
|
|
103
93
|
Set.new([
|
104
94
|
:'creator_id',
|
105
95
|
:'data',
|
106
|
-
:'email_template',
|
107
|
-
:'sms_template',
|
108
96
|
:'time_to_live_in_seconds'
|
109
97
|
])
|
110
98
|
end
|
@@ -144,14 +132,6 @@ module Notifo
|
|
144
132
|
self.data = attributes[:'data']
|
145
133
|
end
|
146
134
|
|
147
|
-
if attributes.key?(:'email_template')
|
148
|
-
self.email_template = attributes[:'email_template']
|
149
|
-
end
|
150
|
-
|
151
|
-
if attributes.key?(:'sms_template')
|
152
|
-
self.sms_template = attributes[:'sms_template']
|
153
|
-
end
|
154
|
-
|
155
135
|
if attributes.key?(:'created')
|
156
136
|
self.created = attributes[:'created']
|
157
137
|
end
|
@@ -259,8 +239,6 @@ module Notifo
|
|
259
239
|
creator_id == o.creator_id &&
|
260
240
|
display_name == o.display_name &&
|
261
241
|
data == o.data &&
|
262
|
-
email_template == o.email_template &&
|
263
|
-
sms_template == o.sms_template &&
|
264
242
|
created == o.created &&
|
265
243
|
formatting == o.formatting &&
|
266
244
|
settings == o.settings &&
|
@@ -280,7 +258,7 @@ module Notifo
|
|
280
258
|
# Calculates hash code according to all attributes.
|
281
259
|
# @return [Integer] Hash code
|
282
260
|
def hash
|
283
|
-
[id, topic, creator_id, display_name, data,
|
261
|
+
[id, topic, creator_id, display_name, data, created, formatting, settings, properties, scheduling, counters, silent, time_to_live_in_seconds].hash
|
284
262
|
end
|
285
263
|
|
286
264
|
# Builds the object from hash
|
@@ -0,0 +1,212 @@
|
|
1
|
+
=begin
|
2
|
+
#Notifo API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.36
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module Notifo
|
15
|
+
class InfoDto
|
16
|
+
# The actual version.
|
17
|
+
attr_accessor :version
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'version' => :'version'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'version' => :'Object'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::InfoDto` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::InfoDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'version')
|
55
|
+
self.version = attributes[:'version']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
if @version.nil?
|
64
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
65
|
+
end
|
66
|
+
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return false if @version.nil?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
version == o.version
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[version].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
|
+
self.send("#{key}=", nil)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
Notifo.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end end
|
212
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.
|
9
|
+
Swagger Codegen version: 3.0.36
|
10
10
|
=end
|
11
11
|
|
12
12
|
require 'date'
|
@@ -18,6 +18,9 @@ module Notifo
|
|
18
18
|
|
19
19
|
attr_accessor :device_type
|
20
20
|
|
21
|
+
# A unique identifier for the device.
|
22
|
+
attr_accessor :device_identifier
|
23
|
+
|
21
24
|
# The last time the device was woken up.
|
22
25
|
attr_accessor :last_wakeup
|
23
26
|
|
@@ -26,6 +29,7 @@ module Notifo
|
|
26
29
|
{
|
27
30
|
:'token' => :'token',
|
28
31
|
:'device_type' => :'deviceType',
|
32
|
+
:'device_identifier' => :'deviceIdentifier',
|
29
33
|
:'last_wakeup' => :'lastWakeup'
|
30
34
|
}
|
31
35
|
end
|
@@ -35,6 +39,7 @@ module Notifo
|
|
35
39
|
{
|
36
40
|
:'token' => :'Object',
|
37
41
|
:'device_type' => :'Object',
|
42
|
+
:'device_identifier' => :'Object',
|
38
43
|
:'last_wakeup' => :'Object'
|
39
44
|
}
|
40
45
|
end
|
@@ -42,6 +47,7 @@ module Notifo
|
|
42
47
|
# List of attributes with nullable: true
|
43
48
|
def self.openapi_nullable
|
44
49
|
Set.new([
|
50
|
+
:'device_identifier',
|
45
51
|
:'last_wakeup'
|
46
52
|
])
|
47
53
|
end
|
@@ -69,6 +75,10 @@ module Notifo
|
|
69
75
|
self.device_type = attributes[:'device_type']
|
70
76
|
end
|
71
77
|
|
78
|
+
if attributes.key?(:'device_identifier')
|
79
|
+
self.device_identifier = attributes[:'device_identifier']
|
80
|
+
end
|
81
|
+
|
72
82
|
if attributes.key?(:'last_wakeup')
|
73
83
|
self.last_wakeup = attributes[:'last_wakeup']
|
74
84
|
end
|
@@ -104,6 +114,7 @@ module Notifo
|
|
104
114
|
self.class == o.class &&
|
105
115
|
token == o.token &&
|
106
116
|
device_type == o.device_type &&
|
117
|
+
device_identifier == o.device_identifier &&
|
107
118
|
last_wakeup == o.last_wakeup
|
108
119
|
end
|
109
120
|
|
@@ -116,7 +127,7 @@ module Notifo
|
|
116
127
|
# Calculates hash code according to all attributes.
|
117
128
|
# @return [Integer] Hash code
|
118
129
|
def hash
|
119
|
-
[token, device_type, last_wakeup].hash
|
130
|
+
[token, device_type, device_identifier, last_wakeup].hash
|
120
131
|
end
|
121
132
|
|
122
133
|
# Builds the object from hash
|