~homeworkprod/byceps

ref: 4237b3ec9496efe95dcce82bea3207ab9de4d520 byceps/byceps/services/ticketing/exceptions.py -rw-r--r-- 1.4 KiB
4237b3ec — Jochen Kupperschmidt Move ticketing blueprint into `site` subpackage 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
byceps.services.ticketing.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""


class TicketIsRevoked(Exception):
    """Indicate an error caused by the ticket being revoked."""


class TicketLacksUser(Exception):
    """Indicate a (failed) attempt to check a user in with a ticket
    which has no user set.
    """


class UserAccountDeleted(Exception):
    """Indicate that an action failed because the user account has been
    deleted.
    """


class UserAccountSuspended(Exception):
    """Indicate that an action failed because the user account is suspended."""


class UserAlreadyCheckedIn(Exception):
    """Indicate that user check-in failed because a user has already
    been checked in with the ticket.
    """


class UserIdUnknown(Exception):
    """Indicate that a user ID is unknown."""


class SeatChangeDeniedForBundledTicket(Exception):
    """Indicate that the ticket belongs to a bundle and, thus, must not
    be used to occupy (or release) a single seat.
    """


class SeatChangeDeniedForGroupSeat(Exception):
    """Indicate that the seat belongs to a group and, thus, cannot be
    occupied by a single ticket that does not belong to a bundle, and
    cannot be released on its own.
    """


class TicketCategoryMismatch(Exception):
    """Indicate that the provided ticket category does not match the one
    of the target item.
    """