@classmethod
def get_obfuscated_card_number(cls, number):
    """
        Get an obfuscated version of the bankcard *number* with several
        digits replaced with 'X'. We obfuscate using the same method as
        eWay uses which shows the first six and the last four digits. For
        a credit card '4444333322221111' this method returns
        '444433XXXXXX1111'. If *number* has less than 11 digits, the number
        is obfuscated completely to avoid accidentally storing a complete
        bankcard number.
        """
    if len(number) < 11:
        return len(number) * 'X'
    start, masked, end = number[:6], number[6:-4], number[-4:]
    return ''.join([start, len(masked) * 'X', end])
