Method: PureCloud::OrganizationApi#patch_features_featurename_with_http_info

Defined in:
lib/purecloud/api/organization_api.rb

#patch_features_featurename_with_http_info(feature_name, enabled, opts = {}) ⇒ Array<(OrganizationFeatures, Fixnum, Hash)>

Update organization

Parameters:

  • feature_name

    Organization feature

  • enabled

    New state of feature

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OrganizationFeatures, Fixnum, Hash)>)

    OrganizationFeatures data, response status code and response headers



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/purecloud/api/organization_api.rb', line 163

def patch_features_featurename_with_http_info(feature_name, enabled, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: OrganizationApi#patch_features_featurename ..."
  end
  
  # verify the required parameter 'feature_name' is set
  fail "Missing the required parameter 'feature_name' when calling patch_features_featurename" if feature_name.nil?
  unless ['realtimeCIC', 'purecloud', 'hipaa', 'ucEnabled', 'pci', 'purecloudVoice', 'xmppFederation', 'chat', 'informalPhotos', 'directory', 'contactCenter', 'unifiedCommunications', 'custserv'].include?(feature_name)
    fail "invalid value for 'feature_name', must be one of realtimeCIC, purecloud, hipaa, ucEnabled, pci, purecloudVoice, xmppFederation, chat, informalPhotos, directory, contactCenter, unifiedCommunications, custserv"
  end
  
  # verify the required parameter 'enabled' is set
  fail "Missing the required parameter 'enabled' when calling patch_features_featurename" if enabled.nil?
  
  # resource path
  local_var_path = "/api/v2/organizations/features/{featureName}".sub('{format}','json').sub('{' + 'featureName' + '}', feature_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(enabled)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OrganizationFeatures')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OrganizationApi#patch_features_featurename\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end