phrase 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +50 -387
  3. data/docs/AccountsApi.md +2 -4
  4. data/docs/AuthorizationsApi.md +10 -14
  5. data/docs/BitbucketSyncApi.md +3 -6
  6. data/docs/BlacklistedKeysApi.md +10 -14
  7. data/docs/BranchesApi.md +12 -18
  8. data/docs/CommentsApi.md +13 -20
  9. data/docs/DistributionsApi.md +10 -14
  10. data/docs/FormatsApi.md +1 -2
  11. data/docs/GitLabSyncApi.md +7 -14
  12. data/docs/{GlossaryApi.md → GlossariesApi.md} +26 -30
  13. data/docs/GlossaryTermTranslationsApi.md +8 -10
  14. data/docs/GlossaryTermsApi.md +10 -14
  15. data/docs/InvitationsApi.md +11 -16
  16. data/docs/JobLocalesApi.md +12 -18
  17. data/docs/JobsApi.md +15 -24
  18. data/docs/KeysApi.md +18 -26
  19. data/docs/KeysSearchParameters.md +1 -1
  20. data/docs/KeysTagParameters.md +1 -1
  21. data/docs/KeysUntagParameters.md +1 -1
  22. data/docs/LocalesApi.md +13 -18
  23. data/docs/MembersApi.md +4 -8
  24. data/docs/OrdersApi.md +10 -14
  25. data/docs/ProjectCreateParameters.md +3 -1
  26. data/docs/ProjectsApi.md +10 -14
  27. data/docs/ReleasesApi.md +11 -16
  28. data/docs/ScreenshotMarkersApi.md +10 -14
  29. data/docs/ScreenshotsApi.md +10 -14
  30. data/docs/SpacesApi.md +13 -20
  31. data/docs/StyleGuidesApi.md +10 -14
  32. data/docs/TagsApi.md +9 -12
  33. data/docs/Team.md +29 -0
  34. data/docs/TeamCreateParameters.md +17 -0
  35. data/docs/TeamDetail.md +29 -0
  36. data/docs/TeamUpdateParameters.md +17 -0
  37. data/docs/TeamsApi.md +721 -0
  38. data/docs/TeamsProjectsCreateParameters.md +17 -0
  39. data/docs/TeamsSpacesCreateParameters.md +17 -0
  40. data/docs/TeamsUsersCreateParameters.md +17 -0
  41. data/docs/TranslationsApi.md +28 -44
  42. data/docs/TranslationsExcludeParameters.md +1 -1
  43. data/docs/TranslationsIncludeParameters.md +1 -1
  44. data/docs/TranslationsReviewParameters.md +1 -1
  45. data/docs/TranslationsSearchParameters.md +1 -1
  46. data/docs/TranslationsUnverifyParameters.md +1 -1
  47. data/docs/TranslationsVerifyParameters.md +1 -1
  48. data/docs/UploadCreateParameters.md +2 -2
  49. data/docs/UploadsApi.md +12 -10
  50. data/docs/UsersApi.md +1 -2
  51. data/docs/VersionsHistoryApi.md +2 -4
  52. data/docs/WebhooksApi.md +11 -16
  53. data/git_push.sh +2 -2
  54. data/lib/phrase.rb +9 -1
  55. data/lib/phrase/api/authorizations_api.rb +10 -8
  56. data/lib/phrase/api/bitbucket_sync_api.rb +3 -3
  57. data/lib/phrase/api/blacklisted_keys_api.rb +10 -8
  58. data/lib/phrase/api/branches_api.rb +16 -14
  59. data/lib/phrase/api/comments_api.rb +19 -17
  60. data/lib/phrase/api/distributions_api.rb +10 -8
  61. data/lib/phrase/api/git_lab_sync_api.rb +3 -3
  62. data/lib/phrase/api/{glossary_api.rb → glossaries_api.rb} +31 -29
  63. data/lib/phrase/api/glossary_term_translations_api.rb +10 -8
  64. data/lib/phrase/api/glossary_terms_api.rb +10 -8
  65. data/lib/phrase/api/invitations_api.rb +10 -8
  66. data/lib/phrase/api/job_locales_api.rb +10 -8
  67. data/lib/phrase/api/jobs_api.rb +13 -11
  68. data/lib/phrase/api/keys_api.rb +14 -12
  69. data/lib/phrase/api/locales_api.rb +15 -13
  70. data/lib/phrase/api/members_api.rb +3 -3
  71. data/lib/phrase/api/orders_api.rb +10 -8
  72. data/lib/phrase/api/projects_api.rb +10 -8
  73. data/lib/phrase/api/releases_api.rb +10 -8
  74. data/lib/phrase/api/screenshot_markers_api.rb +10 -8
  75. data/lib/phrase/api/screenshots_api.rb +10 -8
  76. data/lib/phrase/api/spaces_api.rb +16 -14
  77. data/lib/phrase/api/style_guides_api.rb +10 -8
  78. data/lib/phrase/api/tags_api.rb +10 -8
  79. data/lib/phrase/api/teams_api.rb +840 -0
  80. data/lib/phrase/api/translations_api.rb +13 -11
  81. data/lib/phrase/api/uploads_api.rb +13 -5
  82. data/lib/phrase/api/webhooks_api.rb +13 -11
  83. data/lib/phrase/models/keys_search_parameters.rb +1 -1
  84. data/lib/phrase/models/keys_tag_parameters.rb +1 -1
  85. data/lib/phrase/models/keys_untag_parameters.rb +1 -1
  86. data/lib/phrase/models/project_create_parameters.rb +14 -4
  87. data/lib/phrase/models/team.rb +254 -0
  88. data/lib/phrase/models/team_create_parameters.rb +195 -0
  89. data/lib/phrase/models/team_detail.rb +254 -0
  90. data/lib/phrase/models/team_update_parameters.rb +195 -0
  91. data/lib/phrase/models/teams_projects_create_parameters.rb +195 -0
  92. data/lib/phrase/models/teams_spaces_create_parameters.rb +195 -0
  93. data/lib/phrase/models/teams_users_create_parameters.rb +195 -0
  94. data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
  95. data/lib/phrase/models/translations_include_parameters.rb +1 -1
  96. data/lib/phrase/models/translations_review_parameters.rb +1 -1
  97. data/lib/phrase/models/translations_search_parameters.rb +1 -1
  98. data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
  99. data/lib/phrase/models/translations_verify_parameters.rb +1 -1
  100. data/lib/phrase/models/upload_create_parameters.rb +4 -8
  101. data/lib/phrase/version.rb +1 -1
  102. data/spec/api/authorizations_api_spec.rb +1 -1
  103. data/spec/api/blacklisted_keys_api_spec.rb +1 -1
  104. data/spec/api/branches_api_spec.rb +1 -1
  105. data/spec/api/comments_api_spec.rb +1 -1
  106. data/spec/api/distributions_api_spec.rb +1 -1
  107. data/spec/api/{glossary_api_spec.rb → glossaries_api_spec.rb} +7 -7
  108. data/spec/api/glossary_term_translations_api_spec.rb +1 -1
  109. data/spec/api/glossary_terms_api_spec.rb +1 -1
  110. data/spec/api/invitations_api_spec.rb +1 -1
  111. data/spec/api/job_locales_api_spec.rb +1 -1
  112. data/spec/api/jobs_api_spec.rb +1 -1
  113. data/spec/api/keys_api_spec.rb +3 -3
  114. data/spec/api/locales_api_spec.rb +2 -2
  115. data/spec/api/orders_api_spec.rb +1 -1
  116. data/spec/api/projects_api_spec.rb +1 -1
  117. data/spec/api/releases_api_spec.rb +1 -1
  118. data/spec/api/screenshot_markers_api_spec.rb +1 -1
  119. data/spec/api/screenshots_api_spec.rb +1 -1
  120. data/spec/api/spaces_api_spec.rb +1 -1
  121. data/spec/api/style_guides_api_spec.rb +1 -1
  122. data/spec/api/tags_api_spec.rb +1 -1
  123. data/spec/api/teams_api_spec.rb +185 -0
  124. data/spec/api/translations_api_spec.rb +4 -4
  125. data/spec/api/uploads_api_spec.rb +3 -1
  126. data/spec/api/webhooks_api_spec.rb +1 -1
  127. data/spec/models/project_create_parameters_spec.rb +6 -0
  128. data/spec/models/team_create_parameters_spec.rb +29 -0
  129. data/spec/models/team_detail_spec.rb +65 -0
  130. data/spec/models/team_spec.rb +65 -0
  131. data/spec/models/team_update_parameters_spec.rb +29 -0
  132. data/spec/models/teams_projects_create_parameters_spec.rb +29 -0
  133. data/spec/models/teams_spaces_create_parameters_spec.rb +29 -0
  134. data/spec/models/teams_users_create_parameters_spec.rb +29 -0
  135. metadata +183 -151
