notifo-io 1.0.1 → 1.0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +510 -8
  3. data/Rakefile +0 -2
  4. data/docs/AddAllowedTopicDto.md +3 -14
  5. data/docs/AddContributorDto.md +4 -16
  6. data/docs/AppContributorDto.md +5 -18
  7. data/docs/AppDetailsDto.md +18 -44
  8. data/docs/AppDto.md +8 -24
  9. data/docs/AppsApi.md +149 -331
  10. data/docs/Body.md +7 -0
  11. data/docs/ConfigsApi.md +21 -61
  12. data/docs/ConfirmMode.md +2 -11
  13. data/docs/CreateEmailTemplateDto.md +3 -14
  14. data/docs/EmailTemplateDto.md +5 -18
  15. data/docs/EmailTemplatesDto.md +6 -0
  16. data/docs/EmailVerificationStatus.md +2 -11
  17. data/docs/ErrorDto.md +7 -22
  18. data/docs/EventDto.md +14 -36
  19. data/docs/EventProperties.md +6 -0
  20. data/docs/EventsApi.md +36 -73
  21. data/docs/IsoDayOfWeek.md +2 -11
  22. data/docs/ListResponseDtoOfEventDto.md +4 -16
  23. data/docs/ListResponseDtoOfLogEntryDto.md +4 -16
  24. data/docs/ListResponseDtoOfMediaDto.md +4 -16
  25. data/docs/ListResponseDtoOfSubscriptionDto.md +4 -16
  26. data/docs/ListResponseDtoOfTemplateDto.md +4 -16
  27. data/docs/ListResponseDtoOfTopicDto.md +4 -16
  28. data/docs/ListResponseDtoOfUserDto.md +4 -16
  29. data/docs/LocalizedText.md +6 -0
  30. data/docs/LogEntryDto.md +6 -20
  31. data/docs/LogsApi.md +21 -40
  32. data/docs/MediaApi.md +102 -196
  33. data/docs/MediaDto.md +9 -26
  34. data/docs/MediaMetadata.md +6 -0
  35. data/docs/MediaType.md +2 -11
  36. data/docs/NotificationFormattingDto.md +10 -28
  37. data/docs/NotificationSend.md +2 -11
  38. data/docs/NotificationSettingDto.md +4 -16
  39. data/docs/ProfileDto.md +10 -28
  40. data/docs/PublishDto.md +12 -32
  41. data/docs/PublishManyDto.md +3 -14
  42. data/docs/ResizeMode.md +2 -11
  43. data/docs/SchedulingDto.md +6 -20
  44. data/docs/SchedulingType.md +2 -11
  45. data/docs/SubscriptionDto.md +4 -16
  46. data/docs/TemplateDto.md +5 -18
  47. data/docs/TemplatesApi.md +51 -106
  48. data/docs/TopicDto.md +5 -18
  49. data/docs/TopicsApi.md +21 -40
  50. data/docs/UpdateProfileDto.md +8 -24
  51. data/docs/UpsertAppDto.md +12 -32
  52. data/docs/UpsertTemplateDto.md +5 -18
  53. data/docs/UpsertTemplatesDto.md +3 -14
  54. data/docs/UpsertUserDto.md +10 -28
  55. data/docs/UpsertUsersDto.md +3 -14
  56. data/docs/UserApi.md +68 -160
  57. data/docs/UserDto.md +12 -32
  58. data/docs/UsersApi.md +144 -308
  59. data/git_push.sh +7 -10
  60. data/lib/notifo.rb +9 -5
  61. data/lib/notifo/api/apps_api.rb +130 -202
  62. data/lib/notifo/api/configs_api.rb +14 -30
  63. data/lib/notifo/api/events_api.rb +29 -45
  64. data/lib/notifo/api/logs_api.rb +12 -21
  65. data/lib/notifo/api/media_api.rb +60 -97
  66. data/lib/notifo/api/templates_api.rb +39 -62
  67. data/lib/notifo/api/topics_api.rb +12 -21
  68. data/lib/notifo/api/user_api.rb +51 -88
  69. data/lib/notifo/api/users_api.rb +121 -186
  70. data/lib/notifo/api_client.rb +54 -56
  71. data/lib/notifo/api_error.rb +5 -5
  72. data/lib/notifo/configuration.rb +12 -84
  73. data/lib/notifo/models/add_allowed_topic_dto.rb +13 -44
  74. data/lib/notifo/models/add_contributor_dto.rb +14 -64
  75. data/lib/notifo/models/app_contributor_dto.rb +15 -84
  76. data/lib/notifo/models/app_details_dto.rb +28 -103
  77. data/lib/notifo/models/app_dto.rb +18 -87
  78. data/lib/notifo/models/{inline_object.rb → body.rb} +16 -29
  79. data/lib/notifo/models/confirm_mode.rb +7 -16
  80. data/lib/notifo/models/create_email_template_dto.rb +13 -44
  81. data/lib/notifo/models/email_template_dto.rb +15 -66
  82. data/lib/notifo/models/email_templates_dto.rb +201 -0
  83. data/lib/notifo/models/email_verification_status.rb +8 -17
  84. data/lib/notifo/models/error_dto.rb +17 -33
  85. data/lib/notifo/models/event_dto.rb +24 -114
  86. data/lib/notifo/models/event_properties.rb +201 -0
  87. data/lib/notifo/models/iso_day_of_week.rb +12 -21
  88. data/lib/notifo/models/list_response_dto_of_event_dto.rb +14 -26
  89. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +14 -26
  90. data/lib/notifo/models/list_response_dto_of_media_dto.rb +14 -26
  91. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +14 -26
  92. data/lib/notifo/models/list_response_dto_of_template_dto.rb +14 -26
  93. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +14 -26
  94. data/lib/notifo/models/list_response_dto_of_user_dto.rb +14 -26
  95. data/lib/notifo/models/localized_text.rb +201 -0
  96. data/lib/notifo/models/log_entry_dto.rb +16 -85
  97. data/lib/notifo/models/media_dto.rb +20 -110
  98. data/lib/notifo/models/media_metadata.rb +201 -0
  99. data/lib/notifo/models/media_type.rb +8 -17
  100. data/lib/notifo/models/notification_formatting_dto.rb +27 -53
  101. data/lib/notifo/models/notification_send.rb +8 -17
  102. data/lib/notifo/models/notification_setting_dto.rb +23 -36
  103. data/lib/notifo/models/profile_dto.rb +20 -73
  104. data/lib/notifo/models/publish_dto.rb +23 -60
  105. data/lib/notifo/models/publish_many_dto.rb +13 -25
  106. data/lib/notifo/models/resize_mode.rb +11 -20
  107. data/lib/notifo/models/scheduling_dto.rb +16 -29
  108. data/lib/notifo/models/scheduling_type.rb +6 -15
  109. data/lib/notifo/models/subscription_dto.rb +14 -46
  110. data/lib/notifo/models/template_dto.rb +15 -46
  111. data/lib/notifo/models/topic_dto.rb +15 -65
  112. data/lib/notifo/models/update_profile_dto.rb +18 -36
  113. data/lib/notifo/models/upsert_app_dto.rb +22 -44
  114. data/lib/notifo/models/upsert_template_dto.rb +15 -47
  115. data/lib/notifo/models/upsert_templates_dto.rb +13 -25
  116. data/lib/notifo/models/upsert_user_dto.rb +20 -40
  117. data/lib/notifo/models/upsert_users_dto.rb +13 -25
  118. data/lib/notifo/models/user_dto.rb +22 -77
  119. data/lib/notifo/version.rb +4 -5
  120. data/notifo.gemspec +7 -7
  121. data/spec/api/apps_api_spec.rb +14 -15
  122. data/spec/api/configs_api_spec.rb +7 -8
  123. data/spec/api/events_api_spec.rb +8 -9
  124. data/spec/api/logs_api_spec.rb +7 -8
  125. data/spec/api/media_api_spec.rb +32 -11
  126. data/spec/api/templates_api_spec.rb +8 -9
  127. data/spec/api/topics_api_spec.rb +7 -8
  128. data/spec/api/user_api_spec.rb +9 -10
  129. data/spec/api/users_api_spec.rb +10 -11
  130. data/spec/api_client_spec.rb +5 -6
  131. data/spec/base_object_spec.rb +109 -0
  132. data/spec/configuration_spec.rb +7 -8
  133. data/spec/models/add_allowed_topic_dto_spec.rb +15 -9
  134. data/spec/models/add_contributor_dto_spec.rb +15 -9
  135. data/spec/models/app_contributor_dto_spec.rb +15 -9
  136. data/spec/models/app_details_dto_spec.rb +15 -9
  137. data/spec/models/app_dto_spec.rb +15 -9
  138. data/spec/models/body_spec.rb +40 -0
  139. data/spec/models/confirm_mode_spec.rb +15 -9
  140. data/spec/models/create_email_template_dto_spec.rb +15 -9
  141. data/spec/models/email_template_dto_spec.rb +15 -9
  142. data/spec/models/email_templates_dto_spec.rb +34 -0
  143. data/spec/models/email_verification_status_spec.rb +15 -9
  144. data/spec/models/error_dto_spec.rb +15 -9
  145. data/spec/models/event_dto_spec.rb +15 -9
  146. data/spec/models/event_properties_spec.rb +34 -0
  147. data/spec/models/iso_day_of_week_spec.rb +15 -9
  148. data/spec/models/list_response_dto_of_event_dto_spec.rb +15 -9
  149. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +15 -9
  150. data/spec/models/list_response_dto_of_media_dto_spec.rb +15 -9
  151. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +15 -9
  152. data/spec/models/list_response_dto_of_template_dto_spec.rb +15 -9
  153. data/spec/models/list_response_dto_of_topic_dto_spec.rb +15 -9
  154. data/spec/models/list_response_dto_of_user_dto_spec.rb +15 -9
  155. data/spec/models/localized_text_spec.rb +34 -0
  156. data/spec/models/log_entry_dto_spec.rb +15 -9
  157. data/spec/models/media_dto_spec.rb +21 -9
  158. data/spec/models/media_metadata_spec.rb +34 -0
  159. data/spec/models/media_type_spec.rb +15 -9
  160. data/spec/models/notification_formatting_dto_spec.rb +15 -9
  161. data/spec/models/notification_send_spec.rb +15 -9
  162. data/spec/models/notification_setting_dto_spec.rb +16 -10
  163. data/spec/models/profile_dto_spec.rb +15 -9
  164. data/spec/models/publish_dto_spec.rb +15 -9
  165. data/spec/models/publish_many_dto_spec.rb +15 -9
  166. data/spec/models/resize_mode_spec.rb +15 -9
  167. data/spec/models/scheduling_dto_spec.rb +15 -9
  168. data/spec/models/scheduling_type_spec.rb +15 -9
  169. data/spec/models/subscription_dto_spec.rb +15 -9
  170. data/spec/models/template_dto_spec.rb +15 -9
  171. data/spec/models/topic_dto_spec.rb +15 -9
  172. data/spec/models/update_profile_dto_spec.rb +15 -9
  173. data/spec/models/upsert_app_dto_spec.rb +15 -9
  174. data/spec/models/upsert_template_dto_spec.rb +15 -9
  175. data/spec/models/upsert_templates_dto_spec.rb +15 -9
  176. data/spec/models/upsert_user_dto_spec.rb +15 -9
  177. data/spec/models/upsert_users_dto_spec.rb +15 -9
  178. data/spec/models/user_dto_spec.rb +15 -9
  179. data/spec/spec_helper.rb +4 -5
  180. metadata +44 -9
  181. data/docs/InlineObject.md +0 -18
  182. data/notifo-1.0.0.gem +0 -0
  183. data/notifo-io-1.0.0.2.gem +0 -0
  184. data/notifo-io-1.0.0.gem +0 -0
  185. data/spec/models/inline_object_spec.rb +0 -34
