shortcut_client_ruby 0.0.4 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +74 -0
  3. data/README.md +31 -1986
  4. data/Rakefile +2 -0
  5. data/bin/update.rb +8 -4
  6. data/config.json +2 -1
  7. data/docs/BasicWorkspaceInfo.md +16 -4
  8. data/docs/Branch.md +34 -13
  9. data/docs/Category.md +30 -11
  10. data/docs/Commit.md +38 -15
  11. data/docs/CreateCategory.md +20 -6
  12. data/docs/CreateCategoryParams.md +18 -5
  13. data/docs/CreateCommentComment.md +22 -7
  14. data/docs/CreateEntityTemplate.md +18 -5
  15. data/docs/CreateEpic.md +46 -19
  16. data/docs/CreateEpicComment.md +22 -7
  17. data/docs/CreateGroup.md +28 -10
  18. data/docs/CreateIteration.md +26 -9
  19. data/docs/CreateLabelParams.md +20 -6
  20. data/docs/CreateLinkedFile.md +30 -11
  21. data/docs/CreateMilestone.md +24 -8
  22. data/docs/CreateOrDeleteStoryReaction.md +14 -3
  23. data/docs/CreateProject.md +34 -13
  24. data/docs/CreateStories.md +14 -3
  25. data/docs/CreateStoryComment.md +22 -7
  26. data/docs/CreateStoryCommentParams.md +22 -7
  27. data/docs/CreateStoryContents.md +54 -23
  28. data/docs/CreateStoryLink.md +18 -5
  29. data/docs/CreateStoryLinkParams.md +18 -5
  30. data/docs/CreateStoryParams.md +66 -29
  31. data/docs/CreateTask.md +24 -8
  32. data/docs/CreateTaskParams.md +24 -8
  33. data/docs/DefaultApi.md +3569 -1641
  34. data/docs/DeleteStories.md +14 -3
  35. data/docs/EntityTemplate.md +28 -10
  36. data/docs/EntityTemplateTask.md +20 -6
  37. data/docs/Epic.md +88 -40
  38. data/docs/EpicSearchResults.md +20 -6
  39. data/docs/EpicSlim.md +86 -39
  40. data/docs/EpicState.md +30 -11
  41. data/docs/EpicStats.md +38 -15
  42. data/docs/EpicWorkflow.md +24 -8
  43. data/docs/GetEpicStories.md +14 -3
  44. data/docs/GetExternalLinkStoriesParams.md +14 -3
  45. data/docs/GetIterationStories.md +14 -3
  46. data/docs/GetLabelStories.md +14 -3
  47. data/docs/GetMember.md +14 -3
  48. data/docs/GetProjectStories.md +14 -3
  49. data/docs/Group.md +44 -18
  50. data/docs/History.md +30 -11
  51. data/docs/HistoryActionBranchCreate.md +22 -7
  52. data/docs/HistoryActionBranchMerge.md +22 -7
  53. data/docs/HistoryActionBranchPush.md +22 -7
  54. data/docs/HistoryActionLabelCreate.md +22 -7
  55. data/docs/HistoryActionLabelDelete.md +20 -6
  56. data/docs/HistoryActionLabelUpdate.md +18 -5
  57. data/docs/HistoryActionProjectUpdate.md +22 -7
  58. data/docs/HistoryActionPullRequest.md +24 -8
  59. data/docs/HistoryActionStoryCommentCreate.md +24 -8
  60. data/docs/HistoryActionStoryCreate.md +60 -26
  61. data/docs/HistoryActionStoryDelete.md +22 -7
  62. data/docs/HistoryActionStoryLinkCreate.md +24 -8
  63. data/docs/HistoryActionStoryLinkDelete.md +24 -8
  64. data/docs/HistoryActionStoryLinkUpdate.md +26 -9
  65. data/docs/HistoryActionStoryUpdate.md +26 -9
  66. data/docs/HistoryActionTaskCreate.md +30 -11
  67. data/docs/HistoryActionTaskDelete.md +20 -6
  68. data/docs/HistoryActionTaskUpdate.md +26 -9
  69. data/docs/HistoryChangesStory.md +60 -26
  70. data/docs/HistoryChangesStoryLink.md +18 -5
  71. data/docs/HistoryChangesTask.md +20 -6
  72. data/docs/HistoryReferenceBranch.md +20 -6
  73. data/docs/HistoryReferenceCommit.md +20 -6
  74. data/docs/HistoryReferenceEpic.md +20 -6
  75. data/docs/HistoryReferenceGeneral.md +18 -5
  76. data/docs/HistoryReferenceGroup.md +18 -5
  77. data/docs/HistoryReferenceIteration.md +20 -6
  78. data/docs/HistoryReferenceLabel.md +20 -6
  79. data/docs/HistoryReferenceProject.md +20 -6
  80. data/docs/HistoryReferenceStory.md +22 -7
  81. data/docs/HistoryReferenceStoryTask.md +18 -5
  82. data/docs/HistoryReferenceWorkflowState.md +20 -6
  83. data/docs/Icon.md +22 -7
  84. data/docs/Identity.md +18 -5
  85. data/docs/Iteration.md +48 -20
  86. data/docs/IterationSlim.md +46 -19
  87. data/docs/IterationStats.md +34 -13
  88. data/docs/Label.md +34 -13
  89. data/docs/LabelSlim.md +32 -12
  90. data/docs/LabelStats.md +42 -17
  91. data/docs/LinkedFile.md +44 -18
  92. data/docs/ListEpics.md +14 -3
  93. data/docs/ListGroupStories.md +16 -4
  94. data/docs/ListLabels.md +14 -3
  95. data/docs/ListMembers.md +14 -3
  96. data/docs/MaxSearchResultsExceededError.md +18 -5
  97. data/docs/Member.md +34 -13
  98. data/docs/MemberInfo.md +20 -6
  99. data/docs/Milestone.md +46 -19
  100. data/docs/MilestoneStats.md +18 -5
  101. data/docs/Profile.md +30 -11
  102. data/docs/Project.md +50 -21
  103. data/docs/ProjectStats.md +18 -5
  104. data/docs/PullRequest.md +56 -24
  105. data/docs/PullRequestLabel.md +22 -7
  106. data/docs/Repository.md +30 -11
  107. data/docs/Search.md +20 -6
  108. data/docs/SearchResults.md +16 -4
  109. data/docs/SearchStories.md +68 -30
  110. data/docs/Story.md +112 -52
  111. data/docs/StoryComment.md +40 -16
  112. data/docs/StoryContents.md +50 -21
  113. data/docs/StoryContentsTask.md +22 -7
  114. data/docs/StoryHistoryChangeAddsRemovesInt.md +16 -4
  115. data/docs/StoryHistoryChangeAddsRemovesUuid.md +16 -4
  116. data/docs/StoryHistoryChangeOldNewBool.md +16 -4
  117. data/docs/StoryHistoryChangeOldNewInt.md +16 -4
  118. data/docs/StoryHistoryChangeOldNewStr.md +16 -4
  119. data/docs/StoryHistoryChangeOldNewUuid.md +16 -4
  120. data/docs/StoryLink.md +28 -10
  121. data/docs/StoryReaction.md +16 -4
  122. data/docs/StorySearchResults.md +20 -6
  123. data/docs/StorySlim.md +108 -50
  124. data/docs/StoryStats.md +14 -3
  125. data/docs/Task.md +40 -16
  126. data/docs/ThreadedComment.md +38 -15
  127. data/docs/TypedStoryLink.md +30 -11
  128. data/docs/UnusableEntitlementError.md +18 -5
  129. data/docs/UpdateCategory.md +18 -5
  130. data/docs/UpdateComment.md +14 -3
  131. data/docs/UpdateEntityTemplate.md +16 -4
  132. data/docs/UpdateEpic.md +46 -19
  133. data/docs/UpdateFile.md +24 -8
  134. data/docs/UpdateGroup.md +30 -11
  135. data/docs/UpdateIteration.md +26 -9
  136. data/docs/UpdateLabel.md +20 -6
  137. data/docs/UpdateLinkedFile.md +28 -10
  138. data/docs/UpdateMilestone.md +28 -10
  139. data/docs/UpdateProject.md +30 -11
  140. data/docs/UpdateStories.md +54 -23
  141. data/docs/UpdateStory.md +64 -28
  142. data/docs/UpdateStoryComment.md +14 -3
  143. data/docs/UpdateStoryContents.md +54 -23
  144. data/docs/UpdateStoryLink.md +18 -5
  145. data/docs/UpdateTask.md +22 -7
  146. data/docs/UploadedFile.md +46 -19
  147. data/docs/Workflow.md +34 -13
  148. data/docs/WorkflowState.md +36 -14
  149. data/git_push.sh +11 -9
  150. data/lib/shortcut_client_ruby/api/default_api.rb +2119 -1248
  151. data/lib/shortcut_client_ruby/api_client.rb +143 -106
  152. data/lib/shortcut_client_ruby/api_error.rb +4 -4
  153. data/lib/shortcut_client_ruby/configuration.rb +163 -32
  154. data/lib/shortcut_client_ruby/models/basic_workspace_info.rb +26 -13
  155. data/lib/shortcut_client_ruby/models/branch.rb +35 -42
  156. data/lib/shortcut_client_ruby/models/category.rb +57 -28
  157. data/lib/shortcut_client_ruby/models/commit.rb +37 -44
  158. data/lib/shortcut_client_ruby/models/create_category.rb +90 -17
  159. data/lib/shortcut_client_ruby/models/create_category_params.rb +87 -14
  160. data/lib/shortcut_client_ruby/models/create_comment_comment.rb +57 -16
  161. data/lib/shortcut_client_ruby/models/create_entity_template.rb +46 -14
  162. data/lib/shortcut_client_ruby/models/create_epic.rb +86 -30
  163. data/lib/shortcut_client_ruby/models/create_epic_comment.rb +57 -16
  164. data/lib/shortcut_client_ruby/models/create_group.rb +104 -21
  165. data/lib/shortcut_client_ruby/models/create_iteration.rb +103 -18
  166. data/lib/shortcut_client_ruby/models/create_label_params.rb +97 -15
  167. data/lib/shortcut_client_ruby/models/create_linked_file.rb +110 -22
  168. data/lib/shortcut_client_ruby/models/create_milestone.rb +75 -19
  169. data/lib/shortcut_client_ruby/models/create_or_delete_story_reaction.rb +25 -12
  170. data/lib/shortcut_client_ruby/models/create_project.rb +104 -22
  171. data/lib/shortcut_client_ruby/models/create_stories.rb +25 -12
  172. data/lib/shortcut_client_ruby/models/create_story_comment.rb +48 -16
  173. data/lib/shortcut_client_ruby/models/create_story_comment_params.rb +48 -16
  174. data/lib/shortcut_client_ruby/models/create_story_contents.rb +57 -32
  175. data/lib/shortcut_client_ruby/models/create_story_link.rb +29 -16
  176. data/lib/shortcut_client_ruby/models/create_story_link_params.rb +29 -16
  177. data/lib/shortcut_client_ruby/models/create_story_params.rb +120 -40
  178. data/lib/shortcut_client_ruby/models/create_task.rb +30 -17
  179. data/lib/shortcut_client_ruby/models/create_task_params.rb +30 -17
  180. data/lib/shortcut_client_ruby/models/delete_stories.rb +35 -12
  181. data/lib/shortcut_client_ruby/models/entity_template.rb +32 -19
  182. data/lib/shortcut_client_ruby/models/entity_template_task.rb +28 -15
  183. data/lib/shortcut_client_ruby/models/epic.rb +62 -124
  184. data/lib/shortcut_client_ruby/models/epic_search_results.rb +28 -20
  185. data/lib/shortcut_client_ruby/models/epic_slim.rb +61 -123
  186. data/lib/shortcut_client_ruby/models/epic_state.rb +59 -20
  187. data/lib/shortcut_client_ruby/models/epic_stats.rb +37 -29
  188. data/lib/shortcut_client_ruby/models/epic_workflow.rb +30 -17
  189. data/lib/shortcut_client_ruby/models/get_epic_stories.rb +25 -12
  190. data/lib/shortcut_client_ruby/models/get_external_link_stories_params.rb +55 -12
  191. data/lib/shortcut_client_ruby/models/get_iteration_stories.rb +25 -12
  192. data/lib/shortcut_client_ruby/models/get_label_stories.rb +25 -12
  193. data/lib/shortcut_client_ruby/models/get_member.rb +25 -12
  194. data/lib/shortcut_client_ruby/models/get_project_stories.rb +25 -12
  195. data/lib/shortcut_client_ruby/models/group.rb +96 -37
  196. data/lib/shortcut_client_ruby/models/history.rb +35 -22
  197. data/lib/shortcut_client_ruby/models/history_action_branch_create.rb +31 -18
  198. data/lib/shortcut_client_ruby/models/history_action_branch_merge.rb +31 -18
  199. data/lib/shortcut_client_ruby/models/history_action_branch_push.rb +31 -18
  200. data/lib/shortcut_client_ruby/models/history_action_label_create.rb +61 -18
  201. data/lib/shortcut_client_ruby/models/history_action_label_delete.rb +30 -17
  202. data/lib/shortcut_client_ruby/models/history_action_label_update.rb +29 -16
  203. data/lib/shortcut_client_ruby/models/history_action_project_update.rb +61 -18
  204. data/lib/shortcut_client_ruby/models/history_action_pull_request.rb +62 -19
  205. data/lib/shortcut_client_ruby/models/history_action_story_comment_create.rb +62 -19
  206. data/lib/shortcut_client_ruby/models/history_action_story_create.rb +82 -39
  207. data/lib/shortcut_client_ruby/models/history_action_story_delete.rb +33 -20
  208. data/lib/shortcut_client_ruby/models/history_action_story_link_create.rb +34 -21
  209. data/lib/shortcut_client_ruby/models/history_action_story_link_delete.rb +34 -31
  210. data/lib/shortcut_client_ruby/models/history_action_story_link_update.rb +35 -22
  211. data/lib/shortcut_client_ruby/models/history_action_story_update.rb +65 -22
  212. data/lib/shortcut_client_ruby/models/history_action_task_create.rb +35 -22
  213. data/lib/shortcut_client_ruby/models/history_action_task_delete.rb +30 -17
  214. data/lib/shortcut_client_ruby/models/history_action_task_update.rb +33 -20
  215. data/lib/shortcut_client_ruby/models/history_changes_story.rb +48 -35
  216. data/lib/shortcut_client_ruby/models/history_changes_story_link.rb +27 -14
  217. data/lib/shortcut_client_ruby/models/history_changes_task.rb +28 -15
  218. data/lib/shortcut_client_ruby/models/history_reference_branch.rb +58 -15
  219. data/lib/shortcut_client_ruby/models/history_reference_commit.rb +58 -15
  220. data/lib/shortcut_client_ruby/models/history_reference_epic.rb +58 -15
  221. data/lib/shortcut_client_ruby/models/history_reference_general.rb +27 -14
  222. data/lib/shortcut_client_ruby/models/history_reference_group.rb +27 -14
  223. data/lib/shortcut_client_ruby/models/history_reference_iteration.rb +58 -15
  224. data/lib/shortcut_client_ruby/models/history_reference_label.rb +58 -15
  225. data/lib/shortcut_client_ruby/models/history_reference_project.rb +58 -15
  226. data/lib/shortcut_client_ruby/models/history_reference_story.rb +61 -18
  227. data/lib/shortcut_client_ruby/models/history_reference_story_task.rb +27 -14
  228. data/lib/shortcut_client_ruby/models/history_reference_workflow_state.rb +30 -17
  229. data/lib/shortcut_client_ruby/models/icon.rb +29 -16
  230. data/lib/shortcut_client_ruby/models/identity.rb +27 -24
  231. data/lib/shortcut_client_ruby/models/iteration.rb +42 -29
  232. data/lib/shortcut_client_ruby/models/iteration_slim.rb +41 -28
  233. data/lib/shortcut_client_ruby/models/iteration_stats.rb +35 -22
  234. data/lib/shortcut_client_ruby/models/label.rb +59 -45
  235. data/lib/shortcut_client_ruby/models/label_slim.rb +58 -44
  236. data/lib/shortcut_client_ruby/models/label_stats.rb +39 -26
  237. data/lib/shortcut_client_ruby/models/linked_file.rb +40 -47
  238. data/lib/shortcut_client_ruby/models/list_epics.rb +25 -12
  239. data/lib/shortcut_client_ruby/models/list_group_stories.rb +26 -13
  240. data/lib/shortcut_client_ruby/models/list_labels.rb +25 -12
  241. data/lib/shortcut_client_ruby/models/list_members.rb +25 -12
  242. data/lib/shortcut_client_ruby/models/max_search_results_exceeded_error.rb +31 -18
  243. data/lib/shortcut_client_ruby/models/member.rb +37 -34
  244. data/lib/shortcut_client_ruby/models/member_info.rb +28 -15
  245. data/lib/shortcut_client_ruby/models/milestone.rb +41 -48
  246. data/lib/shortcut_client_ruby/models/milestone_stats.rb +27 -14
  247. data/lib/shortcut_client_ruby/models/profile.rb +33 -35
  248. data/lib/shortcut_client_ruby/models/project.rb +67 -58
  249. data/lib/shortcut_client_ruby/models/project_stats.rb +27 -14
  250. data/lib/shortcut_client_ruby/models/pull_request.rb +46 -43
  251. data/lib/shortcut_client_ruby/models/pull_request_label.rb +59 -16
  252. data/lib/shortcut_client_ruby/models/repository.rb +33 -55
  253. data/lib/shortcut_client_ruby/models/search.rb +49 -17
  254. data/lib/shortcut_client_ruby/models/search_results.rb +26 -13
  255. data/lib/shortcut_client_ruby/models/search_stories.rb +105 -41
  256. data/lib/shortcut_client_ruby/models/story.rb +74 -131
  257. data/lib/shortcut_client_ruby/models/story_comment.rb +38 -40
  258. data/lib/shortcut_client_ruby/models/story_contents.rb +43 -30
  259. data/lib/shortcut_client_ruby/models/story_contents_task.rb +29 -16
  260. data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_int.rb +26 -13
  261. data/lib/shortcut_client_ruby/models/story_history_change_adds_removes_uuid.rb +26 -13
  262. data/lib/shortcut_client_ruby/models/story_history_change_old_new_bool.rb +26 -13
  263. data/lib/shortcut_client_ruby/models/story_history_change_old_new_int.rb +26 -13
  264. data/lib/shortcut_client_ruby/models/story_history_change_old_new_str.rb +26 -13
  265. data/lib/shortcut_client_ruby/models/story_history_change_old_new_uuid.rb +26 -13
  266. data/lib/shortcut_client_ruby/models/story_link.rb +32 -19
  267. data/lib/shortcut_client_ruby/models/story_reaction.rb +26 -13
  268. data/lib/shortcut_client_ruby/models/story_search_results.rb +28 -20
  269. data/lib/shortcut_client_ruby/models/story_slim.rb +72 -129
  270. data/lib/shortcut_client_ruby/models/story_stats.rb +25 -12
  271. data/lib/shortcut_client_ruby/models/task.rb +38 -40
  272. data/lib/shortcut_client_ruby/models/threaded_comment.rb +37 -29
  273. data/lib/shortcut_client_ruby/models/typed_story_link.rb +33 -20
  274. data/lib/shortcut_client_ruby/models/unusable_entitlement_error.rb +85 -16
  275. data/lib/shortcut_client_ruby/models/update_category.rb +68 -14
  276. data/lib/shortcut_client_ruby/models/update_comment.rb +25 -12
  277. data/lib/shortcut_client_ruby/models/update_entity_template.rb +41 -13
  278. data/lib/shortcut_client_ruby/models/update_epic.rb +82 -30
  279. data/lib/shortcut_client_ruby/models/update_file.rb +54 -17
  280. data/lib/shortcut_client_ruby/models/update_group.rb +97 -22
  281. data/lib/shortcut_client_ruby/models/update_iteration.rb +91 -18
  282. data/lib/shortcut_client_ruby/models/update_label.rb +78 -15
  283. data/lib/shortcut_client_ruby/models/update_linked_file.rb +101 -21
  284. data/lib/shortcut_client_ruby/models/update_milestone.rb +73 -21
  285. data/lib/shortcut_client_ruby/models/update_project.rb +98 -20
  286. data/lib/shortcut_client_ruby/models/update_stories.rb +83 -36
  287. data/lib/shortcut_client_ruby/models/update_story.rb +135 -41
  288. data/lib/shortcut_client_ruby/models/update_story_comment.rb +44 -12
  289. data/lib/shortcut_client_ruby/models/update_story_contents.rb +57 -32
  290. data/lib/shortcut_client_ruby/models/update_story_link.rb +29 -16
  291. data/lib/shortcut_client_ruby/models/update_task.rb +29 -16
  292. data/lib/shortcut_client_ruby/models/uploaded_file.rb +41 -53
  293. data/lib/shortcut_client_ruby/models/workflow.rb +35 -22
  294. data/lib/shortcut_client_ruby/models/workflow_state.rb +60 -26
  295. data/lib/shortcut_client_ruby/version.rb +5 -4
  296. data/lib/shortcut_client_ruby.rb +4 -4
  297. data/openapi-generator-cli.jar +0 -0
  298. data/shortcut_client_ruby-0.0.4.gem +0 -0
  299. data/shortcut_client_ruby.gemspec +7 -6
  300. data/spec/api/default_api_spec.rb +64 -63
  301. data/spec/api_client_spec.rb +7 -44
  302. data/spec/configuration_spec.rb +7 -6
  303. data/spec/models/basic_workspace_info_spec.rb +8 -14
  304. data/spec/models/branch_spec.rb +8 -14
  305. data/spec/models/category_spec.rb +8 -14
  306. data/spec/models/commit_spec.rb +8 -14
  307. data/spec/models/create_category_params_spec.rb +8 -14
  308. data/spec/models/create_category_spec.rb +9 -15
  309. data/spec/models/create_comment_comment_spec.rb +8 -14
  310. data/spec/models/create_entity_template_spec.rb +8 -14
  311. data/spec/models/create_epic_comment_spec.rb +8 -14
  312. data/spec/models/create_epic_spec.rb +9 -15
  313. data/spec/models/create_group_spec.rb +9 -15
  314. data/spec/models/create_iteration_spec.rb +8 -14
  315. data/spec/models/create_label_params_spec.rb +8 -14
  316. data/spec/models/create_linked_file_spec.rb +9 -15
  317. data/spec/models/create_milestone_spec.rb +9 -15
  318. data/spec/models/create_or_delete_story_reaction_spec.rb +8 -14
  319. data/spec/models/create_project_spec.rb +8 -14
  320. data/spec/models/create_stories_spec.rb +8 -14
  321. data/spec/models/create_story_comment_params_spec.rb +8 -14
  322. data/spec/models/create_story_comment_spec.rb +8 -14
  323. data/spec/models/create_story_contents_spec.rb +8 -14
  324. data/spec/models/create_story_link_params_spec.rb +9 -15
  325. data/spec/models/create_story_link_spec.rb +9 -15
  326. data/spec/models/create_story_params_spec.rb +9 -15
  327. data/spec/models/create_task_params_spec.rb +8 -14
  328. data/spec/models/create_task_spec.rb +8 -14
  329. data/spec/models/delete_stories_spec.rb +8 -14
  330. data/spec/models/entity_template_spec.rb +8 -14
  331. data/spec/models/entity_template_task_spec.rb +8 -14
  332. data/spec/models/epic_search_results_spec.rb +8 -14
  333. data/spec/models/epic_slim_spec.rb +8 -14
  334. data/spec/models/epic_spec.rb +8 -14
  335. data/spec/models/epic_state_spec.rb +8 -14
  336. data/spec/models/epic_stats_spec.rb +8 -14
  337. data/spec/models/epic_workflow_spec.rb +8 -14
  338. data/spec/models/get_epic_stories_spec.rb +8 -14
  339. data/spec/models/get_external_link_stories_params_spec.rb +8 -14
  340. data/spec/models/get_iteration_stories_spec.rb +8 -14
  341. data/spec/models/get_label_stories_spec.rb +8 -14
  342. data/spec/models/get_member_spec.rb +8 -14
  343. data/spec/models/get_project_stories_spec.rb +8 -14
  344. data/spec/models/group_spec.rb +9 -15
  345. data/spec/models/history_action_branch_create_spec.rb +9 -15
  346. data/spec/models/history_action_branch_merge_spec.rb +9 -15
  347. data/spec/models/history_action_branch_push_spec.rb +9 -15
  348. data/spec/models/history_action_label_create_spec.rb +9 -15
  349. data/spec/models/history_action_label_delete_spec.rb +9 -15
  350. data/spec/models/history_action_label_update_spec.rb +9 -15
  351. data/spec/models/history_action_project_update_spec.rb +9 -15
  352. data/spec/models/history_action_pull_request_spec.rb +9 -15
  353. data/spec/models/history_action_story_comment_create_spec.rb +9 -15
  354. data/spec/models/history_action_story_create_spec.rb +10 -16
  355. data/spec/models/history_action_story_delete_spec.rb +10 -16
  356. data/spec/models/history_action_story_link_create_spec.rb +10 -16
  357. data/spec/models/history_action_story_link_delete_spec.rb +10 -16
  358. data/spec/models/history_action_story_link_update_spec.rb +10 -16
  359. data/spec/models/history_action_story_update_spec.rb +10 -16
  360. data/spec/models/history_action_task_create_spec.rb +9 -15
  361. data/spec/models/history_action_task_delete_spec.rb +9 -15
  362. data/spec/models/history_action_task_update_spec.rb +9 -15
  363. data/spec/models/history_changes_story_link_spec.rb +8 -14
  364. data/spec/models/history_changes_story_spec.rb +8 -14
  365. data/spec/models/history_changes_task_spec.rb +8 -14
  366. data/spec/models/history_reference_branch_spec.rb +8 -14
  367. data/spec/models/history_reference_commit_spec.rb +8 -14
  368. data/spec/models/history_reference_epic_spec.rb +8 -14
  369. data/spec/models/history_reference_general_spec.rb +8 -14
  370. data/spec/models/history_reference_group_spec.rb +8 -14
  371. data/spec/models/history_reference_iteration_spec.rb +8 -14
  372. data/spec/models/history_reference_label_spec.rb +8 -14
  373. data/spec/models/history_reference_project_spec.rb +8 -14
  374. data/spec/models/history_reference_story_spec.rb +9 -15
  375. data/spec/models/history_reference_story_task_spec.rb +8 -14
  376. data/spec/models/history_reference_workflow_state_spec.rb +9 -15
  377. data/spec/models/history_spec.rb +9 -15
  378. data/spec/models/icon_spec.rb +8 -14
  379. data/spec/models/identity_spec.rb +8 -14
  380. data/spec/models/iteration_slim_spec.rb +8 -14
  381. data/spec/models/iteration_spec.rb +8 -14
  382. data/spec/models/iteration_stats_spec.rb +8 -14
  383. data/spec/models/label_slim_spec.rb +8 -14
  384. data/spec/models/label_spec.rb +8 -14
  385. data/spec/models/label_stats_spec.rb +8 -14
  386. data/spec/models/linked_file_spec.rb +8 -14
  387. data/spec/models/list_epics_spec.rb +8 -14
  388. data/spec/models/list_group_stories_spec.rb +8 -14
  389. data/spec/models/list_labels_spec.rb +8 -14
  390. data/spec/models/list_members_spec.rb +8 -14
  391. data/spec/models/max_search_results_exceeded_error_spec.rb +11 -17
  392. data/spec/models/member_info_spec.rb +8 -14
  393. data/spec/models/member_spec.rb +9 -15
  394. data/spec/models/milestone_spec.rb +8 -14
  395. data/spec/models/milestone_stats_spec.rb +8 -14
  396. data/spec/models/profile_spec.rb +8 -14
  397. data/spec/models/project_spec.rb +8 -14
  398. data/spec/models/project_stats_spec.rb +8 -14
  399. data/spec/models/pull_request_label_spec.rb +8 -14
  400. data/spec/models/pull_request_spec.rb +8 -14
  401. data/spec/models/repository_spec.rb +8 -14
  402. data/spec/models/search_results_spec.rb +8 -14
  403. data/spec/models/search_spec.rb +9 -15
  404. data/spec/models/search_stories_spec.rb +10 -16
  405. data/spec/models/story_comment_spec.rb +8 -14
  406. data/spec/models/story_contents_spec.rb +8 -14
  407. data/spec/models/story_contents_task_spec.rb +8 -14
  408. data/spec/models/story_history_change_adds_removes_int_spec.rb +8 -14
  409. data/spec/models/story_history_change_adds_removes_uuid_spec.rb +8 -14
  410. data/spec/models/story_history_change_old_new_bool_spec.rb +8 -14
  411. data/spec/models/story_history_change_old_new_int_spec.rb +8 -14
  412. data/spec/models/story_history_change_old_new_str_spec.rb +8 -14
  413. data/spec/models/story_history_change_old_new_uuid_spec.rb +8 -14
  414. data/spec/models/story_link_spec.rb +8 -14
  415. data/spec/models/story_reaction_spec.rb +8 -14
  416. data/spec/models/story_search_results_spec.rb +8 -14
  417. data/spec/models/story_slim_spec.rb +8 -14
  418. data/spec/models/story_spec.rb +8 -14
  419. data/spec/models/story_stats_spec.rb +8 -14
  420. data/spec/models/task_spec.rb +8 -14
  421. data/spec/models/threaded_comment_spec.rb +8 -14
  422. data/spec/models/typed_story_link_spec.rb +8 -14
  423. data/spec/models/unusable_entitlement_error_spec.rb +9 -15
  424. data/spec/models/update_category_spec.rb +8 -14
  425. data/spec/models/update_comment_spec.rb +8 -14
  426. data/spec/models/update_entity_template_spec.rb +8 -14
  427. data/spec/models/update_epic_spec.rb +9 -15
  428. data/spec/models/update_file_spec.rb +8 -14
  429. data/spec/models/update_group_spec.rb +9 -15
  430. data/spec/models/update_iteration_spec.rb +8 -14
  431. data/spec/models/update_label_spec.rb +8 -14
  432. data/spec/models/update_linked_file_spec.rb +9 -15
  433. data/spec/models/update_milestone_spec.rb +9 -15
  434. data/spec/models/update_project_spec.rb +8 -14
  435. data/spec/models/update_stories_spec.rb +10 -16
  436. data/spec/models/update_story_comment_spec.rb +8 -14
  437. data/spec/models/update_story_contents_spec.rb +8 -14
  438. data/spec/models/update_story_link_spec.rb +9 -15
  439. data/spec/models/update_story_spec.rb +10 -16
  440. data/spec/models/update_task_spec.rb +8 -14
  441. data/spec/models/uploaded_file_spec.rb +8 -14
  442. data/spec/models/workflow_spec.rb +8 -14
  443. data/spec/models/workflow_state_spec.rb +8 -14
  444. data/spec/spec_helper.rb +4 -3
  445. metadata +18 -30
  446. data/docs/V3FilesBody.md +0 -11
  447. data/lib/shortcut/client/ruby/version.rb +0 -9
  448. data/lib/shortcut/client/ruby.rb +0 -12
  449. data/lib/shortcut_client_ruby/models/v3_files_body.rb +0 -252
  450. data/shortcut-client-ruby.gemspec +0 -36
  451. data/spec/base_object_spec.rb +0 -109
  452. data/spec/models/v3_files_body_spec.rb +0 -64
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  class UpdateIteration
@@ -47,16 +49,21 @@ module Shortcut
47
49
  }