@@ -13,10 +13,10 @@ module Phrase
13
13
  # @param distribution_create_parameters [DistributionCreateParameters]
14
14
  # @param [Hash] opts the optional parameters
15
15
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
- # @return [nil]
16
+ # @return [Distribution]
17
17
  def distribution_create(account_id, distribution_create_parameters, opts = {})
18
- distribution_create_with_http_info(account_id, distribution_create_parameters, opts)
19
- nil
18
+ data, _status_code, _headers = distribution_create_with_http_info(account_id, distribution_create_parameters, opts)
19
+ data
20
20
  end
21
21
 
22
22
  # Create a distribution
@@ -25,7 +25,7 @@ module Phrase
25
25
  # @param distribution_create_parameters [DistributionCreateParameters]
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
28
+ # @return [Array<(Response<(Distribution)>, Integer, Hash)>] Response<(Distribution)> data, response status code and response headers
29
29
  def distribution_create_with_http_info(account_id, distribution_create_parameters, opts = {})
30
30
  if @api_client.config.debugging
31
31
  @api_client.config.logger.debug 'Calling API: DistributionsApi.distribution_create ...'
@@ -46,6 +46,8 @@ module Phrase
46
46
 
47
47
  # header parameters
48
48
  header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
51
  # HTTP header 'Content-Type'
