flat_api 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +60 -8
  3. data/LICENSE +201 -0
  4. data/README.md +62 -241
  5. data/lib/flat_api/api/account_api.rb +32 -22
  6. data/lib/flat_api/api/class_api.rb +1671 -453
  7. data/lib/flat_api/api/collection_api.rb +286 -185
  8. data/lib/flat_api/api/edu_resources_api.rb +863 -0
  9. data/lib/flat_api/api/group_api.rb +506 -57
  10. data/lib/flat_api/api/omr_api.rb +894 -0
  11. data/lib/flat_api/api/organization_api.rb +808 -192
  12. data/lib/flat_api/api/score_api.rb +1030 -589
  13. data/lib/flat_api/api/task_api.rb +85 -0
  14. data/lib/flat_api/api/user_api.rb +151 -82
  15. data/lib/flat_api/api_client.rb +223 -145
  16. data/lib/flat_api/api_error.rb +24 -4
  17. data/lib/flat_api/api_model_base.rb +88 -0
  18. data/lib/flat_api/client.rb +69 -0
  19. data/lib/flat_api/configuration.rb +224 -36
  20. data/lib/flat_api/errors.rb +86 -0
  21. data/lib/flat_api/models/add_group_user200_response.rb +148 -0
  22. data/lib/flat_api/models/add_group_user_request.rb +165 -0
  23. data/lib/flat_api/models/api_access_token.rb +201 -0
  24. data/lib/flat_api/models/app_scopes.rb +61 -0
  25. data/lib/flat_api/models/assignment.rb +362 -166
  26. data/lib/flat_api/models/assignment_capabilities.rb +256 -0
  27. data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +193 -0
  28. data/lib/flat_api/models/assignment_copy.rb +79 -169
  29. data/lib/flat_api/models/assignment_copy_response.rb +535 -0
  30. data/lib/flat_api/models/assignment_copy_to_class.rb +186 -0
  31. data/lib/flat_api/models/assignment_copy_to_resource_library.rb +176 -0
  32. data/lib/flat_api/models/assignment_group.rb +232 -0
  33. data/lib/flat_api/models/assignment_submission.rb +337 -131
  34. data/lib/flat_api/models/assignment_submission_comment.rb +209 -0
  35. data/lib/flat_api/models/assignment_submission_comment_creation.rb +166 -0
  36. data/lib/flat_api/models/assignment_submission_comments.rb +158 -0
  37. data/lib/flat_api/models/assignment_submission_history.rb +337 -0
  38. data/lib/flat_api/models/assignment_submission_history_attachment.rb +168 -0
  39. data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
  40. data/lib/flat_api/models/assignment_submission_lti.rb +200 -0
  41. data/lib/flat_api/models/assignment_submission_playback.rb +193 -0
  42. data/lib/flat_api/models/assignment_submission_state.rb +42 -0
  43. data/lib/flat_api/models/assignment_submission_students_mode.rb +40 -0
  44. data/lib/flat_api/models/assignment_submission_update.rb +157 -113
  45. data/lib/flat_api/models/assignment_type.rb +45 -0
  46. data/lib/flat_api/models/assignment_update.rb +538 -0
  47. data/lib/flat_api/models/class_assignment.rb +750 -0
  48. data/lib/flat_api/models/class_assignment_all_of_canvas.rb +159 -0
  49. data/lib/flat_api/models/class_assignment_all_of_lti.rb +149 -0
  50. data/lib/flat_api/models/class_assignment_all_of_mfc.rb +159 -0
  51. data/lib/flat_api/models/class_assignment_update.rb +652 -0
  52. data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +150 -0
  53. data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +152 -0
  54. data/lib/flat_api/models/class_attachment_creation.rb +140 -106
  55. data/lib/flat_api/models/class_creation.rb +142 -108
  56. data/lib/flat_api/models/class_details.rb +244 -125
  57. data/lib/flat_api/models/class_details_canvas.rb +59 -99
  58. data/lib/flat_api/models/class_details_clever.rb +74 -113
  59. data/lib/flat_api/models/class_details_google_classroom.rb +64 -124
  60. data/lib/flat_api/models/class_details_google_drive.rb +61 -101
  61. data/lib/flat_api/models/class_details_issues.rb +151 -0
  62. data/lib/flat_api/models/class_details_issues_sync_inner.rb +203 -0
  63. data/lib/flat_api/models/class_details_lti.rb +76 -106
  64. data/lib/flat_api/models/class_details_mfc.rb +159 -0
  65. data/lib/flat_api/models/class_details_microsoft_graph.rb +148 -0
  66. data/lib/flat_api/models/class_grade_level.rb +43 -0
  67. data/lib/flat_api/models/class_roles.rb +18 -9
  68. data/lib/flat_api/models/class_state.rb +19 -9
  69. data/lib/flat_api/models/class_update.rb +142 -107
  70. data/lib/flat_api/models/collection.rb +304 -115
  71. data/lib/flat_api/models/collection_app.rb +169 -0
  72. data/lib/flat_api/models/collection_capabilities.rb +157 -112
  73. data/lib/flat_api/models/collection_contents.rb +166 -0
  74. data/lib/flat_api/models/collection_creation.rb +120 -104
  75. data/lib/flat_api/models/collection_modification.rb +122 -100
  76. data/lib/flat_api/models/collection_privacy.rb +18 -9
  77. data/lib/flat_api/models/collection_type.rb +22 -11
  78. data/lib/flat_api/models/credit_transaction.rb +388 -0
  79. data/lib/flat_api/models/edu_library.rb +273 -0
  80. data/lib/flat_api/models/edu_resource.rb +383 -0
  81. data/lib/flat_api/models/edu_resource_assignment_creation.rb +170 -0
  82. data/lib/flat_api/models/edu_resource_capabilities.rb +179 -0
  83. data/lib/flat_api/models/edu_resource_copy.rb +166 -0
  84. data/lib/flat_api/models/edu_resource_creation.rb +311 -0
  85. data/lib/flat_api/models/edu_resource_folder.rb +171 -0
  86. data/lib/flat_api/models/edu_resource_lti_link.rb +166 -0
  87. data/lib/flat_api/models/edu_resource_move.rb +166 -0
  88. data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
  89. data/lib/flat_api/models/edu_resource_resource.rb +104 -0
  90. data/lib/flat_api/models/edu_resource_type.rb +40 -0
  91. data/lib/flat_api/models/edu_resource_update.rb +292 -0
  92. data/lib/flat_api/models/edu_resource_use_in_class.rb +176 -0
  93. data/lib/flat_api/models/flat_error_response.rb +109 -105
  94. data/lib/flat_api/models/google_classroom_coursework.rb +74 -103
  95. data/lib/flat_api/models/google_classroom_submission.rb +112 -101
  96. data/lib/flat_api/models/grade.rb +51 -0
  97. data/lib/flat_api/models/group.rb +70 -122
  98. data/lib/flat_api/models/group_creation.rb +238 -0
  99. data/lib/flat_api/models/group_details.rb +253 -110
  100. data/lib/flat_api/models/group_type.rb +20 -9
  101. data/lib/flat_api/models/license_mode.rb +18 -9
  102. data/lib/flat_api/models/license_sources.rb +21 -9
  103. data/lib/flat_api/models/lms_name.rb +19 -9
  104. data/lib/flat_api/models/lti_configuration.rb +56 -0
  105. data/lib/flat_api/models/lti_configuration1p1.rb +361 -0
  106. data/lib/flat_api/models/lti_configuration1p1_all_of_tool.rb +199 -0
  107. data/lib/flat_api/models/lti_configuration1p3.rb +106 -0
  108. data/lib/flat_api/models/lti_configuration1p3_base.rb +336 -0
  109. data/lib/flat_api/models/lti_configuration1p3_base_supported_services.rb +166 -0
  110. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_ags.rb +179 -0
  111. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.rb +159 -0
  112. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_nrps.rb +169 -0
  113. data/lib/flat_api/models/lti_configuration1p3_base_tool.rb +199 -0
  114. data/lib/flat_api/models/lti_configuration1p3_deployment.rb +529 -0
  115. data/lib/flat_api/models/lti_configuration1p3_dynamic.rb +530 -0
  116. data/lib/flat_api/models/lti_configuration1p3_manual.rb +489 -0
  117. data/lib/flat_api/models/lti_configuration_base.rb +306 -0
  118. data/lib/flat_api/models/lti_configuration_create.rb +60 -0
  119. data/lib/flat_api/models/lti_configuration_create1p1.rb +210 -0
  120. data/lib/flat_api/models/lti_configuration_create1p3_deployment.rb +264 -0
  121. data/lib/flat_api/models/lti_configuration_create1p3_dynamic.rb +209 -0
  122. data/lib/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.rb +159 -0
  123. data/lib/flat_api/models/lti_configuration_create1p3_manual.rb +270 -0
  124. data/lib/flat_api/models/lti_configuration_update.rb +104 -0
  125. data/lib/flat_api/models/lti_configuration_update_deployment.rb +169 -0
  126. data/lib/flat_api/models/lti_configuration_update_standalone.rb +219 -0
  127. data/lib/flat_api/models/lti_credentials.rb +108 -114
  128. data/lib/flat_api/models/lti_credentials_creation.rb +99 -103
  129. data/lib/flat_api/models/media_attachment.rb +189 -137
  130. data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
  131. data/lib/flat_api/models/microsoft_graph_assignment.rb +259 -0
  132. data/lib/flat_api/models/microsoft_graph_submission.rb +193 -0
  133. data/lib/flat_api/models/omr_capabilities.rb +480 -0
  134. data/lib/flat_api/models/omr_details_step_data.rb +228 -0
  135. data/lib/flat_api/models/omr_details_submission.rb +288 -0
  136. data/lib/flat_api/models/omr_detected_instrument.rb +260 -0
  137. data/lib/flat_api/models/omr_imported_metadata.rb +181 -0
  138. data/lib/flat_api/models/omr_instrument_override.rb +311 -0
  139. data/lib/flat_api/models/omr_job.rb +394 -0
  140. data/lib/flat_api/models/omr_job_creation.rb +238 -0
  141. data/lib/flat_api/models/omr_job_file_metadata.rb +199 -0
  142. data/lib/flat_api/models/omr_job_file_upload.rb +176 -0
  143. data/lib/flat_api/models/omr_job_file_upload_result.rb +159 -0
  144. data/lib/flat_api/models/omr_job_input_file.rb +176 -0
  145. data/lib/flat_api/models/omr_job_output.rb +40 -0
  146. data/lib/flat_api/models/omr_job_progress.rb +169 -0
  147. data/lib/flat_api/models/omr_job_result.rb +161 -0
  148. data/lib/flat_api/models/omr_job_retention.rb +176 -0
  149. data/lib/flat_api/models/omr_job_status.rb +44 -0
  150. data/lib/flat_api/models/omr_locale_details.rb +193 -0
  151. data/lib/flat_api/models/omr_pending_step.rb +213 -0
  152. data/lib/flat_api/models/omr_step_name.rb +39 -0
  153. data/lib/flat_api/models/organization_invitation.rb +177 -109
  154. data/lib/flat_api/models/organization_invitation_creation.rb +97 -100
  155. data/lib/flat_api/models/organization_roles.rb +19 -10
  156. data/lib/flat_api/models/organization_user_access_token_creation.rb +168 -0
  157. data/lib/flat_api/models/rename_group_request.rb +165 -0
  158. data/lib/flat_api/models/resource_collaborator.rb +204 -116
  159. data/lib/flat_api/models/resource_collaborator_creation.rb +72 -112
  160. data/lib/flat_api/models/resource_rights.rb +168 -107
  161. data/lib/flat_api/models/score_comment.rb +200 -121
  162. data/lib/flat_api/models/score_comment_context.rb +161 -124
  163. data/lib/flat_api/models/score_comment_creation.rb +79 -107
  164. data/lib/flat_api/models/score_comment_moderation.rb +193 -0
  165. data/lib/flat_api/models/score_comment_update.rb +81 -115
  166. data/lib/flat_api/models/score_comments_counts.rb +78 -108
  167. data/lib/flat_api/models/score_creation.rb +80 -225
  168. data/lib/flat_api/models/score_creation_builder_data.rb +234 -0
  169. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +173 -0
  170. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +255 -0
  171. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +217 -0
  172. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +222 -0
  173. data/lib/flat_api/models/score_creation_common.rb +201 -0
  174. data/lib/flat_api/models/score_creation_file_import.rb +277 -0
  175. data/lib/flat_api/models/score_creation_google_drive_import.rb +234 -0
  176. data/lib/flat_api/models/score_creation_type.rb +18 -9
  177. data/lib/flat_api/models/score_details.rb +428 -146
  178. data/lib/flat_api/models/score_details_all_of_me.rb +193 -0
  179. data/lib/flat_api/models/score_fork.rb +84 -101
  180. data/lib/flat_api/models/score_license.rb +18 -9
  181. data/lib/flat_api/models/score_likes_counts.rb +73 -103
  182. data/lib/flat_api/models/score_modification.rb +178 -115
  183. data/lib/flat_api/models/score_plays_counts.rb +179 -0
  184. data/lib/flat_api/models/score_privacy.rb +18 -9
  185. data/lib/flat_api/models/score_revision.rb +142 -111
  186. data/lib/flat_api/models/score_revision_creation.rb +113 -105
  187. data/lib/flat_api/models/score_revision_statistics.rb +81 -101
  188. data/lib/flat_api/models/score_source.rb +59 -100
  189. data/lib/flat_api/models/score_summary.rb +172 -105
  190. data/lib/flat_api/models/score_track.rb +244 -117
  191. data/lib/flat_api/models/score_track_creation.rb +99 -104
  192. data/lib/flat_api/models/score_track_creation_response.rb +165 -0
  193. data/lib/flat_api/models/score_track_point.rb +78 -103
  194. data/lib/flat_api/models/score_track_purpose.rb +40 -0
  195. data/lib/flat_api/models/score_track_state.rb +18 -9
  196. data/lib/flat_api/models/score_track_type.rb +18 -9
  197. data/lib/flat_api/models/score_track_update.rb +98 -103
  198. data/lib/flat_api/models/score_views_counts.rb +73 -103
  199. data/lib/flat_api/models/task.rb +339 -0
  200. data/lib/flat_api/models/task_export_options.rb +151 -0
  201. data/lib/flat_api/models/task_progress.rb +159 -0
  202. data/lib/flat_api/models/task_result.rb +159 -0
  203. data/lib/flat_api/models/teaching_theme.rb +47 -0
  204. data/lib/flat_api/models/tutteo_product.rb +42 -0
  205. data/lib/flat_api/models/user_admin_update.rb +206 -106
  206. data/lib/flat_api/models/user_azure_details.rb +168 -0
  207. data/lib/flat_api/models/user_basics.rb +215 -120
  208. data/lib/flat_api/models/user_community_profile_links.rb +205 -0
  209. data/lib/flat_api/models/user_creation.rb +203 -114
  210. data/lib/flat_api/models/user_details.rb +331 -161
  211. data/lib/flat_api/models/user_details_admin.rb +272 -133
  212. data/lib/flat_api/models/user_details_admin_all_of_license.rb +211 -0
  213. data/lib/flat_api/models/user_public.rb +303 -145
  214. data/lib/flat_api/models/user_public_summary.rb +243 -126
  215. data/lib/flat_api/models/user_signin_link.rb +168 -0
  216. data/lib/flat_api/models/user_signin_link_creation.rb +150 -0
  217. data/lib/flat_api/oauth.rb +128 -0
  218. data/lib/flat_api/pagination.rb +88 -0
  219. data/lib/flat_api/retry.rb +56 -0
  220. data/lib/flat_api/version.rb +5 -5
  221. data/lib/flat_api.rb +144 -16
  222. metadata +154 -434
  223. data/Gemfile +0 -7
  224. data/Rakefile +0 -8
  225. data/docs/AccountApi.md +0 -55
  226. data/docs/Assignment.md +0 -18
  227. data/docs/AssignmentCopy.md +0 -8
  228. data/docs/AssignmentCreation.md +0 -12
  229. data/docs/AssignmentSubmission.md +0 -19
  230. data/docs/AssignmentSubmissionUpdate.md +0 -11
  231. data/docs/ClassApi.md +0 -1051
  232. data/docs/ClassAttachmentCreation.md +0 -10
  233. data/docs/ClassCreation.md +0 -9
  234. data/docs/ClassDetails.md +0 -25
  235. data/docs/ClassDetailsCanvas.md +0 -9
  236. data/docs/ClassDetailsClever.md +0 -14
  237. data/docs/ClassDetailsGoogleClassroom.md +0 -11
  238. data/docs/ClassDetailsGoogleDrive.md +0 -9
  239. data/docs/ClassDetailsLti.md +0 -10
  240. data/docs/ClassRoles.md +0 -7
  241. data/docs/ClassState.md +0 -7
  242. data/docs/ClassUpdate.md +0 -9
  243. data/docs/Collection.md +0 -18
  244. data/docs/CollectionApi.md +0 -521
  245. data/docs/CollectionCapabilities.md +0 -12
  246. data/docs/CollectionCreation.md +0 -8
  247. data/docs/CollectionModification.md +0 -8
  248. data/docs/CollectionPrivacy.md +0 -7
  249. data/docs/CollectionTitle.md +0 -7
  250. data/docs/CollectionType.md +0 -7
  251. data/docs/FlatErrorResponse.md +0 -11
  252. data/docs/FlatLocales.md +0 -7
  253. data/docs/GoogleClassroomCoursework.md +0 -10
  254. data/docs/GoogleClassroomSubmission.md +0 -10
  255. data/docs/Group.md +0 -14
  256. data/docs/GroupApi.md +0 -167
  257. data/docs/GroupDetails.md +0 -14
  258. data/docs/GroupType.md +0 -7
  259. data/docs/LicenseMode.md +0 -7
  260. data/docs/LicenseSources.md +0 -7
  261. data/docs/LmsName.md +0 -7
  262. data/docs/LtiCredentials.md +0 -16
  263. data/docs/LtiCredentialsCreation.md +0 -9
  264. data/docs/MediaAttachment.md +0 -23
  265. data/docs/MediaScoreSharingMode.md +0 -7
  266. data/docs/OrganizationApi.md +0 -538
  267. data/docs/OrganizationInvitation.md +0 -14
  268. data/docs/OrganizationInvitationCreation.md +0 -9
  269. data/docs/OrganizationRoles.md +0 -7
  270. data/docs/ResourceCollaborator.md +0 -16
  271. data/docs/ResourceCollaboratorCreation.md +0 -14
  272. data/docs/ResourceRights.md +0 -10
  273. data/docs/ResourceSharingKey.md +0 -7
  274. data/docs/ScoreApi.md +0 -1658
  275. data/docs/ScoreComment.md +0 -22
  276. data/docs/ScoreCommentContext.md +0 -14
  277. data/docs/ScoreCommentCreation.md +0 -13
  278. data/docs/ScoreCommentUpdate.md +0 -11
  279. data/docs/ScoreCommentsCounts.md +0 -11
  280. data/docs/ScoreCreation.md +0 -14
  281. data/docs/ScoreCreationType.md +0 -7
  282. data/docs/ScoreData.md +0 -7
  283. data/docs/ScoreDataEncoding.md +0 -7
  284. data/docs/ScoreDetails.md +0 -36
  285. data/docs/ScoreFork.md +0 -8
  286. data/docs/ScoreLicense.md +0 -7
  287. data/docs/ScoreLikesCounts.md +0 -10
  288. data/docs/ScoreModification.md +0 -14
  289. data/docs/ScorePrivacy.md +0 -7
  290. data/docs/ScoreRevision.md +0 -14
  291. data/docs/ScoreRevisionCreation.md +0 -11
  292. data/docs/ScoreRevisionStatistics.md +0 -9
  293. data/docs/ScoreSource.md +0 -8
  294. data/docs/ScoreSummary.md +0 -13
  295. data/docs/ScoreTrack.md +0 -19
  296. data/docs/ScoreTrackCreation.md +0 -12
  297. data/docs/ScoreTrackPoint.md +0 -10
  298. data/docs/ScoreTrackState.md +0 -7
  299. data/docs/ScoreTrackType.md +0 -7
  300. data/docs/ScoreTrackUpdate.md +0 -11
  301. data/docs/ScoreViewsCounts.md +0 -10
  302. data/docs/UserAdminUpdate.md +0 -9
  303. data/docs/UserApi.md +0 -173
  304. data/docs/UserBasics.md +0 -13
  305. data/docs/UserCreation.md +0 -11
  306. data/docs/UserDetails.md +0 -28
  307. data/docs/UserDetailsAdmin.md +0 -20
  308. data/docs/UserDetailsAdminLicense.md +0 -12
  309. data/docs/UserInstruments.md +0 -7
  310. data/docs/UserPublic.md +0 -25
  311. data/docs/UserPublicSummary.md +0 -17
  312. data/flat_api.gemspec +0 -48
  313. data/lib/flat_api/models/assignment_creation.rb +0 -230
  314. data/lib/flat_api/models/collection_title.rb +0 -179
  315. data/lib/flat_api/models/flat_locales.rb +0 -36
  316. data/lib/flat_api/models/resource_sharing_key.rb +0 -179
  317. data/lib/flat_api/models/score_data.rb +0 -179
  318. data/lib/flat_api/models/score_data_encoding.rb +0 -30
  319. data/lib/flat_api/models/user_details_admin_license.rb +0 -227
  320. data/lib/flat_api/models/user_instruments.rb +0 -179
  321. data/spec/api/account_api_spec.rb +0 -46
  322. data/spec/api/class_api_spec.rb +0 -278
  323. data/spec/api/collection_api_spec.rb +0 -159
  324. data/spec/api/group_api_spec.rb +0 -72
  325. data/spec/api/organization_api_spec.rb +0 -162
  326. data/spec/api/score_api_spec.rb +0 -426
  327. data/spec/api/user_api_spec.rb +0 -73
  328. data/spec/api_client_spec.rb +0 -226
  329. data/spec/configuration_spec.rb +0 -42
  330. data/spec/models/assignment_copy_spec.rb +0 -42
  331. data/spec/models/assignment_creation_spec.rb +0 -66
  332. data/spec/models/assignment_spec.rb +0 -106
  333. data/spec/models/assignment_submission_spec.rb +0 -108
  334. data/spec/models/assignment_submission_update_spec.rb +0 -60
  335. data/spec/models/class_attachment_creation_spec.rb +0 -58
  336. data/spec/models/class_creation_spec.rb +0 -48
  337. data/spec/models/class_details_canvas_spec.rb +0 -48
  338. data/spec/models/class_details_clever_spec.rb +0 -82
  339. data/spec/models/class_details_google_classroom_spec.rb +0 -60
  340. data/spec/models/class_details_google_drive_spec.rb +0 -48
  341. data/spec/models/class_details_lti_spec.rb +0 -54
  342. data/spec/models/class_details_spec.rb +0 -144
  343. data/spec/models/class_roles_spec.rb +0 -36
  344. data/spec/models/class_state_spec.rb +0 -36
  345. data/spec/models/class_update_spec.rb +0 -48
  346. data/spec/models/collection_capabilities_spec.rb +0 -66
  347. data/spec/models/collection_creation_spec.rb +0 -42
  348. data/spec/models/collection_modification_spec.rb +0 -42
  349. data/spec/models/collection_privacy_spec.rb +0 -36
  350. data/spec/models/collection_spec.rb +0 -102
  351. data/spec/models/collection_title_spec.rb +0 -36
  352. data/spec/models/collection_type_spec.rb +0 -36
  353. data/spec/models/flat_error_response_spec.rb +0 -60
  354. data/spec/models/flat_locales_spec.rb +0 -36
  355. data/spec/models/google_classroom_coursework_spec.rb +0 -54
  356. data/spec/models/google_classroom_submission_spec.rb +0 -54
  357. data/spec/models/group_details_spec.rb +0 -78
  358. data/spec/models/group_spec.rb +0 -82
  359. data/spec/models/group_type_spec.rb +0 -36
  360. data/spec/models/license_mode_spec.rb +0 -36
  361. data/spec/models/license_sources_spec.rb +0 -36
  362. data/spec/models/lms_name_spec.rb +0 -36
  363. data/spec/models/lti_credentials_creation_spec.rb +0 -48
  364. data/spec/models/lti_credentials_spec.rb +0 -90
  365. data/spec/models/media_attachment_spec.rb +0 -136
  366. data/spec/models/media_score_sharing_mode_spec.rb +0 -36
  367. data/spec/models/organization_invitation_creation_spec.rb +0 -48
  368. data/spec/models/organization_invitation_spec.rb +0 -78
  369. data/spec/models/organization_roles_spec.rb +0 -36
  370. data/spec/models/resource_collaborator_creation_spec.rb +0 -78
  371. data/spec/models/resource_collaborator_spec.rb +0 -90
  372. data/spec/models/resource_rights_spec.rb +0 -54
  373. data/spec/models/resource_sharing_key_spec.rb +0 -36
  374. data/spec/models/score_comment_context_spec.rb +0 -78
  375. data/spec/models/score_comment_creation_spec.rb +0 -72
  376. data/spec/models/score_comment_spec.rb +0 -130
  377. data/spec/models/score_comment_update_spec.rb +0 -60
  378. data/spec/models/score_comments_counts_spec.rb +0 -60
  379. data/spec/models/score_creation_spec.rb +0 -78
  380. data/spec/models/score_creation_type_spec.rb +0 -36
  381. data/spec/models/score_data_encoding_spec.rb +0 -36
  382. data/spec/models/score_data_spec.rb +0 -36
  383. data/spec/models/score_details_spec.rb +0 -210
  384. data/spec/models/score_fork_spec.rb +0 -42
  385. data/spec/models/score_license_spec.rb +0 -36
  386. data/spec/models/score_likes_counts_spec.rb +0 -54
  387. data/spec/models/score_modification_spec.rb +0 -78
  388. data/spec/models/score_privacy_spec.rb +0 -36
  389. data/spec/models/score_revision_creation_spec.rb +0 -60
  390. data/spec/models/score_revision_spec.rb +0 -78
  391. data/spec/models/score_revision_statistics_spec.rb +0 -48
  392. data/spec/models/score_source_spec.rb +0 -42
  393. data/spec/models/score_summary_spec.rb +0 -72
  394. data/spec/models/score_track_creation_spec.rb +0 -66
  395. data/spec/models/score_track_point_spec.rb +0 -58
  396. data/spec/models/score_track_spec.rb +0 -108
  397. data/spec/models/score_track_state_spec.rb +0 -36
  398. data/spec/models/score_track_type_spec.rb +0 -36
  399. data/spec/models/score_track_update_spec.rb +0 -60
  400. data/spec/models/score_views_counts_spec.rb +0 -54
  401. data/spec/models/user_admin_update_spec.rb +0 -48
  402. data/spec/models/user_basics_spec.rb +0 -72
  403. data/spec/models/user_creation_spec.rb +0 -60
  404. data/spec/models/user_details_admin_license_spec.rb +0 -66
  405. data/spec/models/user_details_admin_spec.rb +0 -114
  406. data/spec/models/user_details_spec.rb +0 -166
  407. data/spec/models/user_instruments_spec.rb +0 -36
  408. data/spec/models/user_public_spec.rb +0 -144
  409. data/spec/models/user_public_summary_spec.rb +0 -96
  410. data/spec/spec_helper.rb +0 -111
