/// <summary> /// Modifica la password di un utente /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="identificativoRivenditore"></param> /// <param name="identificativoUtente"></param> /// <param name="infoPassword"></param> /// <param name="xAuthorization">access_token</param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task UpdatePasswordAsync(Guid?identificativoRivenditore, Guid?identificativoUtente, InfoPasswordRequest infoPassword, string xAuthorization) { await UpdatePasswordAsyncWithHttpInfo(identificativoRivenditore, identificativoUtente, infoPassword, xAuthorization); }
/// <summary> /// Modifica la password di un utente /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="identificativoRivenditore"></param> /// <param name="identificativoUtente"></param> /// <param name="infoPassword"></param> /// <param name="xAuthorization">access_token</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <ApiResponse <Object> > UpdatePasswordAsyncWithHttpInfo(Guid?identificativoRivenditore, Guid?identificativoUtente, InfoPasswordRequest infoPassword, string xAuthorization) { // verify the required parameter 'identificativoRivenditore' is set if (identificativoRivenditore == null) { throw new ApiException(400, "Missing required parameter 'identificativoRivenditore' when calling AnagraficheUtentiApi->UpdatePassword"); } // verify the required parameter 'identificativoUtente' is set if (identificativoUtente == null) { throw new ApiException(400, "Missing required parameter 'identificativoUtente' when calling AnagraficheUtentiApi->UpdatePassword"); } // verify the required parameter 'infoPassword' is set if (infoPassword == null) { throw new ApiException(400, "Missing required parameter 'infoPassword' when calling AnagraficheUtentiApi->UpdatePassword"); } // verify the required parameter 'xAuthorization' is set if (xAuthorization == null) { throw new ApiException(400, "Missing required parameter 'xAuthorization' when calling AnagraficheUtentiApi->UpdatePassword"); } var localVarPath = "/api/v2/contratti/rivenditori/{identificativoRivenditore}/utente/{identificativoUtente}/password"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (identificativoRivenditore != null) { localVarPathParams.Add("identificativoRivenditore", this.Configuration.ApiClient.ParameterToString(identificativoRivenditore)); // path parameter } if (identificativoUtente != null) { localVarPathParams.Add("identificativoUtente", this.Configuration.ApiClient.ParameterToString(identificativoUtente)); // path parameter } if (xAuthorization != null) { localVarHeaderParams.Add("X-Authorization", this.Configuration.ApiClient.ParameterToString(xAuthorization)); // header parameter } if (infoPassword != null && infoPassword.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(infoPassword); // http body (model) parameter } else { localVarPostBody = infoPassword; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdatePassword", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null)); }
/// <summary> /// Modifica la password di un utente /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="identificativoRivenditore"></param> /// <param name="identificativoUtente"></param> /// <param name="infoPassword"></param> /// <param name="xAuthorization">access_token</param> /// <returns></returns> public void UpdatePassword(Guid?identificativoRivenditore, Guid?identificativoUtente, InfoPasswordRequest infoPassword, string xAuthorization) { UpdatePasswordWithHttpInfo(identificativoRivenditore, identificativoUtente, infoPassword, xAuthorization); }