50
52
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
53
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
@@ -57,7 +59,7 @@ module Phrase
57
59
  post_body = opts[:body] || @api_client.object_to_http_body(distribution_create_parameters)
58
60
 
59
61
  # return_type
60
- return_type = opts[:return_type]
62
+ return_type = opts[:return_type] || 'Distribution'
61
63
 
62
64
  # auth_names
63
65
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -87,8 +89,8 @@ module Phrase
87
89
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
88
90
  # @return [nil]
89
91
  def distribution_delete(account_id, id, opts = {})
90
- distribution_delete_with_http_info(account_id, id, opts)
91
- nil
92
+ data, _status_code, _headers = distribution_delete_with_http_info(account_id, id, opts)
93
+ data
92
94
  end
93
95
 
94
96
  # Delete a distribution
@@ -97,7 +99,7 @@ module Phrase
97
99
  # @param id [String] ID
98
100
  # @param [Hash] opts the optional parameters
99
101
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
102
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
101
103
  def distribution_delete_with_http_info(account_id, id, opts = {})
102
104
  if @api_client.config.debugging
103
105
  @api_client.config.logger.debug 'Calling API: DistributionsApi.distribution_delete ...'
@@ -15,8 +15,8 @@ module Phrase
15
15
  # @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
16
16
  # @return [nil]
17
17
  def gitlab_sync_delete(id, opts = {})
18
- gitlab_sync_delete_with_http_info(id, opts)
19
- nil
18
+ data, _status_code, _headers = gitlab_sync_delete_with_http_info(id, opts)
19
+ data
20
20
  end
21
21
 
22
22
  # Delete single Sync Setting
@@ -25,7 +25,7 @@ module Phrase
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
27
27
  # @option opts [String] :account_id Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
28
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
28
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
29
29
  def gitlab_sync_delete_with_http_info(id, opts = {})
30
30
  if @api_client.config.debugging
31
31
  @api_client.config.logger.debug 'Calling API: GitLabSyncApi.gitlab_sync_delete ...'
@@ -1,7 +1,7 @@
1
1
  require 'cgi'
2
2
 
3
3
  module Phrase
