osuny_api 0.2.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -7
  3. data/Gemfile.lock +55 -31
  4. data/LICENSE.txt +1 -1
  5. data/README.md +1080 -17
  6. data/Rakefile +1 -1
  7. data/config.json +10 -0
  8. data/docs/AgendaCategoriesBody.md +7 -0
  9. data/docs/AgendaEventsBody.md +7 -0
  10. data/docs/CategoriesIdBody.md +7 -0
  11. data/docs/CategoriesIdBody1.md +7 -0
  12. data/docs/CategoriesIdBody2.md +7 -0
  13. data/docs/CategoriesUpsertBody.md +7 -0
  14. data/docs/CategoriesUpsertBody1.md +7 -0
  15. data/docs/CategoriesUpsertBody2.md +7 -0
  16. data/docs/CommunicationBlockAgenda.md +14 -0
  17. data/docs/CommunicationBlockAgendaData.md +20 -0
  18. data/docs/CommunicationBlockAgendaDataElements.md +7 -0
  19. data/docs/CommunicationBlockCallToAction.md +14 -0
  20. data/docs/CommunicationBlockCallToActionData.md +12 -0
  21. data/docs/CommunicationBlockCallToActionDataElements.md +9 -0
  22. data/docs/CommunicationBlockCallToActionDataImage.md +9 -0
  23. data/docs/CommunicationBlockCategories.md +14 -0
  24. data/docs/CommunicationBlockCategoriesData.md +13 -0
  25. data/docs/CommunicationBlockChapter.md +14 -0
  26. data/docs/CommunicationBlockChapterData.md +12 -0
  27. data/docs/CommunicationBlockContact.md +14 -0
  28. data/docs/CommunicationBlockContactData.md +27 -0
  29. data/docs/CommunicationBlockContactDataElements.md +9 -0
  30. data/docs/CommunicationBlockContactDataTimeSlotMorning.md +8 -0
  31. data/docs/CommunicationBlockDatatable.md +14 -0
  32. data/docs/CommunicationBlockDatatableData.md +11 -0
  33. data/docs/CommunicationBlockDatatableDataElements.md +7 -0
  34. data/docs/CommunicationBlockDefinitions.md +14 -0
  35. data/docs/CommunicationBlockDefinitionsData.md +8 -0
  36. data/docs/CommunicationBlockDefinitionsDataElements.md +8 -0
  37. data/docs/CommunicationBlockEmbed.md +14 -0
  38. data/docs/CommunicationBlockEmbedData.md +9 -0
  39. data/docs/CommunicationBlockFeatures.md +14 -0
  40. data/docs/CommunicationBlockFeaturesData.md +8 -0
  41. data/docs/CommunicationBlockFeaturesDataElements.md +11 -0
  42. data/docs/CommunicationBlockFiles.md +14 -0
  43. data/docs/CommunicationBlockFilesData.md +8 -0
  44. data/docs/CommunicationBlockFilesDataElements.md +9 -0
  45. data/docs/CommunicationBlockGallery.md +14 -0
  46. data/docs/CommunicationBlockGalleryData.md +9 -0
  47. data/docs/CommunicationBlockGalleryDataElements.md +10 -0
  48. data/docs/CommunicationBlockImage.md +14 -0
  49. data/docs/CommunicationBlockImageData.md +10 -0
  50. data/docs/CommunicationBlockKeyFigures.md +14 -0
  51. data/docs/CommunicationBlockKeyFiguresData.md +8 -0
  52. data/docs/CommunicationBlockKeyFiguresDataElements.md +10 -0
  53. data/docs/CommunicationBlockLicense.md +14 -0
  54. data/docs/CommunicationBlockLicenseData.md +12 -0
  55. data/docs/CommunicationBlockLinks.md +14 -0
  56. data/docs/CommunicationBlockLinksData.md +8 -0
  57. data/docs/CommunicationBlockLinksDataElements.md +11 -0
  58. data/docs/CommunicationBlockLocations.md +14 -0
  59. data/docs/CommunicationBlockLocationsData.md +10 -0
  60. data/docs/CommunicationBlockLocationsDataElements.md +7 -0
  61. data/docs/CommunicationBlockOrganizations.md +14 -0
  62. data/docs/CommunicationBlockOrganizationsData.md +15 -0
  63. data/docs/CommunicationBlockOrganizationsDataElements.md +10 -0
  64. data/docs/CommunicationBlockPages.md +14 -0
  65. data/docs/CommunicationBlockPagesData.md +15 -0
  66. data/docs/CommunicationBlockPapers.md +14 -0
  67. data/docs/CommunicationBlockPapersData.md +9 -0
  68. data/docs/CommunicationBlockPersons.md +14 -0
  69. data/docs/CommunicationBlockPersonsData.md +16 -0
  70. data/docs/CommunicationBlockPersonsDataElements.md +8 -0
  71. data/docs/CommunicationBlockPosts.md +14 -0
  72. data/docs/CommunicationBlockPostsData.md +18 -0
  73. data/docs/CommunicationBlockPrograms.md +14 -0
  74. data/docs/CommunicationBlockProgramsData.md +11 -0
  75. data/docs/CommunicationBlockProjects.md +14 -0
  76. data/docs/CommunicationBlockProjectsData.md +16 -0
  77. data/docs/CommunicationBlockSound.md +14 -0
  78. data/docs/CommunicationBlockSoundData.md +9 -0
  79. data/docs/CommunicationBlockTestimonials.md +14 -0
  80. data/docs/CommunicationBlockTestimonialsData.md +7 -0
  81. data/docs/CommunicationBlockTestimonialsDataElements.md +10 -0
  82. data/docs/CommunicationBlockTimeline.md +14 -0
  83. data/docs/CommunicationBlockTimelineData.md +8 -0
  84. data/docs/CommunicationBlockTimelineDataElements.md +8 -0
  85. data/docs/CommunicationBlockTitle.md +14 -0
  86. data/docs/CommunicationBlockTitleData.md +7 -0
  87. data/docs/CommunicationBlockVideo.md +14 -0
  88. data/docs/CommunicationBlockVideoData.md +11 -0
  89. data/docs/CommunicationBlockVolumes.md +14 -0
  90. data/docs/CommunicationWebsite.md +15 -0
  91. data/docs/CommunicationWebsiteAgendaCategory.md +14 -0
  92. data/docs/CommunicationWebsiteAgendaCategoryApi.md +329 -0
  93. data/docs/CommunicationWebsiteAgendaCategoryLocalization.md +17 -0
  94. data/docs/CommunicationWebsiteAgendaCategoryLocalizationFeaturedImage.md +10 -0
  95. data/docs/CommunicationWebsiteAgendaEvent.md +18 -0
  96. data/docs/CommunicationWebsiteAgendaEventApi.md +329 -0
  97. data/docs/CommunicationWebsiteAgendaEventLocalization.md +25 -0
  98. data/docs/CommunicationWebsiteAgendaEventLocalizationAddToCalendarUrls.md +11 -0
  99. data/docs/CommunicationWebsiteAgendaEventTimeSlot.md +13 -0
  100. data/docs/CommunicationWebsiteAgendaEventTimeSlotLocalization.md +13 -0
  101. data/docs/CommunicationWebsiteApi.md +106 -0
  102. data/docs/CommunicationWebsiteDeuxfleurs.md +8 -0
  103. data/docs/CommunicationWebsiteFeatures.md +9 -0
  104. data/docs/CommunicationWebsiteGit.md +10 -0
  105. data/docs/CommunicationWebsiteLocalization.md +23 -0
  106. data/docs/CommunicationWebsitePage.md +17 -0
  107. data/docs/CommunicationWebsitePageApi.md +329 -0
  108. data/docs/CommunicationWebsitePageCategory.md +14 -0
  109. data/docs/CommunicationWebsitePageCategoryApi.md +329 -0
  110. data/docs/CommunicationWebsitePageCategoryLocalization.md +17 -0
  111. data/docs/CommunicationWebsitePageLocalization.md +24 -0
  112. data/docs/CommunicationWebsitePost.md +12 -0
  113. data/docs/CommunicationWebsitePostApi.md +329 -0
  114. data/docs/CommunicationWebsitePostLocalization.md +21 -0
  115. data/docs/CommunicationWebsiteShowcase.md +9 -0
  116. data/docs/CommunicationWebsiteShowcaseTags.md +9 -0
  117. data/docs/EventsIdBody.md +7 -0
  118. data/docs/EventsUpsertBody.md +7 -0
  119. data/docs/OneOfcommunicationWebsiteAgendaCategoryLocalizationBlocksItems.md +6 -0
  120. data/docs/OneOfcommunicationWebsiteAgendaEventLocalizationBlocksItems.md +6 -0
  121. data/docs/OneOfcommunicationWebsitePageCategoryLocalizationBlocksItems.md +6 -0
  122. data/docs/OneOfcommunicationWebsitePageLocalizationBlocksItems.md +6 -0
  123. data/docs/OneOfcommunicationWebsitePostLocalizationBlocksItems.md +6 -0
  124. data/docs/OneOfuniversityOrganizationCategoryLocalizationBlocksItems.md +6 -0
  125. data/docs/OneOfuniversityOrganizationLocalizationBlocksItems.md +6 -0
  126. data/docs/OrganizationsCategoriesBody.md +7 -0
  127. data/docs/OrganizationsIdBody.md +7 -0
  128. data/docs/OrganizationsUpsertBody.md +7 -0
  129. data/docs/PagesCategoriesBody.md +7 -0
  130. data/docs/PagesIdBody.md +7 -0
  131. data/docs/PagesUpsertBody.md +7 -0
  132. data/docs/PostsIdBody.md +7 -0
  133. data/docs/PostsUpsertBody.md +7 -0
  134. data/docs/UniversityOrganization.md +24 -0
  135. data/docs/UniversityOrganizationApi.md +314 -0
  136. data/docs/UniversityOrganizationCategory.md +14 -0
  137. data/docs/UniversityOrganizationCategoryApi.md +314 -0
  138. data/docs/UniversityOrganizationCategoryLocalization.md +16 -0
  139. data/docs/UniversityOrganizationLocalization.md +24 -0
  140. data/docs/UniversityOrganizationsBody.md +7 -0
  141. data/docs/WebsiteIdPagesBody.md +7 -0
  142. data/docs/WebsiteIdPostsBody.md +7 -0
  143. data/generate.sh +2 -0
  144. data/git_push.sh +55 -0
  145. data/lib/osuny_api/api/communication_website_agenda_category_api.rb +374 -0
  146. data/lib/osuny_api/api/communication_website_agenda_event_api.rb +374 -0
  147. data/lib/osuny_api/api/communication_website_api.rb +122 -0
  148. data/lib/osuny_api/api/communication_website_page_api.rb +374 -0
  149. data/lib/osuny_api/api/communication_website_page_category_api.rb +374 -0
  150. data/lib/osuny_api/api/communication_website_post_api.rb +374 -0
  151. data/lib/osuny_api/api/university_organization_api.rb +338 -0
  152. data/lib/osuny_api/api/university_organization_category_api.rb +338 -0
  153. data/lib/osuny_api/api_client.rb +388 -0
  154. data/lib/osuny_api/api_error.rb +57 -0
  155. data/lib/osuny_api/configuration.rb +205 -0
  156. data/lib/osuny_api/models/agenda_categories_body.rb +211 -0
  157. data/lib/osuny_api/models/agenda_events_body.rb +211 -0
  158. data/lib/osuny_api/models/categories_id_body.rb +211 -0
  159. data/lib/osuny_api/models/categories_id_body_1.rb +211 -0
  160. data/lib/osuny_api/models/categories_id_body_2.rb +211 -0
  161. data/lib/osuny_api/models/categories_upsert_body.rb +213 -0
  162. data/lib/osuny_api/models/categories_upsert_body_1.rb +213 -0
  163. data/lib/osuny_api/models/categories_upsert_body_2.rb +213 -0
  164. data/lib/osuny_api/models/communication_block_agenda.rb +312 -0
  165. data/lib/osuny_api/models/communication_block_agenda_data.rb +384 -0
  166. data/lib/osuny_api/models/communication_block_agenda_data_elements.rb +206 -0
  167. data/lib/osuny_api/models/communication_block_call_to_action.rb +312 -0
  168. data/lib/osuny_api/models/communication_block_call_to_action_data.rb +288 -0
  169. data/lib/osuny_api/models/communication_block_call_to_action_data_elements.rb +224 -0
  170. data/lib/osuny_api/models/communication_block_call_to_action_data_image.rb +227 -0
  171. data/lib/osuny_api/models/communication_block_categories.rb +312 -0
  172. data/lib/osuny_api/models/communication_block_categories_data.rb +307 -0
  173. data/lib/osuny_api/models/communication_block_chapter.rb +312 -0
  174. data/lib/osuny_api/models/communication_block_chapter_data.rb +286 -0
  175. data/lib/osuny_api/models/communication_block_contact.rb +312 -0
  176. data/lib/osuny_api/models/communication_block_contact_data.rb +393 -0
  177. data/lib/osuny_api/models/communication_block_contact_data_elements.rb +224 -0
  178. data/lib/osuny_api/models/communication_block_contact_data_time_slot_morning.rb +215 -0
  179. data/lib/osuny_api/models/communication_block_datatable.rb +312 -0
  180. data/lib/osuny_api/models/communication_block_datatable_data.rb +247 -0
  181. data/lib/osuny_api/models/communication_block_datatable_data_elements.rb +208 -0
  182. data/lib/osuny_api/models/communication_block_definitions.rb +312 -0
  183. data/lib/osuny_api/models/communication_block_definitions_data.rb +218 -0
  184. data/lib/osuny_api/models/communication_block_definitions_data_elements.rb +215 -0
  185. data/lib/osuny_api/models/communication_block_embed.rb +312 -0
  186. data/lib/osuny_api/models/communication_block_embed_data.rb +225 -0
  187. data/lib/osuny_api/models/communication_block_features.rb +312 -0
  188. data/lib/osuny_api/models/communication_block_features_data.rb +218 -0
  189. data/lib/osuny_api/models/communication_block_features_data_elements.rb +242 -0
  190. data/lib/osuny_api/models/communication_block_files.rb +312 -0
  191. data/lib/osuny_api/models/communication_block_files_data.rb +218 -0
  192. data/lib/osuny_api/models/communication_block_files_data_elements.rb +224 -0
  193. data/lib/osuny_api/models/communication_block_gallery.rb +312 -0
  194. data/lib/osuny_api/models/communication_block_gallery_data.rb +261 -0
  195. data/lib/osuny_api/models/communication_block_gallery_data_elements.rb +233 -0
  196. data/lib/osuny_api/models/communication_block_image.rb +312 -0
  197. data/lib/osuny_api/models/communication_block_image_data.rb +234 -0
  198. data/lib/osuny_api/models/communication_block_key_figures.rb +312 -0
  199. data/lib/osuny_api/models/communication_block_key_figures_data.rb +218 -0
  200. data/lib/osuny_api/models/communication_block_key_figures_data_elements.rb +233 -0
  201. data/lib/osuny_api/models/communication_block_license.rb +312 -0
  202. data/lib/osuny_api/models/communication_block_license_data.rb +334 -0
  203. data/lib/osuny_api/models/communication_block_links.rb +312 -0
  204. data/lib/osuny_api/models/communication_block_links_data.rb +218 -0
  205. data/lib/osuny_api/models/communication_block_links_data_elements.rb +242 -0
  206. data/lib/osuny_api/models/communication_block_locations.rb +312 -0
  207. data/lib/osuny_api/models/communication_block_locations_data.rb +270 -0
  208. data/lib/osuny_api/models/communication_block_locations_data_elements.rb +206 -0
  209. data/lib/osuny_api/models/communication_block_organizations.rb +312 -0
  210. data/lib/osuny_api/models/communication_block_organizations_data.rb +327 -0
  211. data/lib/osuny_api/models/communication_block_organizations_data_elements.rb +233 -0
  212. data/lib/osuny_api/models/communication_block_pages.rb +312 -0
  213. data/lib/osuny_api/models/communication_block_pages_data.rb +327 -0
  214. data/lib/osuny_api/models/communication_block_papers.rb +312 -0
  215. data/lib/osuny_api/models/communication_block_papers_data.rb +261 -0
  216. data/lib/osuny_api/models/communication_block_persons.rb +312 -0
  217. data/lib/osuny_api/models/communication_block_persons_data.rb +336 -0
  218. data/lib/osuny_api/models/communication_block_persons_data_elements.rb +215 -0
  219. data/lib/osuny_api/models/communication_block_posts.rb +312 -0
  220. data/lib/osuny_api/models/communication_block_posts_data.rb +354 -0
  221. data/lib/osuny_api/models/communication_block_programs.rb +312 -0
  222. data/lib/osuny_api/models/communication_block_programs_data.rb +279 -0
  223. data/lib/osuny_api/models/communication_block_projects.rb +312 -0
  224. data/lib/osuny_api/models/communication_block_projects_data.rb +336 -0
  225. data/lib/osuny_api/models/communication_block_sound.rb +312 -0
  226. data/lib/osuny_api/models/communication_block_sound_data.rb +225 -0
  227. data/lib/osuny_api/models/communication_block_testimonials.rb +312 -0
  228. data/lib/osuny_api/models/communication_block_testimonials_data.rb +209 -0
  229. data/lib/osuny_api/models/communication_block_testimonials_data_elements.rb +233 -0
  230. data/lib/osuny_api/models/communication_block_timeline.rb +312 -0
  231. data/lib/osuny_api/models/communication_block_timeline_data.rb +252 -0
  232. data/lib/osuny_api/models/communication_block_timeline_data_elements.rb +215 -0
  233. data/lib/osuny_api/models/communication_block_title.rb +312 -0
  234. data/lib/osuny_api/models/communication_block_title_data.rb +241 -0
  235. data/lib/osuny_api/models/communication_block_video.rb +312 -0
  236. data/lib/osuny_api/models/communication_block_video_data.rb +277 -0
  237. data/lib/osuny_api/models/communication_block_volumes.rb +312 -0
  238. data/lib/osuny_api/models/communication_website.rb +282 -0
  239. data/lib/osuny_api/models/communication_website_agenda_category.rb +274 -0
  240. data/lib/osuny_api/models/communication_website_agenda_category_localization.rb +302 -0
  241. data/lib/osuny_api/models/communication_website_agenda_category_localization_featured_image.rb +237 -0
  242. data/lib/osuny_api/models/communication_website_agenda_event.rb +315 -0
  243. data/lib/osuny_api/models/communication_website_agenda_event_localization.rb +380 -0
  244. data/lib/osuny_api/models/communication_website_agenda_event_localization_add_to_calendar_urls.rb +242 -0
  245. data/lib/osuny_api/models/communication_website_agenda_event_time_slot.rb +265 -0
  246. data/lib/osuny_api/models/communication_website_agenda_event_time_slot_localization.rb +263 -0
  247. data/lib/osuny_api/models/communication_website_deuxfleurs.rb +216 -0
  248. data/lib/osuny_api/models/communication_website_features.rb +224 -0
  249. data/lib/osuny_api/models/communication_website_git.rb +237 -0
  250. data/lib/osuny_api/models/communication_website_localization.rb +362 -0
  251. data/lib/osuny_api/models/communication_website_page.rb +306 -0
  252. data/lib/osuny_api/models/communication_website_page_category.rb +274 -0
  253. data/lib/osuny_api/models/communication_website_page_category_localization.rb +302 -0
  254. data/lib/osuny_api/models/communication_website_page_localization.rb +371 -0
  255. data/lib/osuny_api/models/communication_website_post.rb +255 -0
  256. data/lib/osuny_api/models/communication_website_post_localization.rb +341 -0
  257. data/lib/osuny_api/models/communication_website_showcase.rb +226 -0
  258. data/lib/osuny_api/models/communication_website_showcase_tags.rb +224 -0
  259. data/lib/osuny_api/models/events_id_body.rb +211 -0
  260. data/lib/osuny_api/models/events_upsert_body.rb +213 -0
  261. data/lib/osuny_api/models/one_ofcommunication_website_agenda_category_localization_blocks_items.rb +197 -0
  262. data/lib/osuny_api/models/one_ofcommunication_website_agenda_event_localization_blocks_items.rb +197 -0
  263. data/lib/osuny_api/models/one_ofcommunication_website_page_category_localization_blocks_items.rb +197 -0
  264. data/lib/osuny_api/models/one_ofcommunication_website_page_localization_blocks_items.rb +197 -0
  265. data/lib/osuny_api/models/one_ofcommunication_website_post_localization_blocks_items.rb +197 -0
  266. data/lib/osuny_api/models/one_ofuniversity_organization_category_localization_blocks_items.rb +197 -0
  267. data/lib/osuny_api/models/one_ofuniversity_organization_localization_blocks_items.rb +197 -0
  268. data/lib/osuny_api/models/organizations_categories_body.rb +211 -0
  269. data/lib/osuny_api/models/organizations_id_body.rb +211 -0
  270. data/lib/osuny_api/models/organizations_upsert_body.rb +213 -0
  271. data/lib/osuny_api/models/pages_categories_body.rb +211 -0
  272. data/lib/osuny_api/models/pages_id_body.rb +211 -0
  273. data/lib/osuny_api/models/pages_upsert_body.rb +213 -0
  274. data/lib/osuny_api/models/posts_id_body.rb +211 -0
  275. data/lib/osuny_api/models/posts_upsert_body.rb +213 -0
  276. data/lib/osuny_api/models/university_organization.rb +409 -0
  277. data/lib/osuny_api/models/university_organization_category.rb +274 -0
  278. data/lib/osuny_api/models/university_organization_category_localization.rb +292 -0
  279. data/lib/osuny_api/models/university_organization_localization.rb +373 -0
  280. data/lib/osuny_api/models/university_organizations_body.rb +211 -0
  281. data/lib/osuny_api/models/website_id_pages_body.rb +211 -0
  282. data/lib/osuny_api/models/website_id_posts_body.rb +211 -0
  283. data/lib/osuny_api/version.rb +11 -2
  284. data/lib/osuny_api.rb +165 -11
  285. data/osuny_api.gemspec +37 -30
  286. data/pkg/osuny_api-0.2.6.gem +0 -0
  287. data/pkg/osuny_api-1.0.0.gem +0 -0
  288. data/spec/api/communication_website_agenda_category_api_spec.rb +106 -0
  289. data/spec/api/communication_website_agenda_event_api_spec.rb +106 -0
  290. data/spec/api/communication_website_api_spec.rb +55 -0
  291. data/spec/api/communication_website_page_api_spec.rb +106 -0
  292. data/spec/api/communication_website_page_category_api_spec.rb +106 -0
  293. data/spec/api/communication_website_post_api_spec.rb +106 -0
  294. data/spec/api/university_organization_api_spec.rb +100 -0
  295. data/spec/api/university_organization_category_api_spec.rb +100 -0
  296. data/spec/api_client_spec.rb +225 -0
  297. data/spec/base_object_spec.rb +109 -0
  298. data/spec/configuration_spec.rb +41 -0
  299. data/spec/models/agenda_categories_body_spec.rb +40 -0
  300. data/spec/models/agenda_events_body_spec.rb +40 -0
  301. data/spec/models/categories_id_body_1_spec.rb +40 -0
  302. data/spec/models/categories_id_body_2_spec.rb +40 -0
  303. data/spec/models/categories_id_body_spec.rb +40 -0
  304. data/spec/models/categories_upsert_body_1_spec.rb +40 -0
  305. data/spec/models/categories_upsert_body_2_spec.rb +40 -0
  306. data/spec/models/categories_upsert_body_spec.rb +40 -0
  307. data/spec/models/communication_block_agenda_data_elements_spec.rb +40 -0
  308. data/spec/models/communication_block_agenda_data_spec.rb +130 -0
  309. data/spec/models/communication_block_agenda_spec.rb +86 -0
  310. data/spec/models/communication_block_call_to_action_data_elements_spec.rb +52 -0
  311. data/spec/models/communication_block_call_to_action_data_image_spec.rb +52 -0
  312. data/spec/models/communication_block_call_to_action_data_spec.rb +74 -0
  313. data/spec/models/communication_block_call_to_action_spec.rb +86 -0
  314. data/spec/models/communication_block_categories_data_spec.rb +84 -0
  315. data/spec/models/communication_block_categories_spec.rb +86 -0
  316. data/spec/models/communication_block_chapter_data_spec.rb +74 -0
  317. data/spec/models/communication_block_chapter_spec.rb +86 -0
  318. data/spec/models/communication_block_contact_data_elements_spec.rb +52 -0
  319. data/spec/models/communication_block_contact_data_spec.rb +160 -0
  320. data/spec/models/communication_block_contact_data_time_slot_morning_spec.rb +46 -0
  321. data/spec/models/communication_block_contact_spec.rb +86 -0
  322. data/spec/models/communication_block_datatable_data_elements_spec.rb +40 -0
  323. data/spec/models/communication_block_datatable_data_spec.rb +64 -0
  324. data/spec/models/communication_block_datatable_spec.rb +86 -0
  325. data/spec/models/communication_block_definitions_data_elements_spec.rb +46 -0
  326. data/spec/models/communication_block_definitions_data_spec.rb +46 -0
  327. data/spec/models/communication_block_definitions_spec.rb +86 -0
  328. data/spec/models/communication_block_embed_data_spec.rb +52 -0
  329. data/spec/models/communication_block_embed_spec.rb +86 -0
  330. data/spec/models/communication_block_features_data_elements_spec.rb +64 -0
  331. data/spec/models/communication_block_features_data_spec.rb +46 -0
  332. data/spec/models/communication_block_features_spec.rb +86 -0
  333. data/spec/models/communication_block_files_data_elements_spec.rb +52 -0
  334. data/spec/models/communication_block_files_data_spec.rb +46 -0
  335. data/spec/models/communication_block_files_spec.rb +86 -0
  336. data/spec/models/communication_block_gallery_data_elements_spec.rb +58 -0
  337. data/spec/models/communication_block_gallery_data_spec.rb +56 -0
  338. data/spec/models/communication_block_gallery_spec.rb +86 -0
  339. data/spec/models/communication_block_image_data_spec.rb +58 -0
  340. data/spec/models/communication_block_image_spec.rb +86 -0
  341. data/spec/models/communication_block_key_figures_data_elements_spec.rb +58 -0
  342. data/spec/models/communication_block_key_figures_data_spec.rb +46 -0
  343. data/spec/models/communication_block_key_figures_spec.rb +86 -0
  344. data/spec/models/communication_block_license_data_spec.rb +90 -0
  345. data/spec/models/communication_block_license_spec.rb +86 -0
  346. data/spec/models/communication_block_links_data_elements_spec.rb +64 -0
  347. data/spec/models/communication_block_links_data_spec.rb +46 -0
  348. data/spec/models/communication_block_links_spec.rb +86 -0
  349. data/spec/models/communication_block_locations_data_elements_spec.rb +40 -0
  350. data/spec/models/communication_block_locations_data_spec.rb +62 -0
  351. data/spec/models/communication_block_locations_spec.rb +86 -0
  352. data/spec/models/communication_block_organizations_data_elements_spec.rb +58 -0
  353. data/spec/models/communication_block_organizations_data_spec.rb +96 -0
  354. data/spec/models/communication_block_organizations_spec.rb +86 -0
  355. data/spec/models/communication_block_pages_data_spec.rb +96 -0
  356. data/spec/models/communication_block_pages_spec.rb +86 -0
  357. data/spec/models/communication_block_papers_data_spec.rb +56 -0
  358. data/spec/models/communication_block_papers_spec.rb +86 -0
  359. data/spec/models/communication_block_persons_data_elements_spec.rb +46 -0
  360. data/spec/models/communication_block_persons_data_spec.rb +102 -0
  361. data/spec/models/communication_block_persons_spec.rb +86 -0
  362. data/spec/models/communication_block_posts_data_spec.rb +114 -0
  363. data/spec/models/communication_block_posts_spec.rb +86 -0
  364. data/spec/models/communication_block_programs_data_spec.rb +68 -0
  365. data/spec/models/communication_block_programs_spec.rb +86 -0
  366. data/spec/models/communication_block_projects_data_spec.rb +102 -0
  367. data/spec/models/communication_block_projects_spec.rb +86 -0
  368. data/spec/models/communication_block_sound_data_spec.rb +52 -0
  369. data/spec/models/communication_block_sound_spec.rb +86 -0
  370. data/spec/models/communication_block_testimonials_data_elements_spec.rb +58 -0
  371. data/spec/models/communication_block_testimonials_data_spec.rb +40 -0
  372. data/spec/models/communication_block_testimonials_spec.rb +86 -0
  373. data/spec/models/communication_block_timeline_data_elements_spec.rb +46 -0
  374. data/spec/models/communication_block_timeline_data_spec.rb +50 -0
  375. data/spec/models/communication_block_timeline_spec.rb +86 -0
  376. data/spec/models/communication_block_title_data_spec.rb +44 -0
  377. data/spec/models/communication_block_title_spec.rb +86 -0
  378. data/spec/models/communication_block_video_data_spec.rb +68 -0
  379. data/spec/models/communication_block_video_spec.rb +86 -0
  380. data/spec/models/communication_block_volumes_spec.rb +86 -0
  381. data/spec/models/communication_website_agenda_category_localization_featured_image_spec.rb +58 -0
  382. data/spec/models/communication_website_agenda_category_localization_spec.rb +100 -0
  383. data/spec/models/communication_website_agenda_category_spec.rb +82 -0
  384. data/spec/models/communication_website_agenda_event_localization_add_to_calendar_urls_spec.rb +64 -0
  385. data/spec/models/communication_website_agenda_event_localization_spec.rb +148 -0
  386. data/spec/models/communication_website_agenda_event_spec.rb +106 -0
  387. data/spec/models/communication_website_agenda_event_time_slot_localization_spec.rb +76 -0
  388. data/spec/models/communication_website_agenda_event_time_slot_spec.rb +76 -0
  389. data/spec/models/communication_website_deuxfleurs_spec.rb +46 -0
  390. data/spec/models/communication_website_features_spec.rb +52 -0
  391. data/spec/models/communication_website_git_spec.rb +58 -0
  392. data/spec/models/communication_website_localization_spec.rb +136 -0
  393. data/spec/models/communication_website_page_category_localization_spec.rb +100 -0
  394. data/spec/models/communication_website_page_category_spec.rb +82 -0
  395. data/spec/models/communication_website_page_localization_spec.rb +142 -0
  396. data/spec/models/communication_website_page_spec.rb +100 -0
  397. data/spec/models/communication_website_post_localization_spec.rb +124 -0
  398. data/spec/models/communication_website_post_spec.rb +70 -0
  399. data/spec/models/communication_website_showcase_spec.rb +52 -0
  400. data/spec/models/communication_website_showcase_tags_spec.rb +52 -0
  401. data/spec/models/communication_website_spec.rb +88 -0
  402. data/spec/models/events_id_body_spec.rb +40 -0
  403. data/spec/models/events_upsert_body_spec.rb +40 -0
  404. data/spec/models/one_ofcommunication_website_agenda_category_localization_blocks_items_spec.rb +34 -0
  405. data/spec/models/one_ofcommunication_website_agenda_event_localization_blocks_items_spec.rb +34 -0
  406. data/spec/models/one_ofcommunication_website_page_category_localization_blocks_items_spec.rb +34 -0
  407. data/spec/models/one_ofcommunication_website_page_localization_blocks_items_spec.rb +34 -0
  408. data/spec/models/one_ofcommunication_website_post_localization_blocks_items_spec.rb +34 -0
  409. data/spec/models/one_ofuniversity_organization_category_localization_blocks_items_spec.rb +34 -0
  410. data/spec/models/one_ofuniversity_organization_localization_blocks_items_spec.rb +34 -0
  411. data/spec/models/organizations_categories_body_spec.rb +40 -0
  412. data/spec/models/organizations_id_body_spec.rb +40 -0
  413. data/spec/models/organizations_upsert_body_spec.rb +40 -0
  414. data/spec/models/pages_categories_body_spec.rb +40 -0
  415. data/spec/models/pages_id_body_spec.rb +40 -0
  416. data/spec/models/pages_upsert_body_spec.rb +40 -0
  417. data/spec/models/posts_id_body_spec.rb +40 -0
  418. data/spec/models/posts_upsert_body_spec.rb +40 -0
  419. data/spec/models/university_organization_category_localization_spec.rb +94 -0
  420. data/spec/models/university_organization_category_spec.rb +82 -0
  421. data/spec/models/university_organization_localization_spec.rb +142 -0
  422. data/spec/models/university_organization_spec.rb +146 -0
  423. data/spec/models/university_organizations_body_spec.rb +40 -0
  424. data/spec/models/website_id_pages_body_spec.rb +40 -0
  425. data/spec/models/website_id_posts_body_spec.rb +40 -0
  426. data/spec/spec_helper.rb +110 -0
  427. metadata +615 -25
  428. data/lib/osuny_api/client.rb +0 -41
  429. data/lib/osuny_api/communication/website/page.rb +0 -12
  430. data/lib/osuny_api/communication/website/post.rb +0 -12
  431. data/lib/osuny_api/communication/website.rb +0 -18
  432. data/lib/osuny_api/communication.rb +0 -13
  433. data/lib/osuny_api/error.rb +0 -4
  434. data/lib/osuny_api/resource.rb +0 -20
