Coverage for packages/clopos/src/integrify/clopos/env.py: 100%
37 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
1import os
2from enum import Enum
4from integrify.utils import Environment
6VERSION = '2.0.0' # Clopos Open API version targeted by this client
8# ENV VARS HERE
9CLOPOS_CLIENT_ID: str = os.getenv('CLOPOS_CLIENT_ID', '')
10CLOPOS_CLIENT_SECRET: str = os.getenv('CLOPOS_CLIENT_SECRET', '')
11CLOPOS_BRAND: str = os.getenv('CLOPOS_BRAND', '')
12CLOPOS_INTEGRATOR_ID: str = os.getenv('CLOPOS_INTEGRATOR_ID', '')
13# v2-də auth JWT-si brand/venue/integrator-i encode edir. `x-venue` opsional olaraq
14# JWT-dəki venue-nu konkret sorğu üçün override etmək üçün saxlanılır.
15CLOPOS_VENUE_ID: str = os.getenv('CLOPOS_VENUE_ID', '')
16CLOPOS_ENV: str = os.getenv('CLOPOS_ENV', Environment.TEST.value)
19class API(str, Enum):
20 """Endpoint constant-ları (Clopos Open API v2)"""
22 BASE_URL = 'https://integrations.clopos.com/open-api/v2/'
24 AUTH = 'auth'
26 VENUES = 'venues'
28 USERS = 'users'
29 USER_BY_ID = 'users/{id}'
31 CUSTOMERS = 'customers'
32 CUSTOMER_BY_ID = 'customers/{id}'
33 CUSTOMER_GROUPS = 'customer-groups'
35 CATEGORIES = 'categories'
36 CATEGORY_BY_ID = 'categories/{id}'
38 STATIONS = 'stations'
39 STATION_BY_ID = 'stations/{id}'
41 PRODUCTS = 'products'
42 PRODUCT_BY_ID = 'products/{id}'
43 STOP_LIST = 'products/stop-list'
45 SALE_TYPES = 'sale-types'
46 PAYMENT_METHODS = 'payment-methods'
48 ORDERS = 'orders'
49 ORDER_BY_ID = 'orders/{id}'
51 RECEIPTS = 'receipts'
52 RECEIPT_BY_ID = 'receipts/{id}'
53 RECEIPT_CLOSE = 'receipts/{id}/close'
54 RECEIPT_STOCK_OPERATIONS = 'receipts/{id}/stock-operations'
56 PRICE_LISTS = 'price-lists'
57 PRICE_LIST_PRICES = 'price-lists/prices'
60__all__ = [
61 'VERSION',
62 'CLOPOS_CLIENT_ID',
63 'CLOPOS_CLIENT_SECRET',
64 'CLOPOS_ENV',
65 'API',
66]