/// <summary> /// Get Billing Token in exchange of Credit Card and Billing Information /// </summary> /// <param name="tokenRequest">TokenRequest containing billing information</param> /// <returns>TokenResponse</returns> public async Task <TokenResponse> get(TokenRequest tokenRequest, bool isPreProd) { try { var context = new ValidationContext(tokenRequest); var results = new List <ValidationResult>(); var isValid = Validator.TryValidateObject(tokenRequest, context, results, true); if (!isValid) { TokenResponse tokenResponse = new TokenResponse(); foreach (var validationResult in results) { tokenResponse.addError(new Error(string.Join(", ", validationResult.MemberNames), validationResult.ErrorMessage)); } return(await Task.FromResult <TokenResponse>(tokenResponse)); } else { BillingGateway billingGateway = GatewayFactory.getBillingGateway(billingProvider); return(await billingGateway.getBillingToken(tokenRequest, isPreProd)); } } catch (Exception ex) { TokenResponse tokenResponse = new TokenResponse(); tokenResponse.addError(new Error("unknown", "Unknown Exception")); return(tokenResponse); } }
public YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection GetBillingAccessionsByReportNo(string reportNo, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { BillingGateway gateway = new BillingGateway(); YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection billingAccessionCollection = null; if (webServiceAccount.PrimaryClientId == 0) { billingAccessionCollection = gateway.GetBillingAccessionsByReportNo(reportNo, webServiceAccount); } else { billingAccessionCollection = gateway.GetBillingAccessionsByReportNoClient(reportNo, webServiceAccount); } return billingAccessionCollection; }
public YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection GetBillingAccessionsByLastNameAndFirstName(string lastName, string firstName, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { BillingGateway gateway = new BillingGateway(); YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection billingAccessionCollection = null; if (webServiceAccount.PrimaryClientId == 0) { billingAccessionCollection = gateway.GetBillingAccessionsByLastNameAndFirstName(lastName, firstName, webServiceAccount); } else { billingAccessionCollection = gateway.GetBillingAccessionsByLastNameAndFirstNameClient(lastName, firstName, webServiceAccount); } return billingAccessionCollection; }
public YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection GetBillingAccessionsByBirthdate(DateTime birthdate, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { BillingGateway gateway = new BillingGateway(); YellowstonePathology.YpiConnect.Contract.Billing.BillingAccessionCollection billingAccessionCollection = null; if (webServiceAccount.PrimaryClientId == 0) { billingAccessionCollection = gateway.GetBillingAccessionsByBirthdate(birthdate, webServiceAccount); } else { billingAccessionCollection = gateway.GetBillingAccessionsByBirthdateClient(birthdate, webServiceAccount); } return billingAccessionCollection; }
public YellowstonePathology.YpiConnect.Contract.Billing.BillingDetail GetBillingDetail(string reportNo, bool getMemoryStream, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { BillingGateway gateway = new BillingGateway(); return gateway.GetBillingDetail(reportNo, getMemoryStream, webServiceAccount); }