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.
Files changed (283) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +245 -60
  3. data/docs/AddContributorDto.md +1 -1
  4. data/docs/AdminProfileDto.md +7 -0
  5. data/docs/AppsApi.md +1 -1
  6. data/docs/ChannelSendInfoDto.md +4 -0
  7. data/docs/ConfigsApi.md +1 -1
  8. data/docs/DiagnosticsApi.md +85 -0
  9. data/docs/EmailTemplatesApi.md +26 -26
  10. data/docs/EventDto.md +0 -2
  11. data/docs/EventsApi.md +1 -1
  12. data/docs/InfoDto.md +7 -0
  13. data/docs/IntegrationPropertyDto.md +1 -1
  14. data/docs/LogsApi.md +1 -1
  15. data/docs/MediaApi.md +154 -4
  16. data/docs/MessagingTemplatesApi.md +26 -26
  17. data/docs/MobilePushApi.md +1 -1
  18. data/docs/MobilePushTokenDto.md +1 -0
  19. data/docs/MobilePushTokenDto2.md +1 -0
  20. data/docs/NotificationsApi.md +131 -7
  21. data/docs/PingApi.md +85 -2
  22. data/docs/{IntegrationPropertyType.md → PropertyType.md} +1 -1
  23. data/docs/PublishDto.md +2 -0
  24. data/docs/RegisterMobileTokenDto.md +1 -0
  25. data/docs/SendConfiguration.md +6 -0
  26. data/docs/SmsTemplatesApi.md +26 -26
  27. data/docs/SystemUsersApi.md +5 -4
  28. data/docs/TemplatesApi.md +1 -1
  29. data/docs/TopicsApi.md +6 -6
  30. data/docs/TrackNotificationDto.md +1 -0
  31. data/docs/UserApi.md +41 -1
  32. data/docs/UserDto.md +1 -2
  33. data/docs/UserNotificationBaseDto.md +1 -0
  34. data/docs/UserNotificationDetailsDto.md +1 -0
  35. data/docs/UserNotificationDto.md +1 -0
  36. data/docs/UsersApi.md +101 -6
  37. data/docs/WebPushSubscriptionDto.md +7 -0
  38. data/lib/notifo/api/apps_api.rb +1 -1
  39. data/lib/notifo/api/configs_api.rb +1 -1
  40. data/lib/notifo/api/diagnostics_api.rb +116 -0
  41. data/lib/notifo/api/email_templates_api.rb +46 -46
  42. data/lib/notifo/api/events_api.rb +1 -1
  43. data/lib/notifo/api/logs_api.rb +1 -1
  44. data/lib/notifo/api/media_api.rb +197 -2
  45. data/lib/notifo/api/messaging_templates_api.rb +46 -46
  46. data/lib/notifo/api/mobile_push_api.rb +1 -1
  47. data/lib/notifo/api/notifications_api.rb +150 -3
  48. data/lib/notifo/api/ping_api.rb +102 -2
  49. data/lib/notifo/api/sms_templates_api.rb +46 -46
  50. data/lib/notifo/api/system_users_api.rb +6 -6
  51. data/lib/notifo/api/templates_api.rb +1 -1
  52. data/lib/notifo/api/topics_api.rb +10 -10
  53. data/lib/notifo/api/user_api.rb +49 -1
  54. data/lib/notifo/api/users_api.rb +139 -7
  55. data/lib/notifo/api_client.rb +1 -1
  56. data/lib/notifo/api_error.rb +1 -1
  57. data/lib/notifo/configuration.rb +3 -3
  58. data/lib/notifo/models/add_allowed_topic_dto.rb +1 -1
  59. data/lib/notifo/models/add_contributor_dto.rb +2 -6
  60. data/lib/notifo/models/admin_profile_dto.rb +208 -0
  61. data/lib/notifo/models/app_contributor_dto.rb +1 -1
  62. data/lib/notifo/models/app_details_dto.rb +1 -1
  63. data/lib/notifo/models/app_dto.rb +1 -1
  64. data/lib/notifo/models/app_id_media_body.rb +1 -1
  65. data/lib/notifo/models/channel_condition.rb +1 -1
  66. data/lib/notifo/models/channel_send.rb +1 -1
  67. data/lib/notifo/models/channel_send_info_dto.rb +48 -6
  68. data/lib/notifo/models/channel_setting_dto.rb +1 -1
  69. data/lib/notifo/models/channel_template_details_dto_of_email_template_dto.rb +1 -1
  70. data/lib/notifo/models/channel_template_details_dto_of_messaging_template_dto.rb +1 -1
  71. data/lib/notifo/models/channel_template_details_dto_of_sms_template_dto.rb +1 -1
  72. data/lib/notifo/models/channel_template_dto.rb +1 -1
  73. data/lib/notifo/models/configured_integration_dto.rb +1 -1
  74. data/lib/notifo/models/configured_integrations_dto.rb +1 -1
  75. data/lib/notifo/models/confirm_mode.rb +1 -1
  76. data/lib/notifo/models/create_channel_template_dto.rb +1 -1
  77. data/lib/notifo/models/create_channel_template_language_dto.rb +1 -1
  78. data/lib/notifo/models/create_integration_dto.rb +1 -1
  79. data/lib/notifo/models/create_system_user_dto.rb +1 -1
  80. data/lib/notifo/models/email_formatting_error.rb +1 -1
  81. data/lib/notifo/models/email_preview_dto.rb +1 -1
  82. data/lib/notifo/models/email_preview_request_dto.rb +1 -1
  83. data/lib/notifo/models/email_preview_type.rb +1 -1
  84. data/lib/notifo/models/email_template_dto.rb +1 -1
  85. data/lib/notifo/models/email_template_type.rb +1 -1
  86. data/lib/notifo/models/error_dto.rb +1 -1
  87. data/lib/notifo/models/event_dto.rb +2 -24
  88. data/lib/notifo/models/handled_info_dto.rb +1 -1
  89. data/lib/notifo/models/info_dto.rb +212 -0
  90. data/lib/notifo/models/integration_created_dto.rb +1 -1
  91. data/lib/notifo/models/integration_definition_dto.rb +1 -1
  92. data/lib/notifo/models/integration_property_dto.rb +1 -1
  93. data/lib/notifo/models/integration_status.rb +1 -1
  94. data/lib/notifo/models/iso_day_of_week.rb +1 -1
  95. data/lib/notifo/models/list_response_dto_of_channel_template_dto.rb +1 -1
  96. data/lib/notifo/models/list_response_dto_of_event_dto.rb +1 -1
  97. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +1 -1
  98. data/lib/notifo/models/list_response_dto_of_media_dto.rb +1 -1
  99. data/lib/notifo/models/list_response_dto_of_mobile_push_token_dto.rb +1 -1
  100. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +1 -1
  101. data/lib/notifo/models/list_response_dto_of_system_user_dto.rb +1 -1
  102. data/lib/notifo/models/list_response_dto_of_template_dto.rb +1 -1
  103. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +1 -1
  104. data/lib/notifo/models/list_response_dto_of_user_dto.rb +1 -1
  105. data/lib/notifo/models/list_response_dto_of_user_notification_details_dto.rb +1 -1
  106. data/lib/notifo/models/list_response_dto_of_user_notification_dto.rb +1 -1
  107. data/lib/notifo/models/localized_text.rb +1 -1
  108. data/lib/notifo/models/log_entry_dto.rb +1 -1
  109. data/lib/notifo/models/media_dto.rb +1 -1
  110. data/lib/notifo/models/media_metadata.rb +1 -1
  111. data/lib/notifo/models/media_type.rb +1 -1
  112. data/lib/notifo/models/messaging_template_dto.rb +1 -1
  113. data/lib/notifo/models/mobile_device_type.rb +1 -1
  114. data/lib/notifo/models/mobile_push_token_dto.rb +13 -2
  115. data/lib/notifo/models/mobile_push_token_dto2.rb +16 -5
  116. data/lib/notifo/models/notification_formatting_dto.rb +1 -1
  117. data/lib/notifo/models/notification_properties.rb +1 -1
  118. data/lib/notifo/models/process_status.rb +1 -1
  119. data/lib/notifo/models/profile_dto.rb +1 -1
  120. data/lib/notifo/models/{integration_property_type.rb → property_type.rb} +4 -4
  121. data/lib/notifo/models/publish_dto.rb +26 -2
  122. data/lib/notifo/models/publish_many_dto.rb +1 -1
  123. data/lib/notifo/models/register_mobile_token_dto.rb +16 -5
  124. data/lib/notifo/models/resize_mode.rb +1 -1
  125. data/lib/notifo/models/scheduling_dto.rb +1 -1
  126. data/lib/notifo/models/scheduling_type.rb +1 -1
  127. data/lib/notifo/models/send_configuration.rb +201 -0
  128. data/lib/notifo/models/sms_template_dto.rb +1 -1
  129. data/lib/notifo/models/subscribe_dto.rb +1 -1
  130. data/lib/notifo/models/subscribe_many_dto.rb +1 -1
  131. data/lib/notifo/models/subscription_dto.rb +1 -1
  132. data/lib/notifo/models/system_user_dto.rb +1 -1
  133. data/lib/notifo/models/template_dto.rb +1 -1
  134. data/lib/notifo/models/topic_channel.rb +2 -2
  135. data/lib/notifo/models/topic_dto.rb +1 -1
  136. data/lib/notifo/models/topic_query_scope.rb +1 -1
  137. data/lib/notifo/models/track_notification_dto.rb +12 -2
  138. data/lib/notifo/models/update_channel_template_dto_of_email_template_dto.rb +1 -1
  139. data/lib/notifo/models/update_channel_template_dto_of_messaging_template_dto.rb +1 -1
  140. data/lib/notifo/models/update_channel_template_dto_of_sms_template_dto.rb +1 -1
  141. data/lib/notifo/models/update_integration_dto.rb +1 -1
  142. data/lib/notifo/models/update_profile_dto.rb +1 -1
  143. data/lib/notifo/models/update_system_user_dto.rb +1 -1
  144. data/lib/notifo/models/upsert_app_dto.rb +1 -1
  145. data/lib/notifo/models/upsert_template_dto.rb +1 -1
  146. data/lib/notifo/models/upsert_templates_dto.rb +1 -1
  147. data/lib/notifo/models/upsert_topic_dto.rb +1 -1
  148. data/lib/notifo/models/upsert_topics_dto.rb +1 -1
  149. data/lib/notifo/models/upsert_user_dto.rb +1 -1
  150. data/lib/notifo/models/upsert_users_dto.rb +1 -1
  151. data/lib/notifo/models/user_dto.rb +19 -32
  152. data/lib/notifo/models/user_notification_base_dto.rb +13 -2
  153. data/lib/notifo/models/user_notification_channel_dto.rb +1 -1
  154. data/lib/notifo/models/user_notification_details_dto.rb +13 -2
  155. data/lib/notifo/models/user_notification_dto.rb +13 -2
  156. data/lib/notifo/models/user_property_dto.rb +1 -1
  157. data/lib/notifo/models/user_topic_dto.rb +1 -1
  158. data/lib/notifo/models/web_push_subscription_dto.rb +212 -0
  159. data/lib/notifo/version.rb +1 -1
  160. data/lib/notifo.rb +7 -2
  161. data/notifo.gemspec +2 -3
  162. data/spec/api/apps_api_spec.rb +1 -1
  163. data/spec/api/configs_api_spec.rb +1 -1
  164. data/spec/api/diagnostics_api_spec.rb +54 -0
  165. data/spec/api/email_templates_api_spec.rb +6 -6
  166. data/spec/api/events_api_spec.rb +1 -1
  167. data/spec/api/logs_api_spec.rb +1 -1
  168. data/spec/api/media_api_spec.rb +52 -1
  169. data/spec/api/messaging_templates_api_spec.rb +6 -6
  170. data/spec/api/mobile_push_api_spec.rb +1 -1
  171. data/spec/api/notifications_api_spec.rb +38 -2
  172. data/spec/api/ping_api_spec.rb +23 -1
  173. data/spec/api/sms_templates_api_spec.rb +6 -6
  174. data/spec/api/system_users_api_spec.rb +2 -2
  175. data/spec/api/templates_api_spec.rb +1 -1
  176. data/spec/api/topics_api_spec.rb +2 -2
  177. data/spec/api/user_api_spec.rb +11 -1
  178. data/spec/api/users_api_spec.rb +28 -2
  179. data/spec/api_client_spec.rb +1 -1
  180. data/spec/configuration_spec.rb +4 -4
  181. data/spec/models/add_allowed_topic_dto_spec.rb +1 -1
  182. data/spec/models/add_contributor_dto_spec.rb +1 -1
  183. data/spec/models/admin_profile_dto_spec.rb +40 -0
  184. data/spec/models/app_contributor_dto_spec.rb +1 -1
  185. data/spec/models/app_details_dto_spec.rb +1 -1
  186. data/spec/models/app_dto_spec.rb +1 -1
  187. data/spec/models/app_id_media_body_spec.rb +1 -1
  188. data/spec/models/channel_condition_spec.rb +1 -1
  189. data/spec/models/channel_send_info_dto_spec.rb +25 -1
  190. data/spec/models/channel_send_spec.rb +1 -1
  191. data/spec/models/channel_setting_dto_spec.rb +1 -1
  192. data/spec/models/channel_template_details_dto_of_email_template_dto_spec.rb +1 -1
  193. data/spec/models/channel_template_details_dto_of_messaging_template_dto_spec.rb +1 -1
  194. data/spec/models/channel_template_details_dto_of_sms_template_dto_spec.rb +1 -1
  195. data/spec/models/channel_template_dto_spec.rb +1 -1
  196. data/spec/models/configured_integration_dto_spec.rb +1 -1
  197. data/spec/models/configured_integrations_dto_spec.rb +1 -1
  198. data/spec/models/confirm_mode_spec.rb +1 -1
  199. data/spec/models/create_channel_template_dto_spec.rb +1 -1
  200. data/spec/models/create_channel_template_language_dto_spec.rb +1 -1
  201. data/spec/models/create_integration_dto_spec.rb +1 -1
  202. data/spec/models/create_system_user_dto_spec.rb +1 -1
  203. data/spec/models/email_formatting_error_spec.rb +1 -1
  204. data/spec/models/email_preview_dto_spec.rb +1 -1
  205. data/spec/models/email_preview_request_dto_spec.rb +1 -1
  206. data/spec/models/email_preview_type_spec.rb +1 -1
  207. data/spec/models/email_template_dto_spec.rb +1 -1
  208. data/spec/models/email_template_type_spec.rb +1 -1
  209. data/spec/models/error_dto_spec.rb +1 -1
  210. data/spec/models/event_dto_spec.rb +1 -13
  211. data/spec/models/handled_info_dto_spec.rb +1 -1
  212. data/spec/models/info_dto_spec.rb +40 -0
  213. data/spec/models/integration_created_dto_spec.rb +1 -1
  214. data/spec/models/integration_definition_dto_spec.rb +1 -1
  215. data/spec/models/integration_property_dto_spec.rb +1 -1
  216. data/spec/models/integration_status_spec.rb +1 -1
  217. data/spec/models/iso_day_of_week_spec.rb +1 -1
  218. data/spec/models/list_response_dto_of_channel_template_dto_spec.rb +1 -1
  219. data/spec/models/list_response_dto_of_event_dto_spec.rb +1 -1
  220. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +1 -1
  221. data/spec/models/list_response_dto_of_media_dto_spec.rb +1 -1
  222. data/spec/models/list_response_dto_of_mobile_push_token_dto_spec.rb +1 -1
  223. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +1 -1
  224. data/spec/models/list_response_dto_of_system_user_dto_spec.rb +1 -1
  225. data/spec/models/list_response_dto_of_template_dto_spec.rb +1 -1
  226. data/spec/models/list_response_dto_of_topic_dto_spec.rb +1 -1
  227. data/spec/models/list_response_dto_of_user_dto_spec.rb +1 -1
  228. data/spec/models/list_response_dto_of_user_notification_details_dto_spec.rb +1 -1
  229. data/spec/models/list_response_dto_of_user_notification_dto_spec.rb +1 -1
  230. data/spec/models/localized_text_spec.rb +1 -1
  231. data/spec/models/log_entry_dto_spec.rb +1 -1
  232. data/spec/models/media_dto_spec.rb +1 -1
  233. data/spec/models/media_metadata_spec.rb +1 -1
  234. data/spec/models/media_type_spec.rb +1 -1
  235. data/spec/models/messaging_template_dto_spec.rb +1 -1
  236. data/spec/models/mobile_device_type_spec.rb +1 -1
  237. data/spec/models/mobile_push_token_dto2_spec.rb +7 -1
  238. data/spec/models/mobile_push_token_dto_spec.rb +7 -1
  239. data/spec/models/notification_formatting_dto_spec.rb +1 -1
  240. data/spec/models/notification_properties_spec.rb +1 -1
  241. data/spec/models/process_status_spec.rb +1 -1
  242. data/spec/models/profile_dto_spec.rb +1 -1
  243. data/spec/models/{integration_property_type_spec.rb → property_type_spec.rb} +7 -7
  244. data/spec/models/publish_dto_spec.rb +13 -1
  245. data/spec/models/publish_many_dto_spec.rb +1 -1
  246. data/spec/models/register_mobile_token_dto_spec.rb +7 -1
  247. data/spec/models/resize_mode_spec.rb +1 -1
  248. data/spec/models/scheduling_dto_spec.rb +1 -1
  249. data/spec/models/scheduling_type_spec.rb +1 -1
  250. data/spec/models/send_configuration_spec.rb +34 -0
  251. data/spec/models/sms_template_dto_spec.rb +1 -1
  252. data/spec/models/subscribe_dto_spec.rb +1 -1
  253. data/spec/models/subscribe_many_dto_spec.rb +1 -1
  254. data/spec/models/subscription_dto_spec.rb +1 -1
  255. data/spec/models/system_user_dto_spec.rb +1 -1
  256. data/spec/models/template_dto_spec.rb +1 -1
  257. data/spec/models/topic_channel_spec.rb +1 -1
  258. data/spec/models/topic_dto_spec.rb +1 -1
  259. data/spec/models/topic_query_scope_spec.rb +1 -1
  260. data/spec/models/track_notification_dto_spec.rb +7 -1
  261. data/spec/models/update_channel_template_dto_of_email_template_dto_spec.rb +1 -1
  262. data/spec/models/update_channel_template_dto_of_messaging_template_dto_spec.rb +1 -1
  263. data/spec/models/update_channel_template_dto_of_sms_template_dto_spec.rb +1 -1
  264. data/spec/models/update_integration_dto_spec.rb +1 -1
  265. data/spec/models/update_profile_dto_spec.rb +1 -1
  266. data/spec/models/update_system_user_dto_spec.rb +1 -1
  267. data/spec/models/upsert_app_dto_spec.rb +1 -1
  268. data/spec/models/upsert_template_dto_spec.rb +1 -1
  269. data/spec/models/upsert_templates_dto_spec.rb +1 -1
  270. data/spec/models/upsert_topic_dto_spec.rb +1 -1
  271. data/spec/models/upsert_topics_dto_spec.rb +1 -1
  272. data/spec/models/upsert_user_dto_spec.rb +1 -1
  273. data/spec/models/upsert_users_dto_spec.rb +1 -1
  274. data/spec/models/user_dto_spec.rb +7 -13
  275. data/spec/models/user_notification_base_dto_spec.rb +7 -1
  276. data/spec/models/user_notification_channel_dto_spec.rb +1 -1
  277. data/spec/models/user_notification_details_dto_spec.rb +7 -1
  278. data/spec/models/user_notification_dto_spec.rb +7 -1
  279. data/spec/models/user_property_dto_spec.rb +1 -1
  280. data/spec/models/user_topic_dto_spec.rb +1 -1
  281. data/spec/models/web_push_subscription_dto_spec.rb +40 -0
  282. data/spec/spec_helper.rb +1 -1
  283. 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.29
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, email_template, sms_template, created, formatting, settings, properties, scheduling, counters, silent, time_to_live_in_seconds].hash
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
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
9
+ Swagger Codegen version: 3.0.36
10
10
  =end
11
11
 
12
12
  require 'date'
@@ -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.29
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