/// <summary> /// Initiate and confirm the bill payment operation via GloRemit /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="doBillPaymentModel">Request data required to initiate bill payment. (optional)</param> /// <returns>Task of ApiResponse</returns> public async System.Threading.Tasks.Task <ApiResponse <Object> > V1PaymentsBillsPostAsyncWithHttpInfo(DoBillPaymentModelCreated doBillPaymentModel = null) { var localVarPath = "/v1/payments/bills"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(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" }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (doBillPaymentModel != null && doBillPaymentModel.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(doBillPaymentModel); // http body (model) parameter } else { localVarPostBody = doBillPaymentModel; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("V1PaymentsBillsPost", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <Object>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null)); }
/// <summary> /// Initiate and confirm the bill payment operation via GloRemit /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="doBillPaymentModel">Request data required to initiate bill payment. (optional)</param> /// <returns>Task of void</returns> public async System.Threading.Tasks.Task V1PaymentsBillsPostAsync(DoBillPaymentModelCreated doBillPaymentModel = null) { await V1PaymentsBillsPostAsyncWithHttpInfo(doBillPaymentModel); }
/// <summary> /// Initiate and confirm the bill payment operation via GloRemit /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="doBillPaymentModel">Request data required to initiate bill payment. (optional)</param> /// <returns></returns> public void V1PaymentsBillsPost(DoBillPaymentModelCreated doBillPaymentModel = null) { V1PaymentsBillsPostWithHttpInfo(doBillPaymentModel); }