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