@@ -1,16 +1,16 @@
1
1
  =begin
2
2
  #Flat API
3
3
 
4
- #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro, MuseScore, ABC notation, and many other formats * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.6.0
6
+ The version of the OpenAPI document: 2.26.1
7
7
  Contact: developers@flat.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'cgi'
14
14
 
15
15
  module FlatApi
16
16
  class OrganizationApi
@@ -19,56 +19,212 @@ module FlatApi
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Count the organization users using the provided filters
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Array<String>] :role Filter users by role
25
+ # @option opts [String] :q The query to search
26
+ # @option opts [Array<String>] :group Filter users by group
27
+ # @option opts [Boolean] :no_active_license Filter users who don&#39;t have an active license
28
+ # @option opts [String] :test_accounts Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * &#x60;exclude&#x60;: Hide test accounts from results. * &#x60;only&#x60;: Show only test accounts. When omitted, all users are returned.
29
+ # @return [Integer]
30
+ def count_orga_users(opts = {})
31
+ data, _status_code, _headers = count_orga_users_with_http_info(opts)
32
+ data
33
+ end
34
+
35
+ # Count the organization users using the provided filters
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Array<String>] :role Filter users by role
38
+ # @option opts [String] :q The query to search
39
+ # @option opts [Array<String>] :group Filter users by group
40
+ # @option opts [Boolean] :no_active_license Filter users who don&#39;t have an active license
41
+ # @option opts [String] :test_accounts Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * &#x60;exclude&#x60;: Hide test accounts from results. * &#x60;only&#x60;: Show only test accounts. When omitted, all users are returned.
42
+ # @return [Array<(Integer, Integer, Hash)>] Integer data, response status code and response headers
43
+ def count_orga_users_with_http_info(opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.count_orga_users ...'
46
+ end
47
+ allowable_values = ["user", "teacher", "admin", "accountAdmin"]
48
+ if @api_client.config.client_side_validation && opts[:'role'] && !opts[:'role'].all? { |item| allowable_values.include?(item) }
49
+ fail ArgumentError, "invalid value for \"role\", must include one of #{allowable_values}"
50
+ end
51
+ allowable_values = ["exclude", "only"]
52
+ if @api_client.config.client_side_validation && opts[:'test_accounts'] && !allowable_values.include?(opts[:'test_accounts'])
53
+ fail ArgumentError, "invalid value for \"test_accounts\", must be one of #{allowable_values}"
54
+ end
55
+ # resource path
56
+ local_var_path = '/organizations/users/count'
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+ query_params[:'role'] = @api_client.build_collection_param(opts[:'role'], :multi) if !opts[:'role'].nil?
61
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
62
+ query_params[:'group'] = @api_client.build_collection_param(opts[:'group'], :multi) if !opts[:'group'].nil?
63
+ query_params[:'noActiveLicense'] = opts[:'no_active_license'] if !opts[:'no_active_license'].nil?
64
+ query_params[:'testAccounts'] = opts[:'test_accounts'] if !opts[:'test_accounts'].nil?
65
+
66
+ # header parameters
67
+ header_params = opts[:header_params] || {}
68
+ # HTTP header 'Accept' (if needed)
69
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
70
+
71
+ # form parameters
72
+ form_params = opts[:form_params] || {}
73
+
74
+ # http body (model)
75
+ post_body = opts[:debug_body]
76
+
77
+ # return_type
78
+ return_type = opts[:debug_return_type] || 'Integer'
79
+
80
+ # auth_names
81
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
82
+
83
+ new_options = opts.merge(
84
+ :operation => :"OrganizationApi.count_orga_users",
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => return_type
91
+ )
92
+
93
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "API called: OrganizationApi#count_orga_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ end
97
+ return data, status_code, headers
98
+ end
99
+
100
+ # Create a new LTI configuration (1.1 or 1.3)
101
+ # @param lti_configuration_create [LtiConfigurationCreate]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [LtiConfiguration]
104
+ def create_lti_configuration(lti_configuration_create, opts = {})
105
+ data, _status_code, _headers = create_lti_configuration_with_http_info(lti_configuration_create, opts)
106
+ data
107
+ end
108
+
109
+ # Create a new LTI configuration (1.1 or 1.3)
110
+ # @param lti_configuration_create [LtiConfigurationCreate]
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(LtiConfiguration, Integer, Hash)>] LtiConfiguration data, response status code and response headers
113
+ def create_lti_configuration_with_http_info(lti_configuration_create, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_lti_configuration ...'
116
+ end
117
+ # verify the required parameter 'lti_configuration_create' is set
118
+ if @api_client.config.client_side_validation && lti_configuration_create.nil?
119
+ fail ArgumentError, "Missing the required parameter 'lti_configuration_create' when calling OrganizationApi.create_lti_configuration"
120
+ end
121
+ # resource path
122
+ local_var_path = '/organizations/lti/configurations'
123
+
124
+ # query parameters
125
+ query_params = opts[:query_params] || {}
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ # HTTP header 'Accept' (if needed)
130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
131
+ # HTTP header 'Content-Type'
132
+ content_type = @api_client.select_header_content_type(['application/json'])
133
+ if !content_type.nil?
134
+ header_params['Content-Type'] = content_type
135
+ end
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lti_configuration_create)
142
+
143
+ # return_type
144
+ return_type = opts[:debug_return_type] || 'LtiConfiguration'
145
+
146
+ # auth_names
147
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
148
+
149
+ new_options = opts.merge(
150
+ :operation => :"OrganizationApi.create_lti_configuration",
151
+ :header_params => header_params,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body,
155
+ :auth_names => auth_names,
156
+ :return_type => return_type
157
+ )
158
+
159
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug "API called: OrganizationApi#create_lti_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
162
+ end
163
+ return data, status_code, headers
164
+ end
22
165
 
