checkbox_sdk.client package¶
Subpackages¶
- checkbox_sdk.client.api package
- Submodules
- checkbox_sdk.client.api.branches module
- checkbox_sdk.client.api.cash_registers module
AsyncCashRegistersAsyncCashRegisters.ask_offline_codes()AsyncCashRegisters.get_cash_register()AsyncCashRegisters.get_cash_register_shifts()AsyncCashRegisters.get_cash_registers()AsyncCashRegisters.get_offline_codes()AsyncCashRegisters.get_offline_time()AsyncCashRegisters.go_offline()AsyncCashRegisters.go_online()AsyncCashRegisters.ping_tax_service()
CashRegisters
- checkbox_sdk.client.api.cashier module
- checkbox_sdk.client.api.currency module
- checkbox_sdk.client.api.extended_reports module
AsyncExtendedReportsAsyncExtendedReports.actual_revenue_report()AsyncExtendedReports.bookkeeper_z_report()AsyncExtendedReports.create_receipt_report()AsyncExtendedReports.create_z_report()AsyncExtendedReports.daily_cash_flow_report()AsyncExtendedReports.get_report_task_by_id()AsyncExtendedReports.goods_report()AsyncExtendedReports.net_turnover_report()AsyncExtendedReports.report_json_task_by_id()AsyncExtendedReports.report_xlsx_task_by_id()
ExtendedReportsExtendedReports.actual_revenue_report()ExtendedReports.bookkeeper_z_report()ExtendedReports.create_receipt_report()ExtendedReports.create_z_report()ExtendedReports.daily_cash_flow_report()ExtendedReports.get_report_task_by_id()ExtendedReports.goods_report()ExtendedReports.net_turnover_report()ExtendedReports.report_json_task_by_id()ExtendedReports.report_xlsx_task_by_id()
- checkbox_sdk.client.api.goods module
- checkbox_sdk.client.api.invoices module
- checkbox_sdk.client.api.nova_post module
- checkbox_sdk.client.api.orders module
- checkbox_sdk.client.api.organization module
- checkbox_sdk.client.api.prepayment_receipts module
- checkbox_sdk.client.api.receipts module
- checkbox_sdk.client.api.reports module
- checkbox_sdk.client.api.shifts module
- checkbox_sdk.client.api.tax module
- checkbox_sdk.client.api.transactions module
- checkbox_sdk.client.api.webhook module
- Module contents
Submodules¶
checkbox_sdk.client.asynchronous module¶
checkbox_sdk.client.base module¶
- class checkbox_sdk.client.base.BaseAsyncCheckBoxClient(base_url: str = 'https://api.checkbox.in.ua', requests_timeout: int = 60, proxy: str | Dict[str, str] | None = None, verify_ssl: bool = True, trust_env: bool = True, api_version: str = '1', storage: SessionStorage | None = None, client_name: str = 'checkbox-sdk', client_version: str = '1.1.0', integration_key: str | None = None)¶
Bases:
BaseCheckBoxClient,ABC- abstract async emit(call: AbstractMethod, storage: SessionStorage | None = None, request_timeout: float | None = None)¶
Abstract method to be implemented by subclasses to send an asynchronous request to the Checkbox API.
- Параметри:
call – The method encapsulating the API request details.
storage – Optional session storage to use for the request. If not provided, the default storage will be used.
request_timeout – Optional timeout for the request. If not provided, the client’s default timeout will be used.
- Повертає:
The response from the API.
This method must be implemented by any subclass.
- class checkbox_sdk.client.base.BaseCheckBoxClient(base_url: str = 'https://api.checkbox.in.ua', requests_timeout: int = 60, proxy: str | Dict[str, str] | None = None, verify_ssl: bool = True, trust_env: bool = True, api_version: str = '1', storage: SessionStorage | None = None, client_name: str = 'checkbox-sdk', client_version: str = '1.1.0', integration_key: str | None = None)¶
Bases:
ABCAbstract base class for interacting with the Checkbox API.
This class provides foundational methods and properties for making API requests, managing session storage, and handling common configurations like proxies, SSL verification, and request timeouts.
- Параметри:
base_url – The base URL for the Checkbox API. Defaults to BASE_API_URL.
requests_timeout – The timeout for API requests, in seconds. Defaults to DEFAULT_REQUEST_TIMEOUT.
proxy – Optional proxy configuration. Can be a string URL or a dictionary of proxies.
verify_ssl – Whether to verify SSL certificates. Defaults to True.
trust_env – Whether to trust environment variables for proxy configuration. Defaults to True.
api_version – The version of the API to use. Defaults to API_VERSION.
storage – Optional session storage to use for requests. Defaults to a new SessionStorage instance.
client_name – The name of the client, used for identifying requests. Defaults to «checkbox-sdk».
client_version – The version of the client. Defaults to the package version __version__.
integration_key – Optional integration key for accessing the API. Defaults to None.
- base_url¶
The base URL for the Checkbox API.
- api_version¶
The version of the API to use.
- timeout¶
The timeout for API requests, in seconds.
- proxy¶
The proxy configuration for the client.
- verify_ssl¶
Whether SSL certificates are verified.
- storage¶
The session storage instance used for requests.
- client_name¶
The name of the client.
- client_version¶
The version of the client.
- integration_key¶
The integration key for accessing the API.
- trust_env¶
Whether to trust environment variables for proxy configuration.
- property client_headers: Dict[str, Any]¶
Constructs the headers to be used in API requests.
- Повертає:
A dictionary of headers including the client name, version, and optionally the integration key.
- static handle_wait_status(result: Dict[str, Any], field: str, expected_value: Set[Any], initial: float)¶
- set_license_key(storage: SessionStorage | None, license_key: str | None) None¶
Sets the license key in the session storage.
- Параметри:
storage – Optional session storage to use. If not provided, the default storage will be used.
license_key – The license key to set in the storage. If None, no action is taken.
- class checkbox_sdk.client.base.BaseSyncCheckBoxClient(base_url: str = 'https://api.checkbox.in.ua', requests_timeout: int = 60, proxy: str | Dict[str, str] | None = None, verify_ssl: bool = True, trust_env: bool = True, api_version: str = '1', storage: SessionStorage | None = None, client_name: str = 'checkbox-sdk', client_version: str = '1.1.0', integration_key: str | None = None)¶
Bases:
BaseCheckBoxClient,ABC- abstract emit(call: AbstractMethod, storage: SessionStorage | None = None, request_timeout: float | None = None)¶
Abstract method to be implemented by subclasses to send a request to the Checkbox API.
- Параметри:
call – The method encapsulating the API request details.
storage – Optional session storage to use for the request. If not provided, the default storage will be used.
request_timeout – Optional timeout for the request. If not provided, the client’s default timeout will be used.
- Повертає:
The response from the API.
This method must be implemented by any subclass.