shortcut_client_ruby 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +2303 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/bin/update.rb +34 -0
- data/config.json +7 -0
- data/docs/BasicWorkspaceInfo.md +8 -0
- data/docs/Branch.md +17 -0
- data/docs/Category.md +15 -0
- data/docs/Commit.md +19 -0
- data/docs/CreateCategory.md +10 -0
- data/docs/CreateCategoryParams.md +9 -0
- data/docs/CreateCommentComment.md +11 -0
- data/docs/CreateEntityTemplate.md +9 -0
- data/docs/CreateEpic.md +23 -0
- data/docs/CreateEpicComment.md +11 -0
- data/docs/CreateGroup.md +14 -0
- data/docs/CreateIteration.md +13 -0
- data/docs/CreateLabelParams.md +10 -0
- data/docs/CreateLinkedFile.md +15 -0
- data/docs/CreateMilestone.md +12 -0
- data/docs/CreateOrDeleteStoryReaction.md +7 -0
- data/docs/CreateProject.md +17 -0
- data/docs/CreateStories.md +7 -0
- data/docs/CreateStoryComment.md +11 -0
- data/docs/CreateStoryCommentParams.md +11 -0
- data/docs/CreateStoryContents.md +27 -0
- data/docs/CreateStoryLink.md +9 -0
- data/docs/CreateStoryLinkParams.md +9 -0
- data/docs/CreateStoryParams.md +33 -0
- data/docs/CreateTask.md +12 -0
- data/docs/CreateTaskParams.md +12 -0
- data/docs/DefaultApi.md +5632 -0
- data/docs/DeleteStories.md +7 -0
- data/docs/EntityTemplate.md +14 -0
- data/docs/EntityTemplateTask.md +10 -0
- data/docs/Epic.md +44 -0
- data/docs/EpicSearchResults.md +10 -0
- data/docs/EpicSlim.md +43 -0
- data/docs/EpicState.md +15 -0
- data/docs/EpicStats.md +19 -0
- data/docs/EpicWorkflow.md +12 -0
- data/docs/GetEpicStories.md +7 -0
- data/docs/GetExternalLinkStoriesParams.md +7 -0
- data/docs/GetIterationStories.md +7 -0
- data/docs/GetLabelStories.md +7 -0
- data/docs/GetMember.md +7 -0
- data/docs/GetProjectStories.md +7 -0
- data/docs/Group.md +22 -0
- data/docs/History.md +15 -0
- data/docs/HistoryActionBranchCreate.md +11 -0
- data/docs/HistoryActionBranchMerge.md +11 -0
- data/docs/HistoryActionBranchPush.md +11 -0
- data/docs/HistoryActionLabelCreate.md +11 -0
- data/docs/HistoryActionLabelDelete.md +10 -0
- data/docs/HistoryActionLabelUpdate.md +9 -0
- data/docs/HistoryActionProjectUpdate.md +11 -0
- data/docs/HistoryActionPullRequest.md +12 -0
- data/docs/HistoryActionStoryCommentCreate.md +12 -0
- data/docs/HistoryActionStoryCreate.md +30 -0
- data/docs/HistoryActionStoryDelete.md +11 -0
- data/docs/HistoryActionStoryLinkCreate.md +12 -0
- data/docs/HistoryActionStoryLinkDelete.md +12 -0
- data/docs/HistoryActionStoryLinkUpdate.md +13 -0
- data/docs/HistoryActionStoryUpdate.md +13 -0
- data/docs/HistoryActionTaskCreate.md +15 -0
- data/docs/HistoryActionTaskDelete.md +10 -0
- data/docs/HistoryActionTaskUpdate.md +13 -0
- data/docs/HistoryChangesStory.md +30 -0
- data/docs/HistoryChangesStoryLink.md +9 -0
- data/docs/HistoryChangesTask.md +10 -0
- data/docs/HistoryReferenceBranch.md +10 -0
- data/docs/HistoryReferenceCommit.md +10 -0
- data/docs/HistoryReferenceEpic.md +10 -0
- data/docs/HistoryReferenceGeneral.md +9 -0
- data/docs/HistoryReferenceGroup.md +9 -0
- data/docs/HistoryReferenceIteration.md +10 -0
- data/docs/HistoryReferenceLabel.md +10 -0
- data/docs/HistoryReferenceProject.md +10 -0
- data/docs/HistoryReferenceStory.md +11 -0
- data/docs/HistoryReferenceStoryTask.md +9 -0
- data/docs/HistoryReferenceWorkflowState.md +10 -0
- data/docs/Icon.md +11 -0
- data/docs/Identity.md +9 -0
- data/docs/Iteration.md +24 -0
- data/docs/IterationSlim.md +23 -0
- data/docs/IterationStats.md +17 -0
- data/docs/Label.md +17 -0
- data/docs/LabelSlim.md +16 -0
- data/docs/LabelStats.md +21 -0
- data/docs/LinkedFile.md +22 -0
- data/docs/ListEpics.md +7 -0
- data/docs/ListGroupStories.md +8 -0
- data/docs/ListLabels.md +7 -0
- data/docs/ListMembers.md +7 -0
- data/docs/MaxSearchResultsExceededError.md +9 -0
- data/docs/Member.md +17 -0
- data/docs/MemberInfo.md +10 -0
- data/docs/Milestone.md +23 -0
- data/docs/MilestoneStats.md +9 -0
- data/docs/Profile.md +15 -0
- data/docs/Project.md +25 -0
- data/docs/ProjectStats.md +9 -0
- data/docs/PullRequest.md +28 -0
- data/docs/PullRequestLabel.md +11 -0
- data/docs/Repository.md +15 -0
- data/docs/Search.md +10 -0
- data/docs/SearchResults.md +8 -0
- data/docs/SearchStories.md +34 -0
- data/docs/Story.md +56 -0
- data/docs/StoryComment.md +20 -0
- data/docs/StoryContents.md +25 -0
- data/docs/StoryContentsTask.md +11 -0
- data/docs/StoryHistoryChangeAddsRemovesInt.md +8 -0
- data/docs/StoryHistoryChangeAddsRemovesUuid.md +8 -0
- data/docs/StoryHistoryChangeOldNewBool.md +8 -0
- data/docs/StoryHistoryChangeOldNewInt.md +8 -0
- data/docs/StoryHistoryChangeOldNewStr.md +8 -0
- data/docs/StoryHistoryChangeOldNewUuid.md +8 -0
- data/docs/StoryLink.md +14 -0
- data/docs/StoryReaction.md +8 -0
- data/docs/StorySearchResults.md +10 -0
- data/docs/StorySlim.md +54 -0
- data/docs/StoryStats.md +7 -0
- data/docs/Task.md +20 -0
- data/docs/ThreadedComment.md +19 -0
- data/docs/TypedStoryLink.md +15 -0
- data/docs/UnusableEntitlementError.md +9 -0
- data/docs/UpdateCategory.md +9 -0
- data/docs/UpdateComment.md +7 -0
- data/docs/UpdateEntityTemplate.md +8 -0
- data/docs/UpdateEpic.md +23 -0
- data/docs/UpdateFile.md +12 -0
- data/docs/UpdateGroup.md +15 -0
- data/docs/UpdateIteration.md +13 -0
- data/docs/UpdateLabel.md +10 -0
- data/docs/UpdateLinkedFile.md +14 -0
- data/docs/UpdateMilestone.md +14 -0
- data/docs/UpdateProject.md +15 -0
- data/docs/UpdateStories.md +27 -0
- data/docs/UpdateStory.md +32 -0
- data/docs/UpdateStoryComment.md +7 -0
- data/docs/UpdateStoryContents.md +27 -0
- data/docs/UpdateStoryLink.md +9 -0
- data/docs/UpdateTask.md +11 -0
- data/docs/UploadedFile.md +23 -0
- data/docs/V3FilesBody.md +11 -0
- data/docs/Workflow.md +17 -0
- data/docs/WorkflowState.md +18 -0
- data/git_push.sh +55 -0
- data/lib/shortcut/client/ruby/version.rb +9 -0
- data/lib/shortcut/client/ruby.rb +12 -0
- data/lib/shortcut_client_ruby/api/default_api.rb +6091 -0
- data/lib/shortcut_client_ruby/api_client.rb +388 -0
- data/lib/shortcut_client_ruby/api_error.rb +57 -0
- data/lib/shortcut_client_ruby/configuration.rb +205 -0
- data/lib/shortcut_client_ruby/models/basic_workspace_info.rb +227 -0
- data/lib/shortcut_client_ruby/models/branch.rb +371 -0
- data/lib/shortcut_client_ruby/models/category.rb +335 -0
- data/lib/shortcut_client_ruby/models/commit.rb +398 -0
- data/lib/shortcut_client_ruby/models/create_category.rb +281 -0
- data/lib/shortcut_client_ruby/models/create_category_params.rb +233 -0
- data/lib/shortcut_client_ruby/models/create_comment_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_entity_template.rb +237 -0
- data/lib/shortcut_client_ruby/models/create_epic.rb +416 -0
- data/lib/shortcut_client_ruby/models/create_epic_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_group.rb +325 -0
- data/lib/shortcut_client_ruby/models/create_iteration.rb +288 -0
- data/lib/shortcut_client_ruby/models/create_label_params.rb +243 -0
- data/lib/shortcut_client_ruby/models/create_linked_file.rb +336 -0
- data/lib/shortcut_client_ruby/models/create_milestone.rb +298 -0
- data/lib/shortcut_client_ruby/models/create_or_delete_story_reaction.rb +212 -0
- data/lib/shortcut_client_ruby/models/create_project.rb +319 -0
- data/lib/shortcut_client_ruby/models/create_stories.rb +214 -0
- data/lib/shortcut_client_ruby/models/create_story_comment.rb +252 -0
- data/lib/shortcut_client_ruby/models/create_story_comment_params.rb +253 -0
- data/lib/shortcut_client_ruby/models/create_story_contents.rb +433 -0
- data/lib/shortcut_client_ruby/models/create_story_link.rb +276 -0
- data/lib/shortcut_client_ruby/models/create_story_link_params.rb +267 -0
- data/lib/shortcut_client_ruby/models/create_story_params.rb +532 -0
- data/lib/shortcut_client_ruby/models/create_task.rb +264 -0
- data/lib/shortcut_client_ruby/models/create_task_params.rb +265 -0
- data/lib/shortcut_client_ruby/models/delete_stories.rb +214 -0
- data/lib/shortcut_client_ruby/models/entity_template.rb +317 -0
- data/lib/shortcut_client_ruby/models/entity_template_task.rb +245 -0
- data/lib/shortcut_client_ruby/models/epic.rb +799 -0
- data/lib/shortcut_client_ruby/models/epic_search_results.rb +257 -0
- data/lib/shortcut_client_ruby/models/epic_slim.rb +777 -0
- data/lib/shortcut_client_ruby/models/epic_state.rb +328 -0
- data/lib/shortcut_client_ruby/models/epic_stats.rb +384 -0
- data/lib/shortcut_client_ruby/models/epic_workflow.rb +290 -0
- data/lib/shortcut_client_ruby/models/get_epic_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_external_link_stories_params.rb +212 -0
- data/lib/shortcut_client_ruby/models/get_iteration_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_label_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_member.rb +207 -0
- data/lib/shortcut_client_ruby/models/get_project_stories.rb +207 -0
- data/lib/shortcut_client_ruby/models/group.rb +479 -0
- data/lib/shortcut_client_ruby/models/history.rb +347 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_create.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_merge.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_branch_push.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_label_create.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_label_delete.rb +292 -0
- data/lib/shortcut_client_ruby/models/history_action_label_update.rb +277 -0
- data/lib/shortcut_client_ruby/models/history_action_project_update.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_action_pull_request.rb +322 -0
- data/lib/shortcut_client_ruby/models/history_action_story_comment_create.rb +322 -0
- data/lib/shortcut_client_ruby/models/history_action_story_create.rb +527 -0
- data/lib/shortcut_client_ruby/models/history_action_story_delete.rb +319 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_create.rb +334 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_delete.rb +336 -0
- data/lib/shortcut_client_ruby/models/history_action_story_link_update.rb +348 -0
- data/lib/shortcut_client_ruby/models/history_action_story_update.rb +343 -0
- data/lib/shortcut_client_ruby/models/history_action_task_create.rb +353 -0
- data/lib/shortcut_client_ruby/models/history_action_task_delete.rb +292 -0
- data/lib/shortcut_client_ruby/models/history_action_task_update.rb +331 -0
- data/lib/shortcut_client_ruby/models/history_changes_story.rb +414 -0
- data/lib/shortcut_client_ruby/models/history_changes_story_link.rb +225 -0
- data/lib/shortcut_client_ruby/models/history_changes_task.rb +234 -0
- data/lib/shortcut_client_ruby/models/history_reference_branch.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_commit.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_epic.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_general.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_group.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_iteration.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_label.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_project.rb +258 -0
- data/lib/shortcut_client_ruby/models/history_reference_story.rb +307 -0
- data/lib/shortcut_client_ruby/models/history_reference_story_task.rb +243 -0
- data/lib/shortcut_client_ruby/models/history_reference_workflow_state.rb +292 -0
- data/lib/shortcut_client_ruby/models/icon.rb +273 -0
- data/lib/shortcut_client_ruby/models/identity.rb +245 -0
- data/lib/shortcut_client_ruby/models/iteration.rb +481 -0
- data/lib/shortcut_client_ruby/models/iteration_slim.rb +466 -0
- data/lib/shortcut_client_ruby/models/iteration_stats.rb +353 -0
- data/lib/shortcut_client_ruby/models/label.rb +362 -0
- data/lib/shortcut_client_ruby/models/label_slim.rb +353 -0
- data/lib/shortcut_client_ruby/models/label_stats.rb +423 -0
- data/lib/shortcut_client_ruby/models/linked_file.rb +450 -0
- data/lib/shortcut_client_ruby/models/list_epics.rb +207 -0
- data/lib/shortcut_client_ruby/models/list_group_stories.rb +217 -0
- data/lib/shortcut_client_ruby/models/list_labels.rb +207 -0
- data/lib/shortcut_client_ruby/models/list_members.rb +207 -0
- data/lib/shortcut_client_ruby/models/max_search_results_exceeded_error.rb +289 -0
- data/lib/shortcut_client_ruby/models/member.rb +395 -0
- data/lib/shortcut_client_ruby/models/member_info.rb +253 -0
- data/lib/shortcut_client_ruby/models/milestone.rb +453 -0
- data/lib/shortcut_client_ruby/models/milestone_stats.rb +233 -0
- data/lib/shortcut_client_ruby/models/profile.rb +330 -0
- data/lib/shortcut_client_ruby/models/project.rb +490 -0
- data/lib/shortcut_client_ruby/models/project_stats.rb +243 -0
- data/lib/shortcut_client_ruby/models/pull_request.rb +518 -0
- data/lib/shortcut_client_ruby/models/pull_request_label.rb +269 -0
- data/lib/shortcut_client_ruby/models/repository.rb +340 -0
- data/lib/shortcut_client_ruby/models/search.rb +275 -0
- data/lib/shortcut_client_ruby/models/search_results.rb +226 -0
- data/lib/shortcut_client_ruby/models/search_stories.rb +529 -0
- data/lib/shortcut_client_ruby/models/story.rb +985 -0
- data/lib/shortcut_client_ruby/models/story_comment.rb +419 -0
- data/lib/shortcut_client_ruby/models/story_contents.rb +404 -0
- data/lib/shortcut_client_ruby/models/story_contents_task.rb +255 -0
- data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_int.rb +222 -0
- data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_uuid.rb +222 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_bool.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_int.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_str.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_history_change_old_new_uuid.rb +218 -0
- data/lib/shortcut_client_ruby/models/story_link.rb +318 -0
- data/lib/shortcut_client_ruby/models/story_reaction.rb +230 -0
- data/lib/shortcut_client_ruby/models/story_search_results.rb +257 -0
- data/lib/shortcut_client_ruby/models/story_slim.rb +944 -0
- data/lib/shortcut_client_ruby/models/story_stats.rb +213 -0
- data/lib/shortcut_client_ruby/models/task.rb +418 -0
- data/lib/shortcut_client_ruby/models/threaded_comment.rb +402 -0
- data/lib/shortcut_client_ruby/models/typed_story_link.rb +333 -0
- data/lib/shortcut_client_ruby/models/unusable_entitlement_error.rb +276 -0
- data/lib/shortcut_client_ruby/models/update_category.rb +228 -0
- data/lib/shortcut_client_ruby/models/update_comment.rb +212 -0
- data/lib/shortcut_client_ruby/models/update_entity_template.rb +217 -0
- data/lib/shortcut_client_ruby/models/update_epic.rb +413 -0
- data/lib/shortcut_client_ruby/models/update_file.rb +257 -0
- data/lib/shortcut_client_ruby/models/update_group.rb +328 -0
- data/lib/shortcut_client_ruby/models/update_iteration.rb +273 -0
- data/lib/shortcut_client_ruby/models/update_label.rb +238 -0
- data/lib/shortcut_client_ruby/models/update_linked_file.rb +311 -0
- data/lib/shortcut_client_ruby/models/update_milestone.rb +315 -0
- data/lib/shortcut_client_ruby/models/update_project.rb +289 -0
- data/lib/shortcut_client_ruby/models/update_stories.rb +480 -0
- data/lib/shortcut_client_ruby/models/update_story.rb +529 -0
- data/lib/shortcut_client_ruby/models/update_story_comment.rb +212 -0
- data/lib/shortcut_client_ruby/models/update_story_contents.rb +434 -0
- data/lib/shortcut_client_ruby/models/update_story_link.rb +261 -0
- data/lib/shortcut_client_ruby/models/update_task.rb +249 -0
- data/lib/shortcut_client_ruby/models/uploaded_file.rb +466 -0
- data/lib/shortcut_client_ruby/models/v3_files_body.rb +252 -0
- data/lib/shortcut_client_ruby/models/workflow.rb +367 -0
- data/lib/shortcut_client_ruby/models/workflow_state.rb +374 -0
- data/lib/shortcut_client_ruby/version.rb +14 -0
- data/lib/shortcut_client_ruby.rb +181 -0
- data/shortcut-client-ruby.gemspec +36 -0
- data/shortcut_client_ruby.gemspec +38 -0
- data/spec/api/default_api_spec.rb +1310 -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/basic_workspace_info_spec.rb +46 -0
- data/spec/models/branch_spec.rb +100 -0
- data/spec/models/category_spec.rb +88 -0
- data/spec/models/commit_spec.rb +112 -0
- data/spec/models/create_category_params_spec.rb +52 -0
- data/spec/models/create_category_spec.rb +62 -0
- data/spec/models/create_comment_comment_spec.rb +64 -0
- data/spec/models/create_entity_template_spec.rb +52 -0
- data/spec/models/create_epic_comment_spec.rb +64 -0
- data/spec/models/create_epic_spec.rb +140 -0
- data/spec/models/create_group_spec.rb +86 -0
- data/spec/models/create_iteration_spec.rb +76 -0
- data/spec/models/create_label_params_spec.rb +58 -0
- data/spec/models/create_linked_file_spec.rb +92 -0
- data/spec/models/create_milestone_spec.rb +74 -0
- data/spec/models/create_or_delete_story_reaction_spec.rb +40 -0
- data/spec/models/create_project_spec.rb +100 -0
- data/spec/models/create_stories_spec.rb +40 -0
- data/spec/models/create_story_comment_params_spec.rb +64 -0
- data/spec/models/create_story_comment_spec.rb +64 -0
- data/spec/models/create_story_contents_spec.rb +160 -0
- data/spec/models/create_story_link_params_spec.rb +56 -0
- data/spec/models/create_story_link_spec.rb +56 -0
- data/spec/models/create_story_params_spec.rb +200 -0
- data/spec/models/create_task_params_spec.rb +70 -0
- data/spec/models/create_task_spec.rb +70 -0
- data/spec/models/delete_stories_spec.rb +40 -0
- data/spec/models/entity_template_spec.rb +82 -0
- data/spec/models/entity_template_task_spec.rb +58 -0
- data/spec/models/epic_search_results_spec.rb +58 -0
- data/spec/models/epic_slim_spec.rb +256 -0
- data/spec/models/epic_spec.rb +262 -0
- data/spec/models/epic_state_spec.rb +88 -0
- data/spec/models/epic_stats_spec.rb +112 -0
- data/spec/models/epic_workflow_spec.rb +70 -0
- data/spec/models/get_epic_stories_spec.rb +40 -0
- data/spec/models/get_external_link_stories_params_spec.rb +40 -0
- data/spec/models/get_iteration_stories_spec.rb +40 -0
- data/spec/models/get_label_stories_spec.rb +40 -0
- data/spec/models/get_member_spec.rb +40 -0
- data/spec/models/get_project_stories_spec.rb +40 -0
- data/spec/models/group_spec.rb +134 -0
- data/spec/models/history_action_branch_create_spec.rb +68 -0
- data/spec/models/history_action_branch_merge_spec.rb +68 -0
- data/spec/models/history_action_branch_push_spec.rb +68 -0
- data/spec/models/history_action_label_create_spec.rb +68 -0
- data/spec/models/history_action_label_delete_spec.rb +62 -0
- data/spec/models/history_action_label_update_spec.rb +56 -0
- data/spec/models/history_action_project_update_spec.rb +68 -0
- data/spec/models/history_action_pull_request_spec.rb +74 -0
- data/spec/models/history_action_story_comment_create_spec.rb +74 -0
- data/spec/models/history_action_story_create_spec.rb +186 -0
- data/spec/models/history_action_story_delete_spec.rb +72 -0
- data/spec/models/history_action_story_link_create_spec.rb +78 -0
- data/spec/models/history_action_story_link_delete_spec.rb +78 -0
- data/spec/models/history_action_story_link_update_spec.rb +84 -0
- data/spec/models/history_action_story_update_spec.rb +84 -0
- data/spec/models/history_action_task_create_spec.rb +92 -0
- data/spec/models/history_action_task_delete_spec.rb +62 -0
- data/spec/models/history_action_task_update_spec.rb +80 -0
- data/spec/models/history_changes_story_link_spec.rb +52 -0
- data/spec/models/history_changes_story_spec.rb +178 -0
- data/spec/models/history_changes_task_spec.rb +58 -0
- data/spec/models/history_reference_branch_spec.rb +58 -0
- data/spec/models/history_reference_commit_spec.rb +58 -0
- data/spec/models/history_reference_epic_spec.rb +58 -0
- data/spec/models/history_reference_general_spec.rb +52 -0
- data/spec/models/history_reference_group_spec.rb +52 -0
- data/spec/models/history_reference_iteration_spec.rb +58 -0
- data/spec/models/history_reference_label_spec.rb +58 -0
- data/spec/models/history_reference_project_spec.rb +58 -0
- data/spec/models/history_reference_story_spec.rb +68 -0
- data/spec/models/history_reference_story_task_spec.rb +52 -0
- data/spec/models/history_reference_workflow_state_spec.rb +62 -0
- data/spec/models/history_spec.rb +92 -0
- data/spec/models/icon_spec.rb +64 -0
- data/spec/models/identity_spec.rb +52 -0
- data/spec/models/iteration_slim_spec.rb +136 -0
- data/spec/models/iteration_spec.rb +142 -0
- data/spec/models/iteration_stats_spec.rb +100 -0
- data/spec/models/label_slim_spec.rb +94 -0
- data/spec/models/label_spec.rb +100 -0
- data/spec/models/label_stats_spec.rb +124 -0
- data/spec/models/linked_file_spec.rb +130 -0
- data/spec/models/list_epics_spec.rb +40 -0
- data/spec/models/list_group_stories_spec.rb +46 -0
- data/spec/models/list_labels_spec.rb +40 -0
- data/spec/models/list_members_spec.rb +40 -0
- data/spec/models/max_search_results_exceeded_error_spec.rb +60 -0
- data/spec/models/member_info_spec.rb +58 -0
- data/spec/models/member_spec.rb +104 -0
- data/spec/models/milestone_spec.rb +136 -0
- data/spec/models/milestone_stats_spec.rb +52 -0
- data/spec/models/profile_spec.rb +88 -0
- data/spec/models/project_spec.rb +148 -0
- data/spec/models/project_stats_spec.rb +52 -0
- data/spec/models/pull_request_label_spec.rb +64 -0
- data/spec/models/pull_request_spec.rb +166 -0
- data/spec/models/repository_spec.rb +88 -0
- data/spec/models/search_results_spec.rb +46 -0
- data/spec/models/search_spec.rb +62 -0
- data/spec/models/search_stories_spec.rb +210 -0
- data/spec/models/story_comment_spec.rb +118 -0
- data/spec/models/story_contents_spec.rb +148 -0
- data/spec/models/story_contents_task_spec.rb +64 -0
- data/spec/models/story_history_change_adds_removes_int_spec.rb +46 -0
- data/spec/models/story_history_change_adds_removes_uuid_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_bool_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_int_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_str_spec.rb +46 -0
- data/spec/models/story_history_change_old_new_uuid_spec.rb +46 -0
- data/spec/models/story_link_spec.rb +82 -0
- data/spec/models/story_reaction_spec.rb +46 -0
- data/spec/models/story_search_results_spec.rb +58 -0
- data/spec/models/story_slim_spec.rb +322 -0
- data/spec/models/story_spec.rb +334 -0
- data/spec/models/story_stats_spec.rb +40 -0
- data/spec/models/task_spec.rb +118 -0
- data/spec/models/threaded_comment_spec.rb +112 -0
- data/spec/models/typed_story_link_spec.rb +88 -0
- data/spec/models/unusable_entitlement_error_spec.rb +56 -0
- data/spec/models/update_category_spec.rb +52 -0
- data/spec/models/update_comment_spec.rb +40 -0
- data/spec/models/update_entity_template_spec.rb +46 -0
- data/spec/models/update_epic_spec.rb +140 -0
- data/spec/models/update_file_spec.rb +70 -0
- data/spec/models/update_group_spec.rb +92 -0
- data/spec/models/update_iteration_spec.rb +76 -0
- data/spec/models/update_label_spec.rb +58 -0
- data/spec/models/update_linked_file_spec.rb +86 -0
- data/spec/models/update_milestone_spec.rb +86 -0
- data/spec/models/update_project_spec.rb +88 -0
- data/spec/models/update_stories_spec.rb +168 -0
- data/spec/models/update_story_comment_spec.rb +40 -0
- data/spec/models/update_story_contents_spec.rb +160 -0
- data/spec/models/update_story_link_spec.rb +56 -0
- data/spec/models/update_story_spec.rb +198 -0
- data/spec/models/update_task_spec.rb +64 -0
- data/spec/models/uploaded_file_spec.rb +136 -0
- data/spec/models/v3_files_body_spec.rb +64 -0
- data/spec/models/workflow_spec.rb +100 -0
- data/spec/models/workflow_state_spec.rb +106 -0
- data/spec/spec_helper.rb +110 -0
- metadata +701 -0
@@ -0,0 +1,490 @@
|
|
1
|
+
=begin
|
2
|
+
#Shortcut API
|
3
|
+
|
4
|
+
#Shortcut API
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.35
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module Shortcut
|
15
|
+
# Projects typically map to teams (such as Frontend, Backend, Mobile, Devops, etc) but can represent any open-ended product, component, or initiative.
|
16
|
+
class Project
|
17
|
+
# The Shortcut application url for the Project.
|
18
|
+
attr_accessor :app_url
|
19
|
+
|
20
|
+
# The description of the Project.
|
21
|
+
attr_accessor :description
|
22
|
+
|
23
|
+
# True/false boolean indicating whether the Project is in an Archived state.
|
24
|
+
attr_accessor :archived
|
25
|
+
|
26
|
+
# A string description of this resource.
|
27
|
+
attr_accessor :entity_type
|
28
|
+
|
29
|
+
# The number of days before the thermometer appears in the Story summary.
|
30
|
+
attr_accessor :days_to_thermometer
|
31
|
+
|
32
|
+
# The color associated with the Project in the Shortcut member interface.
|
33
|
+
attr_accessor :color
|
34
|
+
|
35
|
+
# The ID of the workflow the project belongs to.
|
36
|
+
attr_accessor :workflow_id
|
37
|
+
|
38
|
+
# The name of the Project
|
39
|
+
attr_accessor :name
|
40
|
+
|
41
|
+
# The date at which the Project was started.
|
42
|
+
attr_accessor :start_time
|
43
|
+
|
44
|
+
# The time/date that the Project was last updated.
|
45
|
+
attr_accessor :updated_at
|
46
|
+
|
47
|
+
# An array of UUIDs for any Members listed as Followers.
|
48
|
+
attr_accessor :follower_ids
|
49
|
+
|
50
|
+
# This field can be set to another unique ID. In the case that the Project has been imported from another tool, the ID in the other tool can be indicated here.
|
51
|
+
attr_accessor :external_id
|
52
|
+
|
53
|
+
# The unique ID of the Project.
|
54
|
+
attr_accessor :id
|
55
|
+
|
56
|
+
# Configuration to enable or disable thermometers in the Story summary.
|
57
|
+
attr_accessor :show_thermometer
|
58
|
+
|
59
|
+
# The ID of the team the project belongs to.
|
60
|
+
attr_accessor :team_id
|
61
|
+
|
62
|
+
# The number of weeks per iteration in this Project.
|
63
|
+
attr_accessor :iteration_length
|
64
|
+
|
65
|
+
# The Project abbreviation used in Story summaries. Should be kept to 3 characters at most.
|
66
|
+
attr_accessor :abbreviation
|
67
|
+
|
68
|
+
attr_accessor :stats
|
69
|
+
|
70
|
+
# The time/date that the Project was created.
|
71
|
+
attr_accessor :created_at
|
72
|
+
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
74
|
+
def self.attribute_map
|
75
|
+
{
|
76
|
+
:'app_url' => :'app_url',
|
77
|
+
:'description' => :'description',
|
78
|
+
:'archived' => :'archived',
|
79
|
+
:'entity_type' => :'entity_type',
|
80
|
+
:'days_to_thermometer' => :'days_to_thermometer',
|
81
|
+
:'color' => :'color',
|
82
|
+
:'workflow_id' => :'workflow_id',
|
83
|
+
:'name' => :'name',
|
84
|
+
:'start_time' => :'start_time',
|
85
|
+
:'updated_at' => :'updated_at',
|
86
|
+
:'follower_ids' => :'follower_ids',
|
87
|
+
:'external_id' => :'external_id',
|
88
|
+
:'id' => :'id',
|
89
|
+
:'show_thermometer' => :'show_thermometer',
|
90
|
+
:'team_id' => :'team_id',
|
91
|
+
:'iteration_length' => :'iteration_length',
|
92
|
+
:'abbreviation' => :'abbreviation',
|
93
|
+
:'stats' => :'stats',
|
94
|
+
:'created_at' => :'created_at'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# Attribute type mapping.
|
99
|
+
def self.openapi_types
|
100
|
+
{
|
101
|
+
:'app_url' => :'Object',
|
102
|
+
:'description' => :'Object',
|
103
|
+
:'archived' => :'Object',
|
104
|
+
:'entity_type' => :'Object',
|
105
|
+
:'days_to_thermometer' => :'Object',
|
106
|
+
:'color' => :'Object',
|
107
|
+
:'workflow_id' => :'Object',
|
108
|
+
:'name' => :'Object',
|
109
|
+
:'start_time' => :'Object',
|
110
|
+
:'updated_at' => :'Object',
|
111
|
+
:'follower_ids' => :'Object',
|
112
|
+
:'external_id' => :'Object',
|
113
|
+
:'id' => :'Object',
|
114
|
+
:'show_thermometer' => :'Object',
|
115
|
+
:'team_id' => :'Object',
|
116
|
+
:'iteration_length' => :'Object',
|
117
|
+
:'abbreviation' => :'Object',
|
118
|
+
:'stats' => :'Object',
|
119
|
+
:'created_at' => :'Object'
|
120
|
+
}
|
121
|
+
end
|
122
|
+
|
123
|
+
# List of attributes with nullable: true
|
124
|
+
def self.openapi_nullable
|
125
|
+
Set.new([
|
126
|
+
:'description',
|
127
|
+
:'color',
|
128
|
+
:'updated_at',
|
129
|
+
:'external_id',
|
130
|
+
:'abbreviation',
|
131
|
+
:'created_at'
|
132
|
+
])
|
133
|
+
end
|
134
|
+
|
135
|
+
# Initializes the object
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
def initialize(attributes = {})
|
138
|
+
if (!attributes.is_a?(Hash))
|
139
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shortcut::Project` initialize method"
|
140
|
+
end
|
141
|
+
|
142
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
143
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
144
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
145
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shortcut::Project`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
146
|
+
end
|
147
|
+
h[k.to_sym] = v
|
148
|
+
}
|
149
|
+
|
150
|
+
if attributes.key?(:'app_url')
|
151
|
+
self.app_url = attributes[:'app_url']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'description')
|
155
|
+
self.description = attributes[:'description']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.key?(:'archived')
|
159
|
+
self.archived = attributes[:'archived']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.key?(:'entity_type')
|
163
|
+
self.entity_type = attributes[:'entity_type']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.key?(:'days_to_thermometer')
|
167
|
+
self.days_to_thermometer = attributes[:'days_to_thermometer']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.key?(:'color')
|
171
|
+
self.color = attributes[:'color']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.key?(:'workflow_id')
|
175
|
+
self.workflow_id = attributes[:'workflow_id']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.key?(:'name')
|
179
|
+
self.name = attributes[:'name']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.key?(:'start_time')
|
183
|
+
self.start_time = attributes[:'start_time']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.key?(:'updated_at')
|
187
|
+
self.updated_at = attributes[:'updated_at']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.key?(:'follower_ids')
|
191
|
+
if (value = attributes[:'follower_ids']).is_a?(Array)
|
192
|
+
self.follower_ids = value
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.key?(:'external_id')
|
197
|
+
self.external_id = attributes[:'external_id']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'id')
|
201
|
+
self.id = attributes[:'id']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'show_thermometer')
|
205
|
+
self.show_thermometer = attributes[:'show_thermometer']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'team_id')
|
209
|
+
self.team_id = attributes[:'team_id']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.key?(:'iteration_length')
|
213
|
+
self.iteration_length = attributes[:'iteration_length']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.key?(:'abbreviation')
|
217
|
+
self.abbreviation = attributes[:'abbreviation']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'stats')
|
221
|
+
self.stats = attributes[:'stats']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'created_at')
|
225
|
+
self.created_at = attributes[:'created_at']
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
230
|
+
# @return Array for valid properties with the reasons
|
231
|
+
def list_invalid_properties
|
232
|
+
invalid_properties = Array.new
|
233
|
+
if @app_url.nil?
|
234
|
+
invalid_properties.push('invalid value for "app_url", app_url cannot be nil.')
|
235
|
+
end
|
236
|
+
|
237
|
+
if @description.nil?
|
238
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
239
|
+
end
|
240
|
+
|
241
|
+
if @archived.nil?
|
242
|
+
invalid_properties.push('invalid value for "archived", archived cannot be nil.')
|
243
|
+
end
|
244
|
+
|
245
|
+
if @entity_type.nil?
|
246
|
+
invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
|
247
|
+
end
|
248
|
+
|
249
|
+
if @days_to_thermometer.nil?
|
250
|
+
invalid_properties.push('invalid value for "days_to_thermometer", days_to_thermometer cannot be nil.')
|
251
|
+
end
|
252
|
+
|
253
|
+
if @color.nil?
|
254
|
+
invalid_properties.push('invalid value for "color", color cannot be nil.')
|
255
|
+
end
|
256
|
+
|
257
|
+
if @workflow_id.nil?
|
258
|
+
invalid_properties.push('invalid value for "workflow_id", workflow_id cannot be nil.')
|
259
|
+
end
|
260
|
+
|
261
|
+
if @name.nil?
|
262
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if @start_time.nil?
|
266
|
+
invalid_properties.push('invalid value for "start_time", start_time cannot be nil.')
|
267
|
+
end
|
268
|
+
|
269
|
+
if @updated_at.nil?
|
270
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
271
|
+
end
|
272
|
+
|
273
|
+
if @follower_ids.nil?
|
274
|
+
invalid_properties.push('invalid value for "follower_ids", follower_ids cannot be nil.')
|
275
|
+
end
|
276
|
+
|
277
|
+
if @external_id.nil?
|
278
|
+
invalid_properties.push('invalid value for "external_id", external_id cannot be nil.')
|
279
|
+
end
|
280
|
+
|
281
|
+
if @id.nil?
|
282
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
283
|
+
end
|
284
|
+
|
285
|
+
if @show_thermometer.nil?
|
286
|
+
invalid_properties.push('invalid value for "show_thermometer", show_thermometer cannot be nil.')
|
287
|
+
end
|
288
|
+
|
289
|
+
if @team_id.nil?
|
290
|
+
invalid_properties.push('invalid value for "team_id", team_id cannot be nil.')
|
291
|
+
end
|
292
|
+
|
293
|
+
if @iteration_length.nil?
|
294
|
+
invalid_properties.push('invalid value for "iteration_length", iteration_length cannot be nil.')
|
295
|
+
end
|
296
|
+
|
297
|
+
if @abbreviation.nil?
|
298
|
+
invalid_properties.push('invalid value for "abbreviation", abbreviation cannot be nil.')
|
299
|
+
end
|
300
|
+
|
301
|
+
if @stats.nil?
|
302
|
+
invalid_properties.push('invalid value for "stats", stats cannot be nil.')
|
303
|
+
end
|
304
|
+
|
305
|
+
if @created_at.nil?
|
306
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
307
|
+
end
|
308
|
+
|
309
|
+
invalid_properties
|
310
|
+
end
|
311
|
+
|
312
|
+
# Check to see if the all the properties in the model are valid
|
313
|
+
# @return true if the model is valid
|
314
|
+
def valid?
|
315
|
+
return false if @app_url.nil?
|
316
|
+
return false if @description.nil?
|
317
|
+
return false if @archived.nil?
|
318
|
+
return false if @entity_type.nil?
|
319
|
+
return false if @days_to_thermometer.nil?
|
320
|
+
return false if @color.nil?
|
321
|
+
return false if @workflow_id.nil?
|
322
|
+
return false if @name.nil?
|
323
|
+
return false if @start_time.nil?
|
324
|
+
return false if @updated_at.nil?
|
325
|
+
return false if @follower_ids.nil?
|
326
|
+
return false if @external_id.nil?
|
327
|
+
return false if @id.nil?
|
328
|
+
return false if @show_thermometer.nil?
|
329
|
+
return false if @team_id.nil?
|
330
|
+
return false if @iteration_length.nil?
|
331
|
+
return false if @abbreviation.nil?
|
332
|
+
return false if @stats.nil?
|
333
|
+
return false if @created_at.nil?
|
334
|
+
true
|
335
|
+
end
|
336
|
+
|
337
|
+
# Checks equality by comparing each attribute.
|
338
|
+
# @param [Object] Object to be compared
|
339
|
+
def ==(o)
|
340
|
+
return true if self.equal?(o)
|
341
|
+
self.class == o.class &&
|
342
|
+
app_url == o.app_url &&
|
343
|
+
description == o.description &&
|
344
|
+
archived == o.archived &&
|
345
|
+
entity_type == o.entity_type &&
|
346
|
+
days_to_thermometer == o.days_to_thermometer &&
|
347
|
+
color == o.color &&
|
348
|
+
workflow_id == o.workflow_id &&
|
349
|
+
name == o.name &&
|
350
|
+
start_time == o.start_time &&
|
351
|
+
updated_at == o.updated_at &&
|
352
|
+
follower_ids == o.follower_ids &&
|
353
|
+
external_id == o.external_id &&
|
354
|
+
id == o.id &&
|
355
|
+
show_thermometer == o.show_thermometer &&
|
356
|
+
team_id == o.team_id &&
|
357
|
+
iteration_length == o.iteration_length &&
|
358
|
+
abbreviation == o.abbreviation &&
|
359
|
+
stats == o.stats &&
|
360
|
+
created_at == o.created_at
|
361
|
+
end
|
362
|
+
|
363
|
+
# @see the `==` method
|
364
|
+
# @param [Object] Object to be compared
|
365
|
+
def eql?(o)
|
366
|
+
self == o
|
367
|
+
end
|
368
|
+
|
369
|
+
# Calculates hash code according to all attributes.
|
370
|
+
# @return [Integer] Hash code
|
371
|
+
def hash
|
372
|
+
[app_url, description, archived, entity_type, days_to_thermometer, color, workflow_id, name, start_time, updated_at, follower_ids, external_id, id, show_thermometer, team_id, iteration_length, abbreviation, stats, created_at].hash
|
373
|
+
end
|
374
|
+
|
375
|
+
# Builds the object from hash
|
376
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
377
|
+
# @return [Object] Returns the model itself
|
378
|
+
def self.build_from_hash(attributes)
|
379
|
+
new.build_from_hash(attributes)
|
380
|
+
end
|
381
|
+
|
382
|
+
# Builds the object from hash
|
383
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
384
|
+
# @return [Object] Returns the model itself
|
385
|
+
def build_from_hash(attributes)
|
386
|
+
return nil unless attributes.is_a?(Hash)
|
387
|
+
self.class.openapi_types.each_pair do |key, type|
|
388
|
+
if type =~ /\AArray<(.*)>/i
|
389
|
+
# check to ensure the input is an array given that the attribute
|
390
|
+
# is documented as an array but the input is not
|
391
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
392
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
393
|
+
end
|
394
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
395
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
396
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
397
|
+
self.send("#{key}=", nil)
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
self
|
402
|
+
end
|
403
|
+
|
404
|
+
# Deserializes the data based on type
|
405
|
+
# @param string type Data type
|
406
|
+
# @param string value Value to be deserialized
|
407
|
+
# @return [Object] Deserialized data
|
408
|
+
def _deserialize(type, value)
|
409
|
+
case type.to_sym
|
410
|
+
when :DateTime
|
411
|
+
DateTime.parse(value)
|
412
|
+
when :Date
|
413
|
+
Date.parse(value)
|
414
|
+
when :String
|
415
|
+
value.to_s
|
416
|
+
when :Integer
|
417
|
+
value.to_i
|
418
|
+
when :Float
|
419
|
+
value.to_f
|
420
|
+
when :Boolean
|
421
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
422
|
+
true
|
423
|
+
else
|
424
|
+
false
|
425
|
+
end
|
426
|
+
when :Object
|
427
|
+
# generic object (usually a Hash), return directly
|
428
|
+
value
|
429
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
430
|
+
inner_type = Regexp.last_match[:inner_type]
|
431
|
+
value.map { |v| _deserialize(inner_type, v) }
|
432
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
433
|
+
k_type = Regexp.last_match[:k_type]
|
434
|
+
v_type = Regexp.last_match[:v_type]
|
435
|
+
{}.tap do |hash|
|
436
|
+
value.each do |k, v|
|
437
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
438
|
+
end
|
439
|
+
end
|
440
|
+
else # model
|
441
|
+
Shortcut.const_get(type).build_from_hash(value)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
# Returns the string representation of the object
|
446
|
+
# @return [String] String presentation of the object
|
447
|
+
def to_s
|
448
|
+
to_hash.to_s
|
449
|
+
end
|
450
|
+
|
451
|
+
# to_body is an alias to to_hash (backward compatibility)
|
452
|
+
# @return [Hash] Returns the object in the form of hash
|
453
|
+
def to_body
|
454
|
+
to_hash
|
455
|
+
end
|
456
|
+
|
457
|
+
# Returns the object in the form of hash
|
458
|
+
# @return [Hash] Returns the object in the form of hash
|
459
|
+
def to_hash
|
460
|
+
hash = {}
|
461
|
+
self.class.attribute_map.each_pair do |attr, param|
|
462
|
+
value = self.send(attr)
|
463
|
+
if value.nil?
|
464
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
465
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
466
|
+
end
|
467
|
+
|
468
|
+
hash[param] = _to_hash(value)
|
469
|
+
end
|
470
|
+
hash
|
471
|
+
end
|
472
|
+
|
473
|
+
# Outputs non-array value in the form of hash
|
474
|
+
# For object, use to_hash. Otherwise, just return the value
|
475
|
+
# @param [Object] value Any valid value
|
476
|
+
# @return [Hash] Returns the value in the form of hash
|
477
|
+
def _to_hash(value)
|
478
|
+
if value.is_a?(Array)
|
479
|
+
value.compact.map { |v| _to_hash(v) }
|
480
|
+
elsif value.is_a?(Hash)
|
481
|
+
{}.tap do |hash|
|
482
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
483
|
+
end
|
484
|
+
elsif value.respond_to? :to_hash
|
485
|
+
value.to_hash
|
486
|
+
else
|
487
|
+
value
|
488
|
+
end
|
489
|
+
end end
|
490
|
+
end
|