/// <summary> /// Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. /// </summary> /// <exception cref="Wallee.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="request"></param> /// <returns>ApiResponse of WebAppConfirmationResponse</returns> public ApiResponse <WebAppConfirmationResponse> ConfirmWithHttpInfo(WebAppConfirmationRequest request) { // verify the required parameter 'request' is set if (request == null) { throw new ApiException(400, "Missing required parameter 'request' when calling WebAppService->Confirm"); } var localVarPath = "/web-app/confirm"; 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[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json;charset=utf-8" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (request != null && request.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { localVarPostBody = request; // byte array } this.Configuration.ApiClient.ResetTimeout(); // make the HTTP request IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Confirm", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <WebAppConfirmationResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (WebAppConfirmationResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WebAppConfirmationResponse)))); }
/// <summary> /// Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. /// </summary> /// <exception cref="Wallee.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="request"></param> /// <returns>WebAppConfirmationResponse</returns> public WebAppConfirmationResponse Confirm(WebAppConfirmationRequest request) { ApiResponse <WebAppConfirmationResponse> localVarResponse = ConfirmWithHttpInfo(request); return(localVarResponse.Data); }