notifo-io-easierlife 1.0.0 → 1.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +599 -97
- data/Rakefile +0 -2
- data/docs/AddAllowedTopicDto.md +4 -15
- data/docs/AddContributorDto.md +5 -17
- data/docs/AppContributorDto.md +6 -19
- data/docs/AppDetailsDto.md +19 -45
- data/docs/AppDto.md +9 -25
- data/docs/AppsApi.md +181 -363
- data/docs/Body.md +7 -0
- data/docs/ConfigsApi.md +28 -68
- data/docs/ConfirmMode.md +3 -12
- data/docs/CreateEmailTemplateDto.md +4 -15
- data/docs/EmailTemplateDto.md +6 -19
- data/docs/EmailTemplatesDto.md +6 -0
- data/docs/EmailVerificationStatus.md +3 -12
- data/docs/ErrorDto.md +8 -23
- data/docs/EventDto.md +15 -37
- data/docs/EventProperties.md +6 -0
- data/docs/EventsApi.md +43 -80
- data/docs/IsoDayOfWeek.md +3 -12
- data/docs/ListResponseDtoOfEventDto.md +5 -17
- data/docs/ListResponseDtoOfLogEntryDto.md +5 -17
- data/docs/ListResponseDtoOfMediaDto.md +5 -17
- data/docs/ListResponseDtoOfSubscriptionDto.md +5 -17
- data/docs/ListResponseDtoOfTemplateDto.md +5 -17
- data/docs/ListResponseDtoOfTopicDto.md +5 -17
- data/docs/ListResponseDtoOfUserDto.md +5 -17
- data/docs/LocalizedText.md +6 -0
- data/docs/LogEntryDto.md +7 -21
- data/docs/LogsApi.md +25 -44
- data/docs/MediaApi.md +118 -212
- data/docs/MediaDto.md +10 -27
- data/docs/MediaMetadata.md +6 -0
- data/docs/MediaType.md +3 -12
- data/docs/NotificationFormattingDto.md +11 -29
- data/docs/NotificationSend.md +3 -12
- data/docs/NotificationSettingDto.md +5 -17
- data/docs/ProfileDto.md +11 -29
- data/docs/PublishDto.md +13 -33
- data/docs/PublishManyDto.md +4 -15
- data/docs/ResizeMode.md +3 -12
- data/docs/SchedulingDto.md +7 -21
- data/docs/SchedulingType.md +3 -12
- data/docs/SubscriptionDto.md +5 -17
- data/docs/TemplateDto.md +6 -19
- data/docs/TemplatesApi.md +61 -116
- data/docs/TopicDto.md +6 -19
- data/docs/TopicsApi.md +25 -44
- data/docs/UpdateProfileDto.md +9 -25
- data/docs/UpsertAppDto.md +13 -33
- data/docs/UpsertTemplateDto.md +6 -19
- data/docs/UpsertTemplatesDto.md +4 -15
- data/docs/UpsertUserDto.md +11 -29
- data/docs/UpsertUsersDto.md +4 -15
- data/docs/UserApi.md +84 -176
- data/docs/UserDto.md +13 -33
- data/docs/UsersApi.md +173 -337
- data/git_push.sh +7 -10
- data/lib/swagger_client.rb +93 -0
- data/lib/{notifo → swagger_client}/api/apps_api.rb +131 -203
- data/lib/{notifo → swagger_client}/api/configs_api.rb +15 -31
- data/lib/{notifo → swagger_client}/api/events_api.rb +30 -46
- data/lib/{notifo → swagger_client}/api/logs_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/media_api.rb +61 -98
- data/lib/{notifo → swagger_client}/api/templates_api.rb +40 -63
- data/lib/{notifo → swagger_client}/api/topics_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/user_api.rb +52 -89
- data/lib/{notifo → swagger_client}/api/users_api.rb +122 -187
- data/lib/{notifo → swagger_client}/api_client.rb +55 -57
- data/lib/{notifo → swagger_client}/api_error.rb +6 -6
- data/lib/{notifo → swagger_client}/configuration.rb +12 -84
- data/lib/{notifo → swagger_client}/models/add_allowed_topic_dto.rb +16 -47
- data/lib/swagger_client/models/add_contributor_dto.rb +227 -0
- data/lib/swagger_client/models/app_contributor_dto.rb +242 -0
- data/lib/{notifo → swagger_client}/models/app_details_dto.rb +31 -106
- data/lib/{notifo → swagger_client}/models/app_dto.rb +21 -90
- data/lib/swagger_client/models/body.rb +206 -0
- data/lib/swagger_client/models/confirm_mode.rb +29 -0
- data/lib/{notifo → swagger_client}/models/create_email_template_dto.rb +16 -47
- data/lib/swagger_client/models/email_template_dto.rb +237 -0
- data/lib/swagger_client/models/email_templates_dto.rb +201 -0
- data/lib/swagger_client/models/email_verification_status.rb +30 -0
- data/lib/{notifo → swagger_client}/models/error_dto.rb +20 -36
- data/lib/{notifo → swagger_client}/models/event_dto.rb +27 -117
- data/lib/swagger_client/models/event_properties.rb +201 -0
- data/lib/swagger_client/models/iso_day_of_week.rb +34 -0
- data/lib/{notifo/models/list_response_dto_of_subscription_dto.rb → swagger_client/models/list_response_dto_of_event_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_log_entry_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_media_dto.rb +17 -29
- data/lib/{notifo/models/list_response_dto_of_event_dto.rb → swagger_client/models/list_response_dto_of_subscription_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_template_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_topic_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_user_dto.rb +17 -29
- data/lib/swagger_client/models/localized_text.rb +201 -0
- data/lib/{notifo → swagger_client}/models/log_entry_dto.rb +19 -88
- data/lib/{notifo → swagger_client}/models/media_dto.rb +23 -113
- data/lib/swagger_client/models/media_metadata.rb +201 -0
- data/lib/swagger_client/models/media_type.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_formatting_dto.rb +30 -56
- data/lib/swagger_client/models/notification_send.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_setting_dto.rb +26 -39
- data/lib/{notifo → swagger_client}/models/profile_dto.rb +23 -76
- data/lib/{notifo → swagger_client}/models/publish_dto.rb +26 -63
- data/lib/{notifo → swagger_client}/models/publish_many_dto.rb +16 -28
- data/lib/swagger_client/models/resize_mode.rb +33 -0
- data/lib/{notifo → swagger_client}/models/scheduling_dto.rb +19 -32
- data/lib/swagger_client/models/scheduling_type.rb +28 -0
- data/lib/{notifo → swagger_client}/models/subscription_dto.rb +17 -49
- data/lib/{notifo → swagger_client}/models/template_dto.rb +18 -49
- data/lib/{notifo → swagger_client}/models/topic_dto.rb +18 -68
- data/lib/{notifo → swagger_client}/models/update_profile_dto.rb +21 -39
- data/lib/{notifo → swagger_client}/models/upsert_app_dto.rb +25 -47
- data/lib/{notifo → swagger_client}/models/upsert_template_dto.rb +18 -50
- data/lib/{notifo → swagger_client}/models/upsert_templates_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/upsert_user_dto.rb +23 -43
- data/lib/{notifo → swagger_client}/models/upsert_users_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/user_dto.rb +25 -80
- data/lib/swagger_client/version.rb +14 -0
- data/spec/api/apps_api_spec.rb +14 -15
- data/spec/api/configs_api_spec.rb +8 -9
- data/spec/api/events_api_spec.rb +9 -10
- data/spec/api/logs_api_spec.rb +8 -9
- data/spec/api/media_api_spec.rb +13 -14
- data/spec/api/templates_api_spec.rb +9 -10
- data/spec/api/topics_api_spec.rb +8 -9
- data/spec/api/user_api_spec.rb +10 -11
- data/spec/api/users_api_spec.rb +11 -12
- data/spec/api_client_spec.rb +34 -35
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +7 -8
- data/spec/models/add_allowed_topic_dto_spec.rb +16 -10
- data/spec/models/add_contributor_dto_spec.rb +16 -10
- data/spec/models/app_contributor_dto_spec.rb +16 -10
- data/spec/models/app_details_dto_spec.rb +16 -10
- data/spec/models/app_dto_spec.rb +16 -10
- data/spec/models/body_spec.rb +40 -0
- data/spec/models/confirm_mode_spec.rb +16 -10
- data/spec/models/create_email_template_dto_spec.rb +16 -10
- data/spec/models/email_template_dto_spec.rb +16 -10
- data/spec/models/email_templates_dto_spec.rb +34 -0
- data/spec/models/email_verification_status_spec.rb +16 -10
- data/spec/models/error_dto_spec.rb +16 -10
- data/spec/models/event_dto_spec.rb +16 -10
- data/spec/models/event_properties_spec.rb +34 -0
- data/spec/models/iso_day_of_week_spec.rb +16 -10
- data/spec/models/list_response_dto_of_event_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_media_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_template_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_user_dto_spec.rb +16 -10
- data/spec/models/localized_text_spec.rb +34 -0
- data/spec/models/log_entry_dto_spec.rb +16 -10
- data/spec/models/media_dto_spec.rb +16 -10
- data/spec/models/media_metadata_spec.rb +34 -0
- data/spec/models/media_type_spec.rb +16 -10
- data/spec/models/notification_formatting_dto_spec.rb +16 -10
- data/spec/models/notification_send_spec.rb +16 -10
- data/spec/models/notification_setting_dto_spec.rb +17 -11
- data/spec/models/profile_dto_spec.rb +16 -10
- data/spec/models/publish_dto_spec.rb +16 -10
- data/spec/models/publish_many_dto_spec.rb +16 -10
- data/spec/models/resize_mode_spec.rb +16 -10
- data/spec/models/scheduling_dto_spec.rb +16 -10
- data/spec/models/scheduling_type_spec.rb +16 -10
- data/spec/models/subscription_dto_spec.rb +16 -10
- data/spec/models/template_dto_spec.rb +16 -10
- data/spec/models/topic_dto_spec.rb +16 -10
- data/spec/models/update_profile_dto_spec.rb +16 -10
- data/spec/models/upsert_app_dto_spec.rb +16 -10
- data/spec/models/upsert_template_dto_spec.rb +16 -10
- data/spec/models/upsert_templates_dto_spec.rb +16 -10
- data/spec/models/upsert_user_dto_spec.rb +16 -10
- data/spec/models/upsert_users_dto_spec.rb +16 -10
- data/spec/models/user_dto_spec.rb +16 -10
- data/spec/spec_helper.rb +5 -6
- data/{notifo.gemspec → swagger_client.gemspec} +9 -9
- metadata +101 -60
- data/lib/notifo.rb +0 -89
- data/lib/notifo/models/add_contributor_dto.rb +0 -277
- data/lib/notifo/models/app_contributor_dto.rb +0 -311
- data/lib/notifo/models/confirm_mode.rb +0 -38
- data/lib/notifo/models/email_template_dto.rb +0 -288
- data/lib/notifo/models/email_verification_status.rb +0 -39
- data/lib/notifo/models/iso_day_of_week.rb +0 -43
- data/lib/notifo/models/media_type.rb +0 -39
- data/lib/notifo/models/notification_send.rb +0 -39
- data/lib/notifo/models/resize_mode.rb +0 -42
- data/lib/notifo/models/scheduling_type.rb +0 -37
- data/lib/notifo/version.rb +0 -15
- data/notifo-io-1.0.0.gem +0 -0
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpsertUserDto
|
18
16
|
# The id of the user.
|
19
17
|
attr_accessor :id
|
@@ -53,50 +51,37 @@ module Notifo
|
|
53
51
|
}
|
54
52
|
end
|
55
53
|
|
56
|
-
# Returns all the JSON keys this model knows about
|
57
|
-
def self.acceptable_attributes
|
58
|
-
attribute_map.values
|
59
|
-
end
|
60
|
-
|
61
54
|
# Attribute type mapping.
|
62
55
|
def self.openapi_types
|
63
56
|
{
|
64
|
-
:'id' => :'
|
65
|
-
:'full_name' => :'
|
66
|
-
:'email_address' => :'
|
67
|
-
:'phone_number' => :'
|
68
|
-
:'preferred_language' => :'
|
69
|
-
:'preferred_timezone' => :'
|
70
|
-
:'requires_whitelisted_topics' => :'
|
71
|
-
:'settings' => :'
|
57
|
+
:'id' => :'Object',
|
58
|
+
:'full_name' => :'Object',
|
59
|
+
:'email_address' => :'Object',
|
60
|
+
:'phone_number' => :'Object',
|
61
|
+
:'preferred_language' => :'Object',
|
62
|
+
:'preferred_timezone' => :'Object',
|
63
|
+
:'requires_whitelisted_topics' => :'Object',
|
64
|
+
:'settings' => :'Object'
|
72
65
|
}
|
73
66
|
end
|
74
67
|
|
75
68
|
# List of attributes with nullable: true
|
76
69
|
def self.openapi_nullable
|
77
70
|
Set.new([
|
78
|
-
:'id',
|
79
|
-
:'full_name',
|
80
|
-
:'email_address',
|
81
|
-
:'phone_number',
|
82
|
-
:'preferred_language',
|
83
|
-
:'preferred_timezone',
|
84
|
-
:'requires_whitelisted_topics',
|
85
|
-
:'settings'
|
86
71
|
])
|
87
72
|
end
|
88
|
-
|
73
|
+
|
89
74
|
# Initializes the object
|
90
75
|
# @param [Hash] attributes Model attributes in the form of hash
|
91
76
|
def initialize(attributes = {})
|
92
77
|
if (!attributes.is_a?(Hash))
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpsertUserDto` initialize method"
|
94
79
|
end
|
95
80
|
|
96
81
|
# check to see if the attribute exists and convert string to symbol for hash key
|
97
82
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
98
83
|
if (!self.class.attribute_map.key?(k.to_sym))
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
84
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpsertUserDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
100
85
|
end
|
101
86
|
h[k.to_sym] = v
|
102
87
|
}
|
@@ -189,9 +174,7 @@ module Notifo
|
|
189
174
|
def build_from_hash(attributes)
|
190
175
|
return nil unless attributes.is_a?(Hash)
|
191
176
|
self.class.openapi_types.each_pair do |key, type|
|
192
|
-
if
|
193
|
-
self.send("#{key}=", nil)
|
194
|
-
elsif type =~ /\AArray<(.*)>/i
|
177
|
+
if type =~ /\AArray<(.*)>/i
|
195
178
|
# check to ensure the input is an array given that the attribute
|
196
179
|
# is documented as an array but the input is not
|
197
180
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -199,6 +182,8 @@ module Notifo
|
|
199
182
|
end
|
200
183
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
201
184
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
185
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
186
|
+
self.send("#{key}=", nil)
|
202
187
|
end
|
203
188
|
end
|
204
189
|
|
@@ -211,8 +196,8 @@ module Notifo
|
|
211
196
|
# @return [Object] Deserialized data
|
212
197
|
def _deserialize(type, value)
|
213
198
|
case type.to_sym
|
214
|
-
when :
|
215
|
-
|
199
|
+
when :DateTime
|
200
|
+
DateTime.parse(value)
|
216
201
|
when :Date
|
217
202
|
Date.parse(value)
|
218
203
|
when :String
|
@@ -242,9 +227,7 @@ module Notifo
|
|
242
227
|
end
|
243
228
|
end
|
244
229
|
else # model
|
245
|
-
|
246
|
-
klass = Notifo.const_get(type)
|
247
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
248
231
|
end
|
249
232
|
end
|
250
233
|
|
@@ -292,8 +275,5 @@ module Notifo
|
|
292
275
|
else
|
293
276
|
value
|
294
277
|
end
|
295
|
-
end
|
296
|
-
|
297
|
-
end
|
298
|
-
|
278
|
+
end end
|
299
279
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UpsertUsersDto
|
18
16
|
# The users to update.
|
19
17
|
attr_accessor :requests
|
@@ -25,15 +23,10 @@ module Notifo
|
|
25
23
|
}
|
26
24
|
end
|
27
25
|
|
28
|
-
# Returns all the JSON keys this model knows about
|
29
|
-
def self.acceptable_attributes
|
30
|
-
attribute_map.values
|
31
|
-
end
|
32
|
-
|
33
26
|
# Attribute type mapping.
|
34
27
|
def self.openapi_types
|
35
28
|
{
|
36
|
-
:'requests' => :'
|
29
|
+
:'requests' => :'Object'
|
37
30
|
}
|
38
31
|
end
|
39
32
|
|
@@ -42,18 +35,18 @@ module Notifo
|
|
42
35
|
Set.new([
|
43
36
|
])
|
44
37
|
end
|
45
|
-
|
38
|
+
|
46
39
|
# Initializes the object
|
47
40
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
41
|
def initialize(attributes = {})
|
49
42
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UpsertUsersDto` initialize method"
|
51
44
|
end
|
52
45
|
|
53
46
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
47
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
48
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UpsertUsersDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
50
|
end
|
58
51
|
h[k.to_sym] = v
|
59
52
|
}
|
@@ -116,9 +109,7 @@ module Notifo
|
|
116
109
|
def build_from_hash(attributes)
|
117
110
|
return nil unless attributes.is_a?(Hash)
|
118
111
|
self.class.openapi_types.each_pair do |key, type|
|
119
|
-
if
|
120
|
-
self.send("#{key}=", nil)
|
121
|
-
elsif type =~ /\AArray<(.*)>/i
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
122
113
|
# check to ensure the input is an array given that the attribute
|
123
114
|
# is documented as an array but the input is not
|
124
115
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -126,6 +117,8 @@ module Notifo
|
|
126
117
|
end
|
127
118
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
119
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
129
122
|
end
|
130
123
|
end
|
131
124
|
|
@@ -138,8 +131,8 @@ module Notifo
|
|
138
131
|
# @return [Object] Deserialized data
|
139
132
|
def _deserialize(type, value)
|
140
133
|
case type.to_sym
|
141
|
-
when :
|
142
|
-
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
143
136
|
when :Date
|
144
137
|
Date.parse(value)
|
145
138
|
when :String
|
@@ -169,9 +162,7 @@ module Notifo
|
|
169
162
|
end
|
170
163
|
end
|
171
164
|
else # model
|
172
|
-
|
173
|
-
klass = Notifo.const_get(type)
|
174
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
165
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
175
166
|
end
|
176
167
|
end
|
177
168
|
|
@@ -219,8 +210,5 @@ module Notifo
|
|
219
210
|
else
|
220
211
|
value
|
221
212
|
end
|
222
|
-
end
|
223
|
-
|
224
|
-
end
|
225
|
-
|
213
|
+
end end
|
226
214
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class UserDto
|
18
16
|
# The id of the user.
|
19
17
|
attr_accessor :id
|
@@ -61,49 +59,39 @@ module Notifo
|
|
61
59
|
}
|
62
60
|
end
|
63
61
|
|
64
|
-
# Returns all the JSON keys this model knows about
|
65
|
-
def self.acceptable_attributes
|
66
|
-
attribute_map.values
|
67
|
-
end
|
68
|
-
|
69
62
|
# Attribute type mapping.
|
70
63
|
def self.openapi_types
|
71
64
|
{
|
72
|
-
:'id' => :'
|
73
|
-
:'api_key' => :'
|
74
|
-
:'full_name' => :'
|
75
|
-
:'email_address' => :'
|
76
|
-
:'phone_number' => :'
|
77
|
-
:'preferred_language' => :'
|
78
|
-
:'preferred_timezone' => :'
|
79
|
-
:'requires_whitelisted_topics' => :'
|
80
|
-
:'settings' => :'
|
81
|
-
:'counters' => :'
|
65
|
+
:'id' => :'Object',
|
66
|
+
:'api_key' => :'Object',
|
67
|
+
:'full_name' => :'Object',
|
68
|
+
:'email_address' => :'Object',
|
69
|
+
:'phone_number' => :'Object',
|
70
|
+
:'preferred_language' => :'Object',
|
71
|
+
:'preferred_timezone' => :'Object',
|
72
|
+
:'requires_whitelisted_topics' => :'Object',
|
73
|
+
:'settings' => :'Object',
|
74
|
+
:'counters' => :'Object'
|
82
75
|
}
|
83
76
|
end
|
84
77
|
|
85
78
|
# List of attributes with nullable: true
|
86
79
|
def self.openapi_nullable
|
87
80
|
Set.new([
|
88
|
-
:'full_name',
|
89
|
-
:'email_address',
|
90
|
-
:'phone_number',
|
91
|
-
:'preferred_language',
|
92
|
-
:'preferred_timezone',
|
93
81
|
])
|
94
82
|
end
|
95
|
-
|
83
|
+
|
96
84
|
# Initializes the object
|
97
85
|
# @param [Hash] attributes Model attributes in the form of hash
|
98
86
|
def initialize(attributes = {})
|
99
87
|
if (!attributes.is_a?(Hash))
|
100
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::UserDto` initialize method"
|
101
89
|
end
|
102
90
|
|
103
91
|
# check to see if the attribute exists and convert string to symbol for hash key
|
104
92
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
105
93
|
if (!self.class.attribute_map.key?(k.to_sym))
|
106
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::UserDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
107
95
|
end
|
108
96
|
h[k.to_sym] = v
|
109
97
|
}
|
@@ -161,18 +149,10 @@ module Notifo
|
|
161
149
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
162
150
|
end
|
163
151
|
|
164
|
-
if @id.to_s.length < 1
|
165
|
-
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
|
166
|
-
end
|
167
|
-
|
168
152
|
if @api_key.nil?
|
169
153
|
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
170
154
|
end
|
171
155
|
|
172
|
-
if @api_key.to_s.length < 1
|
173
|
-
invalid_properties.push('invalid value for "api_key", the character length must be great than or equal to 1.')
|
174
|
-
end
|
175
|
-
|
176
156
|
if @requires_whitelisted_topics.nil?
|
177
157
|
invalid_properties.push('invalid value for "requires_whitelisted_topics", requires_whitelisted_topics cannot be nil.')
|
178
158
|
end
|
@@ -192,43 +172,13 @@ module Notifo
|
|
192
172
|
# @return true if the model is valid
|
193
173
|
def valid?
|
194
174
|
return false if @id.nil?
|
195
|
-
return false if @id.to_s.length < 1
|
196
175
|
return false if @api_key.nil?
|
197
|
-
return false if @api_key.to_s.length < 1
|
198
176
|
return false if @requires_whitelisted_topics.nil?
|
199
177
|
return false if @settings.nil?
|
200
178
|
return false if @counters.nil?
|
201
179
|
true
|
202
180
|
end
|
203
181
|
|
204
|
-
# Custom attribute writer method with validation
|
205
|
-
# @param [Object] id Value to be assigned
|
206
|
-
def id=(id)
|
207
|
-
if id.nil?
|
208
|
-
fail ArgumentError, 'id cannot be nil'
|
209
|
-
end
|
210
|
-
|
211
|
-
if id.to_s.length < 1
|
212
|
-
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
|
213
|
-
end
|
214
|
-
|
215
|
-
@id = id
|
216
|
-
end
|
217
|
-
|
218
|
-
# Custom attribute writer method with validation
|
219
|
-
# @param [Object] api_key Value to be assigned
|
220
|
-
def api_key=(api_key)
|
221
|
-
if api_key.nil?
|
222
|
-
fail ArgumentError, 'api_key cannot be nil'
|
223
|
-
end
|
224
|
-
|
225
|
-
if api_key.to_s.length < 1
|
226
|
-
fail ArgumentError, 'invalid value for "api_key", the character length must be great than or equal to 1.'
|
227
|
-
end
|
228
|
-
|
229
|
-
@api_key = api_key
|
230
|
-
end
|
231
|
-
|
232
182
|
# Checks equality by comparing each attribute.
|
233
183
|
# @param [Object] Object to be compared
|
234
184
|
def ==(o)
|
@@ -271,9 +221,7 @@ module Notifo
|
|
271
221
|
def build_from_hash(attributes)
|
272
222
|
return nil unless attributes.is_a?(Hash)
|
273
223
|
self.class.openapi_types.each_pair do |key, type|
|
274
|
-
if
|
275
|
-
self.send("#{key}=", nil)
|
276
|
-
elsif type =~ /\AArray<(.*)>/i
|
224
|
+
if type =~ /\AArray<(.*)>/i
|
277
225
|
# check to ensure the input is an array given that the attribute
|
278
226
|
# is documented as an array but the input is not
|
279
227
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -281,6 +229,8 @@ module Notifo
|
|
281
229
|
end
|
282
230
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
283
231
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
232
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
233
|
+
self.send("#{key}=", nil)
|
284
234
|
end
|
285
235
|
end
|
286
236
|
|
@@ -293,8 +243,8 @@ module Notifo
|
|
293
243
|
# @return [Object] Deserialized data
|
294
244
|
def _deserialize(type, value)
|
295
245
|
case type.to_sym
|
296
|
-
when :
|
297
|
-
|
246
|
+
when :DateTime
|
247
|
+
DateTime.parse(value)
|
298
248
|
when :Date
|
299
249
|
Date.parse(value)
|
300
250
|
when :String
|
@@ -324,9 +274,7 @@ module Notifo
|
|
324
274
|
end
|
325
275
|
end
|
326
276
|
else # model
|
327
|
-
|
328
|
-
klass = Notifo.const_get(type)
|
329
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
277
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
330
278
|
end
|
331
279
|
end
|
332
280
|
|
@@ -374,8 +322,5 @@ module Notifo
|
|
374
322
|
else
|
375
323
|
value
|
376
324
|
end
|
377
|
-
end
|
378
|
-
|
379
|
-
end
|
380
|
-
|
325
|
+
end end
|
381
326
|
end
|
@@ -0,0 +1,14 @@
|
|
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.24
|
10
|
+
=end
|
11
|
+
|
12
|
+
module SwaggerClient
|
13
|
+
VERSION = '1.0.0'
|
14
|
+
end
|