4
- class GlossaryApi
4
+ class GlossariesApi
5
5
  attr_accessor :api_client
6
6
 
7
7
  def initialize(api_client = ApiClient.default)
@@ -30,11 +30,11 @@ module Phrase
30
30
  # @return [Array<(Response<(Array<Glossary>)>, Integer, Hash)>] Response<(Array<Glossary>)> data, response status code and response headers
31
31
  def glossaries_list_with_http_info(account_id, opts = {})
32
32
  if @api_client.config.debugging
33
- @api_client.config.logger.debug 'Calling API: GlossaryApi.glossaries_list ...'
33
+ @api_client.config.logger.debug 'Calling API: GlossariesApi.glossaries_list ...'
34
34
  end
35
35
  # verify the required parameter 'account_id' is set
36
36
  if @api_client.config.client_side_validation && account_id.nil?
37
- fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryApi.glossaries_list"
37
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossaries_list"
38
38
  end
39
39
  # resource path
40
40
  local_var_path = '/accounts/{account_id}/glossaries'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
@@ -73,7 +73,7 @@ module Phrase
73
73
 
74
74
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
75
75
  if @api_client.config.debugging
76
- @api_client.config.logger.debug "API called: GlossaryApi#glossaries_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
76
+ @api_client.config.logger.debug "API called: GlossariesApi#glossaries_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
77
  end
78
78
  response = ::Phrase::Response.new(data, headers)
79
79
  return response, status_code, headers
@@ -85,10 +85,10 @@ module Phrase
85
85
  # @param glossary_create_parameters [GlossaryCreateParameters]
86
86
  # @param [Hash] opts the optional parameters
87
87
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
88
- # @return [nil]
88
+ # @return [Glossary]
89
89
  def glossary_create(account_id, glossary_create_parameters, opts = {})
90
- glossary_create_with_http_info(account_id, glossary_create_parameters, opts)
91
- nil
90
+ data, _status_code, _headers = glossary_create_with_http_info(account_id, glossary_create_parameters, opts)
91
+ data
92
92
  end
93
93
 
94
94
  # Create a glossary
@@ -97,18 +97,18 @@ module Phrase
97
97
  # @param glossary_create_parameters [GlossaryCreateParameters]
98
98
  # @param [Hash] opts the optional parameters
99
99
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
100
+ # @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
101
101
  def glossary_create_with_http_info(account_id, glossary_create_parameters, opts = {})
102
102
  if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: GlossaryApi.glossary_create ...'
103
+ @api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_create ...'
104
104
  end
105
105
  # verify the required parameter 'account_id' is set
106
106
  if @api_client.config.client_side_validation && account_id.nil?
107
- fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryApi.glossary_create"
107
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_create"
108
108
  end
109
109
  # verify the required parameter 'glossary_create_parameters' is set
110
110
  if @api_client.config.client_side_validation && glossary_create_parameters.nil?
111
- fail ArgumentError, "Missing the required parameter 'glossary_create_parameters' when calling GlossaryApi.glossary_create"
111
+ fail ArgumentError, "Missing the required parameter 'glossary_create_parameters' when calling GlossariesApi.glossary_create"
112
112
  end
113
113
  # resource path
114
114
  local_var_path = '/accounts/{account_id}/glossaries'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
@@ -118,6 +118,8 @@ module Phrase
118
118
 
119
119
  # header parameters
120
120
  header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
123
  # HTTP header 'Content-Type'
122
124
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
125
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
@@ -129,7 +131,7 @@ module Phrase
129
131
  post_body = opts[:body] || @api_client.object_to_http_body(glossary_create_parameters)
130
132
 
131
133
  # return_type
132
- return_type = opts[:return_type]
134
+ return_type = opts[:return_type] || 'Glossary'
133
135
 
134
136
  # auth_names
135
137
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -145,7 +147,7 @@ module Phrase
145
147
 
146
148
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
147
149
  if @api_client.config.debugging
148
- @api_client.config.logger.debug "API called: GlossaryApi#glossary_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ @api_client.config.logger.debug "API called: GlossariesApi#glossary_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
151
  end
150
152
  response = ::Phrase::Response.new(data, headers)
