static void Main(string[] args) { IPinGeneratorService pinGenerator = new PinGeneratorService(); ICustomerDetails jane = CustomerDetailsProvider.Jane; bool pinSuccessfullyCreated = GeneratePinProcessRun(pinGenerator, jane); while (!pinSuccessfullyCreated) { pinSuccessfullyCreated = GeneratePinProcessRun(pinGenerator, jane); } }
//constructor public PaymentDetails(IDTOToCRMMapper dtoToCRMMapper, ICRMTODTOMapper crmToDTOMapper, ICRMUtilities crmUtilities, IMoveDetails dalMoveDetails, ICustomerDetails dalCustomerDetails, IResourceManagerFactory resourceManager, ILogger logger) { this.crmUtilities = crmUtilities; this.dtoToCRMMapper = dtoToCRMMapper; this.crmToDTOMapper = crmToDTOMapper; this.dalMoveDetails = dalMoveDetails; this.dalCustomerDetails = dalCustomerDetails; this.resourceManager = resourceManager; this.logger = logger; }
//Constructor public EstimateDetails(ICustomerDetails customerDetails, ICRMUtilities objCrmUtilities, JKMServices.DAL.CRM.IMoveDetails crmMoveDetails, ICRMTODTOMapper objCRMToDTOMapper, IDTOToCRMMapper objDTOToCRMMapper, IResourceManagerFactory resourceManager, ILogger logger) { this.customerDetails = customerDetails; this.objCrmUtilities = objCrmUtilities; this.crmMoveDetails = crmMoveDetails; this.resourceManager = resourceManager; this.objCRMToDTOMapper = objCRMToDTOMapper; this.objDTOToCRMMapper = objDTOToCRMMapper; this.logger = logger; }
public async Task IdentifyAsync(ICustomerDetails customer = null) { if (customer == null && this._customerFactory == null) { throw new ArgumentNullException( "customer", "Missing both customer and customer factory, so can not determine who to track"); } customer = customer ?? this._customerFactory.GetCustomerDetails(); // do not transmit events if we do not have a customer id if (customer == null || customer.Id == null) return; await this.CallMethodAsync(MethodCustomer, customer.Id, HttpMethod.Put, customer); }
private static bool GeneratePinProcessRun(IPinGeneratorService pinGenerator, ICustomerDetails customerDetails) { StandardResponse <string> response = pinGenerator.GeneratePin(customerDetails); if (response.Success) { Console.WriteLine($"Successfully created pin: {response.Result}"); return(true); } Console.WriteLine("Pin failed to generate. Please see below for more details"); foreach (var errorMessage in response.ErrorMessages) { Console.WriteLine(errorMessage); } return(false); }
public async Task IdentifyAsync(ICustomerDetails customer = null) { if (customer == null && _customerFactory == null) { throw new ArgumentNullException( nameof(customer), "Missing both customer and customer factory, so can not determine who to track"); } customer = customer ?? _customerFactory.GetCustomerDetails(); // do not transmit events if we do not have a customer id if (customer?.Id == null) { return; } var resource = $"{TrackEndpoint}/customers/{customer.Id}"; await CallMethodAsync(resource, HttpMethod.Put, customer).ConfigureAwait(false); }
public StandardResponse <string> GeneratePin(ICustomerDetails customerDetails) { string pin = GenerateRandomPin(); IList <string> pastPins = _customerPinRetriever.GetPinsForValidation((UserIdEnum)customerDetails.Id); PinForValidationDto pinForValidationDto = new PinForValidationDto(pin, pastPins, customerDetails.BankAccountDetails.BankAccount, customerDetails.BankAccountDetails.SortCode); _pinValidationsRunner.ValidationContext = new ValidationContext(pinForValidationDto); IList <ValidationResult> validationResults = _pinValidationsRunner.Run(); bool validationsfailed = validationResults.Any(v => !v.Success); if (validationsfailed) { return(new StandardResponse <string>(false, null, validationResults.Where(v => !v.Success).Select(v => v.Message).ToList())); } return(new StandardResponse <string>(true, pin, null)); }
public CustomerController(ICustomerDetails blCustomerDetails, IDistributedCache distributedCache) { _blCustomerDetails = blCustomerDetails; _distributedCache = distributedCache; }
public CustomerController(IIndustryCategory industryCategory, ICustomerDetails CustomerDetails) { _IndustryCategory = industryCategory; _ICustomerDetails = CustomerDetails; }
public CustomerServiceController(ICustomerDetails customerDetails, ILogger <CustomerServiceController> logger) { _customerDetails = customerDetails; _logger = logger; }
public CustomerDetailsController(ICustomerDetails customerDetails) { _customerDetails = customerDetails; }
public QuoteController(ICustomerDetails CustomerDetails) { _ICustomerDetails = CustomerDetails; }
public SsoController(ICustomerDetails customerDetails, ISiteSessionProvider siteSessionProvider) { _customerDetails = customerDetails; this.siteSessionProvider = siteSessionProvider; }