23
166
  # Create a new couple of LTI 1.x credentials
24
- # Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/).
25
- # @param body
167
+ # DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/).
168
+ # @param body [LtiCredentialsCreation]
26
169
  # @param [Hash] opts the optional parameters
27
170
  # @return [LtiCredentials]
28
171
  def create_lti_credentials(body, opts = {})
29
172
  data, _status_code, _headers = create_lti_credentials_with_http_info(body, opts)
30
- return data
173
+ data
31
174
  end
32
175
 
33
176
  # Create a new couple of LTI 1.x credentials
34
- # Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/).
35
- # @param body
177
+ # DEPRECATED. Use the unified endpoints under &#x60;/organizations/lti/configurations&#x60;. Note: Teachers may be restricted by the organization privacy setting &#x60;lti1p1AllowTeachersCredentials&#x60;. Flat for Education is a Certified LTI Provider. You can use these API methods to automate the creation of LTI credentials. You can read more about our LTI implementation, supported components and LTI Endpoints in our [Developer Documentation](https://flat.io/developers/docs/lti/).
178
+ # @param body [LtiCredentialsCreation]
36
179
  # @param [Hash] opts the optional parameters
37
- # @return [Array<(LtiCredentials, Fixnum, Hash)>] LtiCredentials data, response status code and response headers
180
+ # @return [Array<(LtiCredentials, Integer, Hash)>] LtiCredentials data, response status code and response headers
38
181
  def create_lti_credentials_with_http_info(body, opts = {})
39
182
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: OrganizationApi.create_lti_credentials ..."
183
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_lti_credentials ...'
41
184
  end
42
185
  # verify the required parameter 'body' is set
43
186
  if @api_client.config.client_side_validation && body.nil?
44
187
  fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.create_lti_credentials"
45
188
  end
46
189
  # resource path
47
- local_var_path = "/organizations/lti/credentials"
190
+ local_var_path = '/organizations/lti/credentials'
48
191
 
49
192
  # query parameters
50
- query_params = {}
193
+ query_params = opts[:query_params] || {}
51
194
 
52
195
  # header parameters
53
- header_params = {}
196
+ header_params = opts[:header_params] || {}
54
197
  # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
56
199
  # HTTP header 'Content-Type'
57
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
200
+ content_type = @api_client.select_header_content_type(['application/json'])
201
+ if !content_type.nil?
202
+ header_params['Content-Type'] = content_type
203
+ end
58
204
 
59
205
  # form parameters
60
- form_params = {}
206
+ form_params = opts[:form_params] || {}
61
207
 
62
208
  # http body (model)
63
- post_body = @api_client.object_to_http_body(body)
64
- auth_names = ['OAuth2']
65
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
209
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
210
+
211
+ # return_type
212
+ return_type = opts[:debug_return_type] || 'LtiCredentials'
213
+
214
+ # auth_names
215
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
216
+
217
+ new_options = opts.merge(
218
+ :operation => :"OrganizationApi.create_lti_credentials",
66
219
  :header_params => header_params,
67
220
  :query_params => query_params,
68
221
  :form_params => form_params,
69
222
  :body => post_body,
70
223
  :auth_names => auth_names,
71
- :return_type => 'LtiCredentials')
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
72
228
  if @api_client.config.debugging
73
229
  @api_client.config.logger.debug "API called: OrganizationApi#create_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
230
  end
@@ -77,49 +233,66 @@ module FlatApi
77
233
 
78
234
  # Create a new invitation to join the organization
79
235
  # This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won't send an invitation. In this case, the property `usedBy` will be directly filled with the uniquer identifier of the corresponding user.
236
+ # @param body [OrganizationInvitationCreation]
80
237
  # @param [Hash] opts the optional parameters
81
- # @option opts [OrganizationInvitationCreation] :body
82
238
  # @return [OrganizationInvitation]
83
- def create_organization_invitation(opts = {})
84
- data, _status_code, _headers = create_organization_invitation_with_http_info(opts)
85
- return data
239
+ def create_organization_invitation(body, opts = {})
240
+ data, _status_code, _headers = create_organization_invitation_with_http_info(body, opts)
241
+ data
86
242
  end
87
243
 
88
244
  # Create a new invitation to join the organization
89
245
  # This method creates and sends invitation for teachers and admins. Invitations can only be used by new Flat users or users who are not part of the organization yet. If the email of the user is already associated to a user of your organization, the API will simply update the role of the existing user and won&#39;t send an invitation. In this case, the property &#x60;usedBy&#x60; will be directly filled with the uniquer identifier of the corresponding user.
246
+ # @param body [OrganizationInvitationCreation]
90
247
  # @param [Hash] opts the optional parameters
91
- # @option opts [OrganizationInvitationCreation] :body
92
- # @return [Array<(OrganizationInvitation, Fixnum, Hash)>] OrganizationInvitation data, response status code and response headers
93
- def create_organization_invitation_with_http_info(opts = {})
248
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
249
+ def create_organization_invitation_with_http_info(body, opts = {})
94
250
  if @api_client.config.debugging
95
- @api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_invitation ..."
251
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_invitation ...'
252
+ end
253
+ # verify the required parameter 'body' is set
254
+ if @api_client.config.client_side_validation && body.nil?
255
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.create_organization_invitation"
96
256
  end
97
257
  # resource path
98
- local_var_path = "/organizations/invitations"
258
+ local_var_path = '/organizations/invitations'
99
259
 
100
260
  # query parameters
101
- query_params = {}
261
+ query_params = opts[:query_params] || {}
102
262
 
103
263
  # header parameters
104
- header_params = {}
264
+ header_params = opts[:header_params] || {}
105
265
  # HTTP header 'Accept' (if needed)
106
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
266
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
107
267
  # HTTP header 'Content-Type'
108
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
268
+ content_type = @api_client.select_header_content_type(['application/json'])
269
+ if !content_type.nil?
270
+ header_params['Content-Type'] = content_type
271
+ end
109
272
 
110
273
  # form parameters
111
- form_params = {}
274
+ form_params = opts[:form_params] || {}
112
275
 
113
276
  # http body (model)
114
- post_body = @api_client.object_to_http_body(opts[:'body'])
115
- auth_names = ['OAuth2']
116
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
277
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
278
+
279
+ # return_type
280
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
281
+
282
+ # auth_names
283
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
284
+
285
+ new_options = opts.merge(
286
+ :operation => :"OrganizationApi.create_organization_invitation",
117
287
  :header_params => header_params,
118
288
  :query_params => query_params,
119
289
  :form_params => form_params,
120
290
  :body => post_body,
121
291
  :auth_names => auth_names,
122
- :return_type => 'OrganizationInvitation')
292
+ :return_type => return_type
293
+ )
294
+
295
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
123
296
  if @api_client.config.debugging
124
297
  @api_client.config.logger.debug "API called: OrganizationApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
125
298
  end
@@ -127,99 +300,384 @@ module FlatApi
127
300
  end
128
301
 
129
302
  # Create a new user account
130
- #
303
+ # @param body [UserCreation]
131
304
  # @param [Hash] opts the optional parameters
132
- # @option opts [UserCreation] :body
133
305
  # @return [UserDetailsAdmin]
134
- def create_organization_user(opts = {})
135
- data, _status_code, _headers = create_organization_user_with_http_info(opts)
136
- return data
306
+ def create_organization_user(body, opts = {})
307
+ data, _status_code, _headers = create_organization_user_with_http_info(body, opts)
308
+ data
137
309
  end
138
310
 
139
311
  # Create a new user account
140
- #
312
+ # @param body [UserCreation]
141
313
  # @param [Hash] opts the optional parameters
