phrase 2.24.0 → 2.26.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.
@@ -0,0 +1,508 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class RepoSyncsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Activate a Repo Sync
11
+ # Activate a deactivated Repo Sync. Active syncs can be used to import and export translations, and imports to Phrase are automatically triggered by pushes to the repository, if configured.
12
+ # @param account_id [String] Account ID
13
+ # @param repo_sync_id [String] Repo Sync ID
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @return [RepoSync]
17
+ def repo_sync_activate(account_id, repo_sync_id, opts = {})
18
+ data, _status_code, _headers = repo_sync_activate_with_http_info(account_id, repo_sync_id, opts)
19
+ data
20
+ end
21
+
22
+ # Activate a Repo Sync
23
+ # Activate a deactivated Repo Sync. Active syncs can be used to import and export translations, and imports to Phrase are automatically triggered by pushes to the repository, if configured.
24
+ # @param account_id [String] Account ID
25
+ # @param repo_sync_id [String] Repo Sync ID
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
+ # @return [Array<(Response<(RepoSync)>, Integer, Hash)>] Response<(RepoSync)> data, response status code and response headers
29
+ def repo_sync_activate_with_http_info(account_id, repo_sync_id, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_activate ...'
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 RepoSyncsApi.repo_sync_activate"
36
+ end
37
+ # verify the required parameter 'repo_sync_id' is set
38
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
39
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_activate"
40
+ end
41
+ # resource path
42
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/activate'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_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
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body]
58
+
59
+ # return_type
60
+ return_type = opts[:return_type] || 'RepoSync'
61
+
62
+ # auth_names
63
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
64
+
65
+ new_options = opts.merge(
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_activate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ response = ::Phrase::Response.new(data, headers)
79
+ return response, status_code, headers
80
+ end
81
+
82
+ # Deactivate a Repo Sync
83
+ # Deactivate an active Repo Sync. Import and export can't be performed on deactivated syncs and the pushes to the repository won't trigger the import to Phrase.
84
+ # @param account_id [String] Account ID
85
+ # @param repo_sync_id [String] Repo Sync ID
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
88
+ # @return [RepoSync]
89
+ def repo_sync_deactivate(account_id, repo_sync_id, opts = {})
90
+ data, _status_code, _headers = repo_sync_deactivate_with_http_info(account_id, repo_sync_id, opts)
91
+ data
92
+ end
93
+
94
+ # Deactivate a Repo Sync
95
+ # Deactivate an active Repo Sync. Import and export can&#39;t be performed on deactivated syncs and the pushes to the repository won&#39;t trigger the import to Phrase.
96
+ # @param account_id [String] Account ID
97
+ # @param repo_sync_id [String] Repo Sync ID
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
+ # @return [Array<(Response<(RepoSync)>, Integer, Hash)>] Response<(RepoSync)> data, response status code and response headers
101
+ def repo_sync_deactivate_with_http_info(account_id, repo_sync_id, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_deactivate ...'
104
+ end
105
+ # verify the required parameter 'account_id' is set
106
+ if @api_client.config.client_side_validation && account_id.nil?
107
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_deactivate"
108
+ end
109
+ # verify the required parameter 'repo_sync_id' is set
110
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_deactivate"
112
+ end
113
+ # resource path
114
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/deactivate'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
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] || 'RepoSync'
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(:POST, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_deactivate\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
+ # Repository Syncs History
155
+ # Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
156
+ # @param account_id [String] Account ID
157
+ # @param repo_sync_id [String] Repo Sync ID
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
160
+ # @return [Array<RepoSyncEvent>]
161
+ def repo_sync_events(account_id, repo_sync_id, opts = {})
162
+ data, _status_code, _headers = repo_sync_events_with_http_info(account_id, repo_sync_id, opts)
163
+ data
164
+ end
165
+
166
+ # Repository Syncs History
167
+ # Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
168
+ # @param account_id [String] Account ID
169
+ # @param repo_sync_id [String] Repo Sync 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<(Array<RepoSyncEvent>)>, Integer, Hash)>] Response<(Array<RepoSyncEvent>)> data, response status code and response headers
173
+ def repo_sync_events_with_http_info(account_id, repo_sync_id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_events ...'
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 RepoSyncsApi.repo_sync_events"
180
+ end
181
+ # verify the required parameter 'repo_sync_id' is set
182
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_events"
184
+ end
185
+ # resource path
186
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/events'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_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] || 'Array<RepoSyncEvent>'
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(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_events\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
+ # Export to code repository
227
+ # > Beta: this feature will change in the future. Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
228
+ # @param account_id [String] Account ID
229
+ # @param repo_sync_id [String] Repo Sync ID
230
+ # @param [Hash] opts the optional parameters
231
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
232
+ # @return [RepoSyncExport]
233
+ def repo_sync_export(account_id, repo_sync_id, opts = {})
234
+ data, _status_code, _headers = repo_sync_export_with_http_info(account_id, repo_sync_id, opts)
235
+ data
236
+ end
237
+
238
+ # Export to code repository
239
+ # &gt; Beta: this feature will change in the future. Export translations from Phrase Strings to repository provider according to the .phrase.yml file within the code repository. *Export is done asynchronously and may take several seconds depending on the project size.*
240
+ # @param account_id [String] Account ID
241
+ # @param repo_sync_id [String] Repo Sync 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<(RepoSyncExport)>, Integer, Hash)>] Response<(RepoSyncExport)> data, response status code and response headers
245
+ def repo_sync_export_with_http_info(account_id, repo_sync_id, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_export ...'
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 RepoSyncsApi.repo_sync_export"
252
+ end
253
+ # verify the required parameter 'repo_sync_id' is set
254
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
255
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_export"
256
+ end
257
+ # resource path
258
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/export'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_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] || 'RepoSyncExport'
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(:POST, local_var_path, new_options)
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_export\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
+ # Import from code repository
299
+ # > Beta: this feature will change in the future. Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
300
+ # @param account_id [String] Account ID
301
+ # @param repo_sync_id [String] Repo Sync ID
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
304
+ # @return [RepoSyncImport]
305
+ def repo_sync_import(account_id, repo_sync_id, opts = {})
306
+ data, _status_code, _headers = repo_sync_import_with_http_info(account_id, repo_sync_id, opts)
307
+ data
308
+ end
309
+
310
+ # Import from code repository
311
+ # &gt; Beta: this feature will change in the future. Import translations from repository provider to Phrase Strings according to the .phrase.yml file within the code repository. _Import is done asynchronously and may take several seconds depending on the project size._
312
+ # @param account_id [String] Account ID
313
+ # @param repo_sync_id [String] Repo Sync ID
314
+ # @param [Hash] opts the optional parameters
315
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
316
+ # @return [Array<(Response<(RepoSyncImport)>, Integer, Hash)>] Response<(RepoSyncImport)> data, response status code and response headers
317
+ def repo_sync_import_with_http_info(account_id, repo_sync_id, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_import ...'
320
+ end
321
+ # verify the required parameter 'account_id' is set
322
+ if @api_client.config.client_side_validation && account_id.nil?
323
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_import"
324
+ end
325
+ # verify the required parameter 'repo_sync_id' is set
326
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
327
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_import"
328
+ end
329
+ # resource path
330
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}/import'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s))
331
+
332
+ # query parameters
333
+ query_params = opts[:query_params] || {}
334
+
335
+ # header parameters
336
+ header_params = opts[:header_params] || {}
337
+ # HTTP header 'Accept' (if needed)
338
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
339
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
340
+
341
+ # form parameters
342
+ form_params = opts[:form_params] || {}
343
+
344
+ # http body (model)
345
+ post_body = opts[:body]
346
+
347
+ # return_type
348
+ return_type = opts[:return_type] || 'RepoSyncImport'
349
+
350
+ # auth_names
351
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
352
+
353
+ new_options = opts.merge(
354
+ :header_params => header_params,
355
+ :query_params => query_params,
356
+ :form_params => form_params,
357
+ :body => post_body,
358
+ :auth_names => auth_names,
359
+ :return_type => return_type
360
+ )
361
+
362
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ response = ::Phrase::Response.new(data, headers)
367
+ return response, status_code, headers
368
+ end
369
+
370
+ # Get Repo Syncs
371
+ # Lists all Repo Syncs from an account
372
+ # @param account_id [String] Account ID
373
+ # @param [Hash] opts the optional parameters
374
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
375
+ # @return [Array<RepoSync>]
376
+ def repo_sync_list(account_id, opts = {})
377
+ data, _status_code, _headers = repo_sync_list_with_http_info(account_id, opts)
378
+ data
379
+ end
380
+
381
+ # Get Repo Syncs
382
+ # Lists all Repo Syncs from an account
383
+ # @param account_id [String] Account ID
384
+ # @param [Hash] opts the optional parameters
385
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
386
+ # @return [Array<(Response<(Array<RepoSync>)>, Integer, Hash)>] Response<(Array<RepoSync>)> data, response status code and response headers
387
+ def repo_sync_list_with_http_info(account_id, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_list ...'
390
+ end
391
+ # verify the required parameter 'account_id' is set
392
+ if @api_client.config.client_side_validation && account_id.nil?
393
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_list"
394
+ end
395
+ # resource path
396
+ local_var_path = '/accounts/{account_id}/repo_syncs'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+
401
+ # header parameters
402
+ header_params = opts[:header_params] || {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
406
+
407
+ # form parameters
408
+ form_params = opts[:form_params] || {}
409
+
410
+ # http body (model)
411
+ post_body = opts[:body]
412
+
413
+ # return_type
414
+ return_type = opts[:return_type] || 'Array<RepoSync>'
415
+
416
+ # auth_names
417
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
418
+
419
+ new_options = opts.merge(
420
+ :header_params => header_params,
421
+ :query_params => query_params,
422
+ :form_params => form_params,
423
+ :body => post_body,
424
+ :auth_names => auth_names,
425
+ :return_type => return_type
426
+ )
427
+
428
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
429
+ if @api_client.config.debugging
430
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
431
+ end
432
+ response = ::Phrase::Response.new(data, headers)
433
+ return response, status_code, headers
434
+ end
435
+
436
+ # Get a single Repo Sync
437
+ # Shows a single Repo Sync setting.
438
+ # @param account_id [String] Account ID
439
+ # @param repo_sync_id [String] Repo Sync ID
440
+ # @param [Hash] opts the optional parameters
441
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
442
+ # @return [RepoSync]
443
+ def repo_sync_show(account_id, repo_sync_id, opts = {})
444
+ data, _status_code, _headers = repo_sync_show_with_http_info(account_id, repo_sync_id, opts)
445
+ data
446
+ end
447
+
448
+ # Get a single Repo Sync
449
+ # Shows a single Repo Sync setting.
450
+ # @param account_id [String] Account ID
451
+ # @param repo_sync_id [String] Repo Sync ID
452
+ # @param [Hash] opts the optional parameters
453
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
454
+ # @return [Array<(Response<(RepoSync)>, Integer, Hash)>] Response<(RepoSync)> data, response status code and response headers
455
+ def repo_sync_show_with_http_info(account_id, repo_sync_id, opts = {})
456
+ if @api_client.config.debugging
457
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_show ...'
458
+ end
459
+ # verify the required parameter 'account_id' is set
460
+ if @api_client.config.client_side_validation && account_id.nil?
461
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_show"
462
+ end
463
+ # verify the required parameter 'repo_sync_id' is set
464
+ if @api_client.config.client_side_validation && repo_sync_id.nil?
465
+ fail ArgumentError, "Missing the required parameter 'repo_sync_id' when calling RepoSyncsApi.repo_sync_show"
466
+ end
467
+ # resource path
468
+ local_var_path = '/accounts/{account_id}/repo_syncs/{repo_sync_id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'repo_sync_id' + '}', CGI.escape(repo_sync_id.to_s))
469
+
470
+ # query parameters
471
+ query_params = opts[:query_params] || {}
472
+
473
+ # header parameters
474
+ header_params = opts[:header_params] || {}
475
+ # HTTP header 'Accept' (if needed)
476
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
477
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
478
+
479
+ # form parameters
480
+ form_params = opts[:form_params] || {}
481
+
482
+ # http body (model)
483
+ post_body = opts[:body]
484
+
485
+ # return_type
486
+ return_type = opts[:return_type] || 'RepoSync'
487
+
488
+ # auth_names
489
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
490
+
491
+ new_options = opts.merge(
492
+ :header_params => header_params,
493
+ :query_params => query_params,
494
+ :form_params => form_params,
495
+ :body => post_body,
496
+ :auth_names => auth_names,
497
+ :return_type => return_type
498
+ )
499
+
500
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
501
+ if @api_client.config.debugging
502
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
503
+ end
504
+ response = ::Phrase::Response.new(data, headers)
505
+ return response, status_code, headers
506
+ end
507
+ end
508
+ end