phrase 2.8.7 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -3
- data/docs/OrganizationJobTemplate.md +25 -0
- data/docs/OrganizationJobTemplateCreateParameters.md +19 -0
- data/docs/OrganizationJobTemplateDetails.md +31 -0
- data/docs/OrganizationJobTemplateLocaleUpdateParameters.md +27 -0
- data/docs/OrganizationJobTemplateLocalesApi.md +341 -0
- data/docs/OrganizationJobTemplateLocalesCreateParameters.md +27 -0
- data/docs/OrganizationJobTemplateUpdateParameters.md +19 -0
- data/docs/OrganizationJobTemplatesApi.md +331 -0
- data/docs/Release.md +2 -0
- data/docs/ReleaseCreateParameters.md +2 -0
- data/docs/ReleasePreview.md +2 -0
- data/lib/phrase/api/organization_job_template_locales_api.rb +408 -0
- data/lib/phrase/api/organization_job_templates_api.rb +378 -0
- data/lib/phrase/models/organization_job_template.rb +230 -0
- data/lib/phrase/models/organization_job_template_create_parameters.rb +210 -0
- data/lib/phrase/models/organization_job_template_details.rb +267 -0
- data/lib/phrase/models/organization_job_template_locale_update_parameters.rb +253 -0
- data/lib/phrase/models/organization_job_template_locales_create_parameters.rb +263 -0
- data/lib/phrase/models/organization_job_template_update_parameters.rb +210 -0
- data/lib/phrase/models/release.rb +12 -1
- data/lib/phrase/models/release_create_parameters.rb +13 -1
- data/lib/phrase/models/release_preview.rb +12 -1
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -0
- data/spec/api/organization_job_template_locales_api_spec.rb +100 -0
- data/spec/api/organization_job_templates_api_spec.rb +95 -0
- data/spec/models/organization_job_template_create_parameters_spec.rb +35 -0
- data/spec/models/organization_job_template_details_spec.rb +71 -0
- data/spec/models/organization_job_template_locale_update_parameters_spec.rb +59 -0
- data/spec/models/organization_job_template_locales_create_parameters_spec.rb +59 -0
- data/spec/models/organization_job_template_spec.rb +53 -0
- data/spec/models/organization_job_template_update_parameters_spec.rb +35 -0
- data/spec/models/release_create_parameters_spec.rb +6 -0
- data/spec/models/release_preview_spec.rb +6 -0
- data/spec/models/release_spec.rb +6 -0
- metadata +240 -208
@@ -0,0 +1,408 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class OrganizationJobTemplateLocalesApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Delete an organization job template locale
|
11
|
+
# Delete an existing organization job template locale.
|
12
|
+
# @param account_id [String] Account ID
|
13
|
+
# @param job_template_id [String] Job Template ID
|
14
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
15
|
+
# @param [Hash] opts the optional parameters
|
16
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
|
+
# @return [nil]
|
18
|
+
def organization_job_template_locale_delete(account_id, job_template_id, job_template_locale_id, opts = {})
|
19
|
+
data, _status_code, _headers = organization_job_template_locale_delete_with_http_info(account_id, job_template_id, job_template_locale_id, opts)
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
# Delete an organization job template locale
|
24
|
+
# Delete an existing organization job template locale.
|
25
|
+
# @param account_id [String] Account ID
|
26
|
+
# @param job_template_id [String] Job Template ID
|
27
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
30
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
31
|
+
def organization_job_template_locale_delete_with_http_info(account_id, job_template_id, job_template_locale_id, opts = {})
|
32
|
+
if @api_client.config.debugging
|
33
|
+
@api_client.config.logger.debug 'Calling API: OrganizationJobTemplateLocalesApi.organization_job_template_locale_delete ...'
|
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 OrganizationJobTemplateLocalesApi.organization_job_template_locale_delete"
|
38
|
+
end
|
39
|
+
# verify the required parameter 'job_template_id' is set
|
40
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_delete"
|
42
|
+
end
|
43
|
+
# verify the required parameter 'job_template_locale_id' is set
|
44
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_delete"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/accounts/{account_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:body]
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:return_type]
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: OrganizationJobTemplateLocalesApi#organization_job_template_locale_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
response = ::Phrase::Response.new(data, headers)
|
83
|
+
return response, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Get a single organization job template locale
|
87
|
+
# Get a single job template locale for a given organization job template.
|
88
|
+
# @param account_id [String] Account ID
|
89
|
+
# @param job_template_id [String] Job Template ID
|
90
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
93
|
+
# @return [JobTemplateLocales]
|
94
|
+
def organization_job_template_locale_show(account_id, job_template_id, job_template_locale_id, opts = {})
|
95
|
+
data, _status_code, _headers = organization_job_template_locale_show_with_http_info(account_id, job_template_id, job_template_locale_id, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Get a single organization job template locale
|
100
|
+
# Get a single job template locale for a given organization job template.
|
101
|
+
# @param account_id [String] Account ID
|
102
|
+
# @param job_template_id [String] Job Template ID
|
103
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
106
|
+
# @return [Array<(Response<(JobTemplateLocales)>, Integer, Hash)>] Response<(JobTemplateLocales)> data, response status code and response headers
|
107
|
+
def organization_job_template_locale_show_with_http_info(account_id, job_template_id, job_template_locale_id, opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: OrganizationJobTemplateLocalesApi.organization_job_template_locale_show ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'account_id' is set
|
112
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_show"
|
114
|
+
end
|
115
|
+
# verify the required parameter 'job_template_id' is set
|
116
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_show"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'job_template_locale_id' is set
|
120
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_show"
|
122
|
+
end
|
123
|
+
# resource path
|
124
|
+
local_var_path = '/accounts/{account_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = opts[:query_params] || {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = opts[:header_params] || {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
134
|
+
|
135
|
+
# form parameters
|
136
|
+
form_params = opts[:form_params] || {}
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = opts[:body]
|
140
|
+
|
141
|
+
# return_type
|
142
|
+
return_type = opts[:return_type] || 'JobTemplateLocales'
|
143
|
+
|
144
|
+
# auth_names
|
145
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
146
|
+
|
147
|
+
new_options = opts.merge(
|
148
|
+
:header_params => header_params,
|
149
|
+
:query_params => query_params,
|
150
|
+
:form_params => form_params,
|
151
|
+
:body => post_body,
|
152
|
+
:auth_names => auth_names,
|
153
|
+
:return_type => return_type
|
154
|
+
)
|
155
|
+
|
156
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
157
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug "API called: OrganizationJobTemplateLocalesApi#organization_job_template_locale_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
159
|
+
end
|
160
|
+
response = ::Phrase::Response.new(data, headers)
|
161
|
+
return response, status_code, headers
|
162
|
+
end
|
163
|
+
|
164
|
+
# Update an organization job template locale
|
165
|
+
# Update an existing organization job template locale.
|
166
|
+
# @param account_id [String] Account ID
|
167
|
+
# @param job_template_id [String] Job Template ID
|
168
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
169
|
+
# @param organization_job_template_locale_update_parameters [OrganizationJobTemplateLocaleUpdateParameters]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
172
|
+
# @return [JobTemplateLocales]
|
173
|
+
def organization_job_template_locale_update(account_id, job_template_id, job_template_locale_id, organization_job_template_locale_update_parameters, opts = {})
|
174
|
+
data, _status_code, _headers = organization_job_template_locale_update_with_http_info(account_id, job_template_id, job_template_locale_id, organization_job_template_locale_update_parameters, opts)
|
175
|
+
data
|
176
|
+
end
|
177
|
+
|
178
|
+
# Update an organization job template locale
|
179
|
+
# Update an existing organization job template locale.
|
180
|
+
# @param account_id [String] Account ID
|
181
|
+
# @param job_template_id [String] Job Template ID
|
182
|
+
# @param job_template_locale_id [String] Job Template Locale ID
|
183
|
+
# @param organization_job_template_locale_update_parameters [OrganizationJobTemplateLocaleUpdateParameters]
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
186
|
+
# @return [Array<(Response<(JobTemplateLocales)>, Integer, Hash)>] Response<(JobTemplateLocales)> data, response status code and response headers
|
187
|
+
def organization_job_template_locale_update_with_http_info(account_id, job_template_id, job_template_locale_id, organization_job_template_locale_update_parameters, opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: OrganizationJobTemplateLocalesApi.organization_job_template_locale_update ...'
|
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 OrganizationJobTemplateLocalesApi.organization_job_template_locale_update"
|
194
|
+
end
|
195
|
+
# verify the required parameter 'job_template_id' is set
|
196
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_update"
|
198
|
+
end
|
199
|
+
# verify the required parameter 'job_template_locale_id' is set
|
200
|
+
if @api_client.config.client_side_validation && job_template_locale_id.nil?
|
201
|
+
fail ArgumentError, "Missing the required parameter 'job_template_locale_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_update"
|
202
|
+
end
|
203
|
+
# verify the required parameter 'organization_job_template_locale_update_parameters' is set
|
204
|
+
if @api_client.config.client_side_validation && organization_job_template_locale_update_parameters.nil?
|
205
|
+
fail ArgumentError, "Missing the required parameter 'organization_job_template_locale_update_parameters' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locale_update"
|
206
|
+
end
|
207
|
+
# resource path
|
208
|
+
local_var_path = '/accounts/{account_id}/job_templates/{job_template_id}/locales/{job_template_locale_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_id.to_s)).sub('{' + 'job_template_locale_id' + '}', CGI.escape(job_template_locale_id.to_s))
|
209
|
+
|
210
|
+
# query parameters
|
211
|
+
query_params = opts[:query_params] || {}
|
212
|
+
|
213
|
+
# header parameters
|
214
|
+
header_params = opts[:header_params] || {}
|
215
|
+
# HTTP header 'Accept' (if needed)
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
217
|
+
# HTTP header 'Content-Type'
|
218
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
219
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
220
|
+
|
221
|
+
# form parameters
|
222
|
+
form_params = opts[:form_params] || {}
|
223
|
+
|
224
|
+
# http body (model)
|
225
|
+
post_body = opts[:body] || @api_client.object_to_http_body(organization_job_template_locale_update_parameters)
|
226
|
+
|
227
|
+
# return_type
|
228
|
+
return_type = opts[:return_type] || 'JobTemplateLocales'
|
229
|
+
|
230
|
+
# auth_names
|
231
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
232
|
+
|
233
|
+
new_options = opts.merge(
|
234
|
+
:header_params => header_params,
|
235
|
+
:query_params => query_params,
|
236
|
+
:form_params => form_params,
|
237
|
+
:body => post_body,
|
238
|
+
:auth_names => auth_names,
|
239
|
+
:return_type => return_type
|
240
|
+
)
|
241
|
+
|
242
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "API called: OrganizationJobTemplateLocalesApi#organization_job_template_locale_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
+
end
|
246
|
+
response = ::Phrase::Response.new(data, headers)
|
247
|
+
return response, status_code, headers
|
248
|
+
end
|
249
|
+
|
250
|
+
# Create an organization job template locale
|
251
|
+
# Create a new organization job template locale.
|
252
|
+
# @param account_id [String] Account ID
|
253
|
+
# @param job_template_id [String] Job Template ID
|
254
|
+
# @param organization_job_template_locales_create_parameters [OrganizationJobTemplateLocalesCreateParameters]
|
255
|
+
# @param [Hash] opts the optional parameters
|
256
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
257
|
+
# @return [JobTemplateLocales]
|
258
|
+
def organization_job_template_locales_create(account_id, job_template_id, organization_job_template_locales_create_parameters, opts = {})
|
259
|
+
data, _status_code, _headers = organization_job_template_locales_create_with_http_info(account_id, job_template_id, organization_job_template_locales_create_parameters, opts)
|
260
|
+
data
|
261
|
+
end
|
262
|
+
|
263
|
+
# Create an organization job template locale
|
264
|
+
# Create a new organization job template locale.
|
265
|
+
# @param account_id [String] Account ID
|
266
|
+
# @param job_template_id [String] Job Template ID
|
267
|
+
# @param organization_job_template_locales_create_parameters [OrganizationJobTemplateLocalesCreateParameters]
|
268
|
+
# @param [Hash] opts the optional parameters
|
269
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
270
|
+
# @return [Array<(Response<(JobTemplateLocales)>, Integer, Hash)>] Response<(JobTemplateLocales)> data, response status code and response headers
|
271
|
+
def organization_job_template_locales_create_with_http_info(account_id, job_template_id, organization_job_template_locales_create_parameters, opts = {})
|
272
|
+
if @api_client.config.debugging
|
273
|
+
@api_client.config.logger.debug 'Calling API: OrganizationJobTemplateLocalesApi.organization_job_template_locales_create ...'
|
274
|
+
end
|
275
|
+
# verify the required parameter 'account_id' is set
|
276
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
277
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locales_create"
|
278
|
+
end
|
279
|
+
# verify the required parameter 'job_template_id' is set
|
280
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
281
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locales_create"
|
282
|
+
end
|
283
|
+
# verify the required parameter 'organization_job_template_locales_create_parameters' is set
|
284
|
+
if @api_client.config.client_side_validation && organization_job_template_locales_create_parameters.nil?
|
285
|
+
fail ArgumentError, "Missing the required parameter 'organization_job_template_locales_create_parameters' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locales_create"
|
286
|
+
end
|
287
|
+
# resource path
|
288
|
+
local_var_path = '/accounts/{account_id}/job_templates/{job_template_id}/locales'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_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(organization_job_template_locales_create_parameters)
|
306
|
+
|
307
|
+
# return_type
|
308
|
+
return_type = opts[:return_type] || 'JobTemplateLocales'
|
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(:POST, local_var_path, new_options)
|
323
|
+
if @api_client.config.debugging
|
324
|
+
@api_client.config.logger.debug "API called: OrganizationJobTemplateLocalesApi#organization_job_template_locales_create\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 organization job template locales
|
331
|
+
# List all job template locales for a given organization job template.
|
332
|
+
# @param account_id [String] Account ID
|
333
|
+
# @param job_template_id [String] Job Template 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 Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
338
|
+
# @return [Array<JobTemplateLocales>]
|
339
|
+
def organization_job_template_locales_list(account_id, job_template_id, opts = {})
|
340
|
+
data, _status_code, _headers = organization_job_template_locales_list_with_http_info(account_id, job_template_id, opts)
|
341
|
+
data
|
342
|
+
end
|
343
|
+
|
344
|
+
# List organization job template locales
|
345
|
+
# List all job template locales for a given organization job template.
|
346
|
+
# @param account_id [String] Account ID
|
347
|
+
# @param job_template_id [String] Job Template 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 Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
352
|
+
# @return [Array<(Response<(Array<JobTemplateLocales>)>, Integer, Hash)>] Response<(Array<JobTemplateLocales>)> data, response status code and response headers
|
353
|
+
def organization_job_template_locales_list_with_http_info(account_id, job_template_id, opts = {})
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug 'Calling API: OrganizationJobTemplateLocalesApi.organization_job_template_locales_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 OrganizationJobTemplateLocalesApi.organization_job_template_locales_list"
|
360
|
+
end
|
361
|
+
# verify the required parameter 'job_template_id' is set
|
362
|
+
if @api_client.config.client_side_validation && job_template_id.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'job_template_id' when calling OrganizationJobTemplateLocalesApi.organization_job_template_locales_list"
|
364
|
+
end
|
365
|
+
# resource path
|
366
|
+
local_var_path = '/accounts/{account_id}/job_templates/{job_template_id}/locales'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'job_template_id' + '}', CGI.escape(job_template_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<JobTemplateLocales>'
|
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: OrganizationJobTemplateLocalesApi#organization_job_template_locales_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
|