phrase 0.4.31 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (663) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +6 -0
  3. data/LICENSE +17 -18
  4. data/README.md +449 -280
  5. data/Rakefile +7 -4
  6. data/docs/Account.md +27 -0
  7. data/docs/AccountDetails.md +27 -0
  8. data/docs/AccountDetails1.md +17 -0
  9. data/docs/AccountsApi.md +134 -0
  10. data/docs/AffectedCount.md +17 -0
  11. data/docs/AffectedResources.md +17 -0
  12. data/docs/Authorization.md +31 -0
  13. data/docs/AuthorizationCreateParameters.md +21 -0
  14. data/docs/AuthorizationUpdateParameters.md +21 -0
  15. data/docs/AuthorizationWithToken.md +33 -0
  16. data/docs/AuthorizationWithToken1.md +17 -0
  17. data/docs/AuthorizationsApi.md +321 -0
  18. data/docs/BitbucketSync.md +27 -0
  19. data/docs/BitbucketSyncApi.md +197 -0
  20. data/docs/BitbucketSyncExportParameters.md +17 -0
  21. data/docs/BitbucketSyncExportResponse.md +17 -0
  22. data/docs/BitbucketSyncImportParameters.md +17 -0
  23. data/docs/BlacklistedKey.md +23 -0
  24. data/docs/BlacklistedKeyCreateParameters.md +17 -0
  25. data/docs/BlacklistedKeyUpdateParameters.md +17 -0
  26. data/docs/BlacklistedKeysApi.md +333 -0
  27. data/docs/Branch.md +29 -0
  28. data/docs/BranchCreateParameters.md +17 -0
  29. data/docs/BranchMergeParameters.md +17 -0
  30. data/docs/BranchUpdateParameters.md +17 -0
  31. data/docs/BranchesApi.md +459 -0
  32. data/docs/Comment.md +25 -0
  33. data/docs/CommentCreateParameters.md +19 -0
  34. data/docs/CommentMarkReadParameters.md +17 -0
  35. data/docs/CommentUpdateParameters.md +19 -0
  36. data/docs/CommentsApi.md +548 -0
  37. data/docs/Distribution.md +29 -0
  38. data/docs/DistributionCreateParameters.md +29 -0
  39. data/docs/DistributionPreview.md +29 -0
  40. data/docs/DistributionUpdateParameters.md +29 -0
  41. data/docs/DistributionsApi.md +331 -0
  42. data/docs/Document.md +23 -0
  43. data/docs/DocumentsApi.md +137 -0
  44. data/docs/Format.md +35 -0
  45. data/docs/FormatsApi.md +68 -0
  46. data/docs/GitHubSyncApi.md +130 -0
  47. data/docs/GitLabSyncApi.md +463 -0
  48. data/docs/GithubSyncExportParameters.md +17 -0
  49. data/docs/GithubSyncImportParameters.md +17 -0
  50. data/docs/GitlabSync.md +37 -0
  51. data/docs/GitlabSyncExport.md +19 -0
  52. data/docs/GitlabSyncExportParameters.md +17 -0
  53. data/docs/GitlabSyncHistory.md +25 -0
  54. data/docs/GitlabSyncImportParameters.md +17 -0
  55. data/docs/GlossariesApi.md +331 -0
  56. data/docs/Glossary.md +25 -0
  57. data/docs/GlossaryCreateParameters.md +21 -0
  58. data/docs/GlossaryTerm.md +31 -0
  59. data/docs/GlossaryTermCreateParameters.md +23 -0
  60. data/docs/GlossaryTermTranslation.md +25 -0
  61. data/docs/GlossaryTermTranslationCreateParameters.md +19 -0
  62. data/docs/GlossaryTermTranslationUpdateParameters.md +19 -0
  63. data/docs/GlossaryTermTranslationsApi.md +213 -0
  64. data/docs/GlossaryTermUpdateParameters.md +23 -0
  65. data/docs/GlossaryTermsApi.md +341 -0
  66. data/docs/GlossaryUpdateParameters.md +21 -0
  67. data/docs/InlineResponse422.md +19 -0
  68. data/docs/InlineResponse422Errors.md +21 -0
  69. data/docs/Invitation.md +35 -0
  70. data/docs/InvitationCreateParameters.md +25 -0
  71. data/docs/InvitationUpdateParameters.md +23 -0
  72. data/docs/InvitationsApi.md +395 -0
  73. data/docs/Job.md +29 -0
  74. data/docs/JobCompleteParameters.md +17 -0
  75. data/docs/JobCreateParameters.md +27 -0
  76. data/docs/JobDetails.md +37 -0
  77. data/docs/JobDetails1.md +23 -0
  78. data/docs/JobKeysCreateParameters.md +19 -0
  79. data/docs/JobLocale.md +23 -0
  80. data/docs/JobLocaleCompleteParameters.md +17 -0
  81. data/docs/JobLocaleReopenParameters.md +17 -0
  82. data/docs/JobLocaleUpdateParameters.md +21 -0
  83. data/docs/JobLocalesApi.md +483 -0
  84. data/docs/JobLocalesCreateParameters.md +21 -0
  85. data/docs/JobPreview.md +21 -0
  86. data/docs/JobReopenParameters.md +17 -0
  87. data/docs/JobStartParameters.md +17 -0
  88. data/docs/JobUpdateParameters.md +23 -0
  89. data/docs/JobsApi.md +674 -0
  90. data/docs/KeyCreateParameters.md +45 -0
  91. data/docs/KeyPreview.md +21 -0
  92. data/docs/KeyUpdateParameters.md +45 -0
  93. data/docs/KeysApi.md +609 -0
  94. data/docs/KeysSearchParameters.md +25 -0
  95. data/docs/KeysTagParameters.md +23 -0
  96. data/docs/KeysUntagParameters.md +23 -0
  97. data/docs/Locale.md +35 -0
  98. data/docs/LocaleCreateParameters.md +35 -0
  99. data/docs/LocaleDetails.md +37 -0
  100. data/docs/LocaleDetails1.md +17 -0
  101. data/docs/LocalePreview.md +21 -0
  102. data/docs/LocaleStatistics.md +29 -0
  103. data/docs/LocaleUpdateParameters.md +35 -0
  104. data/docs/LocalesApi.md +428 -0
  105. data/docs/Member.md +25 -0
  106. data/docs/MemberUpdateParameters.md +23 -0
  107. data/docs/MembersApi.md +267 -0
  108. data/docs/OrderConfirmParameters.md +17 -0
  109. data/docs/OrderCreateParameters.md +43 -0
  110. data/docs/OrdersApi.md +337 -0
  111. data/docs/Project.md +31 -0
  112. data/docs/ProjectCreateParameters.md +29 -0
  113. data/docs/ProjectDetails.md +33 -0
  114. data/docs/ProjectDetails1.md +19 -0
  115. data/docs/ProjectLocales.md +27 -0
  116. data/docs/ProjectLocales1.md +17 -0
  117. data/docs/ProjectShort.md +25 -0
  118. data/docs/ProjectUpdateParameters.md +27 -0
  119. data/docs/ProjectsApi.md +321 -0
  120. data/docs/Release.md +37 -0
  121. data/docs/ReleaseCreateParameters.md +21 -0
  122. data/docs/ReleasePreview.md +37 -0
  123. data/docs/ReleaseUpdateParameters.md +21 -0
  124. data/docs/ReleasesApi.md +407 -0
  125. data/docs/Screenshot.md +29 -0
  126. data/docs/ScreenshotCreateParameters.md +21 -0
  127. data/docs/ScreenshotMarker.md +27 -0
  128. data/docs/ScreenshotMarkerCreateParameters.md +19 -0
  129. data/docs/ScreenshotMarkerUpdateParameters.md +19 -0
  130. data/docs/ScreenshotMarkersApi.md +337 -0
  131. data/docs/ScreenshotUpdateParameters.md +21 -0
  132. data/docs/ScreenshotsApi.md +331 -0
  133. data/docs/Space.md +27 -0
  134. data/docs/SpaceCreateParameters.md +17 -0
  135. data/docs/SpaceUpdateParameters.md +17 -0
  136. data/docs/SpacesApi.md +529 -0
  137. data/docs/SpacesProjectsCreateParameters.md +17 -0
  138. data/docs/StyleGuidesApi.md +331 -0
  139. data/docs/Styleguide.md +23 -0
  140. data/docs/StyleguideCreateParameters.md +41 -0
  141. data/docs/StyleguideDetails.md +49 -0
  142. data/docs/StyleguideDetails1.md +41 -0
  143. data/docs/StyleguidePreview.md +19 -0
  144. data/docs/StyleguideUpdateParameters.md +41 -0
  145. data/docs/Tag.md +23 -0
  146. data/docs/TagCreateParameters.md +19 -0
  147. data/docs/TagWithStats.md +25 -0
  148. data/docs/TagWithStats1.md +17 -0
  149. data/docs/TagWithStats1Statistics.md +23 -0
  150. data/docs/TagWithStats1Statistics1.md +19 -0
  151. data/docs/TagsApi.md +271 -0
  152. data/docs/Team.md +29 -0
  153. data/docs/TeamCreateParameters.md +17 -0
  154. data/docs/TeamDetail.md +29 -0
  155. data/docs/TeamUpdateParameters.md +17 -0
  156. data/docs/TeamsApi.md +721 -0
  157. data/docs/TeamsProjectsCreateParameters.md +17 -0
  158. data/docs/TeamsSpacesCreateParameters.md +17 -0
  159. data/docs/TeamsUsersCreateParameters.md +17 -0
  160. data/docs/Translation.md +37 -0
  161. data/docs/TranslationCreateParameters.md +31 -0
  162. data/docs/TranslationDetails.md +41 -0
  163. data/docs/TranslationDetails1.md +19 -0
  164. data/docs/TranslationExcludeParameters.md +17 -0
  165. data/docs/TranslationIncludeParameters.md +17 -0
  166. data/docs/TranslationKey.md +33 -0
  167. data/docs/TranslationKeyDetails.md +51 -0
  168. data/docs/TranslationKeyDetails1.md +33 -0
  169. data/docs/TranslationOrder.md +49 -0
  170. data/docs/TranslationReviewParameters.md +17 -0
  171. data/docs/TranslationUnverifyParameters.md +17 -0
  172. data/docs/TranslationUpdateParameters.md +27 -0
  173. data/docs/TranslationVerifyParameters.md +17 -0
  174. data/docs/TranslationVersion.md +31 -0
  175. data/docs/TranslationVersionWithUser.md +33 -0
  176. data/docs/TranslationVersionWithUser1.md +17 -0
  177. data/docs/TranslationsApi.md +1148 -0
  178. data/docs/TranslationsExcludeParameters.md +23 -0
  179. data/docs/TranslationsIncludeParameters.md +23 -0
  180. data/docs/TranslationsReviewParameters.md +19 -0
  181. data/docs/TranslationsSearchParameters.md +23 -0
  182. data/docs/TranslationsUnverifyParameters.md +23 -0
  183. data/docs/TranslationsVerifyParameters.md +23 -0
  184. data/docs/Upload.md +31 -0
  185. data/docs/UploadCreateParameters.md +45 -0
  186. data/docs/UploadSummary.md +31 -0
  187. data/docs/UploadsApi.md +234 -0
  188. data/docs/User.md +29 -0
  189. data/docs/UserPreview.md +21 -0
  190. data/docs/UsersApi.md +68 -0
  191. data/docs/VersionsHistoryApi.md +146 -0
  192. data/docs/Webhook.md +29 -0
  193. data/docs/WebhookCreateParameters.md +23 -0
  194. data/docs/WebhookUpdateParameters.md +23 -0
  195. data/docs/WebhooksApi.md +394 -0
  196. data/git_push.sh +58 -0
  197. data/lib/phrase.rb +212 -55
  198. data/lib/phrase/api/accounts_api.rb +142 -0
  199. data/lib/phrase/api/authorizations_api.rb +348 -0
  200. data/lib/phrase/api/bitbucket_sync_api.rb +219 -0
  201. data/lib/phrase/api/blacklisted_keys_api.rb +381 -0
  202. data/lib/phrase/api/branches_api.rb +526 -0
  203. data/lib/phrase/api/comments_api.rb +659 -0
  204. data/lib/phrase/api/distributions_api.rb +378 -0
  205. data/lib/phrase/api/documents_api.rb +152 -0
  206. data/lib/phrase/api/formats_api.rb +70 -0
  207. data/lib/phrase/api/git_hub_sync_api.rb +146 -0
  208. data/lib/phrase/api/git_lab_sync_api.rb +510 -0
  209. data/lib/phrase/api/glossaries_api.rb +378 -0
  210. data/lib/phrase/api/glossary_term_translations_api.rb +270 -0
  211. data/lib/phrase/api/glossary_terms_api.rb +408 -0
  212. data/lib/phrase/api/invitations_api.rb +450 -0
  213. data/lib/phrase/api/job_locales_api.rb +589 -0
  214. data/lib/phrase/api/jobs_api.rb +792 -0
  215. data/lib/phrase/api/keys_api.rb +702 -0
  216. data/lib/phrase/api/locales_api.rb +499 -0
  217. data/lib/phrase/api/members_api.rb +304 -0
  218. data/lib/phrase/api/orders_api.rb +387 -0
  219. data/lib/phrase/api/projects_api.rb +348 -0
  220. data/lib/phrase/api/releases_api.rb +486 -0
  221. data/lib/phrase/api/screenshot_markers_api.rb +396 -0
  222. data/lib/phrase/api/screenshots_api.rb +378 -0
  223. data/lib/phrase/api/spaces_api.rb +610 -0
  224. data/lib/phrase/api/style_guides_api.rb +378 -0
  225. data/lib/phrase/api/tags_api.rb +307 -0
  226. data/lib/phrase/api/teams_api.rb +840 -0
  227. data/lib/phrase/api/translations_api.rb +1353 -0
  228. data/lib/phrase/api/uploads_api.rb +273 -0
  229. data/lib/phrase/api/users_api.rb +70 -0
  230. data/lib/phrase/api/versions_history_api.rb +172 -0
  231. data/lib/phrase/api/webhooks_api.rb +448 -0
  232. data/lib/phrase/api_client.rb +376 -0
  233. data/lib/phrase/api_error.rb +45 -0
  234. data/lib/phrase/configuration.rb +243 -0
  235. data/lib/phrase/models/account.rb +239 -0
  236. data/lib/phrase/models/account_details.rb +247 -0
  237. data/lib/phrase/models/account_details1.rb +194 -0
  238. data/lib/phrase/models/affected_count.rb +194 -0
  239. data/lib/phrase/models/affected_resources.rb +194 -0
  240. data/lib/phrase/models/authorization.rb +259 -0
  241. data/lib/phrase/models/authorization_create_parameters.rb +217 -0
  242. data/lib/phrase/models/authorization_update_parameters.rb +217 -0
  243. data/lib/phrase/models/authorization_with_token.rb +276 -0
  244. data/lib/phrase/models/authorization_with_token1.rb +194 -0
  245. data/lib/phrase/models/bitbucket_sync.rb +241 -0
  246. data/lib/phrase/models/bitbucket_sync_export_parameters.rb +195 -0
  247. data/lib/phrase/models/bitbucket_sync_export_response.rb +194 -0
  248. data/lib/phrase/models/bitbucket_sync_import_parameters.rb +195 -0
  249. data/lib/phrase/models/blacklisted_key.rb +221 -0
  250. data/lib/phrase/models/blacklisted_key_create_parameters.rb +195 -0
  251. data/lib/phrase/models/blacklisted_key_update_parameters.rb +195 -0
  252. data/lib/phrase/models/branch.rb +248 -0
  253. data/lib/phrase/models/branch_create_parameters.rb +195 -0
  254. data/lib/phrase/models/branch_merge_parameters.rb +195 -0
  255. data/lib/phrase/models/branch_update_parameters.rb +195 -0
  256. data/lib/phrase/models/comment.rb +230 -0
  257. data/lib/phrase/models/comment_create_parameters.rb +205 -0
  258. data/lib/phrase/models/comment_mark_read_parameters.rb +195 -0
  259. data/lib/phrase/models/comment_update_parameters.rb +205 -0
  260. data/lib/phrase/models/distribution.rb +252 -0
  261. data/lib/phrase/models/distribution_create_parameters.rb +259 -0
  262. data/lib/phrase/models/distribution_preview.rb +250 -0
  263. data/lib/phrase/models/distribution_update_parameters.rb +259 -0
  264. data/lib/phrase/models/document.rb +221 -0
  265. data/lib/phrase/models/format.rb +275 -0
  266. data/lib/phrase/models/github_sync_export_parameters.rb +195 -0
  267. data/lib/phrase/models/github_sync_import_parameters.rb +195 -0
  268. data/lib/phrase/models/gitlab_sync.rb +284 -0
  269. data/lib/phrase/models/gitlab_sync_export.rb +203 -0
  270. data/lib/phrase/models/gitlab_sync_export_parameters.rb +195 -0
  271. data/lib/phrase/models/gitlab_sync_history.rb +232 -0
  272. data/lib/phrase/models/gitlab_sync_import_parameters.rb +195 -0
  273. data/lib/phrase/models/glossary.rb +232 -0
  274. data/lib/phrase/models/glossary_create_parameters.rb +217 -0
  275. data/lib/phrase/models/glossary_term.rb +259 -0
  276. data/lib/phrase/models/glossary_term_create_parameters.rb +225 -0
  277. data/lib/phrase/models/glossary_term_translation.rb +230 -0
  278. data/lib/phrase/models/glossary_term_translation_create_parameters.rb +205 -0
  279. data/lib/phrase/models/glossary_term_translation_update_parameters.rb +205 -0
  280. data/lib/phrase/models/glossary_term_update_parameters.rb +225 -0
  281. data/lib/phrase/models/glossary_update_parameters.rb +217 -0
  282. data/lib/phrase/models/inline_response422.rb +205 -0
  283. data/lib/phrase/models/inline_response422_errors.rb +212 -0
  284. data/lib/phrase/models/invitation.rb +279 -0
  285. data/lib/phrase/models/invitation_create_parameters.rb +237 -0
  286. data/lib/phrase/models/invitation_update_parameters.rb +227 -0
  287. data/lib/phrase/models/job.rb +248 -0
  288. data/lib/phrase/models/job_complete_parameters.rb +195 -0
  289. data/lib/phrase/models/job_create_parameters.rb +249 -0
  290. data/lib/phrase/models/job_details.rb +296 -0
  291. data/lib/phrase/models/job_details1.rb +225 -0
  292. data/lib/phrase/models/job_keys_create_parameters.rb +207 -0
  293. data/lib/phrase/models/job_locale.rb +223 -0
  294. data/lib/phrase/models/job_locale_complete_parameters.rb +195 -0
  295. data/lib/phrase/models/job_locale_reopen_parameters.rb +195 -0
  296. data/lib/phrase/models/job_locale_update_parameters.rb +217 -0
  297. data/lib/phrase/models/job_locales_create_parameters.rb +217 -0
  298. data/lib/phrase/models/job_preview.rb +212 -0
  299. data/lib/phrase/models/job_reopen_parameters.rb +195 -0
  300. data/lib/phrase/models/job_start_parameters.rb +195 -0
  301. data/lib/phrase/models/job_update_parameters.rb +225 -0
  302. data/lib/phrase/models/key_create_parameters.rb +335 -0
  303. data/lib/phrase/models/key_preview.rb +212 -0
  304. data/lib/phrase/models/key_update_parameters.rb +335 -0
  305. data/lib/phrase/models/keys_search_parameters.rb +235 -0
  306. data/lib/phrase/models/keys_tag_parameters.rb +225 -0
  307. data/lib/phrase/models/keys_untag_parameters.rb +225 -0
  308. data/lib/phrase/models/locale.rb +277 -0
  309. data/lib/phrase/models/locale_create_parameters.rb +285 -0
  310. data/lib/phrase/models/locale_details.rb +294 -0
  311. data/lib/phrase/models/locale_details1.rb +194 -0
  312. data/lib/phrase/models/locale_preview.rb +212 -0
  313. data/lib/phrase/models/locale_statistics.rb +248 -0
  314. data/lib/phrase/models/locale_update_parameters.rb +285 -0
  315. data/lib/phrase/models/member.rb +232 -0
  316. data/lib/phrase/models/member_update_parameters.rb +227 -0
  317. data/lib/phrase/models/order_confirm_parameters.rb +195 -0
  318. data/lib/phrase/models/order_create_parameters.rb +327 -0
  319. data/lib/phrase/models/project.rb +257 -0
  320. data/lib/phrase/models/project_create_parameters.rb +255 -0
  321. data/lib/phrase/models/project_details.rb +274 -0
  322. data/lib/phrase/models/project_details1.rb +203 -0
  323. data/lib/phrase/models/project_locales.rb +249 -0
  324. data/lib/phrase/models/project_locales1.rb +196 -0
  325. data/lib/phrase/models/project_short.rb +230 -0
  326. data/lib/phrase/models/project_update_parameters.rb +245 -0
  327. data/lib/phrase/models/release.rb +290 -0
  328. data/lib/phrase/models/release_create_parameters.rb +217 -0
  329. data/lib/phrase/models/release_preview.rb +290 -0
  330. data/lib/phrase/models/release_update_parameters.rb +217 -0
  331. data/lib/phrase/models/screenshot.rb +248 -0
  332. data/lib/phrase/models/screenshot_create_parameters.rb +215 -0
  333. data/lib/phrase/models/screenshot_marker.rb +239 -0
  334. data/lib/phrase/models/screenshot_marker_create_parameters.rb +205 -0
  335. data/lib/phrase/models/screenshot_marker_update_parameters.rb +205 -0
  336. data/lib/phrase/models/screenshot_update_parameters.rb +215 -0
  337. data/lib/phrase/models/space.rb +241 -0
  338. data/lib/phrase/models/space_create_parameters.rb +195 -0
  339. data/lib/phrase/models/space_update_parameters.rb +195 -0
  340. data/lib/phrase/models/spaces_projects_create_parameters.rb +195 -0
  341. data/lib/phrase/models/styleguide.rb +221 -0
  342. data/lib/phrase/models/styleguide_create_parameters.rb +315 -0
  343. data/lib/phrase/models/styleguide_details.rb +346 -0
  344. data/lib/phrase/models/styleguide_details1.rb +302 -0
  345. data/lib/phrase/models/styleguide_preview.rb +203 -0
  346. data/lib/phrase/models/styleguide_update_parameters.rb +315 -0
  347. data/lib/phrase/models/tag.rb +221 -0
  348. data/lib/phrase/models/tag_create_parameters.rb +205 -0
  349. data/lib/phrase/models/tag_with_stats.rb +240 -0
  350. data/lib/phrase/models/tag_with_stats1.rb +196 -0
  351. data/lib/phrase/models/tag_with_stats1_statistics.rb +221 -0
  352. data/lib/phrase/models/tag_with_stats1_statistics1.rb +203 -0
  353. data/lib/phrase/models/team.rb +254 -0
  354. data/lib/phrase/models/team_create_parameters.rb +195 -0
  355. data/lib/phrase/models/team_detail.rb +254 -0
  356. data/lib/phrase/models/team_update_parameters.rb +195 -0
  357. data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
  358. data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
  359. data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
  360. data/lib/phrase/models/translation.rb +286 -0
  361. data/lib/phrase/models/translation_create_parameters.rb +265 -0
  362. data/lib/phrase/models/translation_details.rb +312 -0
  363. data/lib/phrase/models/translation_details1.rb +203 -0
  364. data/lib/phrase/models/translation_exclude_parameters.rb +195 -0
  365. data/lib/phrase/models/translation_include_parameters.rb +195 -0
  366. data/lib/phrase/models/translation_key.rb +268 -0
  367. data/lib/phrase/models/translation_key_details.rb +357 -0
  368. data/lib/phrase/models/translation_key_details1.rb +266 -0
  369. data/lib/phrase/models/translation_order.rb +340 -0
  370. data/lib/phrase/models/translation_review_parameters.rb +195 -0
  371. data/lib/phrase/models/translation_unverify_parameters.rb +195 -0
  372. data/lib/phrase/models/translation_update_parameters.rb +245 -0
  373. data/lib/phrase/models/translation_verify_parameters.rb +195 -0
  374. data/lib/phrase/models/translation_version.rb +257 -0
  375. data/lib/phrase/models/translation_version_with_user.rb +274 -0
  376. data/lib/phrase/models/translation_version_with_user1.rb +194 -0
  377. data/lib/phrase/models/translations_exclude_parameters.rb +225 -0
  378. data/lib/phrase/models/translations_include_parameters.rb +225 -0
  379. data/lib/phrase/models/translations_review_parameters.rb +205 -0
  380. data/lib/phrase/models/translations_search_parameters.rb +225 -0
  381. data/lib/phrase/models/translations_unverify_parameters.rb +225 -0
  382. data/lib/phrase/models/translations_verify_parameters.rb +225 -0
  383. data/lib/phrase/models/upload.rb +257 -0
  384. data/lib/phrase/models/upload_create_parameters.rb +335 -0
  385. data/lib/phrase/models/upload_summary.rb +257 -0
  386. data/lib/phrase/models/user.rb +248 -0
  387. data/lib/phrase/models/user_preview.rb +212 -0
  388. data/lib/phrase/models/webhook.rb +250 -0
  389. data/lib/phrase/models/webhook_create_parameters.rb +225 -0
  390. data/lib/phrase/models/webhook_update_parameters.rb +225 -0
  391. data/lib/phrase/response.rb +41 -0
  392. data/lib/phrase/version.rb +1 -1
  393. data/phrase.gemspec +27 -27
  394. data/spec/api/accounts_api_spec.rb +50 -0
  395. data/spec/api/authorizations_api_spec.rb +90 -0
  396. data/spec/api/bitbucket_sync_api_spec.rb +64 -0
  397. data/spec/api/blacklisted_keys_api_spec.rb +96 -0
  398. data/spec/api/branches_api_spec.rb +124 -0
  399. data/spec/api/comments_api_spec.rb +151 -0
  400. data/spec/api/distributions_api_spec.rb +95 -0
  401. data/spec/api/documents_api_spec.rb +52 -0
  402. data/spec/api/formats_api_spec.rb +35 -0
  403. data/spec/api/git_hub_sync_api_spec.rb +49 -0
  404. data/spec/api/git_lab_sync_api_spec.rb +125 -0
  405. data/spec/api/glossaries_api_spec.rb +95 -0
  406. data/spec/api/glossary_term_translations_api_spec.rb +72 -0
  407. data/spec/api/glossary_terms_api_spec.rb +100 -0
  408. data/spec/api/invitations_api_spec.rb +109 -0
  409. data/spec/api/job_locales_api_spec.rb +135 -0
  410. data/spec/api/jobs_api_spec.rb +177 -0
  411. data/spec/api/keys_api_spec.rb +162 -0
  412. data/spec/api/locales_api_spec.rb +126 -0
  413. data/spec/api/members_api_spec.rb +81 -0
  414. data/spec/api/orders_api_spec.rb +98 -0
  415. data/spec/api/projects_api_spec.rb +90 -0
  416. data/spec/api/releases_api_spec.rb +115 -0
  417. data/spec/api/screenshot_markers_api_spec.rb +98 -0
  418. data/spec/api/screenshots_api_spec.rb +95 -0
  419. data/spec/api/spaces_api_spec.rb +141 -0
  420. data/spec/api/style_guides_api_spec.rb +95 -0
  421. data/spec/api/tags_api_spec.rb +83 -0
  422. data/spec/api/teams_api_spec.rb +185 -0
  423. data/spec/api/translations_api_spec.rb +287 -0
  424. data/spec/api/uploads_api_spec.rb +82 -0
  425. data/spec/api/users_api_spec.rb +35 -0
  426. data/spec/api/versions_history_api_spec.rb +56 -0
  427. data/spec/api/webhooks_api_spec.rb +109 -0
  428. data/spec/api_client_spec.rb +214 -0
  429. data/spec/configuration_spec.rb +30 -0
  430. data/spec/models/account_details1_spec.rb +29 -0
  431. data/spec/models/account_details_spec.rb +59 -0
  432. data/spec/models/account_spec.rb +59 -0
  433. data/spec/models/affected_count_spec.rb +29 -0
  434. data/spec/models/affected_resources_spec.rb +29 -0
  435. data/spec/models/authorization_create_parameters_spec.rb +41 -0
  436. data/spec/models/authorization_spec.rb +71 -0
  437. data/spec/models/authorization_update_parameters_spec.rb +41 -0
  438. data/spec/models/authorization_with_token1_spec.rb +29 -0
  439. data/spec/models/authorization_with_token_spec.rb +77 -0
  440. data/spec/models/bitbucket_sync_export_parameters_spec.rb +29 -0
  441. data/spec/models/bitbucket_sync_export_response_spec.rb +29 -0
  442. data/spec/models/bitbucket_sync_import_parameters_spec.rb +29 -0
  443. data/spec/models/bitbucket_sync_spec.rb +59 -0
  444. data/spec/models/blacklisted_key_create_parameters_spec.rb +29 -0
  445. data/spec/models/blacklisted_key_spec.rb +47 -0
  446. data/spec/models/blacklisted_key_update_parameters_spec.rb +29 -0
  447. data/spec/models/branch_create_parameters_spec.rb +29 -0
  448. data/spec/models/branch_merge_parameters_spec.rb +29 -0
  449. data/spec/models/branch_spec.rb +65 -0
  450. data/spec/models/branch_update_parameters_spec.rb +29 -0
  451. data/spec/models/comment_create_parameters_spec.rb +35 -0
  452. data/spec/models/comment_mark_read_parameters_spec.rb +29 -0
  453. data/spec/models/comment_spec.rb +53 -0
  454. data/spec/models/comment_update_parameters_spec.rb +35 -0
  455. data/spec/models/distribution_create_parameters_spec.rb +65 -0
  456. data/spec/models/distribution_preview_spec.rb +65 -0
  457. data/spec/models/distribution_spec.rb +65 -0
  458. data/spec/models/distribution_update_parameters_spec.rb +65 -0
  459. data/spec/models/document_spec.rb +47 -0
  460. data/spec/models/format_spec.rb +83 -0
  461. data/spec/models/github_sync_export_parameters_spec.rb +29 -0
  462. data/spec/models/github_sync_import_parameters_spec.rb +29 -0
  463. data/spec/models/gitlab_sync_export_parameters_spec.rb +29 -0
  464. data/spec/models/gitlab_sync_export_spec.rb +35 -0
  465. data/spec/models/gitlab_sync_history_spec.rb +53 -0
  466. data/spec/models/gitlab_sync_import_parameters_spec.rb +29 -0
  467. data/spec/models/gitlab_sync_spec.rb +89 -0
  468. data/spec/models/glossary_create_parameters_spec.rb +41 -0
  469. data/spec/models/glossary_spec.rb +53 -0
  470. data/spec/models/glossary_term_create_parameters_spec.rb +47 -0
  471. data/spec/models/glossary_term_spec.rb +71 -0
  472. data/spec/models/glossary_term_translation_create_parameters_spec.rb +35 -0
  473. data/spec/models/glossary_term_translation_spec.rb +53 -0
  474. data/spec/models/glossary_term_translation_update_parameters_spec.rb +35 -0
  475. data/spec/models/glossary_term_update_parameters_spec.rb +47 -0
  476. data/spec/models/glossary_update_parameters_spec.rb +41 -0
  477. data/spec/models/inline_response422_errors_spec.rb +41 -0
  478. data/spec/models/inline_response422_spec.rb +35 -0
  479. data/spec/models/invitation_create_parameters_spec.rb +53 -0
  480. data/spec/models/invitation_spec.rb +83 -0
  481. data/spec/models/invitation_update_parameters_spec.rb +47 -0
  482. data/spec/models/job_complete_parameters_spec.rb +29 -0
  483. data/spec/models/job_create_parameters_spec.rb +59 -0
  484. data/spec/models/job_details1_spec.rb +47 -0
  485. data/spec/models/job_details_spec.rb +89 -0
  486. data/spec/models/job_keys_create_parameters_spec.rb +35 -0
  487. data/spec/models/job_locale_complete_parameters_spec.rb +29 -0
  488. data/spec/models/job_locale_reopen_parameters_spec.rb +29 -0
  489. data/spec/models/job_locale_spec.rb +47 -0
  490. data/spec/models/job_locale_update_parameters_spec.rb +41 -0
  491. data/spec/models/job_locales_create_parameters_spec.rb +41 -0
  492. data/spec/models/job_preview_spec.rb +41 -0
  493. data/spec/models/job_reopen_parameters_spec.rb +29 -0
  494. data/spec/models/job_spec.rb +65 -0
  495. data/spec/models/job_start_parameters_spec.rb +29 -0
  496. data/spec/models/job_update_parameters_spec.rb +47 -0
  497. data/spec/models/key_create_parameters_spec.rb +113 -0
  498. data/spec/models/key_preview_spec.rb +41 -0
  499. data/spec/models/key_update_parameters_spec.rb +113 -0
  500. data/spec/models/keys_search_parameters_spec.rb +53 -0
  501. data/spec/models/keys_tag_parameters_spec.rb +47 -0
  502. data/spec/models/keys_untag_parameters_spec.rb +47 -0
  503. data/spec/models/locale_create_parameters_spec.rb +83 -0
  504. data/spec/models/locale_details1_spec.rb +29 -0
  505. data/spec/models/locale_details_spec.rb +89 -0
  506. data/spec/models/locale_preview_spec.rb +41 -0
  507. data/spec/models/locale_spec.rb +83 -0
  508. data/spec/models/locale_statistics_spec.rb +65 -0
  509. data/spec/models/locale_update_parameters_spec.rb +83 -0
  510. data/spec/models/member_spec.rb +53 -0
  511. data/spec/models/member_update_parameters_spec.rb +47 -0
  512. data/spec/models/order_confirm_parameters_spec.rb +29 -0
  513. data/spec/models/order_create_parameters_spec.rb +107 -0
  514. data/spec/models/project_create_parameters_spec.rb +65 -0
  515. data/spec/models/project_details1_spec.rb +35 -0
  516. data/spec/models/project_details_spec.rb +77 -0
  517. data/spec/models/project_locales1_spec.rb +29 -0
  518. data/spec/models/project_locales_spec.rb +59 -0
  519. data/spec/models/project_short_spec.rb +53 -0
  520. data/spec/models/project_spec.rb +71 -0
  521. data/spec/models/project_update_parameters_spec.rb +59 -0
  522. data/spec/models/release_create_parameters_spec.rb +41 -0
  523. data/spec/models/release_preview_spec.rb +89 -0
  524. data/spec/models/release_spec.rb +89 -0
  525. data/spec/models/release_update_parameters_spec.rb +41 -0
  526. data/spec/models/screenshot_create_parameters_spec.rb +41 -0
  527. data/spec/models/screenshot_marker_create_parameters_spec.rb +35 -0
  528. data/spec/models/screenshot_marker_spec.rb +59 -0
  529. data/spec/models/screenshot_marker_update_parameters_spec.rb +35 -0
  530. data/spec/models/screenshot_spec.rb +65 -0
  531. data/spec/models/screenshot_update_parameters_spec.rb +41 -0
  532. data/spec/models/space_create_parameters_spec.rb +29 -0
  533. data/spec/models/space_spec.rb +59 -0
  534. data/spec/models/space_update_parameters_spec.rb +29 -0
  535. data/spec/models/spaces_projects_create_parameters_spec.rb +29 -0
  536. data/spec/models/styleguide_create_parameters_spec.rb +101 -0
  537. data/spec/models/styleguide_details1_spec.rb +101 -0
  538. data/spec/models/styleguide_details_spec.rb +125 -0
  539. data/spec/models/styleguide_preview_spec.rb +35 -0
  540. data/spec/models/styleguide_spec.rb +47 -0
  541. data/spec/models/styleguide_update_parameters_spec.rb +101 -0
  542. data/spec/models/tag_create_parameters_spec.rb +35 -0
  543. data/spec/models/tag_spec.rb +47 -0
  544. data/spec/models/tag_with_stats1_spec.rb +29 -0
  545. data/spec/models/tag_with_stats1_statistics1_spec.rb +35 -0
  546. data/spec/models/tag_with_stats1_statistics_spec.rb +47 -0
  547. data/spec/models/tag_with_stats_spec.rb +53 -0
  548. data/spec/models/team_create_parameters_spec.rb +29 -0
  549. data/spec/models/team_detail_spec.rb +65 -0
  550. data/spec/models/team_spec.rb +65 -0
  551. data/spec/models/team_update_parameters_spec.rb +29 -0
  552. data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
  553. data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
  554. data/spec/models/teams_users_create_parameters_spec.rb +29 -0
  555. data/spec/models/translation_create_parameters_spec.rb +71 -0
  556. data/spec/models/translation_details1_spec.rb +35 -0
  557. data/spec/models/translation_details_spec.rb +101 -0
  558. data/spec/models/translation_exclude_parameters_spec.rb +29 -0
  559. data/spec/models/translation_include_parameters_spec.rb +29 -0
  560. data/spec/models/translation_key_details1_spec.rb +77 -0
  561. data/spec/models/translation_key_details_spec.rb +131 -0
  562. data/spec/models/translation_key_spec.rb +77 -0
  563. data/spec/models/translation_order_spec.rb +125 -0
  564. data/spec/models/translation_review_parameters_spec.rb +29 -0
  565. data/spec/models/translation_spec.rb +89 -0
  566. data/spec/models/translation_unverify_parameters_spec.rb +29 -0
  567. data/spec/models/translation_update_parameters_spec.rb +59 -0
  568. data/spec/models/translation_verify_parameters_spec.rb +29 -0
  569. data/spec/models/translation_version_spec.rb +71 -0
  570. data/spec/models/translation_version_with_user1_spec.rb +29 -0
  571. data/spec/models/translation_version_with_user_spec.rb +77 -0
  572. data/spec/models/translations_exclude_parameters_spec.rb +47 -0
  573. data/spec/models/translations_include_parameters_spec.rb +47 -0
  574. data/spec/models/translations_review_parameters_spec.rb +35 -0
  575. data/spec/models/translations_search_parameters_spec.rb +47 -0
  576. data/spec/models/translations_unverify_parameters_spec.rb +47 -0
  577. data/spec/models/translations_verify_parameters_spec.rb +47 -0
  578. data/spec/models/upload_create_parameters_spec.rb +113 -0
  579. data/spec/models/upload_spec.rb +71 -0
  580. data/spec/models/upload_summary_spec.rb +71 -0
  581. data/spec/models/user_preview_spec.rb +41 -0
  582. data/spec/models/user_spec.rb +65 -0
  583. data/spec/models/webhook_create_parameters_spec.rb +47 -0
  584. data/spec/models/webhook_spec.rb +65 -0
  585. data/spec/models/webhook_update_parameters_spec.rb +47 -0
  586. data/spec/spec_helper.rb +99 -0
  587. metadata +819 -188
  588. data/.gitignore +0 -25
  589. data/.travis.yml +0 -4
  590. data/Guardfile +0 -29
  591. data/bin/phrase +0 -8
  592. data/cacert.pem +0 -3366
  593. data/lib/ext/all.rb +0 -5
  594. data/lib/ext/hash.rb +0 -8
  595. data/lib/ext/object.rb +0 -130
  596. data/lib/ext/try.rb +0 -57
  597. data/lib/generators/phrase/install_generator.rb +0 -37
  598. data/lib/generators/templates/README +0 -11
  599. data/lib/generators/templates/phrase.rb +0 -21
  600. data/lib/phrase/adapters/fast_gettext.rb +0 -25
  601. data/lib/phrase/adapters/i18n.rb +0 -12
  602. data/lib/phrase/api.rb +0 -7
  603. data/lib/phrase/api/client.rb +0 -308
  604. data/lib/phrase/api/client/http.rb +0 -56
  605. data/lib/phrase/api/config.rb +0 -34
  606. data/lib/phrase/api/exceptions.rb +0 -9
  607. data/lib/phrase/api/query_params.rb +0 -22
  608. data/lib/phrase/backend.rb +0 -7
  609. data/lib/phrase/backend/base.rb +0 -6
  610. data/lib/phrase/backend/phrase_service.rb +0 -163
  611. data/lib/phrase/cache.rb +0 -34
  612. data/lib/phrase/config.rb +0 -94
  613. data/lib/phrase/delegate.rb +0 -36
  614. data/lib/phrase/delegate/fast_gettext.rb +0 -27
  615. data/lib/phrase/delegate/i18n.rb +0 -166
  616. data/lib/phrase/engine.rb +0 -14
  617. data/lib/phrase/formats.rb +0 -172
  618. data/lib/phrase/formats/angular_translate.rb +0 -19
  619. data/lib/phrase/formats/csv.rb +0 -19
  620. data/lib/phrase/formats/custom.rb +0 -40
  621. data/lib/phrase/formats/gettext.rb +0 -27
  622. data/lib/phrase/formats/gettext_template.rb +0 -19
  623. data/lib/phrase/formats/ini.rb +0 -19
  624. data/lib/phrase/formats/json.rb +0 -19
  625. data/lib/phrase/formats/laravel.rb +0 -19
  626. data/lib/phrase/formats/mozilla_properties.rb +0 -8
  627. data/lib/phrase/formats/nested_json.rb +0 -19
  628. data/lib/phrase/formats/node_json.rb +0 -23
  629. data/lib/phrase/formats/php_array.rb +0 -19
  630. data/lib/phrase/formats/play_properties.rb +0 -15
  631. data/lib/phrase/formats/plist.rb +0 -19
  632. data/lib/phrase/formats/properties.rb +0 -19
  633. data/lib/phrase/formats/properties_xml.rb +0 -19
  634. data/lib/phrase/formats/qt_phrase_book.rb +0 -19
  635. data/lib/phrase/formats/qt_translation_source.rb +0 -19
  636. data/lib/phrase/formats/resx.rb +0 -19
  637. data/lib/phrase/formats/resx_windowsphone.rb +0 -19
  638. data/lib/phrase/formats/simple_json.rb +0 -19
  639. data/lib/phrase/formats/strings.rb +0 -45
  640. data/lib/phrase/formats/tmx.rb +0 -19
  641. data/lib/phrase/formats/windows8_resource.rb +0 -19
  642. data/lib/phrase/formats/xliff.rb +0 -19
  643. data/lib/phrase/formats/xml.rb +0 -49
  644. data/lib/phrase/formats/yaml.rb +0 -19
  645. data/lib/phrase/formats/yaml_symfony.rb +0 -19
  646. data/lib/phrase/formats/yaml_symfony2.rb +0 -8
  647. data/lib/phrase/hash_flattener.rb +0 -21
  648. data/lib/phrase/tool.rb +0 -46
  649. data/lib/phrase/tool/commands.rb +0 -56
  650. data/lib/phrase/tool/commands/base.rb +0 -73
  651. data/lib/phrase/tool/commands/init.rb +0 -51
  652. data/lib/phrase/tool/commands/pull.rb +0 -109
  653. data/lib/phrase/tool/commands/push.rb +0 -163
  654. data/lib/phrase/tool/commands/show_help.rb +0 -26
  655. data/lib/phrase/tool/commands/show_version.rb +0 -17
  656. data/lib/phrase/tool/commands/tags.rb +0 -29
  657. data/lib/phrase/tool/config.rb +0 -120
  658. data/lib/phrase/tool/encoding_detector.rb +0 -17
  659. data/lib/phrase/tool/locale.rb +0 -41
  660. data/lib/phrase/tool/options.rb +0 -32
  661. data/lib/phrase/tool/options_factory.rb +0 -150
  662. data/lib/phrase/tool/tag_validator.rb +0 -9
  663. data/lib/phrase/view_helpers.rb +0 -19
