lib/phrase/api/job_locales_api.rb in phrase-2.4.0 vs lib/phrase/api/job_locales_api.rb in phrase-2.5.0
- old
+ new
@@ -72,11 +72,11 @@
# return_type
return_type = opts[:return_type] || 'JobLocale'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -91,10 +91,96 @@
end
response = ::Phrase::Response.new(data, headers)
return response, status_code, headers
end
+ # Review a job locale
+ # Mark job locale as reviewed.
+ # @param project_id [String] Project ID
+ # @param job_id [String] Job ID
+ # @param id [String] ID
+ # @param job_locale_complete_review_parameters [JobLocaleCompleteReviewParameters]
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @return [JobLocale]
+ def job_locale_complete_review(project_id, job_id, id, job_locale_complete_review_parameters, opts = {})
+ data, _status_code, _headers = job_locale_complete_review_with_http_info(project_id, job_id, id, job_locale_complete_review_parameters, opts)
+ data
+ end
+
+ # Review a job locale
+ # Mark job locale as reviewed.
+ # @param project_id [String] Project ID
+ # @param job_id [String] Job ID
+ # @param id [String] ID
+ # @param job_locale_complete_review_parameters [JobLocaleCompleteReviewParameters]
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @return [Array<(Response<(JobLocale)>, Integer, Hash)>] Response<(JobLocale)> data, response status code and response headers
+ def job_locale_complete_review_with_http_info(project_id, job_id, id, job_locale_complete_review_parameters, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: JobLocalesApi.job_locale_complete_review ...'
+ end
+ # verify the required parameter 'project_id' is set
+ if @api_client.config.client_side_validation && project_id.nil?
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling JobLocalesApi.job_locale_complete_review"
+ end
+ # verify the required parameter 'job_id' is set
+ if @api_client.config.client_side_validation && job_id.nil?
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling JobLocalesApi.job_locale_complete_review"
+ end
+ # verify the required parameter 'id' is set
+ if @api_client.config.client_side_validation && id.nil?
+ fail ArgumentError, "Missing the required parameter 'id' when calling JobLocalesApi.job_locale_complete_review"
+ end
+ # verify the required parameter 'job_locale_complete_review_parameters' is set
+ if @api_client.config.client_side_validation && job_locale_complete_review_parameters.nil?
+ fail ArgumentError, "Missing the required parameter 'job_locale_complete_review_parameters' when calling JobLocalesApi.job_locale_complete_review"
+ end
+ # resource path
+ local_var_path = '/projects/{project_id}/jobs/{job_id}/locales/{id}/complete_review'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:body] || @api_client.object_to_http_body(job_locale_complete_review_parameters)
+
+ # return_type
+ return_type = opts[:return_type] || 'JobLocale'
+
+ # auth_names
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
+
+ new_options = opts.merge(
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: JobLocalesApi#job_locale_complete_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ response = ::Phrase::Response.new(data, headers)
+ return response, status_code, headers
+ end
+
# Delete a job locale
# Delete an existing job locale.
# @param project_id [String] Project ID
# @param job_id [String] Job ID
# @param id [String] ID
@@ -151,11 +237,11 @@
# return_type
return_type = opts[:return_type]
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -237,11 +323,11 @@
# return_type
return_type = opts[:return_type] || 'JobLocale'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -318,11 +404,11 @@
# return_type
return_type = opts[:return_type] || 'JobLocale'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -404,11 +490,11 @@
# return_type
return_type = opts[:return_type] || 'JobLocale'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -484,11 +570,11 @@
# return_type
return_type = opts[:return_type] || 'JobLocale'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
@@ -565,10 +651,10 @@
# return_type
return_type = opts[:return_type] || 'Array<JobLocale>'
# auth_names
- auth_names = opts[:auth_names] || ['Basic', 'Token']
+ auth_names = opts[:auth_names] || ['Basic', 'Token', 'bearerAuth']
new_options = opts.merge(
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,