48
50
  end
49
51
 
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
50
57
  # Attribute type mapping.
51
58
  def self.openapi_types
52
59
  {
53
- :'follower_ids' => :'Object',
54
- :'group_ids' => :'Object',
55
- :'labels' => :'Object',
56
- :'description' => :'Object',
57
- :'name' => :'Object',
58
- :'start_date' => :'Object',
59
- :'end_date' => :'Object'
60
+ :'follower_ids' => :'Array<String>',
61
+ :'group_ids' => :'Array<String>',
62
+ :'labels' => :'Array<CreateLabelParams>',
63
+ :'description' => :'String',
64
+ :'name' => :'String',
65
+ :'start_date' => :'String',
66
+ :'end_date' => :'String'
60
67
  }
61
68
  end
62
69
 
@@ -65,7 +72,7 @@ module Shortcut
65
72
  Set.new([
66
73
  ])
67
74
  end
68
-
75
+
69
76
  # Initializes the object
70
77
  # @param [Hash] attributes Model attributes in the form of hash
71
78
  def initialize(attributes = {})
@@ -120,15 +127,75 @@ module Shortcut
120
127
  # @return Array for valid properties with the reasons
121
128
  def list_invalid_properties
122
129
  invalid_properties = Array.new
130
+ if !@description.nil? && @description.to_s.length > 100000
131
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 100000.')
132
+ end
133
+
134
+ if !@name.nil? && @name.to_s.length < 1
135
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
136
+ end
137
+
138
+ if !@start_date.nil? && @start_date.to_s.length < 1
139
+ invalid_properties.push('invalid value for "start_date", the character length must be great than or equal to 1.')
140
+ end
141
+
142
+ if !@end_date.nil? && @end_date.to_s.length < 1
143
+ invalid_properties.push('invalid value for "end_date", the character length must be great than or equal to 1.')
144
+ end
145
+
123
146
  invalid_properties
