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
@@ -0,0 +1,894 @@
1
+ =begin
2
+ #Flat API
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, 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
+
6
+ The version of the OpenAPI document: 2.26.1
7
+ Contact: developers@flat.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module FlatApi
16
+ class OMRApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add a file to an OMR job
23
+ # Add one image or PDF to a draft job. Call once per file; files keep their upload order.
24
+ # @param job [String] Unique identifier of the OMR job
25
+ # @param omr_job_file_upload [OmrJobFileUpload]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
28
+ # @return [OmrJobFileUploadResult]
29
+ def add_omr_job_file(job, omr_job_file_upload, opts = {})
30
+ data, _status_code, _headers = add_omr_job_file_with_http_info(job, omr_job_file_upload, opts)
31
+ data
32
+ end
33
+
34
+ # Add a file to an OMR job
35
+ # Add one image or PDF to a draft job. Call once per file; files keep their upload order.
36
+ # @param job [String] Unique identifier of the OMR job
37
+ # @param omr_job_file_upload [OmrJobFileUpload]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to `en`). Supported normalized locales: `da`, `de`, `en`, `en-GB`, `es`, `fi`, `fil`, `fr`, `fr-CA`, `hi`, `id`, `it`, `ja`, `ko`, `ms`, `nl`, `nb`, `pl`, `pt`, `pt-BR`, `ro`, `ru`, `sv`, `tr`, `zh-Hans`, `zh-HK`, `zh-TW`. Precedence (highest first): this `X-Flat-Locale` header, the authenticated user's account locale, the `Accept-Language` header, then `en`.
40
+ # @return [Array<(OmrJobFileUploadResult, Integer, Hash)>] OmrJobFileUploadResult data, response status code and response headers
41
+ def add_omr_job_file_with_http_info(job, omr_job_file_upload, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: OMRApi.add_omr_job_file ...'
44
+ end
45
+ # verify the required parameter 'job' is set
46
+ if @api_client.config.client_side_validation && job.nil?
47
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.add_omr_job_file"
48
+ end
49
+ # verify the required parameter 'omr_job_file_upload' is set
50
+ if @api_client.config.client_side_validation && omr_job_file_upload.nil?
51
+ fail ArgumentError, "Missing the required parameter 'omr_job_file_upload' when calling OMRApi.add_omr_job_file"
52
+ end
53
+ # resource path
54
+ local_var_path = '/omr/jobs/{job}/files'.sub('{job}', CGI.escape(job.to_s))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/json'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(omr_job_file_upload)
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'OmrJobFileUploadResult'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"OMRApi.add_omr_job_file",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: OMRApi#add_omr_job_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Cancel an OMR job
100
+ # Cancel a draft or in-flight job. Any charged credits are reversed.
101
+ # @param job [String] Unique identifier of the OMR job
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
104
+ # @return [OmrJob]
105
+ def cancel_omr_job(job, opts = {})
106
+ data, _status_code, _headers = cancel_omr_job_with_http_info(job, opts)
107
+ data
108
+ end
109
+
110
+ # Cancel an OMR job
111
+ # Cancel a draft or in-flight job. Any charged credits are reversed.
112
+ # @param job [String] Unique identifier of the OMR job
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
115
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
116
+ def cancel_omr_job_with_http_info(job, opts = {})
117
+ if @api_client.config.debugging
118
+ @api_client.config.logger.debug 'Calling API: OMRApi.cancel_omr_job ...'
119
+ end
120
+ # verify the required parameter 'job' is set
121
+ if @api_client.config.client_side_validation && job.nil?
122
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.cancel_omr_job"
123
+ end
124
+ # resource path
125
+ local_var_path = '/omr/jobs/{job}/cancel'.sub('{job}', CGI.escape(job.to_s))
126
+
127
+ # query parameters
128
+ query_params = opts[:query_params] || {}
129
+
130
+ # header parameters
131
+ header_params = opts[:header_params] || {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
134
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
135
+
136
+ # form parameters
137
+ form_params = opts[:form_params] || {}
138
+
139
+ # http body (model)
140
+ post_body = opts[:debug_body]
141
+
142
+ # return_type
143
+ return_type = opts[:debug_return_type] || 'OmrJob'
144
+
145
+ # auth_names
146
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
147
+
148
+ new_options = opts.merge(
149
+ :operation => :"OMRApi.cancel_omr_job",
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: OMRApi#cancel_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+
165
+ # Create an OMR job
166
+ # Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without `files` to create an empty job, then add files with `addOmrJobFile`, then run it with `startOmrJob`. Best for multiple images or incremental mobile capture. * **One-shot:** include `files` and `autoStart: true` to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in `interactiveSteps`: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break.
167
+ # @param omr_job_creation [OmrJobCreation]
168
+ # @param [Hash] opts the optional parameters
169
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
170
+ # @return [OmrJob]
171
+ def create_omr_job(omr_job_creation, opts = {})
172
+ data, _status_code, _headers = create_omr_job_with_http_info(omr_job_creation, opts)
173
+ data
174
+ end
175
+
176
+ # Create an OMR job
177
+ # Create an Optical Music Recognition job. There are two ways to call this endpoint: * **Draft:** send the parameters without &#x60;files&#x60; to create an empty job, then add files with &#x60;addOmrJobFile&#x60;, then run it with &#x60;startOmrJob&#x60;. Best for multiple images or incremental mobile capture. * **One-shot:** include &#x60;files&#x60; and &#x60;autoStart: true&#x60; to import in a single request. Best for a single PDF or a third-party integration. Declare the interactive steps your client supports in &#x60;interactiveSteps&#x60;: the pipeline runs fully automatically and only pauses at the steps you list. Steps you do not list, including ones added in the future, are auto-resolved with server defaults, so older clients never break.
178
+ # @param omr_job_creation [OmrJobCreation]
179
+ # @param [Hash] opts the optional parameters
180
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
181
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
182
+ def create_omr_job_with_http_info(omr_job_creation, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug 'Calling API: OMRApi.create_omr_job ...'
185
+ end
186
+ # verify the required parameter 'omr_job_creation' is set
187
+ if @api_client.config.client_side_validation && omr_job_creation.nil?
188
+ fail ArgumentError, "Missing the required parameter 'omr_job_creation' when calling OMRApi.create_omr_job"
189
+ end
190
+ # resource path
191
+ local_var_path = '/omr/jobs'
192
+
193
+ # query parameters
194
+ query_params = opts[:query_params] || {}
195
+
196
+ # header parameters
197
+ header_params = opts[:header_params] || {}
198
+ # HTTP header 'Accept' (if needed)
199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
200
+ # HTTP header 'Content-Type'
201
+ content_type = @api_client.select_header_content_type(['application/json'])
202
+ if !content_type.nil?
203
+ header_params['Content-Type'] = content_type
204
+ end
205
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
206
+
207
+ # form parameters
208
+ form_params = opts[:form_params] || {}
209
+
210
+ # http body (model)
211
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(omr_job_creation)
212
+
213
+ # return_type
214
+ return_type = opts[:debug_return_type] || 'OmrJob'
215
+
216
+ # auth_names
217
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
218
+
219
+ new_options = opts.merge(
220
+ :operation => :"OMRApi.create_omr_job",
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => return_type
227
+ )
228
+
229
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "API called: OMRApi#create_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
232
+ end
233
+ return data, status_code, headers
234
+ end
235
+
236
+ # Delete an OMR job's data
237
+ # Erase a job's uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the `status` it finished with, stays listable, and reports `retention.expiredDate`. Downloads then fail with `OMR_JOB_EXPIRED`. Only available for jobs whose `output` is `musicxml`. Library imports are not covered by the retention policy and are rejected with `OMR_JOB_NOT_EXPIRABLE`; delete the resulting score instead. The job must have finished (`done`, `error` or `canceled`). A draft or in-flight job is rejected with `OMR_JOB_IN_PROGRESS`: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing.
238
+ # @param job [String] Unique identifier of the OMR job
239
+ # @param [Hash] opts the optional parameters
240
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
241
+ # @return [OmrJob]
242
+ def delete_omr_job(job, opts = {})
243
+ data, _status_code, _headers = delete_omr_job_with_http_info(job, opts)
244
+ data
245
+ end
246
+
247
+ # Delete an OMR job&#39;s data
248
+ # Erase a job&#39;s uploaded files and recognition results now, instead of waiting for its retention deadline. Use this to serve a deletion request from your own end user. Reaches the same end state as the scheduled cleanup: the files are gone, the job keeps the &#x60;status&#x60; it finished with, stays listable, and reports &#x60;retention.expiredDate&#x60;. Downloads then fail with &#x60;OMR_JOB_EXPIRED&#x60;. Only available for jobs whose &#x60;output&#x60; is &#x60;musicxml&#x60;. Library imports are not covered by the retention policy and are rejected with &#x60;OMR_JOB_NOT_EXPIRABLE&#x60;; delete the resulting score instead. The job must have finished (&#x60;done&#x60;, &#x60;error&#x60; or &#x60;canceled&#x60;). A draft or in-flight job is rejected with &#x60;OMR_JOB_IN_PROGRESS&#x60;: cancel it first, then delete. Deleting never cancels on your behalf, because cancellation reverses charged credits and that must not happen as a side effect of erasing data. Calling this again on an already-erased job succeeds and changes nothing.
249
+ # @param job [String] Unique identifier of the OMR job
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
252
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
253
+ def delete_omr_job_with_http_info(job, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: OMRApi.delete_omr_job ...'
256
+ end
257
+ # verify the required parameter 'job' is set
258
+ if @api_client.config.client_side_validation && job.nil?
259
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.delete_omr_job"
260
+ end
261
+ # resource path
262
+ local_var_path = '/omr/jobs/{job}'.sub('{job}', CGI.escape(job.to_s))
263
+
264
+ # query parameters
265
+ query_params = opts[:query_params] || {}
266
+
267
+ # header parameters
268
+ header_params = opts[:header_params] || {}
269
+ # HTTP header 'Accept' (if needed)
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
271
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
272
+
273
+ # form parameters
274
+ form_params = opts[:form_params] || {}
275
+
276
+ # http body (model)
277
+ post_body = opts[:debug_body]
278
+
279
+ # return_type
280
+ return_type = opts[:debug_return_type] || 'OmrJob'
281
+
282
+ # auth_names
283
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
284
+
285
+ new_options = opts.merge(
286
+ :operation => :"OMRApi.delete_omr_job",
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names,
292
+ :return_type => return_type
293
+ )
294
+
295
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "API called: OMRApi#delete_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
298
+ end
299
+ return data, status_code, headers
300
+ end
301
+
302
+ # OMR capabilities and limits
303
+ # Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and `remainingCredits` is omitted.
304
+ # @param [Hash] opts the optional parameters
305
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
306
+ # @return [OmrCapabilities]
307
+ def get_omr_capabilities(opts = {})
308
+ data, _status_code, _headers = get_omr_capabilities_with_http_info(opts)
309
+ data
310
+ end
311
+
312
+ # OMR capabilities and limits
313
+ # Advertises the supported steps, export formats, limits, cost-per-page, remaining credits and locales, so clients can feature-detect instead of hardcoding behavior. Authentication is optional: called without an account, the limits are those of the free plan and &#x60;remainingCredits&#x60; is omitted.
314
+ # @param [Hash] opts the optional parameters
315
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
316
+ # @return [Array<(OmrCapabilities, Integer, Hash)>] OmrCapabilities data, response status code and response headers
317
+ def get_omr_capabilities_with_http_info(opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: OMRApi.get_omr_capabilities ...'
320
+ end
321
+ # resource path
322
+ local_var_path = '/omr/capabilities'
323
+
324
+ # query parameters
325
+ query_params = opts[:query_params] || {}
326
+
327
+ # header parameters
328
+ header_params = opts[:header_params] || {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
331
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body]
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type] || 'OmrCapabilities'
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"OMRApi.get_omr_capabilities",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: OMRApi#get_omr_capabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
362
+ # Get an OMR job
363
+ # Get the current state of an OMR job. This is the primary polling endpoint. Pass `wait` to long-poll until the state changes.
364
+ # @param job [String] Unique identifier of the OMR job
365
+ # @param [Hash] opts the optional parameters
366
+ # @option opts [Integer] :wait Long-poll up to this many seconds for a state change before returning.
367
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
368
+ # @return [OmrJob]
369
+ def get_omr_job(job, opts = {})
370
+ data, _status_code, _headers = get_omr_job_with_http_info(job, opts)
371
+ data
372
+ end
373
+
374
+ # Get an OMR job
375
+ # Get the current state of an OMR job. This is the primary polling endpoint. Pass &#x60;wait&#x60; to long-poll until the state changes.
376
+ # @param job [String] Unique identifier of the OMR job
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [Integer] :wait Long-poll up to this many seconds for a state change before returning.
379
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
380
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
381
+ def get_omr_job_with_http_info(job, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job ...'
384
+ end
385
+ # verify the required parameter 'job' is set
386
+ if @api_client.config.client_side_validation && job.nil?
387
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job"
388
+ end
389
+ if @api_client.config.client_side_validation && !opts[:'wait'].nil? && opts[:'wait'] > 25
390
+ fail ArgumentError, 'invalid value for "opts[:"wait"]" when calling OMRApi.get_omr_job, must be smaller than or equal to 25.'
391
+ end
392
+
393
+ if @api_client.config.client_side_validation && !opts[:'wait'].nil? && opts[:'wait'] < 0
394
+ fail ArgumentError, 'invalid value for "opts[:"wait"]" when calling OMRApi.get_omr_job, must be greater than or equal to 0.'
395
+ end
396
+
397
+ # resource path
398
+ local_var_path = '/omr/jobs/{job}'.sub('{job}', CGI.escape(job.to_s))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+ query_params[:'wait'] = opts[:'wait'] if !opts[:'wait'].nil?
403
+
404
+ # header parameters
405
+ header_params = opts[:header_params] || {}
406
+ # HTTP header 'Accept' (if needed)
407
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
408
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
409
+
410
+ # form parameters
411
+ form_params = opts[:form_params] || {}
412
+
413
+ # http body (model)
414
+ post_body = opts[:debug_body]
415
+
416
+ # return_type
417
+ return_type = opts[:debug_return_type] || 'OmrJob'
418
+
419
+ # auth_names
420
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
421
+
422
+ new_options = opts.merge(
423
+ :operation => :"OMRApi.get_omr_job",
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => return_type
430
+ )
431
+
432
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug "API called: OMRApi#get_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
435
+ end
436
+ return data, status_code, headers
437
+ end
438
+
439
+ # Download the finalized result
440
+ # Stream the finalized result in the requested format. Available once the job is `done`. For `output: musicxml` jobs this is the primary way to retrieve the result; no library score is created.
441
+ # @param job [String] Unique identifier of the OMR job
442
+ # @param format [String] Export format. New formats may be added over time; request what your client supports. * &#x60;musicxml&#x60;: Uncompressed MusicXML (plain text &#x60;.xml&#x60;, &#x60;application/vnd.recordare.musicxml+xml&#x60;). * &#x60;mxl&#x60;: Compressed MusicXML (zip archive &#x60;.mxl&#x60;, &#x60;application/vnd.recordare.musicxml&#x60;), the same notation as &#x60;musicxml&#x60; but smaller to download. * &#x60;midi&#x60;: Standard MIDI file (&#x60;.mid&#x60;, &#x60;audio/midi&#x60;). * &#x60;thumbnail.png&#x60;: PNG preview of the first page (&#x60;image/png&#x60;).
443
+ # @param [Hash] opts the optional parameters
444
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
445
+ # @return [File]
446
+ def get_omr_job_export(job, format, opts = {})
447
+ data, _status_code, _headers = get_omr_job_export_with_http_info(job, format, opts)
448
+ data
449
+ end
450
+
451
+ # Download the finalized result
452
+ # Stream the finalized result in the requested format. Available once the job is &#x60;done&#x60;. For &#x60;output: musicxml&#x60; jobs this is the primary way to retrieve the result; no library score is created.
453
+ # @param job [String] Unique identifier of the OMR job
454
+ # @param format [String] Export format. New formats may be added over time; request what your client supports. * &#x60;musicxml&#x60;: Uncompressed MusicXML (plain text &#x60;.xml&#x60;, &#x60;application/vnd.recordare.musicxml+xml&#x60;). * &#x60;mxl&#x60;: Compressed MusicXML (zip archive &#x60;.mxl&#x60;, &#x60;application/vnd.recordare.musicxml&#x60;), the same notation as &#x60;musicxml&#x60; but smaller to download. * &#x60;midi&#x60;: Standard MIDI file (&#x60;.mid&#x60;, &#x60;audio/midi&#x60;). * &#x60;thumbnail.png&#x60;: PNG preview of the first page (&#x60;image/png&#x60;).
455
+ # @param [Hash] opts the optional parameters
456
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
457
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
458
+ def get_omr_job_export_with_http_info(job, format, opts = {})
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job_export ...'
461
+ end
462
+ # verify the required parameter 'job' is set
463
+ if @api_client.config.client_side_validation && job.nil?
464
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job_export"
465
+ end
466
+ # verify the required parameter 'format' is set
467
+ if @api_client.config.client_side_validation && format.nil?
468
+ fail ArgumentError, "Missing the required parameter 'format' when calling OMRApi.get_omr_job_export"
469
+ end
470
+ # verify enum value
471
+ allowable_values = ["musicxml", "mxl", "midi", "thumbnail.png"]
472
+ if @api_client.config.client_side_validation && !allowable_values.include?(format)
473
+ fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
474
+ end
475
+ # resource path
476
+ local_var_path = '/omr/jobs/{job}/exports/{format}'.sub('{job}', CGI.escape(job.to_s)).sub('{format}', CGI.escape(format.to_s))
477
+
478
+ # query parameters
479
+ query_params = opts[:query_params] || {}
480
+
481
+ # header parameters
482
+ header_params = opts[:header_params] || {}
483
+ # HTTP header 'Accept' (if needed)
484
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
485
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
486
+
487
+ # form parameters
488
+ form_params = opts[:form_params] || {}
489
+
490
+ # http body (model)
491
+ post_body = opts[:debug_body]
492
+
493
+ # return_type
494
+ return_type = opts[:debug_return_type] || 'File'
495
+
496
+ # auth_names
497
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
498
+
499
+ new_options = opts.merge(
500
+ :operation => :"OMRApi.get_omr_job_export",
501
+ :header_params => header_params,
502
+ :query_params => query_params,
503
+ :form_params => form_params,
504
+ :body => post_body,
505
+ :auth_names => auth_names,
506
+ :return_type => return_type
507
+ )
508
+
509
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug "API called: OMRApi#get_omr_job_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
512
+ end
513
+ return data, status_code, headers
514
+ end
515
+
516
+ # Get an input page image
517
+ # Fetch one of the job's input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 `OMR_JOB_EXPIRED`. Read `retention.expiredDate` on the job to tell that case apart before requesting a file.
518
+ # @param job [String] Unique identifier of the OMR job
519
+ # @param index [Integer] 0-based index of the input file (page) to fetch.
520
+ # @param [Hash] opts the optional parameters
521
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
522
+ # @return [File]
523
+ def get_omr_job_file(job, index, opts = {})
524
+ data, _status_code, _headers = get_omr_job_file_with_http_info(job, index, opts)
525
+ data
526
+ end
527
+
528
+ # Get an input page image
529
+ # Fetch one of the job&#39;s input files (a page image or PDF) by index, for the review UI. Once data retention has erased the job, this returns 409 &#x60;OMR_JOB_EXPIRED&#x60;. Read &#x60;retention.expiredDate&#x60; on the job to tell that case apart before requesting a file.
530
+ # @param job [String] Unique identifier of the OMR job
531
+ # @param index [Integer] 0-based index of the input file (page) to fetch.
532
+ # @param [Hash] opts the optional parameters
533
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
534
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
535
+ def get_omr_job_file_with_http_info(job, index, opts = {})
536
+ if @api_client.config.debugging
537
+ @api_client.config.logger.debug 'Calling API: OMRApi.get_omr_job_file ...'
538
+ end
539
+ # verify the required parameter 'job' is set
540
+ if @api_client.config.client_side_validation && job.nil?
541
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.get_omr_job_file"
542
+ end
543
+ # verify the required parameter 'index' is set
544
+ if @api_client.config.client_side_validation && index.nil?
545
+ fail ArgumentError, "Missing the required parameter 'index' when calling OMRApi.get_omr_job_file"
546
+ end
547
+ # resource path
548
+ local_var_path = '/omr/jobs/{job}/files/{index}'.sub('{job}', CGI.escape(job.to_s)).sub('{index}', CGI.escape(index.to_s))
549
+
550
+ # query parameters
551
+ query_params = opts[:query_params] || {}
552
+
553
+ # header parameters
554
+ header_params = opts[:header_params] || {}
555
+ # HTTP header 'Accept' (if needed)
556
+ header_params['Accept'] = @api_client.select_header_accept(['image/jpeg', 'application/json']) unless header_params['Accept']
557
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
558
+
559
+ # form parameters
560
+ form_params = opts[:form_params] || {}
561
+
562
+ # http body (model)
563
+ post_body = opts[:debug_body]
564
+
565
+ # return_type
566
+ return_type = opts[:debug_return_type] || 'File'
567
+
568
+ # auth_names
569
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
570
+
571
+ new_options = opts.merge(
572
+ :operation => :"OMRApi.get_omr_job_file",
573
+ :header_params => header_params,
574
+ :query_params => query_params,
575
+ :form_params => form_params,
576
+ :body => post_body,
577
+ :auth_names => auth_names,
578
+ :return_type => return_type
579
+ )
580
+
581
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug "API called: OMRApi#get_omr_job_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ end
585
+ return data, status_code, headers
586
+ end
587
+
588
+ # List credit history
589
+ # The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one's `state` to `canceled`. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read `state` to tell the two apart, and sum only `active` entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan's allowance has since reset. The current balance is not computed from this list: read it from `getOmrCapabilities`.
590
+ # @param [Hash] opts the optional parameters
591
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
592
+ # @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.
593
+ # @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.
594
+ # @return [Array<CreditTransaction>]
595
+ def list_billing_credits_history(opts = {})
596
+ data, _status_code, _headers = list_billing_credits_history_with_http_info(opts)
597
+ data
598
+ end
599
+
600
+ # List credit history
601
+ # The credit ledger of the authenticated account, sorted by creation date descending (most recent entry first). Every entry that moved the balance is listed: the deductions taken when an import runs, and the top-ups added by a credit pack. Reversing a deduction does not add an entry, it flips the original one&#39;s &#x60;state&#x60; to &#x60;canceled&#x60;. Canceled entries stay in the list, so an import that was charged and then failed still shows its deduction rather than disappearing. Read &#x60;state&#x60; to tell the two apart, and sum only &#x60;active&#x60; entries. A refund can additionally add a positive entry when cancelling alone could not restore the full cost, for instance because the plan&#39;s allowance has since reset. The current balance is not computed from this list: read it from &#x60;getOmrCapabilities&#x60;.
602
+ # @param [Hash] opts the optional parameters
603
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
604
+ # @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.
605
+ # @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.
606
+ # @return [Array<(Array<CreditTransaction>, Integer, Hash)>] Array<CreditTransaction> data, response status code and response headers
607
+ def list_billing_credits_history_with_http_info(opts = {})
608
+ if @api_client.config.debugging
609
+ @api_client.config.logger.debug 'Calling API: OMRApi.list_billing_credits_history ...'
610
+ end
611
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
612
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_billing_credits_history, must be smaller than or equal to 1000.'
613
+ end
614
+
615
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
616
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_billing_credits_history, must be greater than or equal to 1.'
617
+ end
618
+
619
+ # resource path
620
+ local_var_path = '/billing/credits/history'
621
+
622
+ # query parameters
623
+ query_params = opts[:query_params] || {}
624
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
625
+ query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
626
+ query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
627
+
628
+ # header parameters
629
+ header_params = opts[:header_params] || {}
630
+ # HTTP header 'Accept' (if needed)
631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
632
+
633
+ # form parameters
634
+ form_params = opts[:form_params] || {}
635
+
636
+ # http body (model)
637
+ post_body = opts[:debug_body]
638
+
639
+ # return_type
640
+ return_type = opts[:debug_return_type] || 'Array<CreditTransaction>'
641
+
642
+ # auth_names
643
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
644
+
645
+ new_options = opts.merge(
646
+ :operation => :"OMRApi.list_billing_credits_history",
647
+ :header_params => header_params,
648
+ :query_params => query_params,
649
+ :form_params => form_params,
650
+ :body => post_body,
651
+ :auth_names => auth_names,
652
+ :return_type => return_type
653
+ )
654
+
655
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
656
+ if @api_client.config.debugging
657
+ @api_client.config.logger.debug "API called: OMRApi#list_billing_credits_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
658
+ end
659
+ return data, status_code, headers
660
+ end
661
+
662
+ # List OMR jobs
663
+ # List the caller's OMR jobs, for resuming work or cleaning up abandoned drafts.
664
+ # @param [Hash] opts the optional parameters
665
+ # @option opts [OmrJobStatus] :status Filter jobs by status
666
+ # @option opts [Boolean] :expired Filter by data-retention state, independently of &#x60;status&#x60;. * &#x60;true&#x60;: only jobs whose files have been erased. * &#x60;false&#x60;: only jobs that still hold their files. Omit to get both. A job keeps the &#x60;status&#x60; it finished with after erasure, so this is the only way to tell the two apart.
667
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
668
+ # @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.
669
+ # @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.
670
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
671
+ # @return [Array<OmrJob>]
672
+ def list_omr_jobs(opts = {})
673
+ data, _status_code, _headers = list_omr_jobs_with_http_info(opts)
674
+ data
675
+ end
676
+
677
+ # List OMR jobs
678
+ # List the caller&#39;s OMR jobs, for resuming work or cleaning up abandoned drafts.
679
+ # @param [Hash] opts the optional parameters
680
+ # @option opts [OmrJobStatus] :status Filter jobs by status
681
+ # @option opts [Boolean] :expired Filter by data-retention state, independently of &#x60;status&#x60;. * &#x60;true&#x60;: only jobs whose files have been erased. * &#x60;false&#x60;: only jobs that still hold their files. Omit to get both. A job keeps the &#x60;status&#x60; it finished with after erasure, so this is the only way to tell the two apart.
682
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 50)
683
+ # @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.
684
+ # @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.
685
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
686
+ # @return [Array<(Array<OmrJob>, Integer, Hash)>] Array<OmrJob> data, response status code and response headers
687
+ def list_omr_jobs_with_http_info(opts = {})
688
+ if @api_client.config.debugging
689
+ @api_client.config.logger.debug 'Calling API: OMRApi.list_omr_jobs ...'
690
+ end
691
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
692
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_omr_jobs, must be smaller than or equal to 1000.'
693
+ end
694
+
695
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
696
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OMRApi.list_omr_jobs, must be greater than or equal to 1.'
697
+ end
698
+
699
+ # resource path
700
+ local_var_path = '/omr/jobs'
701
+
702
+ # query parameters
703
+ query_params = opts[:query_params] || {}
704
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
705
+ query_params[:'expired'] = opts[:'expired'] if !opts[:'expired'].nil?
706
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
707
+ query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
708
+ query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
709
+
710
+ # header parameters
711
+ header_params = opts[:header_params] || {}
712
+ # HTTP header 'Accept' (if needed)
713
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
714
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
715
+
716
+ # form parameters
717
+ form_params = opts[:form_params] || {}
718
+
719
+ # http body (model)
720
+ post_body = opts[:debug_body]
721
+
722
+ # return_type
723
+ return_type = opts[:debug_return_type] || 'Array<OmrJob>'
724
+
725
+ # auth_names
726
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
727
+
728
+ new_options = opts.merge(
729
+ :operation => :"OMRApi.list_omr_jobs",
730
+ :header_params => header_params,
731
+ :query_params => query_params,
732
+ :form_params => form_params,
733
+ :body => post_body,
734
+ :auth_names => auth_names,
735
+ :return_type => return_type
736
+ )
737
+
738
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
739
+ if @api_client.config.debugging
740
+ @api_client.config.logger.debug "API called: OMRApi#list_omr_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
741
+ end
742
+ return data, status_code, headers
743
+ end
744
+
745
+ # Start an OMR job
746
+ # Validate the attached files, run the permission, quota and credit checks, then queue the job for processing.
747
+ # @param job [String] Unique identifier of the OMR job
748
+ # @param [Hash] opts the optional parameters
749
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
750
+ # @return [OmrJob]
751
+ def start_omr_job(job, opts = {})
752
+ data, _status_code, _headers = start_omr_job_with_http_info(job, opts)
753
+ data
754
+ end
755
+
756
+ # Start an OMR job
757
+ # Validate the attached files, run the permission, quota and credit checks, then queue the job for processing.
758
+ # @param job [String] Unique identifier of the OMR job
759
+ # @param [Hash] opts the optional parameters
760
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
761
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
762
+ def start_omr_job_with_http_info(job, opts = {})
763
+ if @api_client.config.debugging
764
+ @api_client.config.logger.debug 'Calling API: OMRApi.start_omr_job ...'
765
+ end
766
+ # verify the required parameter 'job' is set
767
+ if @api_client.config.client_side_validation && job.nil?
768
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.start_omr_job"
769
+ end
770
+ # resource path
771
+ local_var_path = '/omr/jobs/{job}/start'.sub('{job}', CGI.escape(job.to_s))
772
+
773
+ # query parameters
774
+ query_params = opts[:query_params] || {}
775
+
776
+ # header parameters
777
+ header_params = opts[:header_params] || {}
778
+ # HTTP header 'Accept' (if needed)
779
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
780
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
781
+
782
+ # form parameters
783
+ form_params = opts[:form_params] || {}
784
+
785
+ # http body (model)
786
+ post_body = opts[:debug_body]
787
+
788
+ # return_type
789
+ return_type = opts[:debug_return_type] || 'OmrJob'
790
+
791
+ # auth_names
792
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
793
+
794
+ new_options = opts.merge(
795
+ :operation => :"OMRApi.start_omr_job",
796
+ :header_params => header_params,
797
+ :query_params => query_params,
798
+ :form_params => form_params,
799
+ :body => post_body,
800
+ :auth_names => auth_names,
801
+ :return_type => return_type
802
+ )
803
+
804
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
805
+ if @api_client.config.debugging
806
+ @api_client.config.logger.debug "API called: OMRApi#start_omr_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
807
+ end
808
+ return data, status_code, headers
809
+ end
810
+
811
+ # Submit an interactive step
812
+ # Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on `step` (a `oneOf` discriminated by the step name).
813
+ # @param job [String] Unique identifier of the OMR job
814
+ # @param step [OmrStepName] The pending step being submitted
815
+ # @param body [OmrDetailsSubmission]
816
+ # @param [Hash] opts the optional parameters
817
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
818
+ # @return [OmrJob]
819
+ def submit_omr_job_step(job, step, body, opts = {})
820
+ data, _status_code, _headers = submit_omr_job_step_with_http_info(job, step, body, opts)
821
+ data
822
+ end
823
+
824
+ # Submit an interactive step
825
+ # Resolve the step the job is currently awaiting and resume the pipeline. The request body shape depends on &#x60;step&#x60; (a &#x60;oneOf&#x60; discriminated by the step name).
826
+ # @param job [String] Unique identifier of the OMR job
827
+ # @param step [OmrStepName] The pending step being submitted
828
+ # @param body [OmrDetailsSubmission]
829
+ # @param [Hash] opts the optional parameters
830
+ # @option opts [String] :x_flat_locale Preferred locale for localized content in the response (translated error messages, emails, etc.). Accepts any IETF language tag. The API best-matches the value to a supported locale and never rejects an unknown one (it falls back to the closest match, then to &#x60;en&#x60;). Supported normalized locales: &#x60;da&#x60;, &#x60;de&#x60;, &#x60;en&#x60;, &#x60;en-GB&#x60;, &#x60;es&#x60;, &#x60;fi&#x60;, &#x60;fil&#x60;, &#x60;fr&#x60;, &#x60;fr-CA&#x60;, &#x60;hi&#x60;, &#x60;id&#x60;, &#x60;it&#x60;, &#x60;ja&#x60;, &#x60;ko&#x60;, &#x60;ms&#x60;, &#x60;nl&#x60;, &#x60;nb&#x60;, &#x60;pl&#x60;, &#x60;pt&#x60;, &#x60;pt-BR&#x60;, &#x60;ro&#x60;, &#x60;ru&#x60;, &#x60;sv&#x60;, &#x60;tr&#x60;, &#x60;zh-Hans&#x60;, &#x60;zh-HK&#x60;, &#x60;zh-TW&#x60;. Precedence (highest first): this &#x60;X-Flat-Locale&#x60; header, the authenticated user&#39;s account locale, the &#x60;Accept-Language&#x60; header, then &#x60;en&#x60;.
831
+ # @return [Array<(OmrJob, Integer, Hash)>] OmrJob data, response status code and response headers
832
+ def submit_omr_job_step_with_http_info(job, step, body, opts = {})
833
+ if @api_client.config.debugging
834
+ @api_client.config.logger.debug 'Calling API: OMRApi.submit_omr_job_step ...'
835
+ end
836
+ # verify the required parameter 'job' is set
837
+ if @api_client.config.client_side_validation && job.nil?
838
+ fail ArgumentError, "Missing the required parameter 'job' when calling OMRApi.submit_omr_job_step"
839
+ end
840
+ # verify the required parameter 'step' is set
841
+ if @api_client.config.client_side_validation && step.nil?
842
+ fail ArgumentError, "Missing the required parameter 'step' when calling OMRApi.submit_omr_job_step"
843
+ end
844
+ # verify the required parameter 'body' is set
845
+ if @api_client.config.client_side_validation && body.nil?
846
+ fail ArgumentError, "Missing the required parameter 'body' when calling OMRApi.submit_omr_job_step"
847
+ end
848
+ # resource path
849
+ local_var_path = '/omr/jobs/{job}/steps/{step}'.sub('{job}', CGI.escape(job.to_s)).sub('{step}', CGI.escape(step.to_s))
850
+
851
+ # query parameters
852
+ query_params = opts[:query_params] || {}
853
+
854
+ # header parameters
855
+ header_params = opts[:header_params] || {}
856
+ # HTTP header 'Accept' (if needed)
857
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
858
+ # HTTP header 'Content-Type'
859
+ content_type = @api_client.select_header_content_type(['application/json'])
860
+ if !content_type.nil?
861
+ header_params['Content-Type'] = content_type
862
+ end
863
+ header_params[:'X-Flat-Locale'] = opts[:'x_flat_locale'] if !opts[:'x_flat_locale'].nil?
864
+
865
+ # form parameters
866
+ form_params = opts[:form_params] || {}
867
+
868
+ # http body (model)
869
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
870
+
871
+ # return_type
872
+ return_type = opts[:debug_return_type] || 'OmrJob'
873
+
874
+ # auth_names
875
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
876
+
877
+ new_options = opts.merge(
878
+ :operation => :"OMRApi.submit_omr_job_step",
879
+ :header_params => header_params,
880
+ :query_params => query_params,
881
+ :form_params => form_params,
882
+ :body => post_body,
883
+ :auth_names => auth_names,
884
+ :return_type => return_type
885
+ )
886
+
887
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
888
+ if @api_client.config.debugging
889
+ @api_client.config.logger.debug "API called: OMRApi#submit_omr_job_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
890
+ end
891
+ return data, status_code, headers
892
+ end
893
+ end
894
+ end