151
153
  return response, status_code, headers
@@ -159,8 +161,8 @@ module Phrase
159
161
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
160
162
  # @return [nil]
161
163
  def glossary_delete(account_id, id, opts = {})
162
- glossary_delete_with_http_info(account_id, id, opts)
163
- nil
164
+ data, _status_code, _headers = glossary_delete_with_http_info(account_id, id, opts)
165
+ data
164
166
  end
165
167
 
166
168
  # Delete a glossary
@@ -169,18 +171,18 @@ module Phrase
169
171
  # @param id [String] ID
170
172
  # @param [Hash] opts the optional parameters
171
173
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
172
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
174
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
173
175
  def glossary_delete_with_http_info(account_id, id, opts = {})
174
176
  if @api_client.config.debugging
175
- @api_client.config.logger.debug 'Calling API: GlossaryApi.glossary_delete ...'
177
+ @api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_delete ...'
176
178
  end
177
179
  # verify the required parameter 'account_id' is set
178
180
  if @api_client.config.client_side_validation && account_id.nil?
179
- fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryApi.glossary_delete"
181
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_delete"
180
182
  end
181
183
  # verify the required parameter 'id' is set
182
184
  if @api_client.config.client_side_validation && id.nil?
183
- fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryApi.glossary_delete"
185
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_delete"
184
186
  end
185
187
  # resource path
186
188
  local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -215,7 +217,7 @@ module Phrase
215
217
 
216
218
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
217
219
  if @api_client.config.debugging
218
- @api_client.config.logger.debug "API called: GlossaryApi#glossary_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ @api_client.config.logger.debug "API called: GlossariesApi#glossary_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
221
  end
220
222
  response = ::Phrase::Response.new(data, headers)
221
223
  return response, status_code, headers
@@ -242,15 +244,15 @@ module Phrase
242
244
  # @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
243
245
  def glossary_show_with_http_info(account_id, id, opts = {})
244
246
  if @api_client.config.debugging
245
- @api_client.config.logger.debug 'Calling API: GlossaryApi.glossary_show ...'
247
+ @api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_show ...'
246
248
  end
247
249
  # verify the required parameter 'account_id' is set
248
250
  if @api_client.config.client_side_validation && account_id.nil?
249
- fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryApi.glossary_show"
251
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_show"
250
252
  end
251
253
  # verify the required parameter 'id' is set
252
254
  if @api_client.config.client_side_validation && id.nil?
253
- fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryApi.glossary_show"
255
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_show"
254
256
  end
255
257
  # resource path
256
258
  local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -287,7 +289,7 @@ module Phrase
287
289
 
288
290
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
289
291
  if @api_client.config.debugging
290
- @api_client.config.logger.debug "API called: GlossaryApi#glossary_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ @api_client.config.logger.debug "API called: GlossariesApi#glossary_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
291
293
  end
292
294
  response = ::Phrase::Response.new(data, headers)
293
295
  return response, status_code, headers
@@ -316,19 +318,19 @@ module Phrase
316
318
  # @return [Array<(Response<(Glossary)>, Integer, Hash)>] Response<(Glossary)> data, response status code and response headers
317
319
  def glossary_update_with_http_info(account_id, id, glossary_update_parameters, opts = {})
318
320
  if @api_client.config.debugging
319
- @api_client.config.logger.debug 'Calling API: GlossaryApi.glossary_update ...'
321
+ @api_client.config.logger.debug 'Calling API: GlossariesApi.glossary_update ...'
320
322
  end
321
323
  # verify the required parameter 'account_id' is set
322
324
  if @api_client.config.client_side_validation && account_id.nil?
323
- fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossaryApi.glossary_update"
325
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling GlossariesApi.glossary_update"
324
326
  end
325
327
  # verify the required parameter 'id' is set
326
328
  if @api_client.config.client_side_validation && id.nil?
327
- fail ArgumentError, "Missing the required parameter 'id' when calling GlossaryApi.glossary_update"
329
+ fail ArgumentError, "Missing the required parameter 'id' when calling GlossariesApi.glossary_update"
328
330
  end
329
331
  # verify the required parameter 'glossary_update_parameters' is set
