radiomanager_client 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +297 -0
- data/Rakefile +8 -0
- data/docs/Block.md +15 -0
- data/docs/BlockApi.md +233 -0
- data/docs/BlockRelations.md +10 -0
- data/docs/BlockRelationsBroadcast.md +11 -0
- data/docs/BlockRelationsBroadcastParams.md +8 -0
- data/docs/BlockRelationsItems.md +11 -0
- data/docs/BlockRelationsItemsParams.md +8 -0
- data/docs/BlockRelationsProgram.md +11 -0
- data/docs/BlockResult.md +18 -0
- data/docs/BlockResults.md +17 -0
- data/docs/Broadcast.md +29 -0
- data/docs/BroadcastApi.md +641 -0
- data/docs/BroadcastDataInput.md +31 -0
- data/docs/BroadcastFieldValues.md +8 -0
- data/docs/BroadcastInputOnly.md +9 -0
- data/docs/BroadcastOutputOnly.md +12 -0
- data/docs/BroadcastRelations.md +13 -0
- data/docs/BroadcastRelationsBlocks.md +11 -0
- data/docs/BroadcastRelationsItems.md +11 -0
- data/docs/BroadcastRelationsItemsParams.md +8 -0
- data/docs/BroadcastRelationsModelType.md +11 -0
- data/docs/BroadcastRelationsPresenters.md +11 -0
- data/docs/BroadcastRelationsTags.md +11 -0
- data/docs/BroadcastResult.md +40 -0
- data/docs/BroadcastResults.md +17 -0
- data/docs/Campaign.md +14 -0
- data/docs/CampaignApi.md +302 -0
- data/docs/CampaignDataInput.md +14 -0
- data/docs/CampaignOutputOnly.md +13 -0
- data/docs/CampaignRelations.md +9 -0
- data/docs/CampaignRelationsItems.md +11 -0
- data/docs/CampaignRelationsItemsParams.md +8 -0
- data/docs/CampaignResult.md +22 -0
- data/docs/CampaignResults.md +17 -0
- data/docs/Contact.md +13 -0
- data/docs/ContactApi.md +300 -0
- data/docs/ContactDataInput.md +13 -0
- data/docs/ContactFieldValues.md +8 -0
- data/docs/ContactOutputOnly.md +12 -0
- data/docs/ContactRelations.md +10 -0
- data/docs/ContactRelationsItems.md +11 -0
- data/docs/ContactRelationsTags.md +11 -0
- data/docs/ContactRelationsTagsParams.md +8 -0
- data/docs/ContactResult.md +21 -0
- data/docs/ContactResults.md +17 -0
- data/docs/Data.md +9 -0
- data/docs/Data1.md +9 -0
- data/docs/EPGBroadcast.md +10 -0
- data/docs/ExternalMessageApi.md +63 -0
- data/docs/ExternalMessageQueueData.md +14 -0
- data/docs/Forbidden.md +9 -0
- data/docs/Genre.md +11 -0
- data/docs/GenreApi.md +131 -0
- data/docs/GenreOutputOnly.md +8 -0
- data/docs/GenreRelations.md +9 -0
- data/docs/GenreRelationsBroadcasts.md +11 -0
- data/docs/GenreRelationsBroadcastsParams.md +8 -0
- data/docs/GenreRelationsPrograms.md +11 -0
- data/docs/GenreResult.md +14 -0
- data/docs/GenreResults.md +17 -0
- data/docs/ImportItem.md +18 -0
- data/docs/ImportItemFieldValues.md +8 -0
- data/docs/InlineResponse202.md +8 -0
- data/docs/InternalServerError.md +9 -0
- data/docs/InviteUserData.md +9 -0
- data/docs/InviteUserSuccess.md +8 -0
- data/docs/Item.md +23 -0
- data/docs/ItemApi.md +553 -0
- data/docs/ItemDataInput.md +26 -0
- data/docs/ItemInputOnly.md +10 -0
- data/docs/ItemOutputOnly.md +16 -0
- data/docs/ItemRelations.md +14 -0
- data/docs/ItemRelationsBlock.md +11 -0
- data/docs/ItemRelationsCampaign.md +11 -0
- data/docs/ItemRelationsContacts.md +11 -0
- data/docs/ItemRelationsContactsParams.md +8 -0
- data/docs/ItemRelationsProgram.md +11 -0
- data/docs/ItemRelationsTags.md +11 -0
- data/docs/ItemResult.md +39 -0
- data/docs/ItemResults.md +16 -0
- data/docs/ModelType.md +15 -0
- data/docs/ModelTypeApi.md +139 -0
- data/docs/ModelTypeOptions.md +8 -0
- data/docs/ModelTypeOutputOnly.md +8 -0
- data/docs/ModelTypeRelations.md +13 -0
- data/docs/ModelTypeRelationsBroadcasts.md +11 -0
- data/docs/ModelTypeRelationsCampaigns.md +11 -0
- data/docs/ModelTypeRelationsCampaignsParams.md +8 -0
- data/docs/ModelTypeRelationsContacts.md +11 -0
- data/docs/ModelTypeRelationsItems.md +11 -0
- data/docs/ModelTypeRelationsPresenters.md +11 -0
- data/docs/ModelTypeRelationsPrograms.md +11 -0
- data/docs/ModelTypeResult.md +22 -0
- data/docs/ModelTypeResults.md +17 -0
- data/docs/NotFound.md +9 -0
- data/docs/PostSuccess.md +9 -0
- data/docs/Presenter.md +13 -0
- data/docs/PresenterApi.md +300 -0
- data/docs/PresenterDataInput.md +13 -0
- data/docs/PresenterOutputOnly.md +12 -0
- data/docs/PresenterRelations.md +10 -0
- data/docs/PresenterRelationsBroadcasts.md +11 -0
- data/docs/PresenterRelationsPrograms.md +11 -0
- data/docs/PresenterRelationsProgramsParams.md +8 -0
- data/docs/PresenterResult.md +21 -0
- data/docs/PresenterResults.md +17 -0
- data/docs/Program.md +20 -0
- data/docs/ProgramApi.md +308 -0
- data/docs/ProgramDataInput.md +22 -0
- data/docs/ProgramFieldValues.md +8 -0
- data/docs/ProgramInputOnly.md +9 -0
- data/docs/ProgramOutputOnly.md +12 -0
- data/docs/ProgramRelations.md +13 -0
- data/docs/ProgramRelationsBlocks.md +11 -0
- data/docs/ProgramRelationsBroadcasts.md +11 -0
- data/docs/ProgramRelationsItems.md +11 -0
- data/docs/ProgramRelationsItemsParams.md +8 -0
- data/docs/ProgramRelationsPresenters.md +11 -0
- data/docs/ProgramRelationsTags.md +11 -0
- data/docs/ProgramResult.md +31 -0
- data/docs/ProgramResults.md +17 -0
- data/docs/ReadOnly.md +9 -0
- data/docs/RelationsPlaceholder.md +11 -0
- data/docs/StringApi.md +66 -0
- data/docs/Success.md +8 -0
- data/docs/Tag.md +8 -0
- data/docs/TagApi.md +302 -0
- data/docs/TagDataInput.md +8 -0
- data/docs/TagOutputOnly.md +12 -0
- data/docs/TagRelations.md +11 -0
- data/docs/TagRelationsBroadcasts.md +11 -0
- data/docs/TagRelationsBroadcastsParams.md +8 -0
- data/docs/TagRelationsContacts.md +11 -0
- data/docs/TagRelationsItems.md +11 -0
- data/docs/TagRelationsPrograms.md +11 -0
- data/docs/TagResult.md +17 -0
- data/docs/TagResults.md +16 -0
- data/docs/TextString.md +12 -0
- data/docs/TooManyRequests.md +8 -0
- data/docs/UnprocessableEntity.md +8 -0
- data/docs/UserApi.md +231 -0
- data/docs/UserResult.md +19 -0
- data/docs/UserResultSettings.md +13 -0
- data/docs/UserResults.md +17 -0
- data/docs/VisualResult.md +8 -0
- data/docs/VisualSlideApi.md +106 -0
- data/git_push.sh +55 -0
- data/lib/radiomanager_client.rb +185 -0
- data/lib/radiomanager_client/api/block_api.rb +257 -0
- data/lib/radiomanager_client/api/broadcast_api.rb +668 -0
- data/lib/radiomanager_client/api/campaign_api.rb +331 -0
- data/lib/radiomanager_client/api/contact_api.rb +328 -0
- data/lib/radiomanager_client/api/external_message_api.rb +78 -0
- data/lib/radiomanager_client/api/genre_api.rb +153 -0
- data/lib/radiomanager_client/api/item_api.rb +576 -0
- data/lib/radiomanager_client/api/model_type_api.rb +168 -0
- data/lib/radiomanager_client/api/presenter_api.rb +328 -0
- data/lib/radiomanager_client/api/program_api.rb +340 -0
- data/lib/radiomanager_client/api/string_api.rb +85 -0
- data/lib/radiomanager_client/api/tag_api.rb +331 -0
- data/lib/radiomanager_client/api/user_api.rb +255 -0
- data/lib/radiomanager_client/api/visual_slide_api.rb +121 -0
- data/lib/radiomanager_client/api_client.rb +389 -0
- data/lib/radiomanager_client/api_error.rb +38 -0
- data/lib/radiomanager_client/configuration.rb +209 -0
- data/lib/radiomanager_client/models/block.rb +293 -0
- data/lib/radiomanager_client/models/block_relations.rb +206 -0
- data/lib/radiomanager_client/models/block_relations_broadcast.rb +215 -0
- data/lib/radiomanager_client/models/block_relations_broadcast_params.rb +188 -0
- data/lib/radiomanager_client/models/block_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/block_relations_items_params.rb +188 -0
- data/lib/radiomanager_client/models/block_relations_program.rb +215 -0
- data/lib/radiomanager_client/models/block_result.rb +320 -0
- data/lib/radiomanager_client/models/block_results.rb +271 -0
- data/lib/radiomanager_client/models/broadcast.rb +428 -0
- data/lib/radiomanager_client/models/broadcast_data_input.rb +450 -0
- data/lib/radiomanager_client/models/broadcast_field_values.rb +188 -0
- data/lib/radiomanager_client/models/broadcast_input_only.rb +201 -0
- data/lib/radiomanager_client/models/broadcast_output_only.rb +244 -0
- data/lib/radiomanager_client/models/broadcast_relations.rb +233 -0
- data/lib/radiomanager_client/models/broadcast_relations_blocks.rb +215 -0
- data/lib/radiomanager_client/models/broadcast_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/broadcast_relations_items_params.rb +188 -0
- data/lib/radiomanager_client/models/broadcast_relations_model_type.rb +215 -0
- data/lib/radiomanager_client/models/broadcast_relations_presenters.rb +215 -0
- data/lib/radiomanager_client/models/broadcast_relations_tags.rb +215 -0
- data/lib/radiomanager_client/models/broadcast_result.rb +547 -0
- data/lib/radiomanager_client/models/broadcast_results.rb +271 -0
- data/lib/radiomanager_client/models/campaign.rb +259 -0
- data/lib/radiomanager_client/models/campaign_data_input.rb +259 -0
- data/lib/radiomanager_client/models/campaign_output_only.rb +255 -0
- data/lib/radiomanager_client/models/campaign_relations.rb +197 -0
- data/lib/radiomanager_client/models/campaign_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/campaign_relations_items_params.rb +188 -0
- data/lib/radiomanager_client/models/campaign_result.rb +353 -0
- data/lib/radiomanager_client/models/campaign_results.rb +271 -0
- data/lib/radiomanager_client/models/contact.rb +248 -0
- data/lib/radiomanager_client/models/contact_data_input.rb +248 -0
- data/lib/radiomanager_client/models/contact_field_values.rb +188 -0
- data/lib/radiomanager_client/models/contact_output_only.rb +224 -0
- data/lib/radiomanager_client/models/contact_relations.rb +206 -0
- data/lib/radiomanager_client/models/contact_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/contact_relations_tags.rb +215 -0
- data/lib/radiomanager_client/models/contact_relations_tags_params.rb +188 -0
- data/lib/radiomanager_client/models/contact_result.rb +320 -0
- data/lib/radiomanager_client/models/contact_results.rb +271 -0
- data/lib/radiomanager_client/models/data.rb +199 -0
- data/lib/radiomanager_client/models/data_1.rb +199 -0
- data/lib/radiomanager_client/models/epg_broadcast.rb +227 -0
- data/lib/radiomanager_client/models/external_message_queue_data.rb +333 -0
- data/lib/radiomanager_client/models/forbidden.rb +209 -0
- data/lib/radiomanager_client/models/genre.rb +225 -0
- data/lib/radiomanager_client/models/genre_output_only.rb +188 -0
- data/lib/radiomanager_client/models/genre_relations.rb +197 -0
- data/lib/radiomanager_client/models/genre_relations_broadcasts.rb +215 -0
- data/lib/radiomanager_client/models/genre_relations_broadcasts_params.rb +188 -0
- data/lib/radiomanager_client/models/genre_relations_programs.rb +215 -0
- data/lib/radiomanager_client/models/genre_result.rb +252 -0
- data/lib/radiomanager_client/models/genre_results.rb +271 -0
- data/lib/radiomanager_client/models/import_item.rb +292 -0
- data/lib/radiomanager_client/models/import_item_field_values.rb +188 -0
- data/lib/radiomanager_client/models/inline_response_202.rb +188 -0
- data/lib/radiomanager_client/models/internal_server_error.rb +209 -0
- data/lib/radiomanager_client/models/invite_user_data.rb +207 -0
- data/lib/radiomanager_client/models/invite_user_success.rb +188 -0
- data/lib/radiomanager_client/models/item.rb +366 -0
- data/lib/radiomanager_client/models/item_data_input.rb +397 -0
- data/lib/radiomanager_client/models/item_input_only.rb +210 -0
- data/lib/radiomanager_client/models/item_output_only.rb +260 -0
- data/lib/radiomanager_client/models/item_relations.rb +242 -0
- data/lib/radiomanager_client/models/item_relations_block.rb +215 -0
- data/lib/radiomanager_client/models/item_relations_campaign.rb +215 -0
- data/lib/radiomanager_client/models/item_relations_contacts.rb +215 -0
- data/lib/radiomanager_client/models/item_relations_contacts_params.rb +188 -0
- data/lib/radiomanager_client/models/item_relations_program.rb +215 -0
- data/lib/radiomanager_client/models/item_relations_tags.rb +215 -0
- data/lib/radiomanager_client/models/item_result.rb +510 -0
- data/lib/radiomanager_client/models/item_results.rb +262 -0
- data/lib/radiomanager_client/models/model_type.rb +289 -0
- data/lib/radiomanager_client/models/model_type_options.rb +188 -0
- data/lib/radiomanager_client/models/model_type_output_only.rb +188 -0
- data/lib/radiomanager_client/models/model_type_relations.rb +233 -0
- data/lib/radiomanager_client/models/model_type_relations_broadcasts.rb +215 -0
- data/lib/radiomanager_client/models/model_type_relations_campaigns.rb +215 -0
- data/lib/radiomanager_client/models/model_type_relations_campaigns_params.rb +188 -0
- data/lib/radiomanager_client/models/model_type_relations_contacts.rb +215 -0
- data/lib/radiomanager_client/models/model_type_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/model_type_relations_presenters.rb +215 -0
- data/lib/radiomanager_client/models/model_type_relations_programs.rb +215 -0
- data/lib/radiomanager_client/models/model_type_result.rb +352 -0
- data/lib/radiomanager_client/models/model_type_results.rb +271 -0
- data/lib/radiomanager_client/models/not_found.rb +209 -0
- data/lib/radiomanager_client/models/post_success.rb +204 -0
- data/lib/radiomanager_client/models/presenter.rb +240 -0
- data/lib/radiomanager_client/models/presenter_data_input.rb +240 -0
- data/lib/radiomanager_client/models/presenter_output_only.rb +244 -0
- data/lib/radiomanager_client/models/presenter_relations.rb +206 -0
- data/lib/radiomanager_client/models/presenter_relations_broadcasts.rb +215 -0
- data/lib/radiomanager_client/models/presenter_relations_programs.rb +215 -0
- data/lib/radiomanager_client/models/presenter_relations_programs_params.rb +188 -0
- data/lib/radiomanager_client/models/presenter_result.rb +332 -0
- data/lib/radiomanager_client/models/presenter_results.rb +271 -0
- data/lib/radiomanager_client/models/program.rb +306 -0
- data/lib/radiomanager_client/models/program_data_input.rb +328 -0
- data/lib/radiomanager_client/models/program_field_values.rb +188 -0
- data/lib/radiomanager_client/models/program_input_only.rb +201 -0
- data/lib/radiomanager_client/models/program_output_only.rb +244 -0
- data/lib/radiomanager_client/models/program_relations.rb +233 -0
- data/lib/radiomanager_client/models/program_relations_blocks.rb +215 -0
- data/lib/radiomanager_client/models/program_relations_broadcasts.rb +215 -0
- data/lib/radiomanager_client/models/program_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/program_relations_items_params.rb +188 -0
- data/lib/radiomanager_client/models/program_relations_presenters.rb +215 -0
- data/lib/radiomanager_client/models/program_relations_tags.rb +215 -0
- data/lib/radiomanager_client/models/program_result.rb +425 -0
- data/lib/radiomanager_client/models/program_results.rb +271 -0
- data/lib/radiomanager_client/models/read_only.rb +209 -0
- data/lib/radiomanager_client/models/relations_placeholder.rb +239 -0
- data/lib/radiomanager_client/models/success.rb +194 -0
- data/lib/radiomanager_client/models/tag.rb +193 -0
- data/lib/radiomanager_client/models/tag_data_input.rb +193 -0
- data/lib/radiomanager_client/models/tag_output_only.rb +229 -0
- data/lib/radiomanager_client/models/tag_relations.rb +215 -0
- data/lib/radiomanager_client/models/tag_relations_broadcasts.rb +215 -0
- data/lib/radiomanager_client/models/tag_relations_broadcasts_params.rb +188 -0
- data/lib/radiomanager_client/models/tag_relations_contacts.rb +215 -0
- data/lib/radiomanager_client/models/tag_relations_items.rb +215 -0
- data/lib/radiomanager_client/models/tag_relations_programs.rb +215 -0
- data/lib/radiomanager_client/models/tag_result.rb +279 -0
- data/lib/radiomanager_client/models/tag_results.rb +262 -0
- data/lib/radiomanager_client/models/text_string.rb +239 -0
- data/lib/radiomanager_client/models/too_many_requests.rb +193 -0
- data/lib/radiomanager_client/models/unprocessable_entity.rb +196 -0
- data/lib/radiomanager_client/models/user_result.rb +307 -0
- data/lib/radiomanager_client/models/user_result_settings.rb +233 -0
- data/lib/radiomanager_client/models/user_results.rb +271 -0
- data/lib/radiomanager_client/models/visual_result.rb +188 -0
- data/lib/radiomanager_client/version.rb +15 -0
- data/radiomanager_client-1.0.0.gem +0 -0
- data/radiomanager_client.gemspec +46 -0
- data/spec/api/block_api_spec.rb +88 -0
- data/spec/api/broadcast_api_spec.rb +180 -0
- data/spec/api/campaign_api_spec.rb +102 -0
- data/spec/api/contact_api_spec.rb +101 -0
- data/spec/api/external_message_api_spec.rb +47 -0
- data/spec/api/genre_api_spec.rb +64 -0
- data/spec/api/item_api_spec.rb +163 -0
- data/spec/api/model_type_api_spec.rb +68 -0
- data/spec/api/presenter_api_spec.rb +101 -0
- data/spec/api/program_api_spec.rb +105 -0
- data/spec/api/string_api_spec.rb +48 -0
- data/spec/api/tag_api_spec.rb +102 -0
- data/spec/api/user_api_spec.rb +84 -0
- data/spec/api/visual_slide_api_spec.rb +57 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/block_relations_broadcast_params_spec.rb +42 -0
- data/spec/models/block_relations_broadcast_spec.rb +60 -0
- data/spec/models/block_relations_items_params_spec.rb +42 -0
- data/spec/models/block_relations_items_spec.rb +60 -0
- data/spec/models/block_relations_program_spec.rb +60 -0
- data/spec/models/block_relations_spec.rb +54 -0
- data/spec/models/block_result_spec.rb +102 -0
- data/spec/models/block_results_spec.rb +96 -0
- data/spec/models/block_spec.rb +84 -0
- data/spec/models/broadcast_data_input_spec.rb +184 -0
- data/spec/models/broadcast_field_values_spec.rb +42 -0
- data/spec/models/broadcast_input_only_spec.rb +48 -0
- data/spec/models/broadcast_output_only_spec.rb +66 -0
- data/spec/models/broadcast_relations_blocks_spec.rb +60 -0
- data/spec/models/broadcast_relations_items_params_spec.rb +42 -0
- data/spec/models/broadcast_relations_items_spec.rb +60 -0
- data/spec/models/broadcast_relations_model_type_spec.rb +60 -0
- data/spec/models/broadcast_relations_presenters_spec.rb +60 -0
- data/spec/models/broadcast_relations_spec.rb +72 -0
- data/spec/models/broadcast_relations_tags_spec.rb +60 -0
- data/spec/models/broadcast_result_spec.rb +238 -0
- data/spec/models/broadcast_results_spec.rb +96 -0
- data/spec/models/broadcast_spec.rb +172 -0
- data/spec/models/campaign_data_input_spec.rb +78 -0
- data/spec/models/campaign_output_only_spec.rb +72 -0
- data/spec/models/campaign_relations_items_params_spec.rb +42 -0
- data/spec/models/campaign_relations_items_spec.rb +60 -0
- data/spec/models/campaign_relations_spec.rb +48 -0
- data/spec/models/campaign_result_spec.rb +126 -0
- data/spec/models/campaign_results_spec.rb +96 -0
- data/spec/models/campaign_spec.rb +78 -0
- data/spec/models/contact_data_input_spec.rb +72 -0
- data/spec/models/contact_field_values_spec.rb +42 -0
- data/spec/models/contact_output_only_spec.rb +66 -0
- data/spec/models/contact_relations_items_spec.rb +60 -0
- data/spec/models/contact_relations_spec.rb +54 -0
- data/spec/models/contact_relations_tags_params_spec.rb +42 -0
- data/spec/models/contact_relations_tags_spec.rb +60 -0
- data/spec/models/contact_result_spec.rb +120 -0
- data/spec/models/contact_results_spec.rb +96 -0
- data/spec/models/contact_spec.rb +72 -0
- data/spec/models/data_1_spec.rb +48 -0
- data/spec/models/data_spec.rb +48 -0
- data/spec/models/epg_broadcast_spec.rb +54 -0
- data/spec/models/external_message_queue_data_spec.rb +78 -0
- data/spec/models/forbidden_spec.rb +48 -0
- data/spec/models/genre_output_only_spec.rb +42 -0
- data/spec/models/genre_relations_broadcasts_params_spec.rb +42 -0
- data/spec/models/genre_relations_broadcasts_spec.rb +60 -0
- data/spec/models/genre_relations_programs_spec.rb +60 -0
- data/spec/models/genre_relations_spec.rb +48 -0
- data/spec/models/genre_result_spec.rb +78 -0
- data/spec/models/genre_results_spec.rb +96 -0
- data/spec/models/genre_spec.rb +60 -0
- data/spec/models/import_item_field_values_spec.rb +42 -0
- data/spec/models/import_item_spec.rb +102 -0
- data/spec/models/inline_response_202_spec.rb +42 -0
- data/spec/models/internal_server_error_spec.rb +48 -0
- data/spec/models/invite_user_data_spec.rb +48 -0
- data/spec/models/invite_user_success_spec.rb +42 -0
- data/spec/models/item_data_input_spec.rb +154 -0
- data/spec/models/item_input_only_spec.rb +54 -0
- data/spec/models/item_output_only_spec.rb +90 -0
- data/spec/models/item_relations_block_spec.rb +60 -0
- data/spec/models/item_relations_campaign_spec.rb +60 -0
- data/spec/models/item_relations_contacts_params_spec.rb +42 -0
- data/spec/models/item_relations_contacts_spec.rb +60 -0
- data/spec/models/item_relations_program_spec.rb +60 -0
- data/spec/models/item_relations_spec.rb +78 -0
- data/spec/models/item_relations_tags_spec.rb +60 -0
- data/spec/models/item_result_spec.rb +232 -0
- data/spec/models/item_results_spec.rb +90 -0
- data/spec/models/item_spec.rb +136 -0
- data/spec/models/model_type_options_spec.rb +42 -0
- data/spec/models/model_type_output_only_spec.rb +42 -0
- data/spec/models/model_type_relations_broadcasts_spec.rb +60 -0
- data/spec/models/model_type_relations_campaigns_params_spec.rb +42 -0
- data/spec/models/model_type_relations_campaigns_spec.rb +60 -0
- data/spec/models/model_type_relations_contacts_spec.rb +60 -0
- data/spec/models/model_type_relations_items_spec.rb +60 -0
- data/spec/models/model_type_relations_presenters_spec.rb +60 -0
- data/spec/models/model_type_relations_programs_spec.rb +60 -0
- data/spec/models/model_type_relations_spec.rb +72 -0
- data/spec/models/model_type_result_spec.rb +130 -0
- data/spec/models/model_type_results_spec.rb +96 -0
- data/spec/models/model_type_spec.rb +88 -0
- data/spec/models/not_found_spec.rb +48 -0
- data/spec/models/post_success_spec.rb +48 -0
- data/spec/models/presenter_data_input_spec.rb +72 -0
- data/spec/models/presenter_output_only_spec.rb +66 -0
- data/spec/models/presenter_relations_broadcasts_spec.rb +60 -0
- data/spec/models/presenter_relations_programs_params_spec.rb +42 -0
- data/spec/models/presenter_relations_programs_spec.rb +60 -0
- data/spec/models/presenter_relations_spec.rb +54 -0
- data/spec/models/presenter_result_spec.rb +120 -0
- data/spec/models/presenter_results_spec.rb +96 -0
- data/spec/models/presenter_spec.rb +72 -0
- data/spec/models/program_data_input_spec.rb +126 -0
- data/spec/models/program_field_values_spec.rb +42 -0
- data/spec/models/program_input_only_spec.rb +48 -0
- data/spec/models/program_output_only_spec.rb +66 -0
- data/spec/models/program_relations_blocks_spec.rb +60 -0
- data/spec/models/program_relations_broadcasts_spec.rb +60 -0
- data/spec/models/program_relations_items_params_spec.rb +42 -0
- data/spec/models/program_relations_items_spec.rb +60 -0
- data/spec/models/program_relations_presenters_spec.rb +60 -0
- data/spec/models/program_relations_spec.rb +72 -0
- data/spec/models/program_relations_tags_spec.rb +60 -0
- data/spec/models/program_result_spec.rb +180 -0
- data/spec/models/program_results_spec.rb +96 -0
- data/spec/models/program_spec.rb +114 -0
- data/spec/models/read_only_spec.rb +48 -0
- data/spec/models/relations_placeholder_spec.rb +60 -0
- data/spec/models/success_spec.rb +42 -0
- data/spec/models/tag_data_input_spec.rb +42 -0
- data/spec/models/tag_output_only_spec.rb +66 -0
- data/spec/models/tag_relations_broadcasts_params_spec.rb +42 -0
- data/spec/models/tag_relations_broadcasts_spec.rb +60 -0
- data/spec/models/tag_relations_contacts_spec.rb +60 -0
- data/spec/models/tag_relations_items_spec.rb +60 -0
- data/spec/models/tag_relations_programs_spec.rb +60 -0
- data/spec/models/tag_relations_spec.rb +60 -0
- data/spec/models/tag_result_spec.rb +96 -0
- data/spec/models/tag_results_spec.rb +90 -0
- data/spec/models/tag_spec.rb +42 -0
- data/spec/models/text_string_spec.rb +66 -0
- data/spec/models/too_many_requests_spec.rb +42 -0
- data/spec/models/unprocessable_entity_spec.rb +42 -0
- data/spec/models/user_result_settings_spec.rb +72 -0
- data/spec/models/user_result_spec.rb +108 -0
- data/spec/models/user_results_spec.rb +96 -0
- data/spec/models/visual_result_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +825 -0
@@ -0,0 +1,259 @@
|
|
1
|
+
=begin
|
2
|
+
#RadioManager
|
3
|
+
|
4
|
+
#RadioManager
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
Contact: support@pluxbox.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module RadioManagerClient
|
16
|
+
|
17
|
+
class CampaignDataInput
|
18
|
+
attr_accessor :model_type_id
|
19
|
+
|
20
|
+
attr_accessor :field_values
|
21
|
+
|
22
|
+
attr_accessor :title
|
23
|
+
|
24
|
+
attr_accessor :start
|
25
|
+
|
26
|
+
attr_accessor :stop
|
27
|
+
|
28
|
+
attr_accessor :recommended
|
29
|
+
|
30
|
+
attr_accessor :description
|
31
|
+
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'model_type_id' => :'model_type_id',
|
37
|
+
:'field_values' => :'field_values',
|
38
|
+
:'title' => :'title',
|
39
|
+
:'start' => :'start',
|
40
|
+
:'stop' => :'stop',
|
41
|
+
:'recommended' => :'recommended',
|
42
|
+
:'description' => :'description'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.swagger_types
|
48
|
+
{
|
49
|
+
:'model_type_id' => :'Integer',
|
50
|
+
:'field_values' => :'Array<Object>',
|
51
|
+
:'title' => :'String',
|
52
|
+
:'start' => :'DateTime',
|
53
|
+
:'stop' => :'DateTime',
|
54
|
+
:'recommended' => :'BOOLEAN',
|
55
|
+
:'description' => :'String'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
return unless attributes.is_a?(Hash)
|
63
|
+
|
64
|
+
# convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
66
|
+
|
67
|
+
if attributes.has_key?(:'model_type_id')
|
68
|
+
self.model_type_id = attributes[:'model_type_id']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'field_values')
|
72
|
+
if (value = attributes[:'field_values']).is_a?(Array)
|
73
|
+
self.field_values = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'title')
|
78
|
+
self.title = attributes[:'title']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'start')
|
82
|
+
self.start = attributes[:'start']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'stop')
|
86
|
+
self.stop = attributes[:'stop']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'recommended')
|
90
|
+
self.recommended = attributes[:'recommended']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'description')
|
94
|
+
self.description = attributes[:'description']
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
+
# @return Array for valid properies with the reasons
|
101
|
+
def list_invalid_properties
|
102
|
+
invalid_properties = Array.new
|
103
|
+
if @model_type_id.nil?
|
104
|
+
invalid_properties.push("invalid value for 'model_type_id', model_type_id cannot be nil.")
|
105
|
+
end
|
106
|
+
|
107
|
+
if @start.nil?
|
108
|
+
invalid_properties.push("invalid value for 'start', start cannot be nil.")
|
109
|
+
end
|
110
|
+
|
111
|
+
if @stop.nil?
|
112
|
+
invalid_properties.push("invalid value for 'stop', stop cannot be nil.")
|
113
|
+
end
|
114
|
+
|
115
|
+
return invalid_properties
|
116
|
+
end
|
117
|
+
|
118
|
+
# Check to see if the all the properties in the model are valid
|
119
|
+
# @return true if the model is valid
|
120
|
+
def valid?
|
121
|
+
return false if @model_type_id.nil?
|
122
|
+
return false if @start.nil?
|
123
|
+
return false if @stop.nil?
|
124
|
+
return true
|
125
|
+
end
|
126
|
+
|
127
|
+
# Checks equality by comparing each attribute.
|
128
|
+
# @param [Object] Object to be compared
|
129
|
+
def ==(o)
|
130
|
+
return true if self.equal?(o)
|
131
|
+
self.class == o.class &&
|
132
|
+
model_type_id == o.model_type_id &&
|
133
|
+
field_values == o.field_values &&
|
134
|
+
title == o.title &&
|
135
|
+
start == o.start &&
|
136
|
+
stop == o.stop &&
|
137
|
+
recommended == o.recommended &&
|
138
|
+
description == o.description
|
139
|
+
end
|
140
|
+
|
141
|
+
# @see the `==` method
|
142
|
+
# @param [Object] Object to be compared
|
143
|
+
def eql?(o)
|
144
|
+
self == o
|
145
|
+
end
|
146
|
+
|
147
|
+
# Calculates hash code according to all attributes.
|
148
|
+
# @return [Fixnum] Hash code
|
149
|
+
def hash
|
150
|
+
[model_type_id, field_values, title, start, stop, recommended, description].hash
|
151
|
+
end
|
152
|
+
|
153
|
+
# Builds the object from hash
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
155
|
+
# @return [Object] Returns the model itself
|
156
|
+
def build_from_hash(attributes)
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
158
|
+
self.class.swagger_types.each_pair do |key, type|
|
159
|
+
if type =~ /\AArray<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the the attribute
|
161
|
+
# is documented as an array but the input is not
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
164
|
+
end
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
167
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
168
|
+
end
|
169
|
+
|
170
|
+
self
|
171
|
+
end
|
172
|
+
|
173
|
+
# Deserializes the data based on type
|
174
|
+
# @param string type Data type
|
175
|
+
# @param string value Value to be deserialized
|
176
|
+
# @return [Object] Deserialized data
|
177
|
+
def _deserialize(type, value)
|
178
|
+
case type.to_sym
|
179
|
+
when :DateTime
|
180
|
+
DateTime.parse(value)
|
181
|
+
when :Date
|
182
|
+
Date.parse(value)
|
183
|
+
when :String
|
184
|
+
value.to_s
|
185
|
+
when :Integer
|
186
|
+
value.to_i
|
187
|
+
when :Float
|
188
|
+
value.to_f
|
189
|
+
when :BOOLEAN
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
191
|
+
true
|
192
|
+
else
|
193
|
+
false
|
194
|
+
end
|
195
|
+
when :Object
|
196
|
+
# generic object (usually a Hash), return directly
|
197
|
+
value
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each do |k, v|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
else # model
|
210
|
+
temp_model = RadioManagerClient.const_get(type).new
|
211
|
+
temp_model.build_from_hash(value)
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the string representation of the object
|
216
|
+
# @return [String] String presentation of the object
|
217
|
+
def to_s
|
218
|
+
to_hash.to_s
|
219
|
+
end
|
220
|
+
|
221
|
+
# to_body is an alias to to_hash (backward compatibility)
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_body
|
224
|
+
to_hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Returns the object in the form of hash
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
229
|
+
def to_hash
|
230
|
+
hash = {}
|
231
|
+
self.class.attribute_map.each_pair do |attr, param|
|
232
|
+
value = self.send(attr)
|
233
|
+
next if value.nil?
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map{ |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -0,0 +1,255 @@
|
|
1
|
+
=begin
|
2
|
+
#RadioManager
|
3
|
+
|
4
|
+
#RadioManager
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0
|
7
|
+
Contact: support@pluxbox.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module RadioManagerClient
|
16
|
+
|
17
|
+
class CampaignOutputOnly
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :updated_at
|
21
|
+
|
22
|
+
attr_accessor :created_at
|
23
|
+
|
24
|
+
attr_accessor :deleted_at
|
25
|
+
|
26
|
+
attr_accessor :item
|
27
|
+
|
28
|
+
attr_accessor :_external_station_id
|
29
|
+
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'id' => :'id',
|
35
|
+
:'updated_at' => :'updated_at',
|
36
|
+
:'created_at' => :'created_at',
|
37
|
+
:'deleted_at' => :'deleted_at',
|
38
|
+
:'item' => :'item',
|
39
|
+
:'_external_station_id' => :'_external_station_id'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Attribute type mapping.
|
44
|
+
def self.swagger_types
|
45
|
+
{
|
46
|
+
:'id' => :'Integer',
|
47
|
+
:'updated_at' => :'DateTime',
|
48
|
+
:'created_at' => :'DateTime',
|
49
|
+
:'deleted_at' => :'DateTime',
|
50
|
+
:'item' => :'Array<Item>',
|
51
|
+
:'_external_station_id' => :'Integer'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
62
|
+
|
63
|
+
if attributes.has_key?(:'id')
|
64
|
+
self.id = attributes[:'id']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'updated_at')
|
68
|
+
self.updated_at = attributes[:'updated_at']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'created_at')
|
72
|
+
self.created_at = attributes[:'created_at']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'deleted_at')
|
76
|
+
self.deleted_at = attributes[:'deleted_at']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'item')
|
80
|
+
if (value = attributes[:'item']).is_a?(Array)
|
81
|
+
self.item = value
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'_external_station_id')
|
86
|
+
self._external_station_id = attributes[:'_external_station_id']
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
92
|
+
# @return Array for valid properies with the reasons
|
93
|
+
def list_invalid_properties
|
94
|
+
invalid_properties = Array.new
|
95
|
+
if @id.nil?
|
96
|
+
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
97
|
+
end
|
98
|
+
|
99
|
+
if @updated_at.nil?
|
100
|
+
invalid_properties.push("invalid value for 'updated_at', updated_at cannot be nil.")
|
101
|
+
end
|
102
|
+
|
103
|
+
if @created_at.nil?
|
104
|
+
invalid_properties.push("invalid value for 'created_at', created_at cannot be nil.")
|
105
|
+
end
|
106
|
+
|
107
|
+
if @deleted_at.nil?
|
108
|
+
invalid_properties.push("invalid value for 'deleted_at', deleted_at cannot be nil.")
|
109
|
+
end
|
110
|
+
|
111
|
+
return invalid_properties
|
112
|
+
end
|
113
|
+
|
114
|
+
# Check to see if the all the properties in the model are valid
|
115
|
+
# @return true if the model is valid
|
116
|
+
def valid?
|
117
|
+
return false if @id.nil?
|
118
|
+
return false if @updated_at.nil?
|
119
|
+
return false if @created_at.nil?
|
120
|
+
return false if @deleted_at.nil?
|
121
|
+
return true
|
122
|
+
end
|
123
|
+
|
124
|
+
# Checks equality by comparing each attribute.
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def ==(o)
|
127
|
+
return true if self.equal?(o)
|
128
|
+
self.class == o.class &&
|
129
|
+
id == o.id &&
|
130
|
+
updated_at == o.updated_at &&
|
131
|
+
created_at == o.created_at &&
|
132
|
+
deleted_at == o.deleted_at &&
|
133
|
+
item == o.item &&
|
134
|
+
_external_station_id == o._external_station_id
|
135
|
+
end
|
136
|
+
|
137
|
+
# @see the `==` method
|
138
|
+
# @param [Object] Object to be compared
|
139
|
+
def eql?(o)
|
140
|
+
self == o
|
141
|
+
end
|
142
|
+
|
143
|
+
# Calculates hash code according to all attributes.
|
144
|
+
# @return [Fixnum] Hash code
|
145
|
+
def hash
|
146
|
+
[id, updated_at, created_at, deleted_at, item, _external_station_id].hash
|
147
|
+
end
|
148
|
+
|
149
|
+
# Builds the object from hash
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
151
|
+
# @return [Object] Returns the model itself
|
152
|
+
def build_from_hash(attributes)
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
154
|
+
self.class.swagger_types.each_pair do |key, type|
|
155
|
+
if type =~ /\AArray<(.*)>/i
|
156
|
+
# check to ensure the input is an array given that the the attribute
|
157
|
+
# is documented as an array but the input is not
|
158
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
159
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
160
|
+
end
|
161
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
162
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
163
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
164
|
+
end
|
165
|
+
|
166
|
+
self
|
167
|
+
end
|
168
|
+
|
169
|
+
# Deserializes the data based on type
|
170
|
+
# @param string type Data type
|
171
|
+
# @param string value Value to be deserialized
|
172
|
+
# @return [Object] Deserialized data
|
173
|
+
def _deserialize(type, value)
|
174
|
+
case type.to_sym
|
175
|
+
when :DateTime
|
176
|
+
DateTime.parse(value)
|
177
|
+
when :Date
|
178
|
+
Date.parse(value)
|
179
|
+
when :String
|
180
|
+
value.to_s
|
181
|
+
when :Integer
|
182
|
+
value.to_i
|
183
|
+
when :Float
|
184
|
+
value.to_f
|
185
|
+
when :BOOLEAN
|
186
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
187
|
+
true
|
188
|
+
else
|
189
|
+
false
|
190
|
+
end
|
191
|
+
when :Object
|
192
|
+
# generic object (usually a Hash), return directly
|
193
|
+
value
|
194
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
195
|
+
inner_type = Regexp.last_match[:inner_type]
|
196
|
+
value.map { |v| _deserialize(inner_type, v) }
|
197
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
198
|
+
k_type = Regexp.last_match[:k_type]
|
199
|
+
v_type = Regexp.last_match[:v_type]
|
200
|
+
{}.tap do |hash|
|
201
|
+
value.each do |k, v|
|
202
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
else # model
|
206
|
+
temp_model = RadioManagerClient.const_get(type).new
|
207
|
+
temp_model.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
next if value.nil?
|
230
|
+
hash[param] = _to_hash(value)
|
231
|
+
end
|
232
|
+
hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Outputs non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
# @param [Object] value Any valid value
|
238
|
+
# @return [Hash] Returns the value in the form of hash
|
239
|
+
def _to_hash(value)
|
240
|
+
if value.is_a?(Array)
|
241
|
+
value.compact.map{ |v| _to_hash(v) }
|
242
|
+
elsif value.is_a?(Hash)
|
243
|
+
{}.tap do |hash|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
245
|
+
end
|
246
|
+
elsif value.respond_to? :to_hash
|
247
|
+
value.to_hash
|
248
|
+
else
|
249
|
+
value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|