phrase 3.1.0 → 3.2.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.
data/docs/RepoSyncsApi.md CHANGED
@@ -4,19 +4,19 @@ All URIs are relative to *https://api.phrase.com/v2*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**repo_sync_activate**](RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/activate | Activate a Repo Sync
8
- [**repo_sync_deactivate**](RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/deactivate | Deactivate a Repo Sync
9
- [**repo_sync_events**](RepoSyncsApi.md#repo_sync_events) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id}/events | Repository Syncs History
10
- [**repo_sync_export**](RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/export | Export to code repository
11
- [**repo_sync_import**](RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{repo_sync_id}/import | Import from code repository
7
+ [**repo_sync_activate**](RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{id}/activate | Activate a Repo Sync
8
+ [**repo_sync_deactivate**](RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{id}/deactivate | Deactivate a Repo Sync
9
+ [**repo_sync_events**](RepoSyncsApi.md#repo_sync_events) | **GET** /accounts/{account_id}/repo_syncs/{id}/events | Repository Syncs History
10
+ [**repo_sync_export**](RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{id}/export | Export to code repository
11
+ [**repo_sync_import**](RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{id}/import | Import from code repository
12
12
  [**repo_sync_list**](RepoSyncsApi.md#repo_sync_list) | **GET** /accounts/{account_id}/repo_syncs | Get Repo Syncs
13
- [**repo_sync_show**](RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id} | Get a single Repo Sync
13
+ [**repo_sync_show**](RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{id} | Get a single Repo Sync
14
14
 
15
15
 
16
16
 
17
17
  ## repo_sync_activate
18
18
 
19
- > RepoSync repo_sync_activate(account_id, repo_sync_id, opts)
19
+ > RepoSync repo_sync_activate(account_id, id, opts)
20
20
 
21
21
  Activate a Repo Sync
22
22
 
@@ -40,14 +40,14 @@ end
40
40
 
41
41
  api_instance = Phrase::RepoSyncsApi.new
42
42
  account_id = 'account_id_example' # String | Account ID
43
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
43
+ id = 'id_example' # String | ID
44
44
  opts = {
45
45
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
46
46
  }
47
47
 
48
48
  begin
49
49
  #Activate a Repo Sync
50
- result = api_instance.repo_sync_activate(account_id, repo_sync_id, opts)
50
+ result = api_instance.repo_sync_activate(account_id, id, opts)
51
51
  pp result
52
52
  rescue Phrase::ApiError => e
53
53
  puts "Exception when calling RepoSyncsApi->repo_sync_activate: #{e}"
@@ -60,7 +60,7 @@ end
60
60
  Name | Type | Description | Notes
61
61
  ------------- | ------------- | ------------- | -------------
62
62
  **account_id** | **String**| Account ID |
63
- **repo_sync_id** | **String**| Repo Sync ID |
63
+ **id** | **String**| ID |
64
64
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
65
65
 
66
66
  ### Return type
@@ -79,7 +79,7 @@ Response<([**RepoSync**](RepoSync.md))>
79
79
 
80
80
  ## repo_sync_deactivate
81
81
 
82
- > RepoSync repo_sync_deactivate(account_id, repo_sync_id, opts)
82
+ > RepoSync repo_sync_deactivate(account_id, id, opts)
83
83
 
84
84
  Deactivate a Repo Sync
85
85
 
@@ -103,14 +103,14 @@ end
103
103
 
104
104
  api_instance = Phrase::RepoSyncsApi.new
105
105
  account_id = 'account_id_example' # String | Account ID
106
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
106
+ id = 'id_example' # String | ID
107
107
  opts = {
108
108
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
109
109
  }
110
110
 
111
111
  begin
112
112
  #Deactivate a Repo Sync
113
- result = api_instance.repo_sync_deactivate(account_id, repo_sync_id, opts)
113
+ result = api_instance.repo_sync_deactivate(account_id, id, opts)
114
114
  pp result
115
115
  rescue Phrase::ApiError => e
116
116
  puts "Exception when calling RepoSyncsApi->repo_sync_deactivate: #{e}"
@@ -123,7 +123,7 @@ end
123
123
  Name | Type | Description | Notes
124
124
  ------------- | ------------- | ------------- | -------------
125
125
  **account_id** | **String**| Account ID |
126
- **repo_sync_id** | **String**| Repo Sync ID |
126
+ **id** | **String**| ID |
127
127
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
128
128
 
129
129
  ### Return type
@@ -142,7 +142,7 @@ Response<([**RepoSync**](RepoSync.md))>
142
142
 
143
143
  ## repo_sync_events
144
144
 
145
- > Array&lt;RepoSyncEvent&gt; repo_sync_events(account_id, repo_sync_id, opts)
145
+ > Array&lt;RepoSyncEvent&gt; repo_sync_events(account_id, id, opts)
146
146
 
147
147
  Repository Syncs History
148
148
 
@@ -166,14 +166,14 @@ end
166
166
 
167
167
  api_instance = Phrase::RepoSyncsApi.new
168
168
  account_id = 'account_id_example' # String | Account ID
169
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
169
+ id = 'id_example' # String | ID
170
170
  opts = {
171
171
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
172
172
  }
173
173
 
174
174
  begin
175
175
  #Repository Syncs History
176
- result = api_instance.repo_sync_events(account_id, repo_sync_id, opts)
176
+ result = api_instance.repo_sync_events(account_id, id, opts)
177
177
  pp result
178
178
  rescue Phrase::ApiError => e
179
179
  puts "Exception when calling RepoSyncsApi->repo_sync_events: #{e}"
@@ -186,7 +186,7 @@ end
186
186
  Name | Type | Description | Notes
187
187
  ------------- | ------------- | ------------- | -------------
188
188
  **account_id** | **String**| Account ID |
189
- **repo_sync_id** | **String**| Repo Sync ID |
189
+ **id** | **String**| ID |
190
190
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
191
191
 
192
192
  ### Return type
@@ -205,7 +205,7 @@ Response<([**Array&lt;RepoSyncEvent&gt;**](RepoSyncEvent.md))>
205
205
 
206
206
  ## repo_sync_export
207
207
 
208
- > RepoSyncExport repo_sync_export(account_id, repo_sync_id, opts)
208
+ > RepoSyncExport repo_sync_export(account_id, id, opts)
209
209
 
210
210
  Export to code repository
211
211
 
@@ -229,14 +229,14 @@ end
229
229
 
230
230
  api_instance = Phrase::RepoSyncsApi.new
231
231
  account_id = 'account_id_example' # String | Account ID
232
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
232
+ id = 'id_example' # String | ID
233
233
  opts = {
234
234
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
235
235
  }
236
236
 
237
237
  begin
238
238
  #Export to code repository
239
- result = api_instance.repo_sync_export(account_id, repo_sync_id, opts)
239
+ result = api_instance.repo_sync_export(account_id, id, opts)
240
240
  pp result
241
241
  rescue Phrase::ApiError => e
242
242
  puts "Exception when calling RepoSyncsApi->repo_sync_export: #{e}"
@@ -249,7 +249,7 @@ end
249
249
  Name | Type | Description | Notes
250
250
  ------------- | ------------- | ------------- | -------------
251
251
  **account_id** | **String**| Account ID |
252
- **repo_sync_id** | **String**| Repo Sync ID |
252
+ **id** | **String**| ID |
253
253
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
254
254
 
255
255
  ### Return type
@@ -268,7 +268,7 @@ Response<([**RepoSyncExport**](RepoSyncExport.md))>
268
268
 
269
269
  ## repo_sync_import
270
270
 
271
- > RepoSyncImport repo_sync_import(account_id, repo_sync_id, opts)
271
+ > RepoSyncImport repo_sync_import(account_id, id, opts)
272
272
 
273
273
  Import from code repository
274
274
 
@@ -292,14 +292,14 @@ end
292
292
 
293
293
  api_instance = Phrase::RepoSyncsApi.new
294
294
  account_id = 'account_id_example' # String | Account ID
295
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
295
+ id = 'id_example' # String | ID
296
296
  opts = {
297
297
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
298
298
  }
299
299
 
300
300
  begin
301
301
  #Import from code repository
302
- result = api_instance.repo_sync_import(account_id, repo_sync_id, opts)
302
+ result = api_instance.repo_sync_import(account_id, id, opts)
303
303
  pp result
304
304
  rescue Phrase::ApiError => e
305
305
  puts "Exception when calling RepoSyncsApi->repo_sync_import: #{e}"
@@ -312,7 +312,7 @@ end
312
312
  Name | Type | Description | Notes
313
313
  ------------- | ------------- | ------------- | -------------
314
314
  **account_id** | **String**| Account ID |
315
- **repo_sync_id** | **String**| Repo Sync ID |
315
+ **id** | **String**| ID |
316
316
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
317
317
 
318
318
  ### Return type
@@ -392,7 +392,7 @@ Response<([**Array&lt;RepoSync&gt;**](RepoSync.md))>
392
392
 
393
393
  ## repo_sync_show
394
394
 
395
- > RepoSync repo_sync_show(account_id, repo_sync_id, opts)
395
+ > RepoSync repo_sync_show(account_id, id, opts)
396
396
 
397
397
  Get a single Repo Sync
398
398
 
@@ -416,14 +416,14 @@ end
416
416
 
417
417
  api_instance = Phrase::RepoSyncsApi.new
418
418
  account_id = 'account_id_example' # String | Account ID
419
- repo_sync_id = 'repo_sync_id_example' # String | Repo Sync ID
419
+ id = 'id_example' # String | ID
420
420
  opts = {
421
421
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
422
422
  }
423
423
 
424
424
  begin
425
425
  #Get a single Repo Sync
426
- result = api_instance.repo_sync_show(account_id, repo_sync_id, opts)
426
+ result = api_instance.repo_sync_show(account_id, id, opts)
427
427
  pp result
428
428
  rescue Phrase::ApiError => e
429
429
  puts "Exception when calling RepoSyncsApi->repo_sync_show: #{e}"
@@ -436,7 +436,7 @@ end
436
436
  Name | Type | Description | Notes
437
437
  ------------- | ------------- | ------------- | -------------
438
438
  **account_id** | **String**| Account ID |
439
- **repo_sync_id** | **String**| Repo Sync ID |
439
+ **id** | **String**| ID |
440
440
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
441
441
 
442
442
  ### Return type
@@ -17,7 +17,7 @@ require 'Phrase'
17
17
  instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
18
18
  name: A screenshot name,
19
19
  description: A screenshot description,
20
- filename: [B@38b14624)
20
+ filename: [B@46c9a298)
21
21
  ```
22
22
 
23
23
 
@@ -0,0 +1,402 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class ReleaseTriggersApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a release trigger
11
+ # Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution.
12
+ # @param account_id [String] Account ID
13
+ # @param distribution_id [String] Distribution ID
14
+ # @param release_create_parameters1 [ReleaseCreateParameters1]
15
+ # @param [Hash] opts the optional parameters
16
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
17
+ # @return [ReleaseTrigger]
18
+ def release_triggers_create(account_id, distribution_id, release_create_parameters1, opts = {})
19
+ data, _status_code, _headers = release_triggers_create_with_http_info(account_id, distribution_id, release_create_parameters1, opts)
20
+ data
21
+ end
22
+
23
+ # Create a release trigger
24
+ # Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution.
25
+ # @param account_id [String] Account ID
26
+ # @param distribution_id [String] Distribution ID
27
+ # @param release_create_parameters1 [ReleaseCreateParameters1]
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers
31
+ def release_triggers_create_with_http_info(account_id, distribution_id, release_create_parameters1, opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_create ...'
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 ReleaseTriggersApi.release_triggers_create"
38
+ end
39
+ # verify the required parameter 'distribution_id' is set
40
+ if @api_client.config.client_side_validation && distribution_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_create"
42
+ end
43
+ # verify the required parameter 'release_create_parameters1' is set
44
+ if @api_client.config.client_side_validation && release_create_parameters1.nil?
45
+ fail ArgumentError, "Missing the required parameter 'release_create_parameters1' when calling ReleaseTriggersApi.release_triggers_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(release_create_parameters1)
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'ReleaseTrigger'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ response = ::Phrase::Response.new(data, headers)
87
+ return response, status_code, headers
88
+ end
89
+
90
+ # Delete a single release trigger
91
+ # Delete a single release trigger.
92
+ # @param account_id [String] Account ID
93
+ # @param distribution_id [String] Distribution ID
94
+ # @param id [String] ID
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
97
+ # @return [nil]
98
+ def release_triggers_destroy(account_id, distribution_id, id, opts = {})
99
+ data, _status_code, _headers = release_triggers_destroy_with_http_info(account_id, distribution_id, id, opts)
100
+ data
101
+ end
102
+
103
+ # Delete a single release trigger
104
+ # Delete a single release trigger.
105
+ # @param account_id [String] Account ID
106
+ # @param distribution_id [String] Distribution 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
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
111
+ def release_triggers_destroy_with_http_info(account_id, distribution_id, id, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_destroy ...'
114
+ end
115
+ # verify the required parameter 'account_id' is set
116
+ if @api_client.config.client_side_validation && account_id.nil?
117
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_destroy"
118
+ end
119
+ # verify the required parameter 'distribution_id' is set
120
+ if @api_client.config.client_side_validation && distribution_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_destroy"
122
+ end
123
+ # verify the required parameter 'id' is set
124
+ if @api_client.config.client_side_validation && id.nil?
125
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_destroy"
126
+ end
127
+ # resource path
128
+ local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+
133
+ # header parameters
134
+ header_params = opts[:header_params] || {}
135
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:body]
142
+
143
+ # return_type
144
+ return_type = opts[:return_type]
145
+
146
+ # auth_names
147
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
148
+
149
+ new_options = opts.merge(
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ response = ::Phrase::Response.new(data, headers)
163
+ return response, status_code, headers
164
+ end
165
+
166
+ # List release triggers
167
+ # List all release triggers for the given distribution.<br> Note: Currently only one release trigger can exist per distribution.
168
+ # @param account_id [String] Account ID
169
+ # @param distribution_id [String] Distribution ID
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
172
+ # @return [Array<ReleaseTrigger>]
173
+ def release_triggers_list(account_id, distribution_id, opts = {})
174
+ data, _status_code, _headers = release_triggers_list_with_http_info(account_id, distribution_id, opts)
175
+ data
176
+ end
177
+
178
+ # List release triggers
179
+ # List all release triggers for the given distribution.&lt;br&gt; Note: Currently only one release trigger can exist per distribution.
180
+ # @param account_id [String] Account ID
181
+ # @param distribution_id [String] Distribution ID
182
+ # @param [Hash] opts the optional parameters
183
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
184
+ # @return [Array<(Response<(Array<ReleaseTrigger>)>, Integer, Hash)>] Response<(Array<ReleaseTrigger>)> data, response status code and response headers
185
+ def release_triggers_list_with_http_info(account_id, distribution_id, opts = {})
186
+ if @api_client.config.debugging
187
+ @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_list ...'
188
+ end
189
+ # verify the required parameter 'account_id' is set
190
+ if @api_client.config.client_side_validation && account_id.nil?
191
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_list"
192
+ end
193
+ # verify the required parameter 'distribution_id' is set
194
+ if @api_client.config.client_side_validation && distribution_id.nil?
195
+ fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_list"
196
+ end
197
+ # resource path
198
+ local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s))
199
+
200
+ # query parameters
201
+ query_params = opts[:query_params] || {}
202
+
203
+ # header parameters
204
+ header_params = opts[:header_params] || {}
205
+ # HTTP header 'Accept' (if needed)
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:body]
214
+
215
+ # return_type
216
+ return_type = opts[:return_type] || 'Array<ReleaseTrigger>'
217
+
218
+ # auth_names
219
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
220
+
221
+ new_options = opts.merge(
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => return_type
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ response = ::Phrase::Response.new(data, headers)
235
+ return response, status_code, headers
236
+ end
237
+
238
+ # Get a single release trigger
239
+ # Get details of a single release trigger.
240
+ # @param account_id [String] Account ID
241
+ # @param distribution_id [String] Distribution ID
242
+ # @param id [String] ID
243
+ # @param [Hash] opts the optional parameters
244
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
245
+ # @return [ReleaseTrigger]
246
+ def release_triggers_show(account_id, distribution_id, id, opts = {})
247
+ data, _status_code, _headers = release_triggers_show_with_http_info(account_id, distribution_id, id, opts)
248
+ data
249
+ end
250
+
251
+ # Get a single release trigger
252
+ # Get details of a single release trigger.
253
+ # @param account_id [String] Account ID
254
+ # @param distribution_id [String] Distribution ID
255
+ # @param id [String] ID
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
258
+ # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers
259
+ def release_triggers_show_with_http_info(account_id, distribution_id, id, opts = {})
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_show ...'
262
+ end
263
+ # verify the required parameter 'account_id' is set
264
+ if @api_client.config.client_side_validation && account_id.nil?
265
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_show"
266
+ end
267
+ # verify the required parameter 'distribution_id' is set
268
+ if @api_client.config.client_side_validation && distribution_id.nil?
269
+ fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_show"
270
+ end
271
+ # verify the required parameter 'id' is set
272
+ if @api_client.config.client_side_validation && id.nil?
273
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_show"
274
+ end
275
+ # resource path
276
+ local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
277
+
278
+ # query parameters
279
+ query_params = opts[:query_params] || {}
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
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
286
+
287
+ # form parameters
288
+ form_params = opts[:form_params] || {}
289
+
290
+ # http body (model)
291
+ post_body = opts[:body]
292
+
293
+ # return_type
294
+ return_type = opts[:return_type] || 'ReleaseTrigger'
295
+
296
+ # auth_names
297
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
298
+
299
+ new_options = opts.merge(
300
+ :header_params => header_params,
301
+ :query_params => query_params,
302
+ :form_params => form_params,
303
+ :body => post_body,
304
+ :auth_names => auth_names,
305
+ :return_type => return_type
306
+ )
307
+
308
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ response = ::Phrase::Response.new(data, headers)
313
+ return response, status_code, headers
314
+ end
315
+
316
+ # Update a release trigger
317
+ # Update a recurring release.
318
+ # @param account_id [String] Account ID
319
+ # @param distribution_id [String] Distribution ID
320
+ # @param id [String] ID
321
+ # @param release_update_parameters1 [ReleaseUpdateParameters1]
322
+ # @param [Hash] opts the optional parameters
323
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
324
+ # @return [ReleaseTrigger]
325
+ def release_triggers_update(account_id, distribution_id, id, release_update_parameters1, opts = {})
326
+ data, _status_code, _headers = release_triggers_update_with_http_info(account_id, distribution_id, id, release_update_parameters1, opts)
327
+ data
328
+ end
329
+
330
+ # Update a release trigger
331
+ # Update a recurring release.
332
+ # @param account_id [String] Account ID
333
+ # @param distribution_id [String] Distribution ID
334
+ # @param id [String] ID
335
+ # @param release_update_parameters1 [ReleaseUpdateParameters1]
336
+ # @param [Hash] opts the optional parameters
337
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
338
+ # @return [Array<(Response<(ReleaseTrigger)>, Integer, Hash)>] Response<(ReleaseTrigger)> data, response status code and response headers
339
+ def release_triggers_update_with_http_info(account_id, distribution_id, id, release_update_parameters1, opts = {})
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug 'Calling API: ReleaseTriggersApi.release_triggers_update ...'
342
+ end
343
+ # verify the required parameter 'account_id' is set
344
+ if @api_client.config.client_side_validation && account_id.nil?
345
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling ReleaseTriggersApi.release_triggers_update"
346
+ end
347
+ # verify the required parameter 'distribution_id' is set
348
+ if @api_client.config.client_side_validation && distribution_id.nil?
349
+ fail ArgumentError, "Missing the required parameter 'distribution_id' when calling ReleaseTriggersApi.release_triggers_update"
350
+ end
351
+ # verify the required parameter 'id' is set
352
+ if @api_client.config.client_side_validation && id.nil?
353
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReleaseTriggersApi.release_triggers_update"
354
+ end
355
+ # verify the required parameter 'release_update_parameters1' is set
356
+ if @api_client.config.client_side_validation && release_update_parameters1.nil?
357
+ fail ArgumentError, "Missing the required parameter 'release_update_parameters1' when calling ReleaseTriggersApi.release_triggers_update"
358
+ end
359
+ # resource path
360
+ local_var_path = '/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'distribution_id' + '}', CGI.escape(distribution_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
361
+
362
+ # query parameters
363
+ query_params = opts[:query_params] || {}
364
+
365
+ # header parameters
366
+ header_params = opts[:header_params] || {}
367
+ # HTTP header 'Accept' (if needed)
368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
369
+ # HTTP header 'Content-Type'
370
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
371
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
372
+
373
+ # form parameters
374
+ form_params = opts[:form_params] || {}
375
+
376
+ # http body (model)
377
+ post_body = opts[:body] || @api_client.object_to_http_body(release_update_parameters1)
378
+
379
+ # return_type
380
+ return_type = opts[:return_type] || 'ReleaseTrigger'
381
+
382
+ # auth_names
383
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
384
+
385
+ new_options = opts.merge(
386
+ :header_params => header_params,
387
+ :query_params => query_params,
388
+ :form_params => form_params,
389
+ :body => post_body,
390
+ :auth_names => auth_names,
391
+ :return_type => return_type
392
+ )
393
+
394
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
395
+ if @api_client.config.debugging
396
+ @api_client.config.logger.debug "API called: ReleaseTriggersApi#release_triggers_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
397
+ end
398
+ response = ::Phrase::Response.new(data, headers)
399
+ return response, status_code, headers
400
+ end
401
+ end
402
+ end