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

1from decimal import Decimal 

2 

3from integrify.clopos.schemas.common.object import Balance, CashbackBalance, Timestamp 

4from integrify.clopos.schemas.enums import DiscountType 

5from integrify.utils import UnsetOrNoneField 

6 

7 

8class Group(Timestamp): 

9 id: int 

10 """The unique identifier for the customer group""" 

11 

12 name: str 

13 """The name of the customer group""" 

14 

15 discount_type: UnsetOrNoneField[DiscountType] 

16 """The type of discount applied to the customer group""" 

17 

18 discount_value: int 

19 """The discount applied to the customer group""" 

20 

21 system_type: str 

22 """The system type of the customer group""" 

23 

24 

25class Customer(Timestamp): 

26 id: int 

27 """The unique identifier for the customer""" 

28 

29 venue_id: int 

30 """The ID of the venue the customer belongs to""" 

31 

32 cid: str 

33 """The unique identifier for the customer in the POS""" 

34 

35 group_id: int 

36 """The ID of the customer group they belong to""" 

37 

38 group: UnsetOrNoneField[Group] 

39 """An object containing details of the customer's group""" 

40 

41 balance_id: int 

42 """The balance ID of the customer""" 

43 

44 name: str 

45 """The name of the customer""" 

46 

47 discount: UnsetOrNoneField[Decimal] 

48 """The discount applied to the customer""" 

49 

50 email: UnsetOrNoneField[str] 

51 """The email address of the customer""" 

52 

53 phone: UnsetOrNoneField[str] 

54 """The primary phone number of the customer""" 

55 

56 phones: list[str] = [] 

57 """An array of the customer's phone numbers""" 

58 

59 address: UnsetOrNoneField[str] 

60 """The address of the customer""" 

61 

62 addresses: list[str] = [] 

63 """An array of the customer's saved addresses""" 

64 

65 description: UnsetOrNoneField[str] 

66 """The description of the customer""" 

67 

68 address_data: UnsetOrNoneField[list[str]] 

69 """The customer's address data""" 

70 

71 bonus_balance_id: UnsetOrNoneField[int] 

72 """The ID of the customer's bonus balance""" 

73 

74 balance: UnsetOrNoneField[Balance] 

75 """Contains details about the customer's store credit balance""" 

76 

77 cashback_balance_id: UnsetOrNoneField[int] 

78 """The ID of the customer's cashback balance""" 

79 

80 cashback_balance: UnsetOrNoneField[CashbackBalance] 

81 """Contains details about the customer's cashback balance""" 

82 

83 spent: UnsetOrNoneField[Decimal] 

84 """The total amount spent by the customer""" 

85 

86 total_discount: UnsetOrNoneField[Decimal] 

87 """The total discount applied to the customer""" 

88 

89 total_bonus: UnsetOrNoneField[Decimal] 

90 """The total amount of bonus points applied to the customer""" 

91 

92 receipt_count: UnsetOrNoneField[int] 

93 """The total number of receipts for the customer""" 

94 

95 gender: UnsetOrNoneField[int] 

96 """The gender of the customer""" 

97 

98 date_of_birth: UnsetOrNoneField[str] 

99 """The date of birth of the customer""" 

100 

101 code: UnsetOrNoneField[str] 

102 """The code of the customer""" 

103 

104 source: UnsetOrNoneField[str] 

105 """The source of the customer""" 

106 

107 reference_id: UnsetOrNoneField[str] 

108 """The reference ID of the customer""" 

109 

110 phone_verified_at: UnsetOrNoneField[str] 

111 """The timestamp when the customer's phone number was verified""" 

112 

113 status: UnsetOrNoneField[bool] 

114 """The status of the customer account""" 

115 

116 can_use_loyalty_system: UnsetOrNoneField[bool] 

117 """Whether the customer can use the loyalty system or not""" 

118 

119 is_verified: UnsetOrNoneField[bool] 

120 """Whether the customer is verified or not"""