124
147
  end
125
148
 
126
149
  # Check to see if the all the properties in the model are valid
127
150
  # @return true if the model is valid
128
151
  def valid?
152
+ return false if !@description.nil? && @description.to_s.length > 100000
153
+ return false if !@name.nil? && @name.to_s.length < 1
154
+ return false if !@start_date.nil? && @start_date.to_s.length < 1
155
+ return false if !@end_date.nil? && @end_date.to_s.length < 1
129
156
  true
130
157
  end
131
158
 
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] description Value to be assigned
161
+ def description=(description)
162
+ if !description.nil? && description.to_s.length > 100000
163
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 100000.'
164
+ end
165
+
166
+ @description = description
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] name Value to be assigned
171
+ def name=(name)
172
+ if !name.nil? && name.to_s.length < 1
173
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
174
+ end
175
+
176
+ @name = name
177
+ end
178
+
179
+ # Custom attribute writer method with validation
180
+ # @param [Object] start_date Value to be assigned
181
+ def start_date=(start_date)
182
+ if !start_date.nil? && start_date.to_s.length < 1
183
+ fail ArgumentError, 'invalid value for "start_date", the character length must be great than or equal to 1.'
184
+ end
185
+
186
+ @start_date = start_date
187
+ end
188
+
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] end_date Value to be assigned
191
+ def end_date=(end_date)
192
+ if !end_date.nil? && end_date.to_s.length < 1
193
+ fail ArgumentError, 'invalid value for "end_date", the character length must be great than or equal to 1.'
194
+ end
195
+
196
+ @end_date = end_date
197
+ end
198
+
132
199
  # Checks equality by comparing each attribute.
133
200
  # @param [Object] Object to be compared
134
201
  def ==(o)
@@ -167,8 +234,11 @@ module Shortcut
167
234
  # @return [Object] Returns the model itself
168
235
  def build_from_hash(attributes)
169
236
  return nil unless attributes.is_a?(Hash)
237
+ attributes = attributes.transform_keys(&:to_sym)
170
238
  self.class.openapi_types.each_pair do |key, type|
171
- if type =~ /\AArray<(.*)>/i
239
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
240
+ self.send("#{key}=", nil)
241
+ elsif type =~ /\AArray<(.*)>/i
172
242
  # check to ensure the input is an array given that the attribute
173
243
  # is documented as an array but the input is not
174
244
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -176,8 +246,6 @@ module Shortcut
176
246
  end
177
247
  elsif !attributes[self.class.attribute_map[key]].nil?
178
248
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
180
- self.send("#{key}=", nil)
181
249
  end
182
250
  end
183
251
 
@@ -190,8 +258,8 @@ module Shortcut
190
258
  # @return [Object] Deserialized data
191
259
  def _deserialize(type, value)
192
260
  case type.to_sym
193
- when :DateTime
194
- DateTime.parse(value)
261
+ when :Time
262
+ Time.parse(value)
195
263
  when :Date
196
264
  Date.parse(value)