@@ -1,17 +1,15 @@
1
1
  =begin
2
2
  #Notifo API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- The version of the OpenAPI document: 1.0.0
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
14
  module Notifo
17
15
  class AddContributorDto
@@ -29,16 +27,11 @@ module Notifo
29
27
  }
30
28
  end
31
29
 
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- attribute_map.values
35
- end
36
-
37
30
  # Attribute type mapping.
38
31
  def self.openapi_types
39
32
  {
40
- :'email' => :'String',
41
- :'role' => :'String'
33
+ :'email' => :'Object',
34
+ :'role' => :'Object'
42
35
  }
43
36
  end
44
37
 
@@ -47,7 +40,7 @@ module Notifo
47
40
  Set.new([
48
41
  ])
49
42
  end
50
-
43
+
51
44
  # Initializes the object
52
45
  # @param [Hash] attributes Model attributes in the form of hash
53
46
  def initialize(attributes = {})
@@ -80,18 +73,10 @@ module Notifo
80
73
  invalid_properties.push('invalid value for "email", email cannot be nil.')
81
74
  end
82
75
 
83
- if @email.to_s.length < 1
84
- invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.')
85
- end
86
-
87
76
  if @role.nil?
88
77
  invalid_properties.push('invalid value for "role", role cannot be nil.')
