checkbox_sdk.client.api package

Submodules

checkbox_sdk.client.api.base module

checkbox_sdk.client.api.branches module

class checkbox_sdk.client.api.branches.AsyncBranches(client)

Bases: AsyncPaginationMixin

async get_all_branches(limit: int = 25, offset: int = 0, storage: SessionStorage | None = None) AsyncGenerator

Asynchronously retrieves all branches from the system with pagination support.

Параметри:
  • limit – The number of branches to retrieve per page.

  • offset – The starting point for retrieving branches.

  • storage – Optional session storage to use for the request.

Yields:

Dictionaries, each containing details of a branch.

Example

async for branch in client.branches.get_all_branches():
    print(branch)

Notes

  • This method handles pagination to retrieve all branches.

  • It yields branches one by one.

class checkbox_sdk.client.api.branches.Branches(client)

Bases: PaginationMixin

get_all_branches(limit: int = 25, offset: int = 0, storage: SessionStorage | None = None) Generator

Retrieves all branches from the system with pagination support.

Параметри:
  • limit – The number of branches to retrieve per page.

  • offset – The starting point for retrieving branches.

  • storage – Optional session storage to use for the request.

Yields:

Dictionaries, each containing details of a branch.

Example

for branch in client.branches.get_all_branches():
    print(branch)

Notes

  • This method handles pagination to retrieve all branches.

  • It yields branches one by one.

checkbox_sdk.client.api.cash_registers module

class checkbox_sdk.client.api.cash_registers.AsyncCashRegisters(client)

Bases: AsyncPaginationMixin

async ask_offline_codes(ask_count: int = 2000, sync: bool = False, storage: SessionStorage | None = None) None

Asynchronously requests offline codes from the tax service to fill Checkbox’s cache.

This method directly asks for a specified number of offline codes from the tax service and fills Checkbox’s cache. It should only be used in scenarios where you need to pre-fill the cache with offline codes but do not intend to use them immediately.

Примітка

If you plan to use the offline codes, it is recommended to call get_offline_codes instead, as it includes logic to request and retrieve codes efficiently.

Параметри:
  • ask_count (int) – The number of offline codes to request from the tax service (default is 2000).

  • sync (bool) – Whether to perform the request synchronously (default is False).

  • storage (Optional[SessionStorage]) – An optional session storage object for managing the state of requests.

async get_cash_register(cash_register_id: str | None = None, storage: SessionStorage | None = None) Dict

Retrieves information about a cash register using the Checkbox SDK client based on the UUID.

This function retrieves information about a specific cash register identified by its UUID. If the UUID is not provided, it attempts to use the cash register UUID from the session storage. If no UUID is found, it raises a CheckBoxError.

Параметри:
  • cash_register_id (Optional[str]) – The UUID of the cash register to retrieve information for.

  • storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

Information about the cash register as a dictionary.

Тип повернення:

Dict

async get_cash_register_shifts(storage: SessionStorage | None = None, statuses: List[str] | None = None, desc: bool | None = False, from_date: datetime | str | None = None, to_date: datetime | str | None = None, limit: int | None = 25, offset: int | None = 0) AsyncGenerator

Asynchronously retrieves cash register shifts using the client with the provided storage and filter options.

Параметри:
  • storage – An optional session storage to use for the retrieval.

  • statuses – An optional list of status strings to filter the shifts.

  • desc – A boolean indicating whether to sort the shifts in descending order.

  • from_date – The start date for the shift query.

  • to_date – The end date for the shift query.

  • limit – The maximum number of shifts to retrieve.

  • offset – The offset for pagination.

Yields:

AsyncGenerator yielding cash register shift results.

async get_cash_registers(storage: SessionStorage | None = None, in_use: bool | None = None, fiscal_number: str | None = None, limit: int = 10, offset: int = 0) AsyncGenerator

Generator to retrieve a list of available cash registers.

This function fetches cash registers using pagination and yields the results.

Параметри:
  • storage (Optional[SessionStorage]) – The session storage to use.

  • in_use (Optional[bool]) – Filter for cash registers in use.

  • fiscal_number (Optional[str]) – Filter for cash registers with a specific fiscal number.

  • limit (int) – The maximum number of cash registers to retrieve.

  • offset (int) – The offset for pagination.

Повертає:

