phrase 2.16.0 → 2.17.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,393 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class FigmaAttachmentsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a Figma attachment
11
+ # Create a new Figma attachment.
12
+ # @param project_id [String] Project ID
13
+ # @param figma_attachment_create_parameters [FigmaAttachmentCreateParameters]
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @option opts [String] :branch specify the branch to use
17
+ # @return [FigmaAttachment]
18
+ def figma_attachment_create(project_id, figma_attachment_create_parameters, opts = {})
19
+ data, _status_code, _headers = figma_attachment_create_with_http_info(project_id, figma_attachment_create_parameters, opts)
20
+ data
21
+ end
22
+
23
+ # Create a Figma attachment
24
+ # Create a new Figma attachment.
25
+ # @param project_id [String] Project ID
26
+ # @param figma_attachment_create_parameters [FigmaAttachmentCreateParameters]
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @option opts [String] :branch specify the branch to use
30
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
31
+ def figma_attachment_create_with_http_info(project_id, figma_attachment_create_parameters, opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_create ...'
34
+ end
35
+ # verify the required parameter 'project_id' is set
36
+ if @api_client.config.client_side_validation && project_id.nil?
37
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_create"
38
+ end
39
+ # verify the required parameter 'figma_attachment_create_parameters' is set
40
+ if @api_client.config.client_side_validation && figma_attachment_create_parameters.nil?
41
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_create_parameters' when calling FigmaAttachmentsApi.figma_attachment_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/projects/{project_id}/figma_attachments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ # HTTP header 'Content-Type'
55
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
56
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(figma_attachment_create_parameters)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'FigmaAttachment'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ response = ::Phrase::Response.new(data, headers)
84
+ return response, status_code, headers
85
+ end
86
+
87
+ # Delete a Figma attachment
88
+ # Delete an existing Figma attachment.
89
+ # @param project_id [String] Project ID
90
+ # @param id [String] ID
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
93
+ # @option opts [String] :branch specify the branch to use
94
+ # @return [nil]
95
+ def figma_attachment_delete(project_id, id, opts = {})
96
+ data, _status_code, _headers = figma_attachment_delete_with_http_info(project_id, id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete a Figma attachment
101
+ # Delete an existing Figma attachment.
102
+ # @param project_id [String] Project ID
103
+ # @param id [String] ID
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
106
+ # @option opts [String] :branch specify the branch to use
107
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
108
+ def figma_attachment_delete_with_http_info(project_id, id, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_delete ...'
111
+ end
112
+ # verify the required parameter 'project_id' is set
113
+ if @api_client.config.client_side_validation && project_id.nil?
114
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_delete"
115
+ end
116
+ # verify the required parameter 'id' is set
117
+ if @api_client.config.client_side_validation && id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_delete"
119
+ end
120
+ # resource path
121
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
130
+
131
+ # form parameters
132
+ form_params = opts[:form_params] || {}
133
+
134
+ # http body (model)
135
+ post_body = opts[:body]
136
+
137
+ # return_type
138
+ return_type = opts[:return_type]
139
+
140
+ # auth_names
141
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
142
+
143
+ new_options = opts.merge(
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ response = ::Phrase::Response.new(data, headers)
157
+ return response, status_code, headers
158
+ end
159
+
160
+ # Get a single Figma attachment
161
+ # Get details on a single Figma attachment for a given project.
162
+ # @param project_id [String] Project ID
163
+ # @param id [String] ID
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
166
+ # @option opts [String] :branch specify the branch to use
167
+ # @return [FigmaAttachment]
168
+ def figma_attachment_show(project_id, id, opts = {})
169
+ data, _status_code, _headers = figma_attachment_show_with_http_info(project_id, id, opts)
170
+ data
171
+ end
172
+
173
+ # Get a single Figma attachment
174
+ # Get details on a single Figma attachment for a given project.
175
+ # @param project_id [String] Project ID
176
+ # @param id [String] ID
177
+ # @param [Hash] opts the optional parameters
178
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
179
+ # @option opts [String] :branch specify the branch to use
180
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
181
+ def figma_attachment_show_with_http_info(project_id, id, opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_show ...'
184
+ end
185
+ # verify the required parameter 'project_id' is set
186
+ if @api_client.config.client_side_validation && project_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_show"
188
+ end
189
+ # verify the required parameter 'id' is set
190
+ if @api_client.config.client_side_validation && id.nil?
191
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_show"
192
+ end
193
+ # resource path
194
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
205
+
206
+ # form parameters
207
+ form_params = opts[:form_params] || {}
208
+
209
+ # http body (model)
210
+ post_body = opts[:body]
211
+
212
+ # return_type
213
+ return_type = opts[:return_type] || 'FigmaAttachment'
214
+
215
+ # auth_names
216
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
217
+
218
+ new_options = opts.merge(
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ response = ::Phrase::Response.new(data, headers)
232
+ return response, status_code, headers
233
+ end
234
+
235
+ # Update a Figma attachment
236
+ # Update an existing Figma attachment.
237
+ # @param project_id [String] Project ID
238
+ # @param id [String] ID
239
+ # @param figma_attachment_update_parameters [FigmaAttachmentUpdateParameters]
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
242
+ # @option opts [String] :branch specify the branch to use
243
+ # @return [FigmaAttachment]
244
+ def figma_attachment_update(project_id, id, figma_attachment_update_parameters, opts = {})
245
+ data, _status_code, _headers = figma_attachment_update_with_http_info(project_id, id, figma_attachment_update_parameters, opts)
246
+ data
247
+ end
248
+
249
+ # Update a Figma attachment
250
+ # Update an existing Figma attachment.
251
+ # @param project_id [String] Project ID
252
+ # @param id [String] ID
253
+ # @param figma_attachment_update_parameters [FigmaAttachmentUpdateParameters]
254
+ # @param [Hash] opts the optional parameters
255
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
256
+ # @option opts [String] :branch specify the branch to use
257
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
258
+ def figma_attachment_update_with_http_info(project_id, id, figma_attachment_update_parameters, opts = {})
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_update ...'
261
+ end
262
+ # verify the required parameter 'project_id' is set
263
+ if @api_client.config.client_side_validation && project_id.nil?
264
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_update"
265
+ end
266
+ # verify the required parameter 'id' is set
267
+ if @api_client.config.client_side_validation && id.nil?
268
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_update"
269
+ end
270
+ # verify the required parameter 'figma_attachment_update_parameters' is set
271
+ if @api_client.config.client_side_validation && figma_attachment_update_parameters.nil?
272
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_update_parameters' when calling FigmaAttachmentsApi.figma_attachment_update"
273
+ end
274
+ # resource path
275
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
280
+
281
+ # header parameters
282
+ header_params = opts[:header_params] || {}
283
+ # HTTP header 'Accept' (if needed)
284
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
285
+ # HTTP header 'Content-Type'
286
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
287
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
288
+
289
+ # form parameters
290
+ form_params = opts[:form_params] || {}
291
+
292
+ # http body (model)
293
+ post_body = opts[:body] || @api_client.object_to_http_body(figma_attachment_update_parameters)
294
+
295
+ # return_type
296
+ return_type = opts[:return_type] || 'FigmaAttachment'
297
+
298
+ # auth_names
299
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
300
+
301
+ new_options = opts.merge(
302
+ :header_params => header_params,
303
+ :query_params => query_params,
304
+ :form_params => form_params,
305
+ :body => post_body,
306
+ :auth_names => auth_names,
307
+ :return_type => return_type
308
+ )
309
+
310
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
313
+ end
314
+ response = ::Phrase::Response.new(data, headers)
315
+ return response, status_code, headers
316
+ end
317
+
318
+ # List Figma attachments
319
+ # List all Figma attachments for the given project
320
+ # @param project_id [String] Project ID
321
+ # @param [Hash] opts the optional parameters
322
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
323
+ # @option opts [Integer] :page Page number
324
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
325
+ # @option opts [String] :branch specify the branch to use
326
+ # @return [Array<FigmaAttachment>]
327
+ def figma_attachments_list(project_id, opts = {})
328
+ data, _status_code, _headers = figma_attachments_list_with_http_info(project_id, opts)
329
+ data
330
+ end
331
+
332
+ # List Figma attachments
333
+ # List all Figma attachments for the given project
334
+ # @param project_id [String] Project ID
335
+ # @param [Hash] opts the optional parameters
336
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
337
+ # @option opts [Integer] :page Page number
338
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
339
+ # @option opts [String] :branch specify the branch to use
340
+ # @return [Array<(Response<(Array<FigmaAttachment>)>, Integer, Hash)>] Response<(Array<FigmaAttachment>)> data, response status code and response headers
341
+ def figma_attachments_list_with_http_info(project_id, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachments_list ...'
344
+ end
345
+ # verify the required parameter 'project_id' is set
346
+ if @api_client.config.client_side_validation && project_id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachments_list"
348
+ end
349
+ # resource path
350
+ local_var_path = '/projects/{project_id}/figma_attachments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
351
+
352
+ # query parameters
353
+ query_params = opts[:query_params] || {}
354
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
355
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
356
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
357
+
358
+ # header parameters
359
+ header_params = opts[:header_params] || {}
360
+ # HTTP header 'Accept' (if needed)
361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
362
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
363
+
364
+ # form parameters
365
+ form_params = opts[:form_params] || {}
366
+
367
+ # http body (model)
368
+ post_body = opts[:body]
369
+
370
+ # return_type
371
+ return_type = opts[:return_type] || 'Array<FigmaAttachment>'
372
+
373
+ # auth_names
374
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
375
+
376
+ new_options = opts.merge(
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachments_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ response = ::Phrase::Response.new(data, headers)
390
+ return response, status_code, headers
391
+ end
392
+ end
393
+ end
@@ -0,0 +1,168 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class KeysFigmaAttachmentsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Attach the Figma attachment to a key
11
+ # Attach the Figma attachment to a key
12
+ # @param project_id [String] Project ID
13
+ # @param figma_attachment_id [String] Figma attachment ID
14
+ # @param id [String] ID
15
+ # @param [Hash] opts the optional parameters
16
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @option opts [String] :branch specify the branch to use
18
+ # @return [nil]
19
+ def figma_attachment_attach_to_key(project_id, figma_attachment_id, id, opts = {})
20
+ data, _status_code, _headers = figma_attachment_attach_to_key_with_http_info(project_id, figma_attachment_id, id, opts)
21
+ data
22
+ end
23
+
24
+ # Attach the Figma attachment to a key
25
+ # Attach the Figma attachment to a key
26
+ # @param project_id [String] Project ID
27
+ # @param figma_attachment_id [String] Figma attachment ID
28
+ # @param id [String] ID
29
+ # @param [Hash] opts the optional parameters
30
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
+ # @option opts [String] :branch specify the branch to use
32
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
33
+ def figma_attachment_attach_to_key_with_http_info(project_id, figma_attachment_id, id, opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: KeysFigmaAttachmentsApi.figma_attachment_attach_to_key ...'
36
+ end
37
+ # verify the required parameter 'project_id' is set
38
+ if @api_client.config.client_side_validation && project_id.nil?
39
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysFigmaAttachmentsApi.figma_attachment_attach_to_key"
40
+ end
41
+ # verify the required parameter 'figma_attachment_id' is set
42
+ if @api_client.config.client_side_validation && figma_attachment_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_id' when calling KeysFigmaAttachmentsApi.figma_attachment_attach_to_key"
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling KeysFigmaAttachmentsApi.figma_attachment_attach_to_key"
48
+ end
49
+ # resource path
50
+ local_var_path = '/projects/{project_id}/figma_attachments/{figma_attachment_id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'figma_attachment_id' + '}', CGI.escape(figma_attachment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:body]
65
+
66
+ # return_type
67
+ return_type = opts[:return_type]
68
+
69
+ # auth_names
70
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
71
+
72
+ new_options = opts.merge(
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: KeysFigmaAttachmentsApi#figma_attachment_attach_to_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ response = ::Phrase::Response.new(data, headers)
86
+ return response, status_code, headers
87
+ end
88
+
89
+ # Detach the Figma attachment from a key
90
+ # Detach the Figma attachment from a key
91
+ # @param project_id [String] Project ID
92
+ # @param figma_attachment_id [String] Figma attachment ID
93
+ # @param id [String] ID
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
96
+ # @option opts [String] :branch specify the branch to use
97
+ # @return [nil]
98
+ def figma_attachment_detach_from_key(project_id, figma_attachment_id, id, opts = {})
99
+ data, _status_code, _headers = figma_attachment_detach_from_key_with_http_info(project_id, figma_attachment_id, id, opts)
100
+ data
101
+ end
102
+
103
+ # Detach the Figma attachment from a key
104
+ # Detach the Figma attachment from a key
105
+ # @param project_id [String] Project ID
106
+ # @param figma_attachment_id [String] Figma attachment ID
107
+ # @param id [String] ID
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
110
+ # @option opts [String] :branch specify the branch to use
111
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
112
+ def figma_attachment_detach_from_key_with_http_info(project_id, figma_attachment_id, id, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: KeysFigmaAttachmentsApi.figma_attachment_detach_from_key ...'
115
+ end
116
+ # verify the required parameter 'project_id' is set
117
+ if @api_client.config.client_side_validation && project_id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysFigmaAttachmentsApi.figma_attachment_detach_from_key"
119
+ end
120
+ # verify the required parameter 'figma_attachment_id' is set
121
+ if @api_client.config.client_side_validation && figma_attachment_id.nil?
122
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_id' when calling KeysFigmaAttachmentsApi.figma_attachment_detach_from_key"
123
+ end
124
+ # verify the required parameter 'id' is set
125
+ if @api_client.config.client_side_validation && id.nil?
126
+ fail ArgumentError, "Missing the required parameter 'id' when calling KeysFigmaAttachmentsApi.figma_attachment_detach_from_key"
127
+ end
128
+ # resource path
129
+ local_var_path = '/projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'figma_attachment_id' + '}', CGI.escape(figma_attachment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
134
+
135
+ # header parameters
136
+ header_params = opts[:header_params] || {}
137
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
138
+
139
+ # form parameters
140
+ form_params = opts[:form_params] || {}
141
+
142
+ # http body (model)
143
+ post_body = opts[:body]
144
+
145
+ # return_type
146
+ return_type = opts[:return_type]
147
+
148
+ # auth_names
149
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
150
+
151
+ new_options = opts.merge(
152
+ :header_params => header_params,
153
+ :query_params => query_params,
154
+ :form_params => form_params,
155
+ :body => post_body,
156
+ :auth_names => auth_names,
157
+ :return_type => return_type
158
+ )
159
+
160
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: KeysFigmaAttachmentsApi#figma_attachment_detach_from_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ response = ::Phrase::Response.new(data, headers)
165
+ return response, status_code, headers
166
+ end
167
+ end
168
+ end