142
- # @option opts [UserCreation] :body
143
- # @return [Array<(UserDetailsAdmin, Fixnum, Hash)>] UserDetailsAdmin data, response status code and response headers
144
- def create_organization_user_with_http_info(opts = {})
314
+ # @return [Array<(UserDetailsAdmin, Integer, Hash)>] UserDetailsAdmin data, response status code and response headers
315
+ def create_organization_user_with_http_info(body, opts = {})
145
316
  if @api_client.config.debugging
146
- @api_client.config.logger.debug "Calling API: OrganizationApi.create_organization_user ..."
317
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_user ...'
318
+ end
319
+ # verify the required parameter 'body' is set
320
+ if @api_client.config.client_side_validation && body.nil?
321
+ fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.create_organization_user"
147
322
  end
148
323
  # resource path
149
- local_var_path = "/organizations/users"
324
+ local_var_path = '/organizations/users'
150
325
 
151
326
  # query parameters
152
- query_params = {}
327
+ query_params = opts[:query_params] || {}
153
328
 
154
329
  # header parameters
155
- header_params = {}
330
+ header_params = opts[:header_params] || {}
156
331
  # HTTP header 'Accept' (if needed)
157
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
158
333
  # HTTP header 'Content-Type'
159
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
334
+ content_type = @api_client.select_header_content_type(['application/json'])
335
+ if !content_type.nil?
336
+ header_params['Content-Type'] = content_type
337
+ end
160
338
 
161
339
  # form parameters
162
- form_params = {}
340
+ form_params = opts[:form_params] || {}
163
341
 
164
342
  # http body (model)
165
- post_body = @api_client.object_to_http_body(opts[:'body'])
166
- auth_names = ['OAuth2']
167
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
343
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
344
+
345
+ # return_type
346
+ return_type = opts[:debug_return_type] || 'UserDetailsAdmin'
347
+
348
+ # auth_names
349
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
350
+
351
+ new_options = opts.merge(
352
+ :operation => :"OrganizationApi.create_organization_user",
168
353
  :header_params => header_params,
169
354
  :query_params => query_params,
170
355
  :form_params => form_params,
171
356
  :body => post_body,
172
357
  :auth_names => auth_names,
173
- :return_type => 'UserDetailsAdmin')
358
+ :return_type => return_type
359
+ )
360
+
361
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
174
362
  if @api_client.config.debugging
175
363
  @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
364
  end
177
365
  return data, status_code, headers
178
366
  end
179
367
 
368
+ # Create a delegated API access token for an organization user
369
+ # This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user.
370
+ # @param user [String] Unique identifier of the Flat account
371
+ # @param organization_user_access_token_creation [OrganizationUserAccessTokenCreation]
372
+ # @param [Hash] opts the optional parameters
373
+ # @return [ApiAccessToken]
374
+ def create_organization_user_access_token(user, organization_user_access_token_creation, opts = {})
375
+ data, _status_code, _headers = create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts)
376
+ data
377
+ end
378
+
379
+ # Create a delegated API access token for an organization user
380
+ # This operation will create an API access token for a chosen organization user. This token will be valid for a limited time and can be used to access the API as the organization user.
381
+ # @param user [String] Unique identifier of the Flat account
382
+ # @param organization_user_access_token_creation [OrganizationUserAccessTokenCreation]
383
+ # @param [Hash] opts the optional parameters
384
+ # @return [Array<(ApiAccessToken, Integer, Hash)>] ApiAccessToken data, response status code and response headers
385
+ def create_organization_user_access_token_with_http_info(user, organization_user_access_token_creation, opts = {})
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_user_access_token ...'
388
+ end
389
+ # verify the required parameter 'user' is set
390
+ if @api_client.config.client_side_validation && user.nil?
391
+ fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.create_organization_user_access_token"
392
+ end
393
+ # verify the required parameter 'organization_user_access_token_creation' is set
394
+ if @api_client.config.client_side_validation && organization_user_access_token_creation.nil?
395
+ fail ArgumentError, "Missing the required parameter 'organization_user_access_token_creation' when calling OrganizationApi.create_organization_user_access_token"
396
+ end
397
+ # resource path
398
+ local_var_path = '/organizations/users/{user}/accessToken'.sub('{user}', CGI.escape(user.to_s))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
407
+ # HTTP header 'Content-Type'
408
+ content_type = @api_client.select_header_content_type(['application/json'])
409
+ if !content_type.nil?
410
+ header_params['Content-Type'] = content_type
411
+ end
412
+
413
+ # form parameters
414
+ form_params = opts[:form_params] || {}
415
+
416
+ # http body (model)
417
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_user_access_token_creation)
418
+
419
+ # return_type
420
+ return_type = opts[:debug_return_type] || 'ApiAccessToken'
421
+
422
+ # auth_names
423
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
424
+
425
+ new_options = opts.merge(
426
+ :operation => :"OrganizationApi.create_organization_user_access_token",
427
+ :header_params => header_params,
428
+ :query_params => query_params,
429
+ :form_params => form_params,
430
+ :body => post_body,
431
+ :auth_names => auth_names,
432
+ :return_type => return_type
433
+ )
434
+
435
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
+ end
439
+ return data, status_code, headers
440
+ end
441
+
442
+ # Create a sign in link for an organization user
443
+ # @param user [String] Unique identifier of the Flat account
444
+ # @param user_signin_link_creation [UserSigninLinkCreation]
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [UserSigninLink]
447
+ def create_organization_user_signin_link(user, user_signin_link_creation, opts = {})
448
+ data, _status_code, _headers = create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts)
449
+ data
450
+ end
451
+
452
+ # Create a sign in link for an organization user
453
+ # @param user [String] Unique identifier of the Flat account
454
+ # @param user_signin_link_creation [UserSigninLinkCreation]
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [Array<(UserSigninLink, Integer, Hash)>] UserSigninLink data, response status code and response headers
457
+ def create_organization_user_signin_link_with_http_info(user, user_signin_link_creation, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.create_organization_user_signin_link ...'
460
+ end
461
+ # verify the required parameter 'user' is set
462
+ if @api_client.config.client_side_validation && user.nil?
463
+ fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.create_organization_user_signin_link"
464
+ end
465
+ # verify the required parameter 'user_signin_link_creation' is set
466
+ if @api_client.config.client_side_validation && user_signin_link_creation.nil?
467
+ fail ArgumentError, "Missing the required parameter 'user_signin_link_creation' when calling OrganizationApi.create_organization_user_signin_link"
468
+ end
469
+ # resource path
470
+ local_var_path = '/organizations/users/{user}/signinLink'.sub('{user}', CGI.escape(user.to_s))
471
+
472
+ # query parameters
473
+ query_params = opts[:query_params] || {}
474
+
475
+ # header parameters
476
+ header_params = opts[:header_params] || {}
477
+ # HTTP header 'Accept' (if needed)
478
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
479
+ # HTTP header 'Content-Type'
480
+ content_type = @api_client.select_header_content_type(['application/json'])
481
+ if !content_type.nil?
482
+ header_params['Content-Type'] = content_type
483
+ end
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+
488
+ # http body (model)
489
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(user_signin_link_creation)
490
+
491
+ # return_type
492
+ return_type = opts[:debug_return_type] || 'UserSigninLink'
493
+
494
+ # auth_names
495
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
496
+
497
+ new_options = opts.merge(
498
+ :operation => :"OrganizationApi.create_organization_user_signin_link",
499
+ :header_params => header_params,
500
+ :query_params => query_params,
501
+ :form_params => form_params,
502
+ :body => post_body,
503
+ :auth_names => auth_names,
504
+ :return_type => return_type
505
+ )
506
+
507
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: OrganizationApi#create_organization_user_signin_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+
514
+ # Delete an LTI configuration
515
+ # @param configuration [String] Configuration unique identifier
516
+ # @param [Hash] opts the optional parameters
517
+ # @return [nil]
518
+ def delete_lti_configuration(configuration, opts = {})
519
+ delete_lti_configuration_with_http_info(configuration, opts)
520
+ nil
521
+ end
522
+
523
+ # Delete an LTI configuration
524
+ # @param configuration [String] Configuration unique identifier
525
+ # @param [Hash] opts the optional parameters
526
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
527
+ def delete_lti_configuration_with_http_info(configuration, opts = {})
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.delete_lti_configuration ...'
530
+ end
531
+ # verify the required parameter 'configuration' is set
532
+ if @api_client.config.client_side_validation && configuration.nil?
533
+ fail ArgumentError, "Missing the required parameter 'configuration' when calling OrganizationApi.delete_lti_configuration"
534
+ end
535
+ # resource path
536
+ local_var_path = '/organizations/lti/configurations/{configuration}'.sub('{configuration}', CGI.escape(configuration.to_s))
537
+
538
+ # query parameters
539
+ query_params = opts[:query_params] || {}
540
+
541
+ # header parameters
542
+ header_params = opts[:header_params] || {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body]
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type]
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
557
+
558
+ new_options = opts.merge(
559
+ :operation => :"OrganizationApi.delete_lti_configuration",
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => return_type
566
+ )
567
+
568
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: OrganizationApi#delete_lti_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ return data, status_code, headers
573
+ end
574
+
575
+ # List LTI configurations (1.1 and 1.3)
576
+ # @param [Hash] opts the optional parameters
577
+ # @return [Array<LtiConfiguration>]
578
+ def list_lti_configurations(opts = {})
579
+ data, _status_code, _headers = list_lti_configurations_with_http_info(opts)
580
+ data
581
+ end
582
+
583
+ # List LTI configurations (1.1 and 1.3)
584
+ # @param [Hash] opts the optional parameters
585
+ # @return [Array<(Array<LtiConfiguration>, Integer, Hash)>] Array<LtiConfiguration> data, response status code and response headers
586
+ def list_lti_configurations_with_http_info(opts = {})
587
+ if @api_client.config.debugging
588
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.list_lti_configurations ...'
589
+ end
590
+ # resource path
591
+ local_var_path = '/organizations/lti/configurations'
592
+
593
+ # query parameters
594
+ query_params = opts[:query_params] || {}
595
+
596
+ # header parameters
597
+ header_params = opts[:header_params] || {}
598
+ # HTTP header 'Accept' (if needed)
599
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
600
+
601
+ # form parameters
602
+ form_params = opts[:form_params] || {}
603
+
604
+ # http body (model)
605
+ post_body = opts[:debug_body]
606
+
607
+ # return_type
608
+ return_type = opts[:debug_return_type] || 'Array<LtiConfiguration>'
609
+
610
+ # auth_names
611
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
612
+
613
+ new_options = opts.merge(
614
+ :operation => :"OrganizationApi.list_lti_configurations",
615
+ :header_params => header_params,
616
+ :query_params => query_params,
617
+ :form_params => form_params,
618
+ :body => post_body,
619
+ :auth_names => auth_names,
620
+ :return_type => return_type
621
+ )
622
+
623
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
624
+ if @api_client.config.debugging
625
+ @api_client.config.logger.debug "API called: OrganizationApi#list_lti_configurations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
626
+ end
627
+ return data, status_code, headers
628
+ end
629
+
180
630
  # List LTI 1.x credentials
