public void CheckoutpaymentgatewayPaymentrequestPostTest() { CheckoutPaymentGatewayModelsPaymentRequest body = null; var response = instance.CheckoutpaymentgatewayPaymentrequestPost(body); Assert.IsInstanceOf <CheckoutPaymentGatewayModelsPaymentResponse>(response, "response is CheckoutPaymentGatewayModelsPaymentResponse"); }
/// <summary> /// Generates a payment request with the gateway Adds a payment /// </summary> /// <exception cref="PaymentGatewayAPIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Payment to add (optional)</param> /// <returns>Task of CheckoutPaymentGatewayModelsPaymentResponse</returns> public async System.Threading.Tasks.Task <CheckoutPaymentGatewayModelsPaymentResponse> CheckoutpaymentgatewayPaymentrequestPostAsync(CheckoutPaymentGatewayModelsPaymentRequest body = null) { ApiResponse <CheckoutPaymentGatewayModelsPaymentResponse> localVarResponse = await CheckoutpaymentgatewayPaymentrequestPostAsyncWithHttpInfo(body); return(localVarResponse.Data); }
/// <summary> /// Generates a payment request with the gateway Adds a payment /// </summary> /// <exception cref="PaymentGatewayAPIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Payment to add (optional)</param> /// <returns>Task of ApiResponse (CheckoutPaymentGatewayModelsPaymentResponse)</returns> public async System.Threading.Tasks.Task <ApiResponse <CheckoutPaymentGatewayModelsPaymentResponse> > CheckoutpaymentgatewayPaymentrequestPostAsyncWithHttpInfo(CheckoutPaymentGatewayModelsPaymentRequest body = null) { var localVarPath = "/checkoutpaymentgateway/paymentrequest"; 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-patch+json", "application/json", "text/json", "application/_*+json", "application/xml", "text/xml", "application/_*+xml" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "text/plain", "application/json", "text/json", "application/xml", "text/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.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("CheckoutpaymentgatewayPaymentrequestPost", localVarResponse); if (exception != null) { Log.LogError(exception, "An Exception occured in the PaymentApi Server."); //throw exception; } } return(new ApiResponse <CheckoutPaymentGatewayModelsPaymentResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), (CheckoutPaymentGatewayModelsPaymentResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CheckoutPaymentGatewayModelsPaymentResponse)))); }
/// <summary> /// Generates a payment request with the gateway Adds a payment /// </summary> /// <exception cref="PaymentGatewayAPIClient.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="body">Payment to add (optional)</param> /// <returns>CheckoutPaymentGatewayModelsPaymentResponse</returns> public CheckoutPaymentGatewayModelsPaymentResponse CheckoutpaymentgatewayPaymentrequestPost(CheckoutPaymentGatewayModelsPaymentRequest body = null) { ApiResponse <CheckoutPaymentGatewayModelsPaymentResponse> localVarResponse = CheckoutpaymentgatewayPaymentrequestPostWithHttpInfo(body); return(localVarResponse.Data); }