330
332
  if @api_client.config.client_side_validation && glossary_update_parameters.nil?
331
- fail ArgumentError, "Missing the required parameter 'glossary_update_parameters' when calling GlossaryApi.glossary_update"
333
+ fail ArgumentError, "Missing the required parameter 'glossary_update_parameters' when calling GlossariesApi.glossary_update"
332
334
  end
333
335
  # resource path
334
336
  local_var_path = '/accounts/{account_id}/glossaries/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -367,7 +369,7 @@ module Phrase
367
369
 
368
370
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
369
371
  if @api_client.config.debugging
370
- @api_client.config.logger.debug "API called: GlossaryApi#glossary_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
+ @api_client.config.logger.debug "API called: GlossariesApi#glossary_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371
373
  end
372
374
  response = ::Phrase::Response.new(data, headers)
373
375
  return response, status_code, headers
@@ -15,10 +15,10 @@ module Phrase
15
15
  # @param glossary_term_translation_create_parameters [GlossaryTermTranslationCreateParameters]
16
16
  # @param [Hash] opts the optional parameters
17
17
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
18
- # @return [nil]
18
+ # @return [GlossaryTermTranslation]
19
19
  def glossary_term_translation_create(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts = {})
20
- glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts)
21
- nil
20
+ data, _status_code, _headers = glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts)
21
+ data
22
22
  end
23
23
 
24
24
  # Create a glossary term translation
@@ -29,7 +29,7 @@ module Phrase
29
29
  # @param glossary_term_translation_create_parameters [GlossaryTermTranslationCreateParameters]
30
30
  # @param [Hash] opts the optional parameters
31
31
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
32
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
32
+ # @return [Array<(Response<(GlossaryTermTranslation)>, Integer, Hash)>] Response<(GlossaryTermTranslation)> data, response status code and response headers
33
33
  def glossary_term_translation_create_with_http_info(account_id, glossary_id, term_id, glossary_term_translation_create_parameters, opts = {})
34
34
  if @api_client.config.debugging
35
35
  @api_client.config.logger.debug 'Calling API: GlossaryTermTranslationsApi.glossary_term_translation_create ...'
@@ -58,6 +58,8 @@ module Phrase
58
58
 
59
59
  # header parameters
60
60
  header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
63
  # HTTP header 'Content-Type'
62
64
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
65
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
@@ -69,7 +71,7 @@ module Phrase
69
71
  post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_translation_create_parameters)
70
72
 
71
73
  # return_type
72
- return_type = opts[:return_type]
74
+ return_type = opts[:return_type] || 'GlossaryTermTranslation'
73
75
 
74
76
  # auth_names
75
77
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -101,8 +103,8 @@ module Phrase
101
103
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
102
104
  # @return [nil]
103
105
  def glossary_term_translation_delete(account_id, glossary_id, term_id, id, opts = {})
104
- glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts)
105
- nil
106
+ data, _status_code, _headers = glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts)
107
+ data
106
108
  end
107
109
 
108
110
  # Delete a glossary term translation
@@ -113,7 +115,7 @@ module Phrase
113
115
  # @param id [String] ID
114
116
  # @param [Hash] opts the optional parameters
115
117
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
116
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
118
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
117
119
  def glossary_term_translation_delete_with_http_info(account_id, glossary_id, term_id, id, opts = {})
118
120
  if @api_client.config.debugging
119
121
  @api_client.config.logger.debug 'Calling API: GlossaryTermTranslationsApi.glossary_term_translation_delete ...'
@@ -14,10 +14,10 @@ module Phrase
14
14
  # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
15
15
  # @param [Hash] opts the optional parameters
16
16
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
- # @return [nil]
17
+ # @return [GlossaryTerm]
18
18
  def glossary_term_create(account_id, glossary_id, glossary_term_create_parameters, opts = {})
19
- glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts)
20
- nil
19
+ data, _status_code, _headers = glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts)
20
+ data
21
21
  end
22
22
 
23
23
  # Create a glossary term
@@ -27,7 +27,7 @@ module Phrase
27
27
  # @param glossary_term_create_parameters [GlossaryTermCreateParameters]
