Coverage for packages/clopos/src/integrify/clopos/schemas/customers/object.py: 100%
80 statements
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-19 02:39 +0000
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-19 02:39 +0000
1from decimal import Decimal
3from integrify.clopos.schemas.common.object import Balance, CashbackBalance, Timestamp
4from integrify.clopos.schemas.enums import DiscountType
5from integrify.utils import UnsetOrNoneField
8class Group(Timestamp):
9 id: int
10 """The unique identifier for the customer group"""
12 name: str
13 """The name of the customer group"""
15 discount_type: UnsetOrNoneField[DiscountType]
16 """The type of discount applied to the customer group"""
18 discount_value: int
19 """The discount applied to the customer group"""
21 system_type: str
22 """The system type of the customer group"""
25class Customer(Timestamp):
26 id: int
27 """The unique identifier for the customer"""
29 venue_id: int
30 """The ID of the venue the customer belongs to"""
32 cid: str
33 """The unique identifier for the customer in the POS"""
35 group_id: int
36 """The ID of the customer group they belong to"""
38 group: UnsetOrNoneField[Group]
39 """An object containing details of the customer's group"""
41 balance_id: int
42 """The balance ID of the customer"""
44 name: str
45 """The name of the customer"""
47 discount: UnsetOrNoneField[Decimal]
48 """The discount applied to the customer"""
50 email: UnsetOrNoneField[str]
51 """The email address of the customer"""
53 phone: UnsetOrNoneField[str]
54 """The primary phone number of the customer"""
56 phones: list[str] = []
57 """An array of the customer's phone numbers"""
59 address: UnsetOrNoneField[str]
60 """The address of the customer"""
62 addresses: list[str] = []
63 """An array of the customer's saved addresses"""
65 description: UnsetOrNoneField[str]
66 """The description of the customer"""
68 address_data: UnsetOrNoneField[list[str]]
69 """The customer's address data"""
71 bonus_balance_id: UnsetOrNoneField[int]
72 """The ID of the customer's bonus balance"""
74 balance: UnsetOrNoneField[Balance]
75 """Contains details about the customer's store credit balance"""
77 cashback_balance_id: UnsetOrNoneField[int]
78 """The ID of the customer's cashback balance"""
80 cashback_balance: UnsetOrNoneField[CashbackBalance]
81 """Contains details about the customer's cashback balance"""
83 spent: UnsetOrNoneField[Decimal]
84 """The total amount spent by the customer"""
86 total_discount: UnsetOrNoneField[Decimal]
87 """The total discount applied to the customer"""
89 total_bonus: UnsetOrNoneField[Decimal]
90 """The total amount of bonus points applied to the customer"""
92 receipt_count: UnsetOrNoneField[int]
93 """The total number of receipts for the customer"""
95 gender: UnsetOrNoneField[int]
96 """The gender of the customer"""
98 date_of_birth: UnsetOrNoneField[str]
99 """The date of birth of the customer"""
101 code: UnsetOrNoneField[str]
102 """The code of the customer"""
104 source: UnsetOrNoneField[str]
105 """The source of the customer"""
107 reference_id: UnsetOrNoneField[str]
108 """The reference ID of the customer"""
110 phone_verified_at: UnsetOrNoneField[str]
111 """The timestamp when the customer's phone number was verified"""
113 status: UnsetOrNoneField[bool]
114 """The status of the customer account"""
116 can_use_loyalty_system: UnsetOrNoneField[bool]
117 """Whether the customer can use the loyalty system or not"""
119 is_verified: UnsetOrNoneField[bool]
120 """Whether the customer is verified or not"""