Class: LaunchDarklyApi::ScheduledChangesApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::ScheduledChangesApi
- Defined in:
- lib/launchdarkly_api/api/scheduled_changes_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ nil
Delete scheduled changes workflow Delete a scheduled changes workflow.
-
#delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete scheduled changes workflow Delete a scheduled changes workflow.
-
#get_feature_flag_scheduled_change(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ FeatureFlagScheduledChange
Get a scheduled change Get a scheduled change that will be applied to the feature flag by ID.
-
#get_feature_flag_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Get a scheduled change Get a scheduled change that will be applied to the feature flag by ID.
-
#get_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagScheduledChanges
List scheduled changes Get a list of scheduled changes that will be applied to the feature flag.
-
#get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagScheduledChanges, Integer, Hash)>
List scheduled changes Get a list of scheduled changes that will be applied to the feature flag.
-
#initialize(api_client = ApiClient.default) ⇒ ScheduledChangesApi
constructor
A new instance of ScheduledChangesApi.
-
#patch_flag_config_scheduled_change(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) ⇒ FeatureFlagScheduledChange
Update scheduled changes workflow Update a scheduled change, overriding existing instructions with the new ones.
-
#patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Update scheduled changes workflow Update a scheduled change, overriding existing instructions with the new ones.
-
#post_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) ⇒ FeatureFlagScheduledChange
Create scheduled changes workflow Create scheduled changes for a feature flag.
-
#post_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Create scheduled changes workflow Create scheduled changes for a feature flag.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ScheduledChangesApi
Returns a new instance of ScheduledChangesApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ nil
Delete scheduled changes workflow Delete a scheduled changes workflow.
30 31 32 33 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 30 def delete_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, id, opts = {}) delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, id, opts) nil end |
#delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete scheduled changes workflow Delete a scheduled changes workflow.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 43 def delete_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduledChangesApi.delete_flag_config_scheduled_changes ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling ScheduledChangesApi.delete_flag_config_scheduled_changes" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling ScheduledChangesApi.delete_flag_config_scheduled_changes" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling ScheduledChangesApi.delete_flag_config_scheduled_changes" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScheduledChangesApi.delete_flag_config_scheduled_changes" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ScheduledChangesApi.delete_flag_config_scheduled_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduledChangesApi#delete_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_feature_flag_scheduled_change(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ FeatureFlagScheduledChange
Get a scheduled change Get a scheduled change that will be applied to the feature flag by ID.
111 112 113 114 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 111 def get_feature_flag_scheduled_change(project_key, feature_flag_key, environment_key, id, opts = {}) data, _status_code, _headers = get_feature_flag_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, opts) data end |
#get_feature_flag_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Get a scheduled change Get a scheduled change that will be applied to the feature flag by ID.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 124 def get_feature_flag_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduledChangesApi.get_feature_flag_scheduled_change ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling ScheduledChangesApi.get_feature_flag_scheduled_change" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling ScheduledChangesApi.get_feature_flag_scheduled_change" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling ScheduledChangesApi.get_feature_flag_scheduled_change" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScheduledChangesApi.get_feature_flag_scheduled_change" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FeatureFlagScheduledChange' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ScheduledChangesApi.get_feature_flag_scheduled_change", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduledChangesApi#get_feature_flag_scheduled_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, opts = {}) ⇒ FeatureFlagScheduledChanges
List scheduled changes Get a list of scheduled changes that will be applied to the feature flag.
191 192 193 194 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 191 def get_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, opts = {}) data, _status_code, _headers = get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts) data end |
#get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) ⇒ Array<(FeatureFlagScheduledChanges, Integer, Hash)>
List scheduled changes Get a list of scheduled changes that will be applied to the feature flag.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 203 def get_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduledChangesApi.get_flag_config_scheduled_changes ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling ScheduledChangesApi.get_flag_config_scheduled_changes" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling ScheduledChangesApi.get_flag_config_scheduled_changes" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling ScheduledChangesApi.get_flag_config_scheduled_changes" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FeatureFlagScheduledChanges' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ScheduledChangesApi.get_flag_config_scheduled_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduledChangesApi#get_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_flag_config_scheduled_change(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) ⇒ FeatureFlagScheduledChange
Update scheduled changes workflow
Update a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating scheduled changes. <details> <summary>Click to expand instructions for <strong>updating scheduled changes</strong></summary> #### deleteScheduledChange Removes the scheduled change. Here's an example: ```json { \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }] } ``` #### replaceScheduledChangesInstructions Removes the existing scheduled changes and replaces them with the new instructions. ##### Parameters - `value`: An array of the new actions to perform when the execution date for these scheduled changes arrives. Supported scheduled actions are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the scheduled changes with new instructions to turn flag targeting off: ```json { \"instructions\": [ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ {\"kind\": \"turnFlagOff\"} ] } ] } ``` #### updateScheduledChangesExecutionDate Updates the execution date for the scheduled changes. ##### Parameters - `value`: the new execution date, in Unix milliseconds. Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateScheduledChangesExecutionDate\", \"value\": 1754092860000 } ] } ``` </details>
269 270 271 272 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 269 def patch_flag_config_scheduled_change(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) data, _status_code, _headers = patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts) data end |
#patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Update scheduled changes workflow
Update a scheduled change, overriding existing instructions with the new ones. Updating a scheduled change uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating scheduled changes. <details> <summary>Click to expand instructions for <strong>updating scheduled changes</strong></summary> #### deleteScheduledChange Removes the scheduled change. Here's an example: ```json { \"instructions\": [{ \"kind\": \"deleteScheduledChange\" }] } ``` #### replaceScheduledChangesInstructions Removes the existing scheduled changes and replaces them with the new instructions. ##### Parameters - `value`: An array of the new actions to perform when the execution date for these scheduled changes arrives. Supported scheduled actions are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the scheduled changes with new instructions to turn flag targeting off: ```json { \"instructions\": [ { \"kind\": \"replaceScheduledChangesInstructions\", \"value\": [ {\"kind\": \"turnFlagOff\"} ] } ] } ``` #### updateScheduledChangesExecutionDate Updates the execution date for the scheduled changes. ##### Parameters - `value`: the new execution date, in Unix milliseconds. Here's an example: ```json { \"instructions\": [ { \"kind\": \"updateScheduledChangesExecutionDate\", \"value\": 1754092860000 } ] } ``` </details>
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 284 def patch_flag_config_scheduled_change_with_http_info(project_key, feature_flag_key, environment_key, id, flag_scheduled_changes_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduledChangesApi.patch_flag_config_scheduled_change ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling ScheduledChangesApi.patch_flag_config_scheduled_change" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling ScheduledChangesApi.patch_flag_config_scheduled_change" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling ScheduledChangesApi.patch_flag_config_scheduled_change" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ScheduledChangesApi.patch_flag_config_scheduled_change" end # verify the required parameter 'flag_scheduled_changes_input' is set if @api_client.config.client_side_validation && flag_scheduled_changes_input.nil? fail ArgumentError, "Missing the required parameter 'flag_scheduled_changes_input' when calling ScheduledChangesApi.patch_flag_config_scheduled_change" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'ignoreConflicts'] = opts[:'ignore_conflicts'] if !opts[:'ignore_conflicts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(flag_scheduled_changes_input) # return_type return_type = opts[:debug_return_type] || 'FeatureFlagScheduledChange' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ScheduledChangesApi.patch_flag_config_scheduled_change", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduledChangesApi#patch_flag_config_scheduled_change\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) ⇒ FeatureFlagScheduledChange
Create scheduled changes workflow Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the ‘ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
363 364 365 366 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 363 def post_flag_config_scheduled_changes(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) data, _status_code, _headers = post_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts) data end |
#post_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) ⇒ Array<(FeatureFlagScheduledChange, Integer, Hash)>
Create scheduled changes workflow Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConficts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/launchdarkly_api/api/scheduled_changes_api.rb', line 377 def post_flag_config_scheduled_changes_with_http_info(project_key, feature_flag_key, environment_key, post_flag_scheduled_changes_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduledChangesApi.post_flag_config_scheduled_changes ...' end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling ScheduledChangesApi.post_flag_config_scheduled_changes" end # verify the required parameter 'feature_flag_key' is set if @api_client.config.client_side_validation && feature_flag_key.nil? fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling ScheduledChangesApi.post_flag_config_scheduled_changes" end # verify the required parameter 'environment_key' is set if @api_client.config.client_side_validation && environment_key.nil? fail ArgumentError, "Missing the required parameter 'environment_key' when calling ScheduledChangesApi.post_flag_config_scheduled_changes" end # verify the required parameter 'post_flag_scheduled_changes_input' is set if @api_client.config.client_side_validation && post_flag_scheduled_changes_input.nil? fail ArgumentError, "Missing the required parameter 'post_flag_scheduled_changes_input' when calling ScheduledChangesApi.post_flag_config_scheduled_changes" end # resource path local_var_path = '/api/v2/projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'featureFlagKey' + '}', CGI.escape(feature_flag_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'ignoreConflicts'] = opts[:'ignore_conflicts'] if !opts[:'ignore_conflicts'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_flag_scheduled_changes_input) # return_type return_type = opts[:debug_return_type] || 'FeatureFlagScheduledChange' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"ScheduledChangesApi.post_flag_config_scheduled_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduledChangesApi#post_flag_config_scheduled_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |