Method: PureCloud::GroupsApi#get_fieldconfig_with_http_info
- Defined in:
- lib/purecloud/api/groups_api.rb
#get_fieldconfig_with_http_info(type, opts = {}) ⇒ Array<(FieldConfig, Fixnum, Hash)>
Fetch field config for an entity type
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 213 214 |
# File 'lib/purecloud/api/groups_api.rb', line 167 def get_fieldconfig_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi#get_fieldconfig ..." end # verify the required parameter 'type' is set fail "Missing the required parameter 'type' when calling get_fieldconfig" if type.nil? unless ['person', 'group', 'org'].include?(type) fail "invalid value for 'type', must be one of person, group, org" end # resource path local_var_path = "/api/v2/fieldconfig".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = type # 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 = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FieldConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_fieldconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |