Class CommercialFraudMockService

    • Constructor Detail

      • CommercialFraudMockService

        public CommercialFraudMockService()
    • Method Detail

      • isFreeEmailService

        public int isFreeEmailService​(java.lang.String email)
        whether the given email is from a free email service
        Parameters:
        email - the email to check
        Returns:
        the score (0 if no free email, otherwise DEFAULT_INCREMENT)
      • isBannedDomain

        public int isBannedDomain​(java.lang.String domain)
        whether the given domain is banned
        Parameters:
        domain - the domain to check
        Returns:
        the score (0 if not banned, otherwise DEFAULT_INCREMENT)
      • isBannedIP

        public int isBannedIP​(java.lang.String ipAddress)
        whether the given ip address is banned
        Parameters:
        ipAddress - the ip address to check
        Returns:
        the score (0 if not banned, otherwise DEFAULT_INCREMENT)
      • isFraudulentCreditCard

        public int isFraudulentCreditCard​(java.lang.String hashedNumber)
        whether the given hashed credit card number is fraudulent
        Parameters:
        hashedNumber - the hashed credit card number to check
        Returns:
        the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
      • isFraudulentEmailAddress

        public int isFraudulentEmailAddress​(java.lang.String email)
        whether the given email address is fraudulent
        Parameters:
        email - the email to check
        Returns:
        the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
      • isFraudulentGeolocation

        public int isFraudulentGeolocation​(java.lang.String ipAddress,
                                           java.lang.String country,
                                           java.lang.String zipCode,
                                           java.lang.String state)
        whether the given geolocation is fraudulent
        Parameters:
        ipAddress - the ip address to check
        country - the country to check
        zipCode - the zip code to check
        state - the state to check
        Returns:
        the score (0 if not fraudulent, otherwise DEFAULT_INCREMENT)
      • decomposeOrderModel

        protected java.util.Map<java.lang.String,​java.lang.String> decomposeOrderModel​(AbstractOrderModel order)
      • doAll

        protected java.util.Map<java.lang.String,​java.lang.Double> doAll​(java.util.Map<java.lang.String,​java.lang.String> parameters)