89
78
  end
90
79
 
91
- if @role.to_s.length < 1
92
- invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
93
- end
94
-
95
80
  invalid_properties
96
81
  end
97
82
 
@@ -99,40 +84,10 @@ module Notifo
99
84
  # @return true if the model is valid
100
85
  def valid?
101
86
  return false if @email.nil?
102
- return false if @email.to_s.length < 1
103
87
  return false if @role.nil?
104
- return false if @role.to_s.length < 1
105
88
  true
106
89
  end
107
90
 
108
- # Custom attribute writer method with validation
109
- # @param [Object] email Value to be assigned
110
- def email=(email)
111
- if email.nil?
112
- fail ArgumentError, 'email cannot be nil'
113
- end
114
-
115
- if email.to_s.length < 1
116
- fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.'
117
- end
118
-
119
- @email = email
120
- end
121
-
122
- # Custom attribute writer method with validation
123
- # @param [Object] role Value to be assigned
124
- def role=(role)
125
- if role.nil?
126
- fail ArgumentError, 'role cannot be nil'
127
- end
128
-
129
- if role.to_s.length < 1
130
- fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
131
- end
132
-
133
- @role = role
134
- end
135
-
136
91
  # Checks equality by comparing each attribute.
137
92
  # @param [Object] Object to be compared
