Coverage for packages/clopos/src/integrify/clopos/schemas/sales/object.py: 100%
43 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, Media, Timestamp
4from integrify.utils import UnsetOrNoneField
7class PaymentMethod(Timestamp):
8 id: int
9 """The unique identifier for the payment method"""
11 name: str
12 """The name of the payment method (e.g., "Cash", "Card")"""
14 customer_required: int
15 """Whether a customer must be attached to the transaction (1 for yes, 0 for no)"""
17 is_system: int
18 """Indicates if it’s a system-default payment method"""
20 balance_id: UnsetOrNoneField[int]
21 """The ID of the balance associated with the payment method"""
23 balance: UnsetOrNoneField[Balance]
24 """An object containing details of the associated balance account"""
26 service: UnsetOrNoneField[dict]
27 """Details of any external service integrated with this payment method"""
29 split: UnsetOrNoneField[int]
30 """Indicates if this payment method can be used for split payments"""
32 status: dict[str, int]
33 """Map of venue_id -> 0/1 availability for this method"""
36class SaleType(Timestamp):
37 id: int
38 """The unique identifier for the sale type"""
40 name: str
41 """The name of the sale type (e.g., "In-store", "Delivery")"""
43 system_type: UnsetOrNoneField[str]
44 """A system-defined type identifier (e.g., "IN", "DELIVERY")"""
46 status: dict[str, int]
47 """Map of venue_id -> 0/1 availability for this method"""
49 channel: UnsetOrNoneField[str]
50 """The channel the sale type belongs to"""
52 service_charge_rate: UnsetOrNoneField[Decimal]
53 """The service charge rate associated with this sale type"""
55 payment_method_id: UnsetOrNoneField[int]
56 """The ID of the default payment method for this sale type, if any"""
58 position: UnsetOrNoneField[int]
59 """The position of the sale type in the list of sale types"""
61 payment_method: UnsetOrNoneField[PaymentMethod]
62 """An object containing details of the associated payment method"""
64 media: UnsetOrNoneField[list[Media]]
65 """Media of the sale type"""