197
265
  when :String
@@ -221,7 +289,9 @@ module Shortcut
221
289
  end
222
290
  end
223
291
  else # model
224
- Shortcut.const_get(type).build_from_hash(value)
292
+ # models (e.g. Pet) or oneOf
293
+ klass = Shortcut.const_get(type)
294
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
225
295
  end
226
296
  end
227
297
 
@@ -269,5 +339,8 @@ module Shortcut
269
339
  else
270
340
  value
271
341
  end
272
- end end
342
+ end
343
+
344
+ end
345
+
273
346
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  class UpdateLabel
@@ -35,13 +37,18 @@ module Shortcut
35
37
  }
36
38
  end
37
39
 
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
38
45
  # Attribute type mapping.
39
46
  def self.openapi_types
40
47
  {
41
- :'name' => :'Object',
42
- :'description' => :'Object',
43
- :'color' => :'Object',
44
- :'archived' => :'Object'
48
+ :'name' => :'String',
49
+ :'description' => :'String',
50
+ :'color' => :'String',
51
+ :'archived' => :'Boolean'
45
52
  }
46
53
  end
47
54
 
@@ -51,7 +58,7 @@ module Shortcut
51
58
  :'color',
52
59
  ])
53
60
  end
54
-
61
+
55
62
  # Initializes the object
56
63
  # @param [Hash] attributes Model attributes in the form of hash
57
64
  def initialize(attributes = {})
@@ -88,15 +95,65 @@ module Shortcut
88
95
  # @return Array for valid properties with the reasons
89
96
  def list_invalid_properties
90
97
  invalid_properties = Array.new
98
+ if !@name.nil? && @name.to_s.length > 128
99
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 128.')
100
+ end
101
+
102
+ if !@name.nil? && @name.to_s.length < 1
103
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
104
+ end
105
+
106
+ if !@color.nil? && @color.to_s.length < 1
107
+ invalid_properties.push('invalid value for "color", the character length must be great than or equal to 1.')
108
+ end
109
+
110
+ pattern = Regexp.new(/^#[a-fA-F0-9]{6}$/)
111
+ if !@color.nil? && @color !~ pattern
112
+ invalid_properties.push("invalid value for \"color\", must conform to the pattern #{pattern}.")
113
+ end
114
+
91
115
  invalid_properties
92
116
  end
93
117
 
94
118
  # Check to see if the all the properties in the model are valid
95
119
  # @return true if the model is valid
96
120
  def valid?
121
+ return false if !@name.nil? && @name.to_s.length > 128
122
+ return false if !@name.nil? && @name.to_s.length < 1
123
+ return false if !@color.nil? && @color.to_s.length < 1
124
+ return false if !@color.nil? && @color !~ Regexp.new(/^#[a-fA-F0-9]{6}$/)
97
125
  true
98
126
  end
99
127
 
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] name Value to be assigned
130
+ def name=(name)
131
+ if !name.nil? && name.to_s.length > 128
132
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 128.'
133
+ end
134
+
135
+ if !name.nil? && name.to_s.length < 1
136
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
137
+ end
138
+
139
+ @name = name
140
+ end
141
+
142
+ # Custom attribute writer method with validation
143
+ # @param [Object] color Value to be assigned
144
+ def color=(color)
145
+ if !color.nil? && color.to_s.length < 1
146
+ fail ArgumentError, 'invalid value for "color", the character length must be great than or equal to 1.'
147
+ end
148
+
149
+ pattern = Regexp.new(/^#[a-fA-F0-9]{6}$/)
150
+ if !color.nil? && color !~ pattern
151
+ fail ArgumentError, "invalid value for \"color\", must conform to the pattern #{pattern}."
152
+ end
153
+
154
+ @color = color
155
+ end
156
+
100
157
  # Checks equality by comparing each attribute.
101
158
  # @param [Object] Object to be compared
102
159
  def ==(o)
@@ -132,8 +189,11 @@ module Shortcut
132
189
  # @return [Object] Returns the model itself
133
190
  def build_from_hash(attributes)
134
191
  return nil unless attributes.is_a?(Hash)
192
+ attributes = attributes.transform_keys(&:to_sym)
135
193
  self.class.openapi_types.each_pair do |key, type|
136
- if type =~ /\AArray<(.*)>/i
194
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
195
+ self.send("#{key}=", nil)
196
+ elsif type =~ /\AArray<(.*)>/i
137
197
  # check to ensure the input is an array given that the attribute
138
198
  # is documented as an array but the input is not
139
199
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -141,8 +201,6 @@ module Shortcut
141
201
  end
142
202
  elsif !attributes[self.class.attribute_map[key]].nil?
143
203
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
145
- self.send("#{key}=", nil)
146
204
  end
147
205
  end
148
206
 
@@ -155,8 +213,8 @@ module Shortcut
155
213
  # @return [Object] Deserialized data
156
214
  def _deserialize(type, value)
157
215
  case type.to_sym
158
- when :DateTime
159
- DateTime.parse(value)
216
+ when :Time
217
+ Time.parse(value)
160
218
  when :Date
161
219
  Date.parse(value)
162
220
  when :String
@@ -186,7 +244,9 @@ module Shortcut
186
244
  end
187
245
  end
188
246
  else # model
189
- Shortcut.const_get(type).build_from_hash(value)
247
+ # models (e.g. Pet) or oneOf
248
+ klass = Shortcut.const_get(type)
249
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
250
  end
191
251
  end
192
252
 
@@ -234,5 +294,8 @@ module Shortcut
234
294
  else
235
295
  value
236
296
  end
237
- end end
297
+ end
298
+
299
+ end
300
+
238
301
  end
@@ -3,13 +3,15 @@
3
3
 
4
4
  #Shortcut API
5
5
 
6
- OpenAPI spec version: 3.0
6
+ The version of the OpenAPI document: 3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
7
10
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.35
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module Shortcut
15
17
  class UpdateLinkedFile
@@ -73,17 +75,22 @@ module Shortcut
73
75
  }
74
76
  end
75
77
 
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
76
83
  # Attribute type mapping.
77
84
  def self.openapi_types
78
85
  {
79
- :'description' => :'Object',
80
- :'story_id' => :'Object',
81
- :'name' => :'Object',
82
- :'thumbnail_url' => :'Object',
83
- :'type' => :'Object',
84
- :'size' => :'Object',
85
- :'uploader_id' => :'Object',
86
- :'url' => :'Object'
86
+ :'description' => :'String',
87
+ :'story_id' => :'Integer',
88
+ :'name' => :'String',
89
+ :'thumbnail_url' => :'String',
90
+ :'type' => :'String',
91
+ :'size' => :'Integer',
92
+ :'uploader_id' => :'String',
93
+ :'url' => :'String'
87
94
  }
88
95
  end
89
96
 
@@ -92,7 +99,7 @@ module Shortcut
92
99
  Set.new([
93
100
  ])
94
101
  end
95
-
102
+
96
103
  # Initializes the object
97
104
  # @param [Hash] attributes Model attributes in the form of hash
98
105
  def initialize(attributes = {})
@@ -145,27 +152,94 @@ module Shortcut
145
152
  # @return Array for valid properties with the reasons
146
153
  def list_invalid_properties
147
154
  invalid_properties = Array.new
155
+ if !@name.nil? && @name.to_s.length < 1
156
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
157
+ end
158
+
159
+ if !@thumbnail_url.nil? && @thumbnail_url.to_s.length > 2048
160
+ invalid_properties.push('invalid value for "thumbnail_url", the character length must be smaller than or equal to 2048.')
161
+ end
162
+
163
+ pattern = Regexp.new(/^https?:\/\/.+$/)
164
+ if !@thumbnail_url.nil? && @thumbnail_url !~ pattern
165
+ invalid_properties.push("invalid value for \"thumbnail_url\", must conform to the pattern #{pattern}.")
166
+ end
167
+
168
+ if !@url.nil? && @url.to_s.length > 2048
169
+ invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 2048.')
170
+ end
171
+
172
+ pattern = Regexp.new(/^https?:\/\/.+$/)
173
+ if !@url.nil? && @url !~ pattern
174
+ invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
175
+ end
176
+
148
177
  invalid_properties
149
178
  end
150
179
 
151
180
  # Check to see if the all the properties in the model are valid
152
181
  # @return true if the model is valid
153
182
  def valid?
154
- type_validator = EnumAttributeValidator.new('Object', ['google', 'url', 'dropbox', 'box', 'onedrive'])
183
+ return false if !@name.nil? && @name.to_s.length < 1
184
+ return false if !@thumbnail_url.nil? && @thumbnail_url.to_s.length > 2048
185
+ return false if !@thumbnail_url.nil? && @thumbnail_url !~ Regexp.new(/^https?:\/\/.+$/)
186
+ type_validator = EnumAttributeValidator.new('String', ["google", "url", "dropbox", "box", "onedrive"])
155
187
  return false unless type_validator.valid?(@type)
188
+ return false if !@url.nil? && @url.to_s.length > 2048
189
+ return false if !@url.nil? && @url !~ Regexp.new(/^https?:\/\/.+$/)
156
190
  true
157
191
  end
158
192
 
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] name Value to be assigned
195
+ def name=(name)
196
+ if !name.nil? && name.to_s.length < 1
197
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
198
+ end
199
+
200
+ @name = name
201
+ end
202
+
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] thumbnail_url Value to be assigned
205
+ def thumbnail_url=(thumbnail_url)
206
+ if !thumbnail_url.nil? && thumbnail_url.to_s.length > 2048
207
+ fail ArgumentError, 'invalid value for "thumbnail_url", the character length must be smaller than or equal to 2048.'
208
+ end
209
+
210
+ pattern = Regexp.new(/^https?:\/\/.+$/)
211
+ if !thumbnail_url.nil? && thumbnail_url !~ pattern
212
+ fail ArgumentError, "invalid value for \"thumbnail_url\", must conform to the pattern #{pattern}."
213
+ end
214
+
215
+ @thumbnail_url = thumbnail_url
216
+ end
217
+
159
218
  # Custom attribute writer method checking allowed values (enum).
160
219
  # @param [Object] type Object to be assigned
161
220
  def type=(type)
162
- validator = EnumAttributeValidator.new('Object', ['google', 'url', 'dropbox', 'box', 'onedrive'])
221
+ validator = EnumAttributeValidator.new('String', ["google", "url", "dropbox", "box", "onedrive"])
163
222
  unless validator.valid?(type)
164
223
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
165
224
  end
166
225
  @type = type
167
226
  end
168
227
 
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] url Value to be assigned
230
+ def url=(url)
231
+ if !url.nil? && url.to_s.length > 2048
232
+ fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 2048.'
233
+ end
234
+
235
+ pattern = Regexp.new(/^https?:\/\/.+$/)
236
+ if !url.nil? && url !~ pattern
237
+ fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
238
+ end
239
+
240
+ @url = url
241
+ end
242
+
169
243
  # Checks equality by comparing each attribute.
170
244
  # @param [Object] Object to be compared
171
245
  def ==(o)
@@ -205,8 +279,11 @@ module Shortcut
205
279
  # @return [Object] Returns the model itself
206
280
  def build_from_hash(attributes)
207
281
  return nil unless attributes.is_a?(Hash)
282
+ attributes = attributes.transform_keys(&:to_sym)
208
283
  self.class.openapi_types.each_pair do |key, type|