Yields the information of available cash registers.

Тип повернення:

Generator

async get_offline_codes(ask_count: int = 2000, threshold: int = 500, storage: SessionStorage | None = None) List[str]

Asynchronously retrieves offline fiscal codes from Checkbox’s cache and refills it when necessary.

This method is designed to asynchronously obtain offline codes for fiscal transactions using the Checkbox SDK. It checks the available number of offline codes in the cache. If the available count falls below the specified threshold, it requests additional codes from the tax server. The method then returns a list of fiscal codes for offline transactions.

Параметри:
  • ask_count (int) – The number of offline codes to retrieve (default is 2000).

  • threshold (int) – The number of minimal number of offline codes after which new set will be asked from the tax server

  • storage (Optional[SessionStorage]) – An optional session storage object for managing the state of requests.

Повертає:

A list of fiscal codes for offline transactions.

Тип повернення:

List[str]

async get_offline_time(from_date: datetime | str | None = None, to_date: datetime | str | None = None, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves the offline time information using the client with the provided storage.

Параметри:
  • from_date – The start date for the offline time query.

  • to_date – The end date for the offline time query.

  • storage – An optional session storage to use for the retrieval.

Повертає:

A dictionary containing the offline time information.

async go_offline(go_offline_date: datetime | str | None = None, fiscal_code: str | None = None, storage: SessionStorage | None = None) Dict[str, str]

Puts the cash register offline using the Checkbox SDK.

This function puts the cash register offline to disable online operations using the Checkbox SDK.

Параметри:
  • go_offline_date (Optional[Union[datetime.datetime, str]]) – The date and time to go offline after the last

  • transaction. (successful)

  • fiscal_code (Optional[str]) – The fiscal code that was not used before.

  • storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from putting the cash register offline as a dictionary.

Тип повернення:

Dict[str, str]

async go_online(storage: SessionStorage | None = None) Dict[str, str]

Puts the cash register online using the Checkbox SDK.

This function puts the client online to enable online operations using the Checkbox SDK.

Параметри:

storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from putting the client online as a dictionary.

Тип повернення:

Dict[str, str]

async ping_tax_service(storage: SessionStorage | None = None) Dict[str, Any]

Pings the tax service using the Checkbox SDK client and returns the response as a dictionary.

This function sends a ping request to the tax service using the Checkbox SDK client and returns the response as a dictionary.

Параметри:

storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from the tax service as a dictionary.

Тип повернення:

Dict

class checkbox_sdk.client.api.cash_registers.CashRegisters(client)

Bases: PaginationMixin

ask_offline_codes(ask_count: int = 2000, sync: bool = False, storage: SessionStorage | None = None) None

Requests offline codes from the tax service to fill Checkbox’s cache.

This method directly asks for a specified number of offline codes from the tax service and fills Checkbox’s cache. It should only be used in scenarios where you need to pre-fill the cache with offline codes but do not intend to use them immediately.

Примітка

If you plan to use the offline codes, it is recommended to call get_offline_codes instead, as it includes logic to request and retrieve codes efficiently.

Параметри:
  • ask_count (int) – The number of offline codes to request from the tax service (default is 2000).

  • sync (bool) – Whether to perform the request synchronously (default is False).

  • storage (Optional[SessionStorage]) – An optional session storage object for managing the state of requests.

get_cash_register(cash_register_id: str | None = None, storage: SessionStorage | None = None) Dict

Retrieves information about a cash register using the Checkbox SDK client based on the UUID.

This function retrieves information about a specific cash register identified by its UUID. If the UUID is not provided, it attempts to use the cash register UUID from the session storage. If no UUID is found, it raises a CheckBoxError.

Параметри:
  • cash_register_id (Optional[str]) – The UUID of the cash register to retrieve information for.

  • storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

Information about the cash register as a dictionary.

Тип повернення:

Dict

get_cash_register_shifts(storage: SessionStorage | None = None, statuses: List[str] | None = None, desc: bool | None = False, from_date: datetime | str | None = None, to_date: datetime | str | None = None, limit: int | None = 25, offset: int | None = 0) Generator

Retrieves cash register shifts using the client with the provided storage and filter options.

Параметри:
  • storage – An optional session storage to use for the retrieval.

  • statuses – An optional list of status strings to filter the shifts.

  • desc – A boolean indicating whether to sort the shifts in descending order.

  • from_date – The start date for the shift query.

  • to_date – The end date for the shift query.

  • limit – The maximum number of shifts to retrieve.

  • offset – The offset for pagination.

Yields:

Generator yielding cash register shift results.

get_cash_registers(storage: SessionStorage | None = None, in_use: bool | None = None, fiscal_number: str | None = None, limit: int = 10, offset: int = 0) Generator

Generator to retrieve a list of available cash registers.

This function fetches cash registers using pagination and yields the results.

Параметри:
  • storage (Optional[SessionStorage]) – The session storage to use.

  • in_use (Optional[bool]) – Filter for cash registers in use.

  • fiscal_number (Optional[str]) – Filter for cash registers with a specific fiscal number.

  • limit (int) – The maximum number of cash registers to retrieve.

  • offset (int) – The offset for pagination.

Повертає:

Yields the information of available cash registers.

Тип повернення:

Generator

get_offline_codes(ask_count: int = 2000, threshold: int = 500, storage: SessionStorage | None = None) List[str]

Retrieves offline fiscal codes from Checkbox’s cache and refills it when necessary.

This method is designed to obtain offline codes for fiscal transactions using the Checkbox SDK. It first checks the available number of offline codes in the cache. If the number of available codes falls below the specified threshold, it requests additional codes from the tax server. The method then returns a list of fiscal codes for offline transactions.

Параметри:
  • ask_count (int) – The number of offline codes to retrieve (default is 2000).

  • threshold (int) – The number of minimal number of offline codes after which new set will be asked from the tax server

  • storage (Optional[SessionStorage]) – An optional session storage object for managing the state of requests.

Повертає:

A list of fiscal codes for offline transactions.

Тип повернення:

List[str]

get_offline_time(from_date: datetime | str | None = None, to_date: datetime | str | None = None, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves the offline time information using the client with the provided storage.

Параметри:
  • from_date – The start date for the offline time query.

  • to_date – The end date for the offline time query.

  • storage – An optional session storage to use for the retrieval.

Повертає:

A dictionary containing the offline time information.

go_offline(go_offline_date: datetime | str | None = None, fiscal_code: str | None = None, storage: SessionStorage | None = None) Dict[str, str]

Puts the cash register offline using the Checkbox SDK.

This function puts the cash register offline to disable online operations using the Checkbox SDK.

Параметри:
  • go_offline_date (Optional[Union[datetime.datetime, str]]) – The date and time to go offline after the last

  • transaction. (successful)

  • fiscal_code (Optional[str]) – The fiscal code that was not used before.

  • storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from putting the cash register offline as a dictionary.

Тип повернення:

Dict[str, str]

go_online(storage: SessionStorage | None = None) Dict[str, str]

Puts the cash register online using the Checkbox SDK.

This function puts the client online to enable online operations using the Checkbox SDK.

Параметри:

storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from putting the client online as a dictionary.

Тип повернення:

Dict[str, str]

ping_tax_service(storage: SessionStorage | None = None) Dict[str, Any]

Pings the tax service using the Checkbox SDK client and returns the response as a dictionary.

This function sends a ping request to the tax service using the Checkbox SDK client and returns the response as a dictionary.

Параметри:

storage (Optional[SessionStorage]) – An optional session storage to use.

Повертає:

The response from the tax service as a dictionary.

Тип повернення:

Dict

checkbox_sdk.client.api.cashier module

class checkbox_sdk.client.api.cashier.AsyncCashier(client)

Bases: object

async authenticate(login: str, password: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using cashier’s login credentials.

This method sets the cash license key, signs in using the provided cashier’s login and password, and refreshes the user (cashier) information.

Параметри:
  • login (str) – The user’s login.

  • password (str) – The user’s password.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

async authenticate_pin_code(pin_code: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using a PIN code (recommended method).

This method sets the cash license key, signs in using the provided cashier’s PIN code, and refreshes the user (cashier) information.

Параметри:
  • pin_code (str) – The PIN code for cashier authentication.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

async authenticate_token(token: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using a token.

This method sets the cash license key, assigns the token to the storage, and refreshes the user (cashier) information. Use this method if you already have an access token.

Параметри:
  • token (str) – The token for authentication.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

async check_signature(storage: SessionStorage | None = None) Dict[str, Any]

Checks the signature asynchronously using the client with the provided storage.

Параметри:

storage – An optional session storage to use for the signature check.

Повертає:

A dictionary containing the signature key.

async get_all_taxes_by_cashier(storage: SessionStorage | None = None) Dict[str, Any]

Retrieves all taxes associated with a cashier asynchronously using the client with the provided storage.

Параметри:

storage – An optional session storage to use for the retrieval.

Повертає:

A dictionary containing all taxes associated with the cashier.

async sign_out(storage: SessionStorage | None = None) None

Sign out cashier.

This method signs out the current user (cashier) by calling the SignOut endpoint.

Параметри:

storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

class checkbox_sdk.client.api.cashier.Cashier(client)

Bases: object

authenticate(login: str, password: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using cashier’s login credentials.

This method sets the cash license key, signs in using the provided cashier’s login and password, and refreshes the user (cashier) information.

Параметри:
  • login (str) – The user’s login.

  • password (str) – The user’s password.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

authenticate_pin_code(pin_code: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using a PIN code (recommended method).

This method sets the cash license key, signs in using the provided cashier’s PIN code, and refreshes the user (cashier) information.

Параметри:
  • pin_code (str) – The PIN code for cashier authentication.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

authenticate_token(token: str, license_key: str | None = None, storage: SessionStorage | None = None) None

Authenticate using a token.

This method sets the cash license key, assigns the token to the storage, and refreshes the user (cashier) information. Use this method if you already have an access token.

Параметри:
  • token (str) – The token for authentication.

  • license_key (Optional[str]) – The cash register license key to set.

  • storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

check_signature(storage: SessionStorage | None = None) Dict[str, Any]

Checks the signature using the client with the provided storage.

Параметри:

storage – An optional session storage to use for the signature check.

Повертає:

A dictionary containing the signature key.

get_all_taxes_by_cashier(storage: SessionStorage | None = None) Dict[str, Any]

Retrieves all taxes associated with a cashier using the client with the provided storage.

Параметри:

storage – An optional session storage to use for the retrieval.

Повертає:

A dictionary containing all taxes associated with the cashier.

sign_out(storage: SessionStorage | None = None) None

Sign out cashier.

This method signs out the current user (cashier) by calling the SignOut endpoint.

Параметри:

storage (Optional[SessionStorage]) – The session storage to use.

Повертає:

None

checkbox_sdk.client.api.currency module

class checkbox_sdk.client.api.currency.AsyncCurrency(client)

Bases: object

async get_currency_rate(currency_code: str, storage: SessionStorage | None = None) Dict[str, Any]

Asynchronously retrieves the current exchange rate for a specified currency.

Параметри:
  • currency_code – The code of the currency to retrieve the rate for.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the current exchange rate for the specified currency.

Example

response = await client.currency.get_currency_rate(currency_code="USD")
print(response)

Notes

  • This method sends an asynchronous GET request to retrieve the current exchange rate for the specified currency.

async get_currency_rates(active: bool | None = True, storage: SessionStorage | None = None) List[Dict[str, Any]]

Asynchronously retrieves currency rates based on the specified criteria.

Параметри:
  • active – A flag indicating whether to retrieve only active currency rates. Defaults to True.

  • storage – An optional session storage to use for the operation.

Повертає:

A list of dictionaries, where each dictionary contains details of a currency rate.

Example

rates = await client.currency.get_currency_rates(active=True)
for rate in rates:
    print(rate)

Notes

  • This method sends an asynchronous request to retrieve currency rates.

  • The active parameter determines if only active rates are retrieved.

async setup_currency_rates(rates: List[Dict] | None = None, **payload) List[Dict[str, Any]]

Asynchronously sets up currency rates in the system.

Параметри:
  • rates – A list of dictionaries representing currency rates to be set up. If provided, this will be used as the request payload.

  • **payload – Additional payload for the request. If rates is provided, **payload should not be used.

Повертає:

A list of dictionaries containing the details of the setup operation.

Example

response = await client.currency.setup_currency_rates(rates=[{"currency": "USD", "rate": 1.0}])
print(response)

Notes

  • This method sends an asynchronous POST request to set up currency rates.

  • If rates is provided, it will be used for the request payload; otherwise, **payload can be used.

class checkbox_sdk.client.api.currency.Currency(client)

Bases: object

get_currency_rate(currency_code: str, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves the current exchange rate for a specified currency.

Параметри:
  • currency_code – The code of the currency to retrieve the rate for.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the current exchange rate for the specified currency.

Example

response = client.currency.get_currency_rate(currency_code="USD")
print(response)

Notes

  • This method sends a GET request to retrieve the current exchange rate for the specified currency.

get_currency_rates(active: bool | None = True, storage: SessionStorage | None = None) List[Dict[str, Any]]

Retrieves currency rates based on the specified criteria.

Параметри:
  • active – A flag indicating whether to retrieve only active currency rates. Defaults to True.

  • storage – An optional session storage to use for the operation.

Повертає:

A list of dictionaries, where each dictionary contains details of a currency rate.

Example

rates = client.currency.get_currency_rates(active=True)
for rate in rates:
    print(rate)

Notes

  • This method sends a request to retrieve currency rates.

  • The active parameter determines if only active rates are retrieved.

setup_currency_rates(rates: List[Dict] | None = None, **payload) List[Dict[str, Any]]

Sets up currency rates in the system.

Параметри:
  • rates – A list of dictionaries representing currency rates to be set up. If provided, this will be used as the request payload.

  • **payload – Additional payload for the request. If rates is provided, **payload should not be used.

Повертає:

A list of dictionaries containing the details of the setup operation.

Example

response = client.currency.setup_currency_rates(rates=[{"currency": "USD", "rate": 1.0}])
print(response)

Notes

  • This method sends a POST request to set up currency rates.

  • If rates is provided, it will be used for the request payload; otherwise, **payload can be used.

checkbox_sdk.client.api.extended_reports module

class checkbox_sdk.client.api.extended_reports.AsyncExtendedReports(client)

Bases: object

async actual_revenue_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates an actual revenue report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created actual revenue report.

Example

revenue_report = await client.extended_reports.actual_revenue_report(data=[{"item": "example"}])
print(revenue_report)

Notes

  • This method sends a POST request to create an actual revenue report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async bookkeeper_z_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates a bookkeeper Z report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created bookkeeper Z report.

Example

z_report = await client.extended_reports.bookkeeper_z_report(data=[{"item": "example"}])
print(z_report)

Notes

  • This method sends a POST request to create a bookkeeper Z report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async create_receipt_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates a receipt report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created receipt report.

Example

receipt_report = await client.extended_reports.create_receipt_report(data=[{"item": "example"}])
print(receipt_report)

Notes

  • This method sends a POST request to create a receipt report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async create_z_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates a Z report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created Z report.

Example

z_report = await client.create_z_report(data=[{"item": "example"}])
print(z_report)

Notes

  • This method sends a POST request to create a Z report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async daily_cash_flow_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates a daily cash flow report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created daily cash flow report.

Example

cash_flow_report = await client.extended_reports.daily_cash_flow_report(data=[{"item": "example"}])
print(cash_flow_report)

Notes

  • This method sends a POST request to create a daily cash flow report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async get_report_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Asynchronously retrieves a specific report task by its ID.

Параметри:
  • report_task_id – The ID of the report task to retrieve.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the retrieved report task.

Example

report_task = await client.extended_reports.get_report_task_by_id(
    report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task)

Notes

  • This method sends a GET request to retrieve the report task with the specified ID asynchronously.

async goods_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously generates a goods report.

Параметри:
  • data – Additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload for the request.

Повертає:

A dictionary containing the details of the generated goods report.

Example

report = await client.extended_reports.goods_report(data=[{"item": "example"}])
print(report)

Notes

  • This method sends a POST request to generate the goods report asynchronously.

async net_turnover_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Asynchronously creates a net turnover report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created net turnover report.

Example

turnover_report = await client.extended_reports.net_turnover_report(data=[{"item": "example"}])
print(turnover_report)

Notes

  • This method sends a POST request to create a net turnover report asynchronously.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

async report_json_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Asynchronously retrieves the details of a specific report task by its ID, including the JSON file if available.

Параметри:
  • report_task_id – The ID of the report task to retrieve. Can be a string or a UUID.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the report task and possibly the JSON file.

Example

report_task_details = await client.report_json_task_by_id(
    report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task_details)

Notes

  • This method sends a GET request to asynchronously retrieve the details of the report task with the specified ID.

async report_xlsx_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Asynchronously retrieves the details of a specific report task by its ID, including the XLSX file if available.

Параметри:
  • report_task_id – The ID of the report task to retrieve. Can be a string or a UUID.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the report task and possibly the XLSX file.

Example

report_task_details = await client.report_xlsx_task_by_id(
    report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task_details)

Notes

  • This method sends a GET request to asynchronously retrieve the details of the report task with the specified ID.

class checkbox_sdk.client.api.extended_reports.ExtendedReports(client)

Bases: object

actual_revenue_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates an actual revenue report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created actual revenue report.

Example

revenue_report = client.extended_reports.actual_revenue_report(data=[{"item": "example"}])
print(revenue_report)

Notes

  • This method sends a POST request to create an actual revenue report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

bookkeeper_z_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates a bookkeeper Z report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created bookkeeper Z report.

Example

z_report = client.extended_reports.bookkeeper_z_report(data=[{"item": "example"}])
print(z_report)

Notes

  • This method sends a POST request to create a bookkeeper Z report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

create_receipt_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates a receipt report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created receipt report.

Example

receipt_report = client.extended_reports.create_receipt_report(data=[{"item": "example"}])
print(receipt_report)

Notes

  • This method sends a POST request to create a receipt report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

create_z_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates a Z report.

Параметри:
  • data – Additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload for the request.

Повертає:

A dictionary containing the details of the created Z report.

Example

z_report = client.extended_reports.create_z_report(data=[{"item": "example"}])
print(z_report)

Notes

  • This method sends a POST request to create a Z report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

daily_cash_flow_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates a daily cash flow report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created daily cash flow report.

Example

cash_flow_report = client.extended_reports.daily_cash_flow_report(data=[{"item": "example"}])
print(cash_flow_report)

Notes

  • This method sends a POST request to create a daily cash flow report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

get_report_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves a specific report task by its ID.

Параметри:
  • report_task_id – The ID of the report task to retrieve.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the retrieved report task.

Example

report_task =
    client.extended_reports.get_report_task_by_id(
      report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task)

Notes

  • This method sends a GET request to retrieve the report task with the specified ID.

goods_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Generates a goods report.

Параметри:
  • data – Additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload for the request.

Повертає:

A dictionary containing the details of the generated goods report.

Example

report = client.extended_reports.goods_report(data=[{"item": "example"}])
print(report)

Notes

  • This method sends a POST request to generate the goods report.

net_turnover_report(data: List[Dict] | None = None, storage: SessionStorage | None = None, **payload) Dict[str, Any]

Creates a net turnover report.

Параметри:
  • data – Optional list of dictionaries containing additional data for the report.

  • storage – An optional session storage to use for the operation.

  • **payload – Additional payload to include in the request.

Повертає:

A dictionary containing the details of the created net turnover report.

Example

turnover_report = client.extended_reports.net_turnover_report(data=[{"item": "example"}])
print(turnover_report)

Notes

  • This method sends a POST request to create a net turnover report.

  • The data argument can be used to provide additional data required for generating the report.

  • Additional payload parameters can be passed as keyword arguments.

report_json_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves the details of a specific report task by its ID, including the JSON file if available.

Параметри:
  • report_task_id – The ID of the report task to retrieve. Can be a string or a UUID.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the report task and possibly the JSON file.

Example

report_task_details =
    client.extended_reports.
    report_json_task_by_id(report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task_details)

Notes

  • This method sends a GET request to retrieve the details of the report task with the specified ID.

report_xlsx_task_by_id(report_task_id: str | UUID, storage: SessionStorage | None = None) Dict[str, Any]

Retrieves the details of a specific report task by its ID, including the XLSX file if available.

Параметри:
  • report_task_id – The ID of the report task to retrieve. Can be a string or a UUID.

  • storage – An optional session storage to use for the operation.

Повертає:

A dictionary containing the details of the report task and possibly the XLSX file.

Example

report_task_details =
    client.extended_reports.report_xlsx_task_by_id(
      report_task_id="123e4567-e89b-12d3-a456-426614174000")
print(report_task_details)

Notes

  • This method sends a GET request to retrieve the details of the report task with the specified 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