/// <summary> /// Receives the Password reset and tries to set the provided password for the user. Receives the Password reset and tries to set the provided password for the user. The Password will only be set if a valid token is provided /// </summary> /// <exception cref="Com.Madana.APIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">- the MDN_PasswordReset Object (optional)</param> /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> /// <returns>Task of ApiResponse (System.IO.Stream)</returns> public async System.Threading.Tasks.Task <ApiResponse <System.IO.Stream> > UpdatePasswordWithHttpInfoAsync(JsonMDNPasswordReset body = default(JsonMDNPasswordReset), CancellationToken cancellationToken = default(CancellationToken)) { var localVarPath = "/account/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" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "application/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType, cancellationToken); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("UpdatePassword", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <System.IO.Stream>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), (System.IO.Stream) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(System.IO.Stream)))); }
/// <summary> /// Receives the Password reset and tries to set the provided password for the user. Receives the Password reset and tries to set the provided password for the user. The Password will only be set if a valid token is provided /// </summary> /// <exception cref="Com.Madana.APIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">- the MDN_PasswordReset Object (optional)</param> /// <returns>System.IO.Stream</returns> public System.IO.Stream UpdatePassword(JsonMDNPasswordReset body = default(JsonMDNPasswordReset)) { ApiResponse <System.IO.Stream> localVarResponse = UpdatePasswordWithHttpInfo(body); return(localVarResponse.Data); }
/// <summary> /// Receives the Password reset and tries to set the provided password for the user. Receives the Password reset and tries to set the provided password for the user. The Password will only be set if a valid token is provided /// </summary> /// <exception cref="Com.Madana.APIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">- the MDN_PasswordReset Object (optional)</param> /// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param> /// <returns>Task of System.IO.Stream</returns> public async System.Threading.Tasks.Task <System.IO.Stream> UpdatePasswordAsync(JsonMDNPasswordReset body = default(JsonMDNPasswordReset), CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse <System.IO.Stream> localVarResponse = await UpdatePasswordWithHttpInfoAsync(body, cancellationToken); return(localVarResponse.Data); }
/// <summary> /// Receives the Password reset and tries to set the provided password for the user. Receives the Password reset and tries to set the provided password for the user. The Password will only be set if a valid token is provided /// </summary> /// <exception cref="Com.MadanaSampleclient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">- the MDN_PasswordReset Object (optional)</param> /// <returns>Task of System.IO.Stream</returns> public async System.Threading.Tasks.Task <System.IO.Stream> UpdateObjectAsync(JsonMDNPasswordReset body = default(JsonMDNPasswordReset)) { ApiResponse <System.IO.Stream> localVarResponse = await UpdateObjectAsyncWithHttpInfo(body); return(localVarResponse.Data); }