181
- #
631
+ # DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`.
182
632
  # @param [Hash] opts the optional parameters
183
633
  # @return [Array<LtiCredentials>]
184
634
  def list_lti_credentials(opts = {})
185
635
  data, _status_code, _headers = list_lti_credentials_with_http_info(opts)
186
- return data
636
+ data
187
637
  end
188
638
 
189
639
  # List LTI 1.x credentials
190
- #
640
+ # DEPRECATED. Use the unified endpoints under &#x60;/organizations/lti/configurations&#x60;. Note: Teachers may be restricted by the organization privacy setting &#x60;lti1p1AllowTeachersCredentials&#x60;.
191
641
  # @param [Hash] opts the optional parameters
192
- # @return [Array<(Array<LtiCredentials>, Fixnum, Hash)>] Array<LtiCredentials> data, response status code and response headers
642
+ # @return [Array<(Array<LtiCredentials>, Integer, Hash)>] Array<LtiCredentials> data, response status code and response headers
193
643
  def list_lti_credentials_with_http_info(opts = {})
194
644
  if @api_client.config.debugging
195
- @api_client.config.logger.debug "Calling API: OrganizationApi.list_lti_credentials ..."
645
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.list_lti_credentials ...'
196
646
  end
197
647
  # resource path
198
- local_var_path = "/organizations/lti/credentials"
648
+ local_var_path = '/organizations/lti/credentials'
199
649
 
200
650
  # query parameters
201
- query_params = {}
651
+ query_params = opts[:query_params] || {}
202
652
 
203
653
  # header parameters
204
- header_params = {}
654
+ header_params = opts[:header_params] || {}
205
655
  # HTTP header 'Accept' (if needed)
206
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
- # HTTP header 'Content-Type'
208
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
656
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
209
657
 
210
658
  # form parameters
211
- form_params = {}
659
+ form_params = opts[:form_params] || {}
212
660
 
213
661
  # http body (model)
214
- post_body = nil
215
- auth_names = ['OAuth2']
216
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
662
+ post_body = opts[:debug_body]
663
+
664
+ # return_type
665
+ return_type = opts[:debug_return_type] || 'Array<LtiCredentials>'
666
+
667
+ # auth_names
668
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
669
+
670
+ new_options = opts.merge(
671
+ :operation => :"OrganizationApi.list_lti_credentials",
217
672
  :header_params => header_params,
218
673
  :query_params => query_params,
219
674
  :form_params => form_params,
220
675
  :body => post_body,
221
676
  :auth_names => auth_names,
222
- :return_type => 'Array<LtiCredentials>')
677
+ :return_type => return_type
678
+ )
679
+
680
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
223
681
  if @api_client.config.debugging
224
682
  @api_client.config.logger.debug "API called: OrganizationApi#list_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
683
  end
@@ -227,7 +685,6 @@ module FlatApi
227
685
  end
228
686
 
229
687
  # List the organization invitations
230
- #
231
688
  # @param [Hash] opts the optional parameters
232
689
  # @option opts [String] :role Filter users by role
233
690
  # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
@@ -236,23 +693,23 @@ module FlatApi
236
693
  # @return [Array<OrganizationInvitation>]
237
694
  def list_organization_invitations(opts = {})
238
695
  data, _status_code, _headers = list_organization_invitations_with_http_info(opts)
239
- return data
696
+ data
240
697
  end
241
698
 
242
699
  # List the organization invitations
243
- #
244
700
  # @param [Hash] opts the optional parameters
245
701
  # @option opts [String] :role Filter users by role
246
- # @option opts [Integer] :limit This is the maximum number of objects that may be returned
702
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
247
703
  # @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
248
704
  # @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
249
- # @return [Array<(Array<OrganizationInvitation>, Fixnum, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
705
+ # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
250
706
  def list_organization_invitations_with_http_info(opts = {})
251
707
  if @api_client.config.debugging
252
- @api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_invitations ..."
708
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.list_organization_invitations ...'
253
709
  end
254
- if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
255
- fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
710
+ allowable_values = ["user", "teacher", "admin"]
711
+ if @api_client.config.client_side_validation && opts[:'role'] && !allowable_values.include?(opts[:'role'])
712
+ fail ArgumentError, "invalid value for \"role\", must be one of #{allowable_values}"
256
713
  end
257
714
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
258
715
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_invitations, must be smaller than or equal to 1000.'
@@ -263,35 +720,43 @@ module FlatApi
263
720
  end
264
721
 
265
722
  # resource path
266
- local_var_path = "/organizations/invitations"
723
+ local_var_path = '/organizations/invitations'
267
724
 
268
725
  # query parameters
269
- query_params = {}
726
+ query_params = opts[:query_params] || {}
270
727
  query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
271
728
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
272
729
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
273
730
  query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
274
731
 
275
732
  # header parameters
276
- header_params = {}
733
+ header_params = opts[:header_params] || {}
277
734
  # HTTP header 'Accept' (if needed)
278
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
- # HTTP header 'Content-Type'
280
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
735
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
281
736
 
282
737
  # form parameters
283
- form_params = {}
738
+ form_params = opts[:form_params] || {}
284
739
 
285
740
  # http body (model)
286
- post_body = nil
287
- auth_names = ['OAuth2']
288
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
741
+ post_body = opts[:debug_body]
742
+
743
+ # return_type
744
+ return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'
745
+
746
+ # auth_names
747
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
748
+
749
+ new_options = opts.merge(
750
+ :operation => :"OrganizationApi.list_organization_invitations",
289
751
  :header_params => header_params,
290
752
  :query_params => query_params,
291
753
  :form_params => form_params,
292
754
  :body => post_body,
293
755
  :auth_names => auth_names,
294
- :return_type => 'Array<OrganizationInvitation>')
756
+ :return_type => return_type
757
+ )
758
+
759
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
295
760
  if @api_client.config.debugging
296
761
  @api_client.config.logger.debug "API called: OrganizationApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
297
762
  end
@@ -299,32 +764,59 @@ module FlatApi
299
764
  end
300
765
 
301
766
  # List the organization users
302
- #
303
767
  # @param [Hash] opts the optional parameters
304
- # @option opts [String] :role Filter users by role
305
- # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
768
+ # @option opts [String] :sort The order to sort the user list. * &#x60;creationDate&#x60;: Order by account creation. * &#x60;firstname&#x60;, &#x60;lastname&#x60;, &#x60;username&#x60;: Order by the user identity. * &#x60;lastActivityDate&#x60;: Order by the last recorded activity. * &#x60;licenseExpirationDate&#x60;: Order by the expiration of the active license.
769
+ # @option opts [String] :direction Sort direction
306
770
  # @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
307
771
  # @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
772
+ # @option opts [Array<String>] :role Filter users by role
773
+ # @option opts [String] :q The query to search
774
+ # @option opts [Array<String>] :group Filter users by group
775
+ # @option opts [Boolean] :no_active_license Filter users who don&#39;t have an active license
776
+ # @option opts [String] :test_accounts Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * &#x60;exclude&#x60;: Hide test accounts from results. * &#x60;only&#x60;: Show only test accounts. When omitted, all users are returned.
777
+ # @option opts [Array<String>] :license_expiration_date Filter users by license expiration date or &#x60;active&#x60; / &#x60;notActive&#x60;
778
+ # @option opts [Boolean] :only_ids Return only user ids
779
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
308
780
  # @return [Array<UserDetailsAdmin>]
309
781
  def list_organization_users(opts = {})
310
782
  data, _status_code, _headers = list_organization_users_with_http_info(opts)
311
- return data
783
+ data
312
784
  end
313
785
 
314
786
  # List the organization users
315
- #
316
787
  # @param [Hash] opts the optional parameters
317
- # @option opts [String] :role Filter users by role
318
- # @option opts [Integer] :limit This is the maximum number of objects that may be returned
788
+ # @option opts [String] :sort The order to sort the user list. * &#x60;creationDate&#x60;: Order by account creation. * &#x60;firstname&#x60;, &#x60;lastname&#x60;, &#x60;username&#x60;: Order by the user identity. * &#x60;lastActivityDate&#x60;: Order by the last recorded activity. * &#x60;licenseExpirationDate&#x60;: Order by the expiration of the active license.
789
+ # @option opts [String] :direction Sort direction
319
790
  # @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
320
791
  # @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
321
- # @return [Array<(Array<UserDetailsAdmin>, Fixnum, Hash)>] Array<UserDetailsAdmin> data, response status code and response headers
792
+ # @option opts [Array<String>] :role Filter users by role
793
+ # @option opts [String] :q The query to search
794
+ # @option opts [Array<String>] :group Filter users by group
795
+ # @option opts [Boolean] :no_active_license Filter users who don&#39;t have an active license
796
+ # @option opts [String] :test_accounts Filter users based on test account status. Test accounts are student accounts created for testing purposes by teachers. * &#x60;exclude&#x60;: Hide test accounts from results. * &#x60;only&#x60;: Show only test accounts. When omitted, all users are returned.
797
+ # @option opts [Array<String>] :license_expiration_date Filter users by license expiration date or &#x60;active&#x60; / &#x60;notActive&#x60;
798
+ # @option opts [Boolean] :only_ids Return only user ids
799
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
800
+ # @return [Array<(Array<UserDetailsAdmin>, Integer, Hash)>] Array<UserDetailsAdmin> data, response status code and response headers
322
801
  def list_organization_users_with_http_info(opts = {})
323
802
  if @api_client.config.debugging
