public void getStatus() { APIBanking.com.quantiguous.api.FundsTransferByCustomerService2.getStatus request = new APIBanking.com.quantiguous.api.FundsTransferByCustomerService2.getStatus(); request.customerID = "505"; request.appID = "12345"; request.requestReferenceNo = "d55c9008d2a0489fabc00965d5ce2296"; String userName = System.Environment.GetEnvironmentVariable("API_YBL_USER"); String userPassword = System.Environment.GetEnvironmentVariable("API_YBL_PASSWORD"); String clientId = System.Environment.GetEnvironmentVariable("API_YBL_CLIENT_ID"); String clientSecret = System.Environment.GetEnvironmentVariable("API_YBL_CLIENT_SECRET"); String clientCert = System.Environment.GetEnvironmentVariable("API_YBL_CLIENT_CERT"); String clientCertPassword = System.Environment.GetEnvironmentVariable("API_YBL_CLIENT_CERT_PASSWORD"); APIBanking.Environment env = new APIBanking.Environments.YBL.UAT(userName, userPassword, clientId, clientSecret, clientCert, clientCertPassword); try { APIBanking.com.quantiguous.api.FundsTransferByCustomerService2.getStatusResponse response = FundsTransferByCustomerService2.getStatus(env, request); Assert.IsNotNull(response); } catch (Fault e) { Console.WriteLine(e.ToString()); } }
public static com.quantiguous.api.FundsTransferByCustomerService2.getStatusResponse getStatus(Environment env, APIBanking.com.quantiguous.api.FundsTransferByCustomerService2.getStatus request) { request.version = VERSION; com.quantiguous.api.FundsTransferByCustomerService2.fundsTransferByCustomerService2Client client = createClient(env); try { using (new System.ServiceModel.OperationContextScope((System.ServiceModel.IClientChannel)client.InnerChannel)) { System.Net.ServicePointManager.SecurityProtocol = env.getSecurityProtocol(); System.ServiceModel.Web.WebOperationContext.Current.OutgoingRequest.UserAgent = "APIBanking.NET"; IDictionaryEnumerator headers = env.getHeaders().GetEnumerator(); while (headers.MoveNext()) { System.ServiceModel.Web.WebOperationContext.Current.OutgoingRequest.Headers.Add(headers.Key.ToString(), headers.Value.ToString()); } com.quantiguous.api.FundsTransferByCustomerService2.getStatusResponse response = client.getStatus(request); return(response); } } catch (MessageSecurityException e) { throw new Fault(e); } catch (FaultException e) { throw new Fault(e); } catch (Exception e) { throw new Fault(e); } }