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'
|
@@ -38,6 +38,7 @@ module Notifo
|
|
38
38
|
# List of attributes with nullable: true
|
39
39
|
def self.openapi_nullable
|
40
40
|
Set.new([
|
41
|
+
:'role'
|
41
42
|
])
|
42
43
|
end
|
43
44
|
|
@@ -73,10 +74,6 @@ module Notifo
|
|
73
74
|
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
74
75
|
end
|
75
76
|
|
76
|
-
if @role.nil?
|
77
|
-
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
78
|
-
end
|
79
|
-
|
80
77
|
invalid_properties
|
81
78
|
end
|
82
79
|
|
@@ -84,7 +81,6 @@ module Notifo
|
|
84
81
|
# @return true if the model is valid
|
85
82
|
def valid?
|
86
83
|
return false if @email.nil?
|
87
|
-
return false if @role.nil?
|
88
84
|
true
|
89
85
|
end
|
90
86
|
|
@@ -0,0 +1,208 @@
|
|
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 AdminProfileDto
|
16
|
+
# The token for the integrated app.
|
17
|
+
attr_accessor :token
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'token' => :'token'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'token' => :'Object'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
:'token'
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
if (!attributes.is_a?(Hash))
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::AdminProfileDto` initialize method"
|
45
|
+
end
|
46
|
+
|
47
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::AdminProfileDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
|
+
end
|
52
|
+
h[k.to_sym] = v
|
53
|
+
}
|
54
|
+
|
55
|
+
if attributes.key?(:'token')
|
56
|
+
self.token = attributes[:'token']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properties with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
invalid_properties
|
65
|
+
end
|
66
|
+
|
67
|
+
# Check to see if the all the properties in the model are valid
|
68
|
+
# @return true if the model is valid
|
69
|
+
def valid?
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def ==(o)
|
76
|
+
return true if self.equal?(o)
|
77
|
+
self.class == o.class &&
|
78
|
+
token == o.token
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Integer] Hash code
|
89
|
+
def hash
|
90
|
+
[token].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def self.build_from_hash(attributes)
|
97
|
+
new.build_from_hash(attributes)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.openapi_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
115
|
+
self.send("#{key}=", nil)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
self
|
120
|
+
end
|
121
|
+
|
122
|
+
# Deserializes the data based on type
|
123
|
+
# @param string type Data type
|
124
|
+
# @param string value Value to be deserialized
|
125
|
+
# @return [Object] Deserialized data
|
126
|
+
def _deserialize(type, value)
|
127
|
+
case type.to_sym
|
128
|
+
when :DateTime
|
129
|
+
DateTime.parse(value)
|
130
|
+
when :Date
|
131
|
+
Date.parse(value)
|
132
|
+
when :String
|
133
|
+
value.to_s
|
134
|
+
when :Integer
|
135
|
+
value.to_i
|
136
|
+
when :Float
|
137
|
+
value.to_f
|
138
|
+
when :Boolean
|
139
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
140
|
+
true
|
141
|
+
else
|
142
|
+
false
|
143
|
+
end
|
144
|
+
when :Object
|
145
|
+
# generic object (usually a Hash), return directly
|
146
|
+
value
|
147
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
148
|
+
inner_type = Regexp.last_match[:inner_type]
|
149
|
+
value.map { |v| _deserialize(inner_type, v) }
|
150
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
151
|
+
k_type = Regexp.last_match[:k_type]
|
152
|
+
v_type = Regexp.last_match[:v_type]
|
153
|
+
{}.tap do |hash|
|
154
|
+
value.each do |k, v|
|
155
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
else # model
|
159
|
+
Notifo.const_get(type).build_from_hash(value)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
# Returns the string representation of the object
|
164
|
+
# @return [String] String presentation of the object
|
165
|
+
def to_s
|
166
|
+
to_hash.to_s
|
167
|
+
end
|
168
|
+
|
169
|
+
# to_body is an alias to to_hash (backward compatibility)
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
171
|
+
def to_body
|
172
|
+
to_hash
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the object in the form of hash
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
177
|
+
def to_hash
|
178
|
+
hash = {}
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
180
|
+
value = self.send(attr)
|
181
|
+
if value.nil?
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
184
|
+
end
|
185
|
+
|
186
|
+
hash[param] = _to_hash(value)
|
187
|
+
end
|
188
|
+
hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Outputs non-array value in the form of hash
|
192
|
+
# For object, use to_hash. Otherwise, just return the value
|
193
|
+
# @param [Object] value Any valid value
|
194
|
+
# @return [Hash] Returns the value in the form of hash
|
195
|
+
def _to_hash(value)
|
196
|
+
if value.is_a?(Array)
|
197
|
+
value.compact.map { |v| _to_hash(v) }
|
198
|
+
elsif value.is_a?(Hash)
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
201
|
+
end
|
202
|
+
elsif value.respond_to? :to_hash
|
203
|
+
value.to_hash
|
204
|
+
else
|
205
|
+
value
|
206
|
+
end
|
207
|
+
end end
|
208
|
+
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'
|
@@ -15,18 +15,33 @@ module Notifo
|
|
15
15
|
class ChannelSendInfoDto
|
16
16
|
attr_accessor :status
|
17
17
|
|
18
|
+
attr_accessor :configuration
|
19
|
+
|
18
20
|
# The last update.
|
19
21
|
attr_accessor :last_update
|
20
22
|
|
21
23
|
# The details.
|
22
24
|
attr_accessor :detail
|
23
25
|
|
26
|
+
# The first time the notification has been marked as delivered for this identifier.
|
27
|
+
attr_accessor :first_delivered
|
28
|
+
|
29
|
+
# The first time the notification has been marked as seen for this identifier.
|
30
|
+
attr_accessor :first_seen
|
31
|
+
|
32
|
+
# The first time the notification has been marked as confirmed for this identifier.
|
33
|
+
attr_accessor :first_confirmed
|
34
|
+
|
24
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
36
|
def self.attribute_map
|
26
37
|
{
|
27
38
|
:'status' => :'status',
|
39
|
+
:'configuration' => :'configuration',
|
28
40
|
:'last_update' => :'lastUpdate',
|
29
|
-
:'detail' => :'detail'
|
41
|
+
:'detail' => :'detail',
|
42
|
+
:'first_delivered' => :'firstDelivered',
|
43
|
+
:'first_seen' => :'firstSeen',
|
44
|
+
:'first_confirmed' => :'firstConfirmed'
|
30
45
|
}
|
31
46
|
end
|
32
47
|
|
@@ -34,15 +49,22 @@ module Notifo
|
|
34
49
|
def self.openapi_types
|
35
50
|
{
|
36
51
|
:'status' => :'Object',
|
52
|
+
:'configuration' => :'Object',
|
37
53
|
:'last_update' => :'Object',
|
38
|
-
:'detail' => :'Object'
|
54
|
+
:'detail' => :'Object',
|
55
|
+
:'first_delivered' => :'Object',
|
56
|
+
:'first_seen' => :'Object',
|
57
|
+
:'first_confirmed' => :'Object'
|
39
58
|
}
|
40
59
|
end
|
41
60
|
|
42
61
|
# List of attributes with nullable: true
|
43
62
|
def self.openapi_nullable
|
44
63
|
Set.new([
|
45
|
-
:'detail'
|
64
|
+
:'detail',
|
65
|
+
:'first_delivered',
|
66
|
+
:'first_seen',
|
67
|
+
:'first_confirmed'
|
46
68
|
])
|
47
69
|
end
|
48
70
|
|
@@ -65,6 +87,10 @@ module Notifo
|
|
65
87
|
self.status = attributes[:'status']
|
66
88
|
end
|
67
89
|
|
90
|
+
if attributes.key?(:'configuration')
|
91
|
+
self.configuration = attributes[:'configuration']
|
92
|
+
end
|
93
|
+
|
68
94
|
if attributes.key?(:'last_update')
|
69
95
|
self.last_update = attributes[:'last_update']
|
70
96
|
end
|
@@ -72,6 +98,18 @@ module Notifo
|
|
72
98
|
if attributes.key?(:'detail')
|
73
99
|
self.detail = attributes[:'detail']
|
74
100
|
end
|
101
|
+
|
102
|
+
if attributes.key?(:'first_delivered')
|
103
|
+
self.first_delivered = attributes[:'first_delivered']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'first_seen')
|
107
|
+
self.first_seen = attributes[:'first_seen']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'first_confirmed')
|
111
|
+
self.first_confirmed = attributes[:'first_confirmed']
|
112
|
+
end
|
75
113
|
end
|
76
114
|
|
77
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -93,8 +131,12 @@ module Notifo
|
|
93
131
|
return true if self.equal?(o)
|
94
132
|
self.class == o.class &&
|
95
133
|
status == o.status &&
|
134
|
+
configuration == o.configuration &&
|
96
135
|
last_update == o.last_update &&
|
97
|
-
detail == o.detail
|
136
|
+
detail == o.detail &&
|
137
|
+
first_delivered == o.first_delivered &&
|
138
|
+
first_seen == o.first_seen &&
|
139
|
+
first_confirmed == o.first_confirmed
|
98
140
|
end
|
99
141
|
|
100
142
|
# @see the `==` method
|
@@ -106,7 +148,7 @@ module Notifo
|
|
106
148
|
# Calculates hash code according to all attributes.
|
107
149
|
# @return [Integer] Hash code
|
108
150
|
def hash
|
109
|
-
[status, last_update, detail].hash
|
151
|
+
[status, configuration, last_update, detail, first_delivered, first_seen, first_confirmed].hash
|
110
152
|
end
|
111
153
|
|
112
154
|
# Builds the object from hash
|