324
- @api_client.config.logger.debug "Calling API: OrganizationApi.list_organization_users ..."
803
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.list_organization_users ...'
804
+ end
805
+ allowable_values = ["creationDate", "firstname", "lastname", "username", "lastActivityDate", "licenseExpirationDate"]
806
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
807
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
808
+ end
809
+ allowable_values = ["asc", "desc"]
810
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
811
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
812
+ end
813
+ allowable_values = ["user", "teacher", "admin", "accountAdmin"]
814
+ if @api_client.config.client_side_validation && opts[:'role'] && !opts[:'role'].all? { |item| allowable_values.include?(item) }
815
+ fail ArgumentError, "invalid value for \"role\", must include one of #{allowable_values}"
325
816
  end
326
- if @api_client.config.client_side_validation && opts[:'role'] && !['user', 'teacher', 'admin'].include?(opts[:'role'])
327
- fail ArgumentError, 'invalid value for "role", must be one of user, teacher, admin'
817
+ allowable_values = ["exclude", "only"]
818
+ if @api_client.config.client_side_validation && opts[:'test_accounts'] && !allowable_values.include?(opts[:'test_accounts'])
819
+ fail ArgumentError, "invalid value for \"test_accounts\", must be one of #{allowable_values}"
328
820
  end
329
821
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
330
822
  fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrganizationApi.list_organization_users, must be smaller than or equal to 1000.'
@@ -335,35 +827,51 @@ module FlatApi
335
827
  end
336
828
 
337
829
  # resource path
338
- local_var_path = "/organizations/users"
830
+ local_var_path = '/organizations/users'
339
831
 
340
832
  # query parameters
341
- query_params = {}
342
- query_params[:'role'] = opts[:'role'] if !opts[:'role'].nil?
343
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
833
+ query_params = opts[:query_params] || {}
834
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
835
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
344
836
  query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
345
837
  query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
838
+ query_params[:'role'] = @api_client.build_collection_param(opts[:'role'], :multi) if !opts[:'role'].nil?
839
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
840
+ query_params[:'group'] = @api_client.build_collection_param(opts[:'group'], :multi) if !opts[:'group'].nil?
841
+ query_params[:'noActiveLicense'] = opts[:'no_active_license'] if !opts[:'no_active_license'].nil?
842
+ query_params[:'testAccounts'] = opts[:'test_accounts'] if !opts[:'test_accounts'].nil?
843
+ query_params[:'licenseExpirationDate'] = @api_client.build_collection_param(opts[:'license_expiration_date'], :multi) if !opts[:'license_expiration_date'].nil?
844
+ query_params[:'onlyIds'] = opts[:'only_ids'] if !opts[:'only_ids'].nil?
845
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
346
846
 
347
847
  # header parameters
348
- header_params = {}
848
+ header_params = opts[:header_params] || {}
349
849
  # HTTP header 'Accept' (if needed)
350
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
351
- # HTTP header 'Content-Type'
352
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
850
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
353
851
 
354
852
  # form parameters
355
- form_params = {}
853
+ form_params = opts[:form_params] || {}
356
854
 
357
855
  # http body (model)
358
- post_body = nil
359
- auth_names = ['OAuth2']
360
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
856
+ post_body = opts[:debug_body]
857
+
858
+ # return_type
859
+ return_type = opts[:debug_return_type] || 'Array<UserDetailsAdmin>'
860
+
861
+ # auth_names
862
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
863
+
864
+ new_options = opts.merge(
865
+ :operation => :"OrganizationApi.list_organization_users",
361
866
  :header_params => header_params,
362
867
  :query_params => query_params,
363
868
  :form_params => form_params,
364
869
  :body => post_body,
365
870
  :auth_names => auth_names,
366
- :return_type => 'Array<UserDetailsAdmin>')
871
+ :return_type => return_type
872
+ )
873
+
874
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
367
875
  if @api_client.config.debugging
368
876
  @api_client.config.logger.debug "API called: OrganizationApi#list_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
369
877
  end
@@ -371,53 +879,60 @@ module FlatApi
371
879
  end
372
880
 
373
881
  # Remove an organization invitation
374
- #
375
- # @param invitation Unique identifier of the invitation
882
+ # @param invitation [String] Unique identifier of the invitation
376
883
  # @param [Hash] opts the optional parameters
377
884
  # @return [nil]
378
885
  def remove_organization_invitation(invitation, opts = {})
379
886
  remove_organization_invitation_with_http_info(invitation, opts)
380
- return nil
887
+ nil
381
888
  end
382
889
 
383
890
  # Remove an organization invitation
384
- #
385
- # @param invitation Unique identifier of the invitation
891
+ # @param invitation [String] Unique identifier of the invitation
386
892
  # @param [Hash] opts the optional parameters
387
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
893
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
388
894
  def remove_organization_invitation_with_http_info(invitation, opts = {})
389
895
  if @api_client.config.debugging
390
- @api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_invitation ..."
896
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.remove_organization_invitation ...'
391
897
  end
392
898
  # verify the required parameter 'invitation' is set
393
899
  if @api_client.config.client_side_validation && invitation.nil?
394
900
  fail ArgumentError, "Missing the required parameter 'invitation' when calling OrganizationApi.remove_organization_invitation"
395
901
  end
396
902
  # resource path
397
- local_var_path = "/organizations/invitations/{invitation}".sub('{' + 'invitation' + '}', invitation.to_s)
903
+ local_var_path = '/organizations/invitations/{invitation}'.sub('{invitation}', CGI.escape(invitation.to_s))
398
904
 
399
905
  # query parameters
400
- query_params = {}
906
+ query_params = opts[:query_params] || {}
401
907
 
402
908
  # header parameters
403
- header_params = {}
909
+ header_params = opts[:header_params] || {}
404
910
  # HTTP header 'Accept' (if needed)
405
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
406
- # HTTP header 'Content-Type'
407
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
911
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
408
912
 
409
913
  # form parameters
410
- form_params = {}
914
+ form_params = opts[:form_params] || {}
411
915
 
412
916
  # http body (model)
413
- post_body = nil
414
- auth_names = ['OAuth2']
415
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
917
+ post_body = opts[:debug_body]
918
+
919
+ # return_type
920
+ return_type = opts[:debug_return_type]
921
+
922
+ # auth_names
923
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
924
+
925
+ new_options = opts.merge(
926
+ :operation => :"OrganizationApi.remove_organization_invitation",
416
927
  :header_params => header_params,
417
928
  :query_params => query_params,
418
929
  :form_params => form_params,
419
930
  :body => post_body,
420
- :auth_names => auth_names)
931
+ :auth_names => auth_names,
932
+ :return_type => return_type
933
+ )
934
+
935
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
421
936
  if @api_client.config.debugging
422
937
  @api_client.config.logger.debug "API called: OrganizationApi#remove_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
938
  end
@@ -426,55 +941,64 @@ module FlatApi
426
941
 
427
942
  # Remove an account from Flat
428
943
  # This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information)
429
- # @param user Unique identifier of the Flat account
944
+ # @param user [String] Unique identifier of the Flat account
430
945
  # @param [Hash] opts the optional parameters
431
- # @option opts [BOOLEAN] :convert_to_individual If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal.
946
+ # @option opts [Boolean] :convert_to_individual If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal.
432
947
  # @return [nil]
433
948
  def remove_organization_user(user, opts = {})
434
949
  remove_organization_user_with_http_info(user, opts)
435
- return nil
950
+ nil
436
951
  end
437
952
 
438
953
  # Remove an account from Flat
439
954
  # This operation removes an account from Flat and its data, including: * The music scores created by this user (documents, history, comments, collaboration information) * Education related data (assignments and classroom information)
440
- # @param user Unique identifier of the Flat account
955
+ # @param user [String] Unique identifier of the Flat account
441
956
  # @param [Hash] opts the optional parameters
442
- # @option opts [BOOLEAN] :convert_to_individual If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal.
443
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
957
+ # @option opts [Boolean] :convert_to_individual If &#x60;true&#x60;, the account will be only removed from the organization and converted into an individual account on our public website, https://flat.io. This operation will remove the education-related data from the account. Before realizing this operation, you need to be sure that the user is at least 13 years old and that this one has read and agreed to the Individual Terms of Services of Flat available on https://flat.io/legal.
958
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
444
959
  def remove_organization_user_with_http_info(user, opts = {})
445
960
  if @api_client.config.debugging
446
- @api_client.config.logger.debug "Calling API: OrganizationApi.remove_organization_user ..."
961
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.remove_organization_user ...'
447
962
  end
448
963
  # verify the required parameter 'user' is set
449
964
  if @api_client.config.client_side_validation && user.nil?
450
965
  fail ArgumentError, "Missing the required parameter 'user' when calling OrganizationApi.remove_organization_user"
451
966
  end
452
967
  # resource path
453
- local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)
968
+ local_var_path = '/organizations/users/{user}'.sub('{user}', CGI.escape(user.to_s))
454
969
 
455
970
  # query parameters
456
- query_params = {}
971
+ query_params = opts[:query_params] || {}
457
972
  query_params[:'convertToIndividual'] = opts[:'convert_to_individual'] if !opts[:'convert_to_individual'].nil?
458
973
 
459
974
  # header parameters
460
- header_params = {}
975
+ header_params = opts[:header_params] || {}
461
976
  # HTTP header 'Accept' (if needed)
462
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
463
- # HTTP header 'Content-Type'
464
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
977
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
465
978
 
466
979
  # form parameters
467
- form_params = {}
980
+ form_params = opts[:form_params] || {}
468
981
 
469
982
  # http body (model)
470
- post_body = nil
471
- auth_names = ['OAuth2']
472
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
983
+ post_body = opts[:debug_body]
984
+
985
+ # return_type
986
+ return_type = opts[:debug_return_type]
987
+
988
+ # auth_names
989
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
990
+
991
+ new_options = opts.merge(
992
+ :operation => :"OrganizationApi.remove_organization_user",
473
993
  :header_params => header_params,
474
994
  :query_params => query_params,
475
995
  :form_params => form_params,
476
996
  :body => post_body,
477
- :auth_names => auth_names)
997
+ :auth_names => auth_names,
998
+ :return_type => return_type
999
+ )
1000
+
1001
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
478
1002
  if @api_client.config.debugging
479
1003
  @api_client.config.logger.debug "API called: OrganizationApi#remove_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
1004
  end
@@ -482,79 +1006,158 @@ module FlatApi
482
1006
  end
483
1007
 