138
93
  def ==(o)
@@ -167,9 +122,7 @@ module Notifo
167
122
  def build_from_hash(attributes)
168
123
  return nil unless attributes.is_a?(Hash)
169
124
  self.class.openapi_types.each_pair do |key, type|
170
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
- self.send("#{key}=", nil)
172
- elsif type =~ /\AArray<(.*)>/i
125
+ if type =~ /\AArray<(.*)>/i
173
126
  # check to ensure the input is an array given that the attribute
174
127
  # is documented as an array but the input is not
175
128
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -177,6 +130,8 @@ module Notifo
177
130
  end
178
131
  elsif !attributes[self.class.attribute_map[key]].nil?
179
132
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
180
135
  end
181
136
  end
182
137
 
@@ -189,8 +144,8 @@ module Notifo
189
144
  # @return [Object] Deserialized data
190
145
  def _deserialize(type, value)
191
146
  case type.to_sym
192
- when :Time
193
- Time.parse(value)
147
+ when :DateTime
148
+ DateTime.parse(value)
194
149
  when :Date
195
150
  Date.parse(value)
196
151
  when :String
@@ -220,9 +175,7 @@ module Notifo
220
175
  end
221
176
  end
222
177
  else # model
223
- # models (e.g. Pet) or oneOf
224
- klass = Notifo.const_get(type)
225
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ Notifo.const_get(type).build_from_hash(value)
226
179
  end