209
- if type =~ /\AArray<(.*)>/i
284
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
285
+ self.send("#{key}=", nil)
286
+ elsif type =~ /\AArray<(.*)>/i
210
287
  # check to ensure the input is an array given that the attribute
211
288
  # is documented as an array but the input is not
212
289
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -214,8 +291,6 @@ module Shortcut
214
291
  end
215
292
  elsif !attributes[self.class.attribute_map[key]].nil?
216
293
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
217
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
218
- self.send("#{key}=", nil)
219
294
  end
220
295
  end
221
296
 
@@ -228,8 +303,8 @@ module Shortcut
228
303
  # @return [Object] Deserialized data
229
304
  def _deserialize(type, value)
230
305
  case type.to_sym
231
- when :DateTime
232
- DateTime.parse(value)
306
+ when :Time
307
+ Time.parse(value)
233
308
  when :Date
234
309
  Date.parse(value)
235
310
  when :String
@@ -259,7 +334,9 @@ module Shortcut
259
334
  end
260
335
  end
261
336
  else # model
262
- Shortcut.const_get(type).build_from_hash(value)
337
+ # models (e.g. Pet) or oneOf
338
+ klass = Shortcut.const_get(type)
339
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
263
340
  end
264
341
  end
265
342
 
@@ -307,5 +384,8 @@ module Shortcut
307
384
  else
308
385
  value
309
386
  end
310
- end end
387
+ end
388
+
389
+ end
390
+
311
391
  end