484
1008
  # Revoke LTI 1.x credentials
485
- #
486
- # @param credentials Credentials unique identifier
1009
+ # DEPRECATED. Use the unified endpoints under `/organizations/lti/configurations`. Note: Teachers may be restricted by the organization privacy setting `lti1p1AllowTeachersCredentials`.
1010
+ # @param credentials [String] Credentials unique identifier
487
1011
  # @param [Hash] opts the optional parameters
488
1012
  # @return [nil]
489
1013
  def revoke_lti_credentials(credentials, opts = {})
490
1014
  revoke_lti_credentials_with_http_info(credentials, opts)
491
- return nil
1015
+ nil
492
1016
  end
493
1017
 
494
1018
  # Revoke LTI 1.x credentials
495
- #
496
- # @param credentials Credentials unique identifier
1019
+ # DEPRECATED. Use the unified endpoints under &#x60;/organizations/lti/configurations&#x60;. Note: Teachers may be restricted by the organization privacy setting &#x60;lti1p1AllowTeachersCredentials&#x60;.
1020
+ # @param credentials [String] Credentials unique identifier
497
1021
  # @param [Hash] opts the optional parameters
498
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1022
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
499
1023
  def revoke_lti_credentials_with_http_info(credentials, opts = {})
500
1024
  if @api_client.config.debugging
501
- @api_client.config.logger.debug "Calling API: OrganizationApi.revoke_lti_credentials ..."
1025
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.revoke_lti_credentials ...'
502
1026
  end
503
1027
  # verify the required parameter 'credentials' is set
504
1028
  if @api_client.config.client_side_validation && credentials.nil?
505
1029
  fail ArgumentError, "Missing the required parameter 'credentials' when calling OrganizationApi.revoke_lti_credentials"
506
1030
  end
507
1031
  # resource path
508
- local_var_path = "/organizations/lti/credentials/{credentials}".sub('{' + 'credentials' + '}', credentials.to_s)
1032
+ local_var_path = '/organizations/lti/credentials/{credentials}'.sub('{credentials}', CGI.escape(credentials.to_s))
509
1033
 
510
1034
  # query parameters
511
- query_params = {}
1035
+ query_params = opts[:query_params] || {}
512
1036
 
513
1037
  # header parameters
514
- header_params = {}
1038
+ header_params = opts[:header_params] || {}
515
1039
  # HTTP header 'Accept' (if needed)
516
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
517
- # HTTP header 'Content-Type'
518
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1040
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
519
1041
 
520
1042
  # form parameters
521
- form_params = {}
1043
+ form_params = opts[:form_params] || {}
522
1044
 
523
1045
  # http body (model)
524
- post_body = nil
525
- auth_names = ['OAuth2']
526
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1046
+ post_body = opts[:debug_body]
1047
+
1048
+ # return_type
1049
+ return_type = opts[:debug_return_type]
1050
+
1051
+ # auth_names
1052
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1053
+
1054
+ new_options = opts.merge(
1055
+ :operation => :"OrganizationApi.revoke_lti_credentials",
527
1056
  :header_params => header_params,
528
1057
  :query_params => query_params,
529
1058
  :form_params => form_params,
530
1059
  :body => post_body,
531
- :auth_names => auth_names)
1060
+ :auth_names => auth_names,
1061
+ :return_type => return_type
1062
+ )
1063
+
1064
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
532
1065
  if @api_client.config.debugging
533
1066
  @api_client.config.logger.debug "API called: OrganizationApi#revoke_lti_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
534
1067
  end
535
1068
  return data, status_code, headers
536
1069
  end
537
1070
 
1071
+ # Update an existing LTI configuration (edit 1.3; 1.1 not editable)
1072
+ # @param configuration [String] Configuration unique identifier
1073
+ # @param lti_configuration_update [LtiConfigurationUpdate]
1074
+ # @param [Hash] opts the optional parameters
1075
+ # @return [LtiConfiguration]
1076
+ def update_lti_configuration(configuration, lti_configuration_update, opts = {})
1077
+ data, _status_code, _headers = update_lti_configuration_with_http_info(configuration, lti_configuration_update, opts)
1078
+ data
1079
+ end
1080
+
1081
+ # Update an existing LTI configuration (edit 1.3; 1.1 not editable)
1082
+ # @param configuration [String] Configuration unique identifier
1083
+ # @param lti_configuration_update [LtiConfigurationUpdate]
1084
+ # @param [Hash] opts the optional parameters
1085
+ # @return [Array<(LtiConfiguration, Integer, Hash)>] LtiConfiguration data, response status code and response headers
1086
+ def update_lti_configuration_with_http_info(configuration, lti_configuration_update, opts = {})
1087
+ if @api_client.config.debugging
1088
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.update_lti_configuration ...'
1089
+ end
1090
+ # verify the required parameter 'configuration' is set
1091
+ if @api_client.config.client_side_validation && configuration.nil?
1092
+ fail ArgumentError, "Missing the required parameter 'configuration' when calling OrganizationApi.update_lti_configuration"
1093
+ end
1094
+ # verify the required parameter 'lti_configuration_update' is set
1095
+ if @api_client.config.client_side_validation && lti_configuration_update.nil?
1096
+ fail ArgumentError, "Missing the required parameter 'lti_configuration_update' when calling OrganizationApi.update_lti_configuration"
1097
+ end
1098
+ # resource path
1099
+ local_var_path = '/organizations/lti/configurations/{configuration}'.sub('{configuration}', CGI.escape(configuration.to_s))
1100
+
1101
+ # query parameters
1102
+ query_params = opts[:query_params] || {}
1103
+
1104
+ # header parameters
1105
+ header_params = opts[:header_params] || {}
1106
+ # HTTP header 'Accept' (if needed)
1107
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1108
+ # HTTP header 'Content-Type'
1109
+ content_type = @api_client.select_header_content_type(['application/json'])
1110
+ if !content_type.nil?
1111
+ header_params['Content-Type'] = content_type
1112
+ end
1113
+
1114
+ # form parameters
1115
+ form_params = opts[:form_params] || {}
1116
+
1117
+ # http body (model)
1118
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(lti_configuration_update)
1119
+
1120
+ # return_type
1121
+ return_type = opts[:debug_return_type] || 'LtiConfiguration'
1122
+
1123
+ # auth_names
1124
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1125
+
1126
+ new_options = opts.merge(
1127
+ :operation => :"OrganizationApi.update_lti_configuration",
1128
+ :header_params => header_params,
1129
+ :query_params => query_params,
1130
+ :form_params => form_params,
1131
+ :body => post_body,
1132
+ :auth_names => auth_names,
1133
+ :return_type => return_type
1134
+ )
1135
+
1136
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1137
+ if @api_client.config.debugging
1138
+ @api_client.config.logger.debug "API called: OrganizationApi#update_lti_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1139
+ end
1140
+ return data, status_code, headers
1141
+ end
1142
+
538
1143
  # Update account information
539
- #
540
- # @param user Unique identifier of the Flat account
541
- # @param body
1144
+ # @param user [String] Unique identifier of the Flat account
1145
+ # @param body [UserAdminUpdate]
542
1146
  # @param [Hash] opts the optional parameters
543
1147
  # @return [UserDetailsAdmin]
544
1148
  def update_organization_user(user, body, opts = {})
545
1149
  data, _status_code, _headers = update_organization_user_with_http_info(user, body, opts)
546
- return data
1150
+ data
547
1151
  end
548
1152
 
549
1153
  # Update account information
550
- #
551
- # @param user Unique identifier of the Flat account
552
- # @param body
1154
+ # @param user [String] Unique identifier of the Flat account
1155
+ # @param body [UserAdminUpdate]
553
1156
  # @param [Hash] opts the optional parameters
554
- # @return [Array<(UserDetailsAdmin, Fixnum, Hash)>] UserDetailsAdmin data, response status code and response headers
1157
+ # @return [Array<(UserDetailsAdmin, Integer, Hash)>] UserDetailsAdmin data, response status code and response headers
555
1158
  def update_organization_user_with_http_info(user, body, opts = {})
556
1159
  if @api_client.config.debugging
557
- @api_client.config.logger.debug "Calling API: OrganizationApi.update_organization_user ..."
1160
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.update_organization_user ...'
558
1161
  end
559
1162
  # verify the required parameter 'user' is set
560
1163
  if @api_client.config.client_side_validation && user.nil?
@@ -565,31 +1168,44 @@ module FlatApi
565
1168
  fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationApi.update_organization_user"
566
1169
  end
567
1170
  # resource path
568
- local_var_path = "/organizations/users/{user}".sub('{' + 'user' + '}', user.to_s)
1171
+ local_var_path = '/organizations/users/{user}'.sub('{user}', CGI.escape(user.to_s))
569
1172
 
570
1173
  # query parameters
571
- query_params = {}
1174
+ query_params = opts[:query_params] || {}
572
1175
 
573
1176
  # header parameters
574
- header_params = {}
1177
+ header_params = opts[:header_params] || {}
575
1178
  # HTTP header 'Accept' (if needed)
576
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
577
1180
  # HTTP header 'Content-Type'
578
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1181
+ content_type = @api_client.select_header_content_type(['application/json'])
1182
+ if !content_type.nil?
1183
+ header_params['Content-Type'] = content_type
1184
+ end
579
1185
 
580
1186
  # form parameters
581
- form_params = {}
1187
+ form_params = opts[:form_params] || {}
582
1188
 
583
1189
  # http body (model)
584
- post_body = @api_client.object_to_http_body(body)
585
- auth_names = ['OAuth2']
586
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1190
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1191
+
1192
+ # return_type
1193
+ return_type = opts[:debug_return_type] || 'UserDetailsAdmin'
1194
+
1195
+ # auth_names
1196
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1197
+
1198
+ new_options = opts.merge(
1199
+ :operation => :"OrganizationApi.update_organization_user",
587
1200
  :header_params => header_params,
588
1201
  :query_params => query_params,
589
1202
  :form_params => form_params,
590
1203
  :body => post_body,
591
1204
  :auth_names => auth_names,
592
- :return_type => 'UserDetailsAdmin')
1205
+ :return_type => return_type
1206
+ )
1207
+
1208
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
593
1209
  if @api_client.config.debugging
594
1210
  @api_client.config.logger.debug "API called: OrganizationApi#update_organization_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
595
1211
  end