227
180
  end
228
181
 
@@ -270,8 +223,5 @@ module Notifo
270
223
  else
271
224
  value
272
225
  end
273
- end
274
-
275
- end
276
-
226
+ end end
277
227
  end
@@ -1,17 +1,15 @@
1
1
  =begin
2
2
  #Notifo API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- The version of the OpenAPI document: 1.0.0
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
14
  module Notifo
17
15
  class AppContributorDto
@@ -33,17 +31,12 @@ module Notifo
33
31
  }
34
32
  end
35
33
 
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- attribute_map.values
39
- end
40
-
41
34
  # Attribute type mapping.
42
35
  def self.openapi_types
43
36
  {
44
- :'user_id' => :'String',
45
- :'user_name' => :'String',
46
- :'role' => :'String'
37
+ :'user_id' => :'Object',
38
+ :'user_name' => :'Object',
39
+ :'role' => :'Object'
47
40
  }
48
41
  end
49
42
 
@@ -52,7 +45,7 @@ module Notifo
52
45
  Set.new([
53
46
  ])
54
47
  end
55
-
48
+
56
49
  # Initializes the object
57
50
  # @param [Hash] attributes Model attributes in the form of hash
58
51
  def initialize(attributes = {})
@@ -89,26 +82,14 @@ module Notifo
89
82
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
90
83
  end
91
84
 
92
- if @user_id.to_s.length < 1
93
- invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
94
- end
95
-
96
85
  if @user_name.nil?
97
86
  invalid_properties.push('invalid value for "user_name", user_name cannot be nil.')
98
87
  end
99
88
 
100
- if @user_name.to_s.length < 1
101
- invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.')
102
- end
103
-
104
89
  if @role.nil?
105
90
  invalid_properties.push('invalid value for "role", role cannot be nil.')
106
91
  end
107
92
 
108
- if @role.to_s.length < 1
109
- invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
110
- end
111
-
112
93
  invalid_properties
113
94
  end
114
95
 
@@ -116,56 +97,11 @@ module Notifo
116
97
  # @return true if the model is valid
117
98
  def valid?
118
99
  return false if @user_id.nil?
119
- return false if @user_id.to_s.length < 1
120
100
  return false if @user_name.nil?
121
- return false if @user_name.to_s.length < 1
122
101
  return false if @role.nil?
123
- return false if @role.to_s.length < 1
124
102
  true
125
103
  end
126
104
 
127
- # Custom attribute writer method with validation
128
- # @param [Object] user_id Value to be assigned
129
- def user_id=(user_id)
130
- if user_id.nil?
131
- fail ArgumentError, 'user_id cannot be nil'
132
- end
133
-
134
- if user_id.to_s.length < 1
135
- fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
136
- end
137
-
138
- @user_id = user_id
139
- end
140
-
141
- # Custom attribute writer method with validation
142
- # @param [Object] user_name Value to be assigned
143
- def user_name=(user_name)
144
- if user_name.nil?
145
- fail ArgumentError, 'user_name cannot be nil'
146
- end
147
-
148
- if user_name.to_s.length < 1
149
- fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.'
150
- end
151
-
152
- @user_name = user_name
153
- end
154
-
155
- # Custom attribute writer method with validation
156
- # @param [Object] role Value to be assigned
157
- def role=(role)
158
- if role.nil?
159
- fail ArgumentError, 'role cannot be nil'
160
- end
161
-
162
- if role.to_s.length < 1
163
- fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
164
- end
165
-
166
- @role = role
167
- end
168
-
169
105
  # Checks equality by comparing each attribute.
170
106
  # @param [Object] Object to be compared
171
107
  def ==(o)
@@ -201,9 +137,7 @@ module Notifo
201
137
  def build_from_hash(attributes)
202
138
  return nil unless attributes.is_a?(Hash)
203
139
  self.class.openapi_types.each_pair do |key, type|
204
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
205
- self.send("#{key}=", nil)
206
- elsif type =~ /\AArray<(.*)>/i
140
+ if type =~ /\AArray<(.*)>/i
207
141
  # check to ensure the input is an array given that the attribute