28
28
  # @param [Hash] opts the optional parameters
29
29
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
30
+ # @return [Array<(Response<(GlossaryTerm)>, Integer, Hash)>] Response<(GlossaryTerm)> data, response status code and response headers
31
31
  def glossary_term_create_with_http_info(account_id, glossary_id, glossary_term_create_parameters, opts = {})
32
32
  if @api_client.config.debugging
33
33
  @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_create ...'
@@ -52,6 +52,8 @@ module Phrase
52
52
 
53
53
  # header parameters
54
54
  header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
57
  # HTTP header 'Content-Type'
56
58
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
59
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
@@ -63,7 +65,7 @@ module Phrase
63
65
  post_body = opts[:body] || @api_client.object_to_http_body(glossary_term_create_parameters)
64
66
 
65
67
  # return_type
66
- return_type = opts[:return_type]
68
+ return_type = opts[:return_type] || 'GlossaryTerm'
67
69
 
68
70
  # auth_names
69
71
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -94,8 +96,8 @@ module Phrase
94
96
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
95
97
  # @return [nil]
96
98
  def glossary_term_delete(account_id, glossary_id, id, opts = {})
97
- glossary_term_delete_with_http_info(account_id, glossary_id, id, opts)
98
- nil
99
+ data, _status_code, _headers = glossary_term_delete_with_http_info(account_id, glossary_id, id, opts)
100
+ data
99
101
  end
100
102
 
101
103
  # Delete a glossary term
@@ -105,7 +107,7 @@ module Phrase
105
107
  # @param id [String] ID
106
108
  # @param [Hash] opts the optional parameters
107
109
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
108
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
110
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
109
111
  def glossary_term_delete_with_http_info(account_id, glossary_id, id, opts = {})
110
112
  if @api_client.config.debugging
111
113
  @api_client.config.logger.debug 'Calling API: GlossaryTermsApi.glossary_term_delete ...'
@@ -13,10 +13,10 @@ module Phrase
13
13
  # @param invitation_create_parameters [InvitationCreateParameters]
14
14
  # @param [Hash] opts the optional parameters
15
15
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
- # @return [nil]
16
+ # @return [Invitation]
17
17
  def invitation_create(account_id, invitation_create_parameters, opts = {})
18
- invitation_create_with_http_info(account_id, invitation_create_parameters, opts)
19
- nil
18
+ data, _status_code, _headers = invitation_create_with_http_info(account_id, invitation_create_parameters, opts)
19
+ data
20
20
  end
21
21
 
22
22
  # Create a new invitation
@@ -25,7 +25,7 @@ module Phrase
25
25
  # @param invitation_create_parameters [InvitationCreateParameters]
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
28
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
29
29
  def invitation_create_with_http_info(account_id, invitation_create_parameters, opts = {})
30
30
  if @api_client.config.debugging
31
31
  @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_create ...'
@@ -46,6 +46,8 @@ module Phrase
46
46
 
47
47
  # header parameters
48
48
  header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
51
  # HTTP header 'Content-Type'
50
52
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
53
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
@@ -57,7 +59,7 @@ module Phrase
57
59
  post_body = opts[:body] || @api_client.object_to_http_body(invitation_create_parameters)
58
60
 
59
61
  # return_type
60
- return_type = opts[:return_type]
62
+ return_type = opts[:return_type] || 'Invitation'
61
63
 
62
64
  # auth_names
63
65
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -87,8 +89,8 @@ module Phrase
87
89
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
88
90
  # @return [nil]
89
91
  def invitation_delete(account_id, id, opts = {})
90
- invitation_delete_with_http_info(account_id, id, opts)
91
- nil
92
+ data, _status_code, _headers = invitation_delete_with_http_info(account_id, id, opts)
93
+ data
92
94
  end
93
95
 
94
96
  # Delete an invitation
@@ -97,7 +99,7 @@ module Phrase
97
99
  # @param id [String] ID
98
100
  # @param [Hash] opts the optional parameters
99
101
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
102
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
101
103
  def invitation_delete_with_http_info(account_id, id, opts = {})
102
104
  if @api_client.config.debugging
103
105
  @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_delete ...'