@@ -0,0 +1,408 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class GlossaryTermsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a glossary term
11
+ # Create a new glossary term.
12
+ # @param account_id [String] Account ID
13
+ # @param glossary_id [String] Glossary ID
14
+ # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
15
+ # @param [Hash] opts the optional parameters
16
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @return [GlossaryTerm]
18
+ def glossary_term_create(account_id, glossary_id, glossary_term_create_parameters, opts = {})
19
+ data, _status_code, _headers = glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts)
20
+ data
21
+ end
22
+
23
+ # Create a glossary term
24
+ # Create a new glossary term.
25
+ # @param account_id [String] Account ID
26
+ # @param glossary_id [String] Glossary ID
27
+ # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [Array<(Response<(GlossaryTerm)>, Integer, Hash)>] Response<(GlossaryTerm)> data, response status code and response headers
31
+ def glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_create ...'
34
+ end
35
+ # verify the required parameter 'account_id' is set
36
+ if @api_client.config.client_side_validation && account_id.nil?
37
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryTermsApi.glossary_term_create"
38
+ end
39
+ # verify the required parameter 'glossary_id' is set
40
+ if @api_client.config.client_side_validation && glossary_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'glossary_id' when calling GlossaryTermsApi.glossary_term_create"
42
+ end
43
+ # verify the required parameter 'glossary_term_create_parameters' is set
44
+ if @api_client.config.client_side_validation && glossary_term_create_parameters.nil?
45
+ fail ArgumentError, "Missing the required parameter 'glossary_term_create_parameters' when calling GlossaryTermsApi.glossary_term_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/accounts/{account_id}/glossaries/{glossary_id}/terms'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'glossary_id' + '}', CGI.escape(glossary_id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_create_parameters)
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'GlossaryTerm'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: GlossaryTermsApi#glossary_term_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ response = ::Phrase::Response.new(data, headers)
87
+ return response, status_code, headers
88
+ end
89
+
90
+ # Delete a glossary term
91
+ # Delete an existing glossary term.
92
+ # @param account_id [String] Account ID
93
+ # @param glossary_id [String] Glossary ID
94
+ # @param id [String] ID
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
97
+ # @return [nil]
98
+ def glossary_term_delete(account_id, glossary_id, id, opts = {})
99
+ data, _status_code, _headers = glossary_term_delete_with_http_info(account_id, glossary_id, id, opts)
100
+ data
101
+ end
102
+
103
+ # Delete a glossary term
104
+ # Delete an existing glossary term.
105
+ # @param account_id [String] Account ID
106
+ # @param glossary_id [String] Glossary ID
107
+ # @param id [String] ID
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
110
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
111
+ def glossary_term_delete_with_http_info(account_id, glossary_id, id, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_delete ...'
114
+ end
115
+ # verify the required parameter 'account_id' is set
116
+ if @api_client.config.client_side_validation && account_id.nil?
117
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryTermsApi.glossary_term_delete"
118
+ end
119
+ # verify the required parameter 'glossary_id' is set
120
+ if @api_client.config.client_side_validation && glossary_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'glossary_id' when calling GlossaryTermsApi.glossary_term_delete"
122
+ end
123
+ # verify the required parameter 'id' is set
124
+ if @api_client.config.client_side_validation && id.nil?
125
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryTermsApi.glossary_term_delete"
126
+ end
127
+ # resource path
128
+ local_var_path = '/accounts/{account_id}/glossaries/{glossary_id}/terms/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'glossary_id' + '}', CGI.escape(glossary_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+
133
+ # header parameters
134
+ header_params = opts[:header_params] || {}
135
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:body]
142
+
143
+ # return_type
144
+ return_type = opts[:return_type]
145
+
146
+ # auth_names
147
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
148
+
149
+ new_options = opts.merge(
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(:DELETE, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: GlossaryTermsApi#glossary_term_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ response = ::Phrase::Response.new(data, headers)
163
+ return response, status_code, headers
164
+ end
165
+
166
+ # Get a single glossary term
167
+ # Get details on a single glossary term.
168
+ # @param account_id [String] Account ID
169
+ # @param glossary_id [String] Glossary ID
170
+ # @param id [String] ID
171
+ # @param [Hash] opts the optional parameters
172
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
173
+ # @return [GlossaryTerm]
174
+ def glossary_term_show(account_id, glossary_id, id, opts = {})
175
+ data, _status_code, _headers = glossary_term_show_with_http_info(account_id, glossary_id, id, opts)
176
+ data
177
+ end
178
+
179
+ # Get a single glossary term
180
+ # Get details on a single glossary term.
181
+ # @param account_id [String] Account ID
182
+ # @param glossary_id [String] Glossary ID
183
+ # @param id [String] ID
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
186
+ # @return [Array<(Response<(GlossaryTerm)>, Integer, Hash)>] Response<(GlossaryTerm)> data, response status code and response headers
187
+ def glossary_term_show_with_http_info(account_id, glossary_id, id, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_show ...'
190
+ end
191
+ # verify the required parameter 'account_id' is set
192
+ if @api_client.config.client_side_validation && account_id.nil?
193
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryTermsApi.glossary_term_show"
194
+ end
195
+ # verify the required parameter 'glossary_id' is set
196
+ if @api_client.config.client_side_validation && glossary_id.nil?
197
+ fail ArgumentError, "Missing the required parameter 'glossary_id' when calling GlossaryTermsApi.glossary_term_show"
198
+ end
199
+ # verify the required parameter 'id' is set
200
+ if @api_client.config.client_side_validation && id.nil?
201
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryTermsApi.glossary_term_show"
202
+ end
203
+ # resource path
204
+ local_var_path = '/accounts/{account_id}/glossaries/{glossary_id}/terms/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'glossary_id' + '}', CGI.escape(glossary_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
205
+
206
+ # query parameters
207
+ query_params = opts[:query_params] || {}
208
+
209
+ # header parameters
210
+ header_params = opts[:header_params] || {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
213
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:body]
220
+
221
+ # return_type
222
+ return_type = opts[:return_type] || 'GlossaryTerm'
223
+
224
+ # auth_names
225
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
226
+
227
+ new_options = opts.merge(
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => return_type
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: GlossaryTermsApi#glossary_term_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ response = ::Phrase::Response.new(data, headers)
241
+ return response, status_code, headers
242
+ end
243
+
244
+ # Update a glossary term
245
+ # Update an existing glossary term.
246
+ # @param account_id [String] Account ID
247
+ # @param glossary_id [String] Glossary ID
248
+ # @param id [String] ID
249
+ # @param glossary_term_update_parameters [GlossaryTermUpdateParameters]
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
252
+ # @return [GlossaryTerm]
253
+ def glossary_term_update(account_id, glossary_id, id, glossary_term_update_parameters, opts = {})
254
+ data, _status_code, _headers = glossary_term_update_with_http_info(account_id, glossary_id, id, glossary_term_update_parameters, opts)
255
+ data
256
+ end
257
+
258
+ # Update a glossary term
259
+ # Update an existing glossary term.
260
+ # @param account_id [String] Account ID
261
+ # @param glossary_id [String] Glossary ID
262
+ # @param id [String] ID
263
+ # @param glossary_term_update_parameters [GlossaryTermUpdateParameters]
264
+ # @param [Hash] opts the optional parameters
265
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
266
+ # @return [Array<(Response<(GlossaryTerm)>, Integer, Hash)>] Response<(GlossaryTerm)> data, response status code and response headers
267
+ def glossary_term_update_with_http_info(account_id, glossary_id, id, glossary_term_update_parameters, opts = {})
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_update ...'
270
+ end
271
+ # verify the required parameter 'account_id' is set
272
+ if @api_client.config.client_side_validation && account_id.nil?
273
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryTermsApi.glossary_term_update"
274
+ end
275
+ # verify the required parameter 'glossary_id' is set
276
+ if @api_client.config.client_side_validation && glossary_id.nil?
277
+ fail ArgumentError, "Missing the required parameter 'glossary_id' when calling GlossaryTermsApi.glossary_term_update"
278
+ end
279
+ # verify the required parameter 'id' is set
280
+ if @api_client.config.client_side_validation && id.nil?
281
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryTermsApi.glossary_term_update"
282
+ end
283
+ # verify the required parameter 'glossary_term_update_parameters' is set
284
+ if @api_client.config.client_side_validation && glossary_term_update_parameters.nil?
285
+ fail ArgumentError, "Missing the required parameter 'glossary_term_update_parameters' when calling GlossaryTermsApi.glossary_term_update"
286
+ end
287
+ # resource path
288
+ local_var_path = '/accounts/{account_id}/glossaries/{glossary_id}/terms/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'glossary_id' + '}', CGI.escape(glossary_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
289
+
290
+ # query parameters
291
+ query_params = opts[:query_params] || {}
292
+
293
+ # header parameters
294
+ header_params = opts[:header_params] || {}
295
+ # HTTP header 'Accept' (if needed)
296
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
297
+ # HTTP header 'Content-Type'
298
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
299
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
300
+
301
+ # form parameters
302
+ form_params = opts[:form_params] || {}
303
+
304
+ # http body (model)
305
+ post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_update_parameters)
306
+
307
+ # return_type
308
+ return_type = opts[:return_type] || 'GlossaryTerm'
309
+
310
+ # auth_names
311
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
312
+
313
+ new_options = opts.merge(
314
+ :header_params => header_params,
315
+ :query_params => query_params,
316
+ :form_params => form_params,
317
+ :body => post_body,
318
+ :auth_names => auth_names,
319
+ :return_type => return_type
320
+ )
321
+
322
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "API called: GlossaryTermsApi#glossary_term_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
325
+ end
326
+ response = ::Phrase::Response.new(data, headers)
327
+ return response, status_code, headers
328
+ end
329
+
330
+ # List glossary terms
331
+ # List all glossary terms the current user has access to.
332
+ # @param account_id [String] Account ID
333
+ # @param glossary_id [String] Glossary ID
334
+ # @param [Hash] opts the optional parameters
335
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
336
+ # @option opts [Integer] :page Page number
337
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
338
+ # @return [Array<GlossaryTerm>]
339
+ def glossary_terms_list(account_id, glossary_id, opts = {})
340
+ data, _status_code, _headers = glossary_terms_list_with_http_info(account_id, glossary_id, opts)
341
+ data
342
+ end
343
+
344
+ # List glossary terms
345
+ # List all glossary terms the current user has access to.
346
+ # @param account_id [String] Account ID
347
+ # @param glossary_id [String] Glossary ID
348
+ # @param [Hash] opts the optional parameters
349
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
350
+ # @option opts [Integer] :page Page number
351
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
352
+ # @return [Array<(Response<(Array<GlossaryTerm>)>, Integer, Hash)>] Response<(Array<GlossaryTerm>)> data, response status code and response headers
353
+ def glossary_terms_list_with_http_info(account_id, glossary_id, opts = {})
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_terms_list ...'
356
+ end
357
+ # verify the required parameter 'account_id' is set
358
+ if @api_client.config.client_side_validation && account_id.nil?
359
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryTermsApi.glossary_terms_list"
360
+ end
361
+ # verify the required parameter 'glossary_id' is set
362
+ if @api_client.config.client_side_validation && glossary_id.nil?
363
+ fail ArgumentError, "Missing the required parameter 'glossary_id' when calling GlossaryTermsApi.glossary_terms_list"
364
+ end
365
+ # resource path
366
+ local_var_path = '/accounts/{account_id}/glossaries/{glossary_id}/terms'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'glossary_id' + '}', CGI.escape(glossary_id.to_s))
367
+
368
+ # query parameters
369
+ query_params = opts[:query_params] || {}
370
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
371
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
372
+
373
+ # header parameters
374
+ header_params = opts[:header_params] || {}
375
+ # HTTP header 'Accept' (if needed)
376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
377
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
378
+
379
+ # form parameters
380
+ form_params = opts[:form_params] || {}
381
+
382
+ # http body (model)
383
+ post_body = opts[:body]
384
+
385
+ # return_type
386
+ return_type = opts[:return_type] || 'Array<GlossaryTerm>'
387
+
388
+ # auth_names
389
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
390
+
391
+ new_options = opts.merge(
392
+ :header_params => header_params,
393
+ :query_params => query_params,
394
+ :form_params => form_params,
395
+ :body => post_body,
396
+ :auth_names => auth_names,
397
+ :return_type => return_type
398
+ )
399
+
400
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
401
+ if @api_client.config.debugging
402
+ @api_client.config.logger.debug "API called: GlossaryTermsApi#glossary_terms_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
403
+ end
404
+ response = ::Phrase::Response.new(data, headers)
405
+ return response, status_code, headers
406
+ end
407
+ end
408
+ end
@@ -0,0 +1,450 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class InvitationsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a new invitation
11
+ # Invite a person to an account. Developers and translators need <code>project_ids</code> and <code>locale_ids</code> assigned to access them. Access token scope must include <code>team.manage</code>.
12
+ # @param account_id [String] Account ID
13
+ # @param invitation_create_parameters [InvitationCreateParameters]
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @return [Invitation]
17
+ def invitation_create(account_id, invitation_create_parameters, opts = {})
18
+ data, _status_code, _headers = invitation_create_with_http_info(account_id, invitation_create_parameters, opts)
19
+ data
20
+ end
21
+
22
+ # Create a new invitation
23
+ # Invite a person to an account. Developers and translators need &lt;code&gt;project_ids&lt;/code&gt; and &lt;code&gt;locale_ids&lt;/code&gt; assigned to access them. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
24
+ # @param account_id [String] Account ID
25
+ # @param invitation_create_parameters [InvitationCreateParameters]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
29
+ def invitation_create_with_http_info(account_id, invitation_create_parameters, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_create ...'
32
+ end
33
+ # verify the required parameter 'account_id' is set
34
+ if @api_client.config.client_side_validation && account_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitation_create"
36
+ end
37
+ # verify the required parameter 'invitation_create_parameters' is set
38
+ if @api_client.config.client_side_validation && invitation_create_parameters.nil?
39
+ fail ArgumentError, "Missing the required parameter 'invitation_create_parameters' when calling InvitationsApi.invitation_create"
40
+ end
41
+ # resource path
42
+ local_var_path = '/accounts/{account_id}/invitations'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ # HTTP header 'Content-Type'
52
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
54
+
55
+ # form parameters
56
+ form_params = opts[:form_params] || {}
57
+
58
+ # http body (model)
59
+ post_body = opts[:body] || @api_client.object_to_http_body(invitation_create_parameters)
60
+
61
+ # return_type
62
+ return_type = opts[:return_type] || 'Invitation'
63
+
64
+ # auth_names
65
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
66
+
67
+ new_options = opts.merge(
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ response = ::Phrase::Response.new(data, headers)
81
+ return response, status_code, headers
82
+ end
83
+
84
+ # Delete an invitation
85
+ # Delete an existing invitation (must not be accepted yet). Access token scope must include <code>team.manage</code>.
86
+ # @param account_id [String] Account ID
87
+ # @param id [String] ID
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
90
+ # @return [nil]
91
+ def invitation_delete(account_id, id, opts = {})
92
+ data, _status_code, _headers = invitation_delete_with_http_info(account_id, id, opts)
93
+ data
94
+ end
95
+
96
+ # Delete an invitation
97
+ # Delete an existing invitation (must not be accepted yet). Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
98
+ # @param account_id [String] Account ID
99
+ # @param id [String] ID
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
102
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
103
+ def invitation_delete_with_http_info(account_id, id, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_delete ...'
106
+ end
107
+ # verify the required parameter 'account_id' is set
108
+ if @api_client.config.client_side_validation && account_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitation_delete"
110
+ end
111
+ # verify the required parameter 'id' is set
112
+ if @api_client.config.client_side_validation && id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_delete"
114
+ end
115
+ # resource path
116
+ local_var_path = '/accounts/{account_id}/invitations/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:body]
130
+
131
+ # return_type
132
+ return_type = opts[:return_type]
133
+
134
+ # auth_names
135
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
136
+
137
+ new_options = opts.merge(
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ response = ::Phrase::Response.new(data, headers)
151
+ return response, status_code, headers
152
+ end
153
+
154
+ # Resend an invitation
155
+ # Resend the invitation email (must not be accepted yet). Access token scope must include <code>team.manage</code>.
156
+ # @param account_id [String] Account ID
157
+ # @param id [String] ID
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
160
+ # @return [Invitation]
161
+ def invitation_resend(account_id, id, opts = {})
162
+ data, _status_code, _headers = invitation_resend_with_http_info(account_id, id, opts)
163
+ data
164
+ end
165
+
166
+ # Resend an invitation
167
+ # Resend the invitation email (must not be accepted yet). Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
168
+ # @param account_id [String] Account ID
169
+ # @param id [String] ID
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
172
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
173
+ def invitation_resend_with_http_info(account_id, id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_resend ...'
176
+ end
177
+ # verify the required parameter 'account_id' is set
178
+ if @api_client.config.client_side_validation && account_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitation_resend"
180
+ end
181
+ # verify the required parameter 'id' is set
182
+ if @api_client.config.client_side_validation && id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_resend"
184
+ end
185
+ # resource path
186
+ local_var_path = '/accounts/{account_id}/invitations/{id}/resend'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+
191
+ # header parameters
192
+ header_params = opts[:header_params] || {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
195
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:body]
202
+
203
+ # return_type
204
+ return_type = opts[:return_type] || 'Invitation'
205
+
206
+ # auth_names
207
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
208
+
209
+ new_options = opts.merge(
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_resend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ response = ::Phrase::Response.new(data, headers)
223
+ return response, status_code, headers
224
+ end
225
+
226
+ # Get a single invitation
227
+ # Get details on a single invitation. Access token scope must include <code>team.manage</code>.
228
+ # @param account_id [String] Account ID
229
+ # @param id [String] ID
230
+ # @param [Hash] opts the optional parameters
231
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
232
+ # @return [Invitation]
233
+ def invitation_show(account_id, id, opts = {})
234
+ data, _status_code, _headers = invitation_show_with_http_info(account_id, id, opts)
235
+ data
236
+ end
237
+
238
+ # Get a single invitation
239
+ # Get details on a single invitation. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
240
+ # @param account_id [String] Account ID
241
+ # @param id [String] ID
242
+ # @param [Hash] opts the optional parameters
243
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
244
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
245
+ def invitation_show_with_http_info(account_id, id, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_show ...'
248
+ end
249
+ # verify the required parameter 'account_id' is set
250
+ if @api_client.config.client_side_validation && account_id.nil?
251
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitation_show"
252
+ end
253
+ # verify the required parameter 'id' is set
254
+ if @api_client.config.client_side_validation && id.nil?
255
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_show"
256
+ end
257
+ # resource path
258
+ local_var_path = '/accounts/{account_id}/invitations/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
259
+
260
+ # query parameters
261
+ query_params = opts[:query_params] || {}
262
+
263
+ # header parameters
264
+ header_params = opts[:header_params] || {}
265
+ # HTTP header 'Accept' (if needed)
266
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
267
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
268
+
269
+ # form parameters
270
+ form_params = opts[:form_params] || {}
271
+
272
+ # http body (model)
273
+ post_body = opts[:body]
274
+
275
+ # return_type
276
+ return_type = opts[:return_type] || 'Invitation'
277
+
278
+ # auth_names
279
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
280
+
281
+ new_options = opts.merge(
282
+ :header_params => header_params,
283
+ :query_params => query_params,
284
+ :form_params => form_params,
285
+ :body => post_body,
286
+ :auth_names => auth_names,
287
+ :return_type => return_type
288
+ )
289
+
290
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
293
+ end
294
+ response = ::Phrase::Response.new(data, headers)
295
+ return response, status_code, headers
296
+ end
297
+
298
+ # Update an invitation
299
+ # Update an existing invitation (must not be accepted yet). The <code>email</code> cannot be updated. Developers and translators need <code>project_ids</code> and <code>locale_ids</code> assigned to access them. Access token scope must include <code>team.manage</code>.
300
+ # @param account_id [String] Account ID
301
+ # @param id [String] ID
302
+ # @param invitation_update_parameters [InvitationUpdateParameters]
303
+ # @param [Hash] opts the optional parameters
304
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
305
+ # @return [Invitation]
306
+ def invitation_update(account_id, id, invitation_update_parameters, opts = {})
307
+ data, _status_code, _headers = invitation_update_with_http_info(account_id, id, invitation_update_parameters, opts)
308
+ data
309
+ end
310
+
311
+ # Update an invitation
312
+ # Update an existing invitation (must not be accepted yet). The &lt;code&gt;email&lt;/code&gt; cannot be updated. Developers and translators need &lt;code&gt;project_ids&lt;/code&gt; and &lt;code&gt;locale_ids&lt;/code&gt; assigned to access them. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
313
+ # @param account_id [String] Account ID
314
+ # @param id [String] ID
315
+ # @param invitation_update_parameters [InvitationUpdateParameters]
316
+ # @param [Hash] opts the optional parameters
317
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
318
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
319
+ def invitation_update_with_http_info(account_id, id, invitation_update_parameters, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_update ...'
322
+ end
323
+ # verify the required parameter 'account_id' is set
324
+ if @api_client.config.client_side_validation && account_id.nil?
325
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitation_update"
326
+ end
327
+ # verify the required parameter 'id' is set
328
+ if @api_client.config.client_side_validation && id.nil?
329
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_update"
330
+ end
331
+ # verify the required parameter 'invitation_update_parameters' is set
332
+ if @api_client.config.client_side_validation && invitation_update_parameters.nil?
333
+ fail ArgumentError, "Missing the required parameter 'invitation_update_parameters' when calling InvitationsApi.invitation_update"
334
+ end
335
+ # resource path
336
+ local_var_path = '/accounts/{account_id}/invitations/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
337
+
338
+ # query parameters
339
+ query_params = opts[:query_params] || {}
340
+
341
+ # header parameters
342
+ header_params = opts[:header_params] || {}
343
+ # HTTP header 'Accept' (if needed)
344
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
345
+ # HTTP header 'Content-Type'
346
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
347
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
348
+
349
+ # form parameters
350
+ form_params = opts[:form_params] || {}
351
+
352
+ # http body (model)
353
+ post_body = opts[:body] || @api_client.object_to_http_body(invitation_update_parameters)
354
+
355
+ # return_type
356
+ return_type = opts[:return_type] || 'Invitation'
357
+
358
+ # auth_names
359
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
360
+
361
+ new_options = opts.merge(
362
+ :header_params => header_params,
363
+ :query_params => query_params,
364
+ :form_params => form_params,
365
+ :body => post_body,
366
+ :auth_names => auth_names,
367
+ :return_type => return_type
368
+ )
369
+
370
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
+ end
374
+ response = ::Phrase::Response.new(data, headers)
375
+ return response, status_code, headers
376
+ end
377
+
378
+ # List invitations
379
+ # List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include <code>team.manage</code>.
380
+ # @param account_id [String] Account ID
381
+ # @param [Hash] opts the optional parameters
382
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
383
+ # @option opts [Integer] :page Page number
384
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
385
+ # @return [Array<Invitation>]
386
+ def invitations_list(account_id, opts = {})
387
+ data, _status_code, _headers = invitations_list_with_http_info(account_id, opts)
388
+ data
389
+ end
390
+
391
+ # List invitations
392
+ # List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
393
+ # @param account_id [String] Account ID
394
+ # @param [Hash] opts the optional parameters
395
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
396
+ # @option opts [Integer] :page Page number
397
+ # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
398
+ # @return [Array<(Response<(Array<Invitation>)>, Integer, Hash)>] Response<(Array<Invitation>)> data, response status code and response headers
399
+ def invitations_list_with_http_info(account_id, opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitations_list ...'
402
+ end
403
+ # verify the required parameter 'account_id' is set
404
+ if @api_client.config.client_side_validation && account_id.nil?
405
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling InvitationsApi.invitations_list"
406
+ end
407
+ # resource path
408
+ local_var_path = '/accounts/{account_id}/invitations'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
409
+
410
+ # query parameters
411
+ query_params = opts[:query_params] || {}
412
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
413
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
419
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
420
+
421
+ # form parameters
422
+ form_params = opts[:form_params] || {}
423
+
424
+ # http body (model)
425
+ post_body = opts[:body]
426
+
427
+ # return_type
428
+ return_type = opts[:return_type] || 'Array<Invitation>'
429
+
430
+ # auth_names
431
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
432
+
433
+ new_options = opts.merge(
434
+ :header_params => header_params,
435
+ :query_params => query_params,
436
+ :form_params => form_params,
437
+ :body => post_body,
438
+ :auth_names => auth_names,
439
+ :return_type => return_type
440
+ )
441
+
442
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug "API called: InvitationsApi#invitations_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
445
+ end
446
+ response = ::Phrase::Response.new(data, headers)
447
+ return response, status_code, headers
448
+ end
449
+ end
450
+ end