@@ -0,0 +1,312 @@
1
+ =begin
2
+ #Osuny
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.68
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module OsunyApi
15
+ class CommunicationBlockAgenda
16
+ attr_accessor :id
17
+
18
+ attr_accessor :migration_identifier
19
+
20
+ # Template kind of the blocks.
21
+ attr_accessor :template_kind
22
+
23
+ attr_accessor :title
24
+
25
+ attr_accessor :position
26
+
27
+ attr_accessor :published
28
+
29
+ # For advanced use. Add an HTML class for custom purposes.
30
+ attr_accessor :html_class
31
+
32
+ attr_accessor :data
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'id' => :'id',
60
+ :'migration_identifier' => :'migration_identifier',
61
+ :'template_kind' => :'template_kind',
62
+ :'title' => :'title',
63
+ :'position' => :'position',
64
+ :'published' => :'published',
65
+ :'html_class' => :'html_class',
66
+ :'data' => :'data'
67
+ }
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'id' => :'Object',
74
+ :'migration_identifier' => :'Object',
75
+ :'template_kind' => :'Object',
76
+ :'title' => :'Object',
77
+ :'position' => :'Object',
78
+ :'published' => :'Object',
79
+ :'html_class' => :'Object',
80
+ :'data' => :'Object'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ :'id',
88
+ :'migration_identifier',
89
+ :'title',
90
+ :'position',
91
+ :'html_class',
92
+ ])
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OsunyApi::CommunicationBlockAgenda` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!self.class.attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OsunyApi::CommunicationBlockAgenda`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'id')
111
+ self.id = attributes[:'id']
112
+ end
113
+
114
+ if attributes.key?(:'migration_identifier')
115
+ self.migration_identifier = attributes[:'migration_identifier']
116
+ end
117
+
118
+ if attributes.key?(:'template_kind')
119
+ self.template_kind = attributes[:'template_kind']
120
+ end
121
+
122
+ if attributes.key?(:'title')
123
+ self.title = attributes[:'title']
124
+ end
125
+
126
+ if attributes.key?(:'position')
127
+ self.position = attributes[:'position']
128
+ end
129
+
130
+ if attributes.key?(:'published')
131
+ self.published = attributes[:'published']
132
+ else
133
+ self.published = true
134
+ end
135
+
136
+ if attributes.key?(:'html_class')
137
+ self.html_class = attributes[:'html_class']
138
+ end
139
+
140
+ if attributes.key?(:'data')
141
+ self.data = attributes[:'data']
142
+ end
143
+ end
144
+
145
+ # Show invalid properties with the reasons. Usually used together with valid?
146
+ # @return Array for valid properties with the reasons
147
+ def list_invalid_properties
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ template_kind_validator = EnumAttributeValidator.new('Object', ['agenda'])
156
+ return false unless template_kind_validator.valid?(@template_kind)
157
+ true
158
+ end
159
+
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] template_kind Object to be assigned
162
+ def template_kind=(template_kind)
163
+ validator = EnumAttributeValidator.new('Object', ['agenda'])
164
+ unless validator.valid?(template_kind)
165
+ fail ArgumentError, "invalid value for \"template_kind\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @template_kind = template_kind
168
+ end
169
+
170
+ # Checks equality by comparing each attribute.
171
+ # @param [Object] Object to be compared
172
+ def ==(o)
173
+ return true if self.equal?(o)
174
+ self.class == o.class &&
175
+ id == o.id &&
176
+ migration_identifier == o.migration_identifier &&
177
+ template_kind == o.template_kind &&
178
+ title == o.title &&
179
+ position == o.position &&
180
+ published == o.published &&
181
+ html_class == o.html_class &&
182
+ data == o.data
183
+ end
184
+
185
+ # @see the `==` method
186
+ # @param [Object] Object to be compared
187
+ def eql?(o)
188
+ self == o
189
+ end
190
+
191
+ # Calculates hash code according to all attributes.
192
+ # @return [Integer] Hash code
193
+ def hash
194
+ [id, migration_identifier, template_kind, title, position, published, html_class, data].hash
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def self.build_from_hash(attributes)
201
+ new.build_from_hash(attributes)
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def build_from_hash(attributes)
208
+ return nil unless attributes.is_a?(Hash)
209
+ self.class.openapi_types.each_pair do |key, type|
210
+ if type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
214
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
215
+ end
216
+ elsif !attributes[self.class.attribute_map[key]].nil?
217
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
219
+ self.send("#{key}=", nil)
220
+ end
221
+ end
222
+
223
+ self
224
+ end
225
+
226
+ # Deserializes the data based on type
227
+ # @param string type Data type
228
+ # @param string value Value to be deserialized
229
+ # @return [Object] Deserialized data
230
+ def _deserialize(type, value)
231
+ case type.to_sym
232
+ when :DateTime
233
+ DateTime.parse(value)
234
+ when :Date
235
+ Date.parse(value)
236
+ when :String
237
+ value.to_s
238
+ when :Integer
239
+ value.to_i
240
+ when :Float
241
+ value.to_f
242
+ when :Boolean
243
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
244
+ true
245
+ else
246
+ false
247
+ end
248
+ when :Object
249
+ # generic object (usually a Hash), return directly
250
+ value
251
+ when /\AArray<(?<inner_type>.+)>\z/
252
+ inner_type = Regexp.last_match[:inner_type]
253
+ value.map { |v| _deserialize(inner_type, v) }
254
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
255
+ k_type = Regexp.last_match[:k_type]
256
+ v_type = Regexp.last_match[:v_type]
257
+ {}.tap do |hash|
258
+ value.each do |k, v|
259
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
260
+ end
261
+ end
262
+ else # model
263
+ OsunyApi.const_get(type).build_from_hash(value)
264
+ end
265
+ end
266
+
267
+ # Returns the string representation of the object
268
+ # @return [String] String presentation of the object
269
+ def to_s
270
+ to_hash.to_s
271
+ end
272
+
273
+ # to_body is an alias to to_hash (backward compatibility)
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_body
276
+ to_hash
277
+ end
278
+
279
+ # Returns the object in the form of hash
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_hash
282
+ hash = {}
283
+ self.class.attribute_map.each_pair do |attr, param|
284
+ value = self.send(attr)
285
+ if value.nil?
286
+ is_nullable = self.class.openapi_nullable.include?(attr)
287
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
288
+ end
289
+
290
+ hash[param] = _to_hash(value)
291
+ end
292
+ hash
293
+ end
294
+
295
+ # Outputs non-array value in the form of hash
296
+ # For object, use to_hash. Otherwise, just return the value
297
+ # @param [Object] value Any valid value
298
+ # @return [Hash] Returns the value in the form of hash
299
+ def _to_hash(value)
300
+ if value.is_a?(Array)
301
+ value.compact.map { |v| _to_hash(v) }
302
+ elsif value.is_a?(Hash)
303
+ {}.tap do |hash|
304
+ value.each { |k, v| hash[k] = _to_hash(v) }
305
+ end
306
+ elsif value.respond_to? :to_hash
307
+ value.to_hash
308
+ else
309
+ value
310
+ end
311
+ end end
312
+ end
@@ -0,0 +1,384 @@
1
+ =begin
2
+ #Osuny
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.68
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module OsunyApi
15
+ # Data of the block. The structure depends on the template kind.
16
+ class CommunicationBlockAgendaData
17
+ attr_accessor :layout
18
+
19
+ attr_accessor :mode
20
+
21
+ attr_accessor :category_id
22
+
23
+ attr_accessor :description
24
+
25
+ attr_accessor :quantity
26
+
27
+ attr_accessor :time
28
+
29
+ attr_accessor :no_event_message
30
+
31
+ attr_accessor :option_categories
32
+
33
+ attr_accessor :option_dates
34
+
35
+ attr_accessor :option_image
36
+
37
+ attr_accessor :option_subtitle
38
+
39
+ attr_accessor :option_summary
40
+
41
+ attr_accessor :option_status
42
+
43
+ attr_accessor :elements
44
+
45
+ class EnumAttributeValidator
46
+ attr_reader :datatype
47
+ attr_reader :allowable_values
48
+
49
+ def initialize(datatype, allowable_values)
50
+ @allowable_values = allowable_values.map do |value|
51
+ case datatype.to_s
52
+ when /Integer/i
53
+ value.to_i
54
+ when /Float/i
55
+ value.to_f
56
+ else
57
+ value
58
+ end
59
+ end
60
+ end
61
+
62
+ def valid?(value)
63
+ !value || allowable_values.include?(value)
64
+ end
65
+ end
66
+
67
+ # Attribute mapping from ruby-style variable name to JSON key.
68
+ def self.attribute_map
69
+ {
70
+ :'layout' => :'layout',
71
+ :'mode' => :'mode',
72
+ :'category_id' => :'category_id',
73
+ :'description' => :'description',
74
+ :'quantity' => :'quantity',
75
+ :'time' => :'time',
76
+ :'no_event_message' => :'no_event_message',
77
+ :'option_categories' => :'option_categories',
78
+ :'option_dates' => :'option_dates',
79
+ :'option_image' => :'option_image',
80
+ :'option_subtitle' => :'option_subtitle',
81
+ :'option_summary' => :'option_summary',
82
+ :'option_status' => :'option_status',
83
+ :'elements' => :'elements'
84
+ }
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.openapi_types
89
+ {
90
+ :'layout' => :'Object',
91
+ :'mode' => :'Object',
92
+ :'category_id' => :'Object',
93
+ :'description' => :'Object',
94
+ :'quantity' => :'Object',
95
+ :'time' => :'Object',
96
+ :'no_event_message' => :'Object',
97
+ :'option_categories' => :'Object',
98
+ :'option_dates' => :'Object',
99
+ :'option_image' => :'Object',
100
+ :'option_subtitle' => :'Object',
101
+ :'option_summary' => :'Object',
102
+ :'option_status' => :'Object',
103
+ :'elements' => :'Object'
104
+ }
105
+ end
106
+
107
+ # List of attributes with nullable: true
108
+ def self.openapi_nullable
109
+ Set.new([
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OsunyApi::CommunicationBlockAgendaData` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!self.class.attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OsunyApi::CommunicationBlockAgendaData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'layout')
129
+ self.layout = attributes[:'layout']
130
+ end
131
+
132
+ if attributes.key?(:'mode')
133
+ self.mode = attributes[:'mode']
134
+ end
135
+
136
+ if attributes.key?(:'category_id')
137
+ self.category_id = attributes[:'category_id']
138
+ end
139
+
140
+ if attributes.key?(:'description')
141
+ self.description = attributes[:'description']
142
+ end
143
+
144
+ if attributes.key?(:'quantity')
145
+ self.quantity = attributes[:'quantity']
146
+ end
147
+
148
+ if attributes.key?(:'time')
149
+ self.time = attributes[:'time']
150
+ end
151
+
152
+ if attributes.key?(:'no_event_message')
153
+ self.no_event_message = attributes[:'no_event_message']
154
+ end
155
+
156
+ if attributes.key?(:'option_categories')
157
+ self.option_categories = attributes[:'option_categories']
158
+ end
159
+
160
+ if attributes.key?(:'option_dates')
161
+ self.option_dates = attributes[:'option_dates']
162
+ end
163
+
164
+ if attributes.key?(:'option_image')
165
+ self.option_image = attributes[:'option_image']
166
+ end
167
+
168
+ if attributes.key?(:'option_subtitle')
169
+ self.option_subtitle = attributes[:'option_subtitle']
170
+ end
171
+
172
+ if attributes.key?(:'option_summary')
173
+ self.option_summary = attributes[:'option_summary']
174
+ end
175
+
176
+ if attributes.key?(:'option_status')
177
+ self.option_status = attributes[:'option_status']
178
+ end
179
+
180
+ if attributes.key?(:'elements')
181
+ if (value = attributes[:'elements']).is_a?(Array)
182
+ self.elements = value
183
+ end
184
+ end
185
+ end
186
+
187
+ # Show invalid properties with the reasons. Usually used together with valid?
188
+ # @return Array for valid properties with the reasons
189
+ def list_invalid_properties
190
+ invalid_properties = Array.new
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ layout_validator = EnumAttributeValidator.new('Object', ['grid', 'list', 'large'])
198
+ return false unless layout_validator.valid?(@layout)
199
+ mode_validator = EnumAttributeValidator.new('Object', ['all', 'category', 'selection'])
200
+ return false unless mode_validator.valid?(@mode)
201
+ time_validator = EnumAttributeValidator.new('Object', ['future_or_current', 'future', 'current', 'archive'])
202
+ return false unless time_validator.valid?(@time)
203
+ true
204
+ end
205
+
206
+ # Custom attribute writer method checking allowed values (enum).
207
+ # @param [Object] layout Object to be assigned
208
+ def layout=(layout)
209
+ validator = EnumAttributeValidator.new('Object', ['grid', 'list', 'large'])
210
+ unless validator.valid?(layout)
211
+ fail ArgumentError, "invalid value for \"layout\", must be one of #{validator.allowable_values}."
212
+ end
213
+ @layout = layout
214
+ end
215
+
216
+ # Custom attribute writer method checking allowed values (enum).
217
+ # @param [Object] mode Object to be assigned
218
+ def mode=(mode)
219
+ validator = EnumAttributeValidator.new('Object', ['all', 'category', 'selection'])
220
+ unless validator.valid?(mode)
221
+ fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
222
+ end
223
+ @mode = mode
224
+ end
225
+
226
+ # Custom attribute writer method checking allowed values (enum).
227
+ # @param [Object] time Object to be assigned
228
+ def time=(time)
229
+ validator = EnumAttributeValidator.new('Object', ['future_or_current', 'future', 'current', 'archive'])
230
+ unless validator.valid?(time)
231
+ fail ArgumentError, "invalid value for \"time\", must be one of #{validator.allowable_values}."
232
+ end
233
+ @time = time
234
+ end
235
+
236
+ # Checks equality by comparing each attribute.
237
+ # @param [Object] Object to be compared
238
+ def ==(o)
239
+ return true if self.equal?(o)
240
+ self.class == o.class &&
241
+ layout == o.layout &&
242
+ mode == o.mode &&
243
+ category_id == o.category_id &&
244
+ description == o.description &&
245
+ quantity == o.quantity &&
246
+ time == o.time &&
247
+ no_event_message == o.no_event_message &&
248
+ option_categories == o.option_categories &&
249
+ option_dates == o.option_dates &&
250
+ option_image == o.option_image &&
251
+ option_subtitle == o.option_subtitle &&
252
+ option_summary == o.option_summary &&
253
+ option_status == o.option_status &&
254
+ elements == o.elements
255
+ end
256
+
257
+ # @see the `==` method
258
+ # @param [Object] Object to be compared
259
+ def eql?(o)
260
+ self == o
261
+ end
262
+
263
+ # Calculates hash code according to all attributes.
264
+ # @return [Integer] Hash code
265
+ def hash
266
+ [layout, mode, category_id, description, quantity, time, no_event_message, option_categories, option_dates, option_image, option_subtitle, option_summary, option_status, elements].hash
267
+ end
268
+
269
+ # Builds the object from hash
270
+ # @param [Hash] attributes Model attributes in the form of hash
271
+ # @return [Object] Returns the model itself
272
+ def self.build_from_hash(attributes)
273
+ new.build_from_hash(attributes)
274
+ end
275
+
276
+ # Builds the object from hash
277
+ # @param [Hash] attributes Model attributes in the form of hash
278
+ # @return [Object] Returns the model itself
279
+ def build_from_hash(attributes)
280
+ return nil unless attributes.is_a?(Hash)
281
+ self.class.openapi_types.each_pair do |key, type|
282
+ if type =~ /\AArray<(.*)>/i
283
+ # check to ensure the input is an array given that the attribute
284
+ # is documented as an array but the input is not
285
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
286
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
287
+ end
288
+ elsif !attributes[self.class.attribute_map[key]].nil?
289
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
290
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
291
+ self.send("#{key}=", nil)
292
+ end
293
+ end
294
+
295
+ self
296
+ end
297
+
298
+ # Deserializes the data based on type
299
+ # @param string type Data type
300
+ # @param string value Value to be deserialized
301
+ # @return [Object] Deserialized data
302
+ def _deserialize(type, value)
303
+ case type.to_sym
304
+ when :DateTime
305
+ DateTime.parse(value)
306
+ when :Date
307
+ Date.parse(value)
308
+ when :String
309
+ value.to_s
310
+ when :Integer
311
+ value.to_i
312
+ when :Float
313
+ value.to_f
314
+ when :Boolean
315
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
316
+ true
317
+ else
318
+ false
319
+ end
320
+ when :Object
321
+ # generic object (usually a Hash), return directly
322
+ value
323
+ when /\AArray<(?<inner_type>.+)>\z/
324
+ inner_type = Regexp.last_match[:inner_type]
325
+ value.map { |v| _deserialize(inner_type, v) }
326
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
327
+ k_type = Regexp.last_match[:k_type]
328
+ v_type = Regexp.last_match[:v_type]
329
+ {}.tap do |hash|
330
+ value.each do |k, v|
331
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
332
+ end
333
+ end
334
+ else # model
335
+ OsunyApi.const_get(type).build_from_hash(value)
336
+ end
337
+ end
338
+
339
+ # Returns the string representation of the object
340
+ # @return [String] String presentation of the object
341
+ def to_s
342
+ to_hash.to_s
343
+ end
344
+
345
+ # to_body is an alias to to_hash (backward compatibility)
346
+ # @return [Hash] Returns the object in the form of hash
347
+ def to_body
348
+ to_hash
349
+ end
350
+
351
+ # Returns the object in the form of hash
352
+ # @return [Hash] Returns the object in the form of hash
353
+ def to_hash
354
+ hash = {}
355
+ self.class.attribute_map.each_pair do |attr, param|
356
+ value = self.send(attr)
357
+ if value.nil?
358
+ is_nullable = self.class.openapi_nullable.include?(attr)
359
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
360
+ end
361
+
362
+ hash[param] = _to_hash(value)
363
+ end
364
+ hash
365
+ end
366
+
367
+ # Outputs non-array value in the form of hash
368
+ # For object, use to_hash. Otherwise, just return the value
369
+ # @param [Object] value Any valid value
370
+ # @return [Hash] Returns the value in the form of hash
371
+ def _to_hash(value)
372
+ if value.is_a?(Array)
373
+ value.compact.map { |v| _to_hash(v) }
374
+ elsif value.is_a?(Hash)
375
+ {}.tap do |hash|
376
+ value.each { |k, v| hash[k] = _to_hash(v) }
377
+ end
378
+ elsif value.respond_to? :to_hash
379
+ value.to_hash
380
+ else
381
+ value
382
+ end
383
+ end end
384
+ end