208
142
  # is documented as an array but the input is not
209
143
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -211,6 +145,8 @@ module Notifo
211
145
  end
212
146
  elsif !attributes[self.class.attribute_map[key]].nil?
213
147
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
214
150
  end
215
151
  end
216
152
 
@@ -223,8 +159,8 @@ module Notifo
223
159
  # @return [Object] Deserialized data
224
160
  def _deserialize(type, value)
225
161
  case type.to_sym
226
- when :Time
227
- Time.parse(value)
162
+ when :DateTime
163
+ DateTime.parse(value)
228
164
  when :Date
229
165
  Date.parse(value)
230
166
  when :String
@@ -254,9 +190,7 @@ module Notifo
254
190
  end
255
191
  end
256
192
  else # model
257
- # models (e.g. Pet) or oneOf
258
- klass = Notifo.const_get(type)
259
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
+ Notifo.const_get(type).build_from_hash(value)
260
194
  end
261
195
  end
262
196
 
@@ -304,8 +238,5 @@ module Notifo
304
238
  else
305
239
  value
306
240
  end
307
- end
308
-
309
- end
310
-
241
+ end end
311
242
  end
@@ -1,17 +1,15 @@
1
1
  =begin
2
2
  #Notifo API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- The version of the OpenAPI document: 1.0.0
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
14
  module Notifo
17
15
  class AppDetailsDto
@@ -84,45 +82,34 @@ module Notifo
84
82
  }
85
83
  end
86
84
 
87
- # Returns all the JSON keys this model knows about
88
- def self.acceptable_attributes
89
- attribute_map.values
90
- end
91
-
92
85
  # Attribute type mapping.
93
86
  def self.openapi_types
94
87
  {
95
- :'id' => :'String',
96
- :'name' => :'String',
97
- :'role' => :'String',
98
- :'languages' => :'Array<String>',
99
- :'email_address' => :'String',
100
- :'email_name' => :'String',
101
- :'firebase_project' => :'String',
102
- :'firebase_credential' => :'String',
103
- :'webhook_url' => :'String',
104
- :'confirm_url' => :'String',
105
- :'allow_email' => :'Boolean',
106
- :'allow_sms' => :'Boolean',
107
- :'email_verification_status' => :'EmailVerificationStatus',
108
- :'api_keys' => :'Hash<String, String>',
109
- :'contributors' => :'Array<AppContributorDto>',
110
- :'counters' => :'Hash<String, Integer>'
88
+ :'id' => :'Object',
89
+ :'name' => :'Object',
90
+ :'role' => :'Object',
91
+ :'languages' => :'Object',
92
+ :'email_address' => :'Object',
93
+ :'email_name' => :'Object',
94
+ :'firebase_project' => :'Object',
95
+ :'firebase_credential' => :'Object',
96
+ :'webhook_url' => :'Object',
97
+ :'confirm_url' => :'Object',
98
+ :'allow_email' => :'Object',
99
+ :'allow_sms' => :'Object',
100
+ :'email_verification_status' => :'Object',
101
+ :'api_keys' => :'Object',
102
+ :'contributors' => :'Object',
103
+ :'counters' => :'Object'
111
104
  }
112
105
  end
113
106
 
114
107
  # List of attributes with nullable: true
115
108
  def self.openapi_nullable
116
109
  Set.new([
117
- :'email_address',
118
- :'email_name',
119
- :'firebase_project',
120
- :'firebase_credential',
121
- :'webhook_url',
122
- :'confirm_url',
123
110
  ])
124
111
  end
125
-
112
+
126
113
  # Initializes the object
127
114
  # @param [Hash] attributes Model attributes in the form of hash
128
115
  def initialize(attributes = {})
@@ -219,26 +206,14 @@ module Notifo
219
206
  invalid_properties.push('invalid value for "id", id cannot be nil.')
220
207
  end
221
208
 
222
- if @id.to_s.length < 1
223
- invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
224
- end
225
-
226
209
  if @name.nil?
227
210
  invalid_properties.push('invalid value for "name", name cannot be nil.')
228
211
  end
229
212
 
230
- if @name.to_s.length < 1
231
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
232
- end
233
-
234
213
  if @role.nil?
235
214
  invalid_properties.push('invalid value for "role", role cannot be nil.')
236
215
  end
237
216
 
238
- if @role.to_s.length < 1
239
- invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
240
- end
241
-
242
217
  if @languages.nil?
243
218
  invalid_properties.push('invalid value for "languages", languages cannot be nil.')
244
219
  end
@@ -274,11 +249,8 @@ module Notifo
274
249
  # @return true if the model is valid
275
250
  def valid?
276
251
  return false if @id.nil?
277
- return false if @id.to_s.length < 1
278
252
  return false if @name.nil?
279
- return false if @name.to_s.length < 1
280
253
  return false if @role.nil?
281
- return false if @role.to_s.length < 1
282
254
  return false if @languages.nil?
283
255
  return false if @allow_email.nil?
284
256
  return false if @allow_sms.nil?
@@ -289,48 +261,6 @@ module Notifo
289
261
  true
290
262
  end
291
263
 
292
- # Custom attribute writer method with validation
293
- # @param [Object] id Value to be assigned
294
- def id=(id)
295
- if id.nil?
296
- fail ArgumentError, 'id cannot be nil'
297
- end
298
-
299
- if id.to_s.length < 1
300
- fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
301
- end
302
-
303
- @id = id
304
- end
305
-
306
- # Custom attribute writer method with validation
307
- # @param [Object] name Value to be assigned
308
- def name=(name)
309
- if name.nil?
310
- fail ArgumentError, 'name cannot be nil'
311
- end
312
-
313
- if name.to_s.length < 1
314
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
315
- end
316
-
317
- @name = name
318
- end
319
-
320
- # Custom attribute writer method with validation
321
- # @param [Object] role Value to be assigned
322
- def role=(role)
323
- if role.nil?
324
- fail ArgumentError, 'role cannot be nil'
325
- end
326
-
327
- if role.to_s.length < 1
328
- fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
329
- end
330
-
331
- @role = role
332
- end
333
-
334
264
  # Checks equality by comparing each attribute.
335
265
  # @param [Object] Object to be compared
336
266
  def ==(o)
@@ -379,9 +309,7 @@ module Notifo
379
309
  def build_from_hash(attributes)
380
310
  return nil unless attributes.is_a?(Hash)
381
311
  self.class.openapi_types.each_pair do |key, type|
382
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
383
- self.send("#{key}=", nil)
384
- elsif type =~ /\AArray<(.*)>/i
312
+ if type =~ /\AArray<(.*)>/i
385
313
  # check to ensure the input is an array given that the attribute
386
314
  # is documented as an array but the input is not
387
315
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -389,6 +317,8 @@ module Notifo
389
317
  end
390
318
  elsif !attributes[self.class.attribute_map[key]].nil?
391
319
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
320
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
321
+ self.send("#{key}=", nil)
392
322
  end
393
323
  end
394
324
 
@@ -401,8 +331,8 @@ module Notifo
401
331
  # @return [Object] Deserialized data
402
332
  def _deserialize(type, value)
403
333
  case type.to_sym
404
- when :Time
405
- Time.parse(value)
334
+ when :DateTime
335
+ DateTime.parse(value)
406
336
  when :Date
407
337
  Date.parse(value)
408
338
  when :String
@@ -432,9 +362,7 @@ module Notifo
432
362
  end
433
363
  end
434
364
  else # model
435
- # models (e.g. Pet) or oneOf
436
- klass = Notifo.const_get(type)
437
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
365
+ Notifo.const_get(type).build_from_hash(value)
438
366
  end
439
367
  end
440
368
 
@@ -482,8 +410,5 @@ module Notifo
482
410
  else
483
411
  value
484
412
  end
485
- end
486
-
487
- end
488
-
413
+ end end
489
414
  end