checkbox_sdk.methods package¶
Submodules¶
checkbox_sdk.methods.base module¶
- class checkbox_sdk.methods.base.AbstractMethod¶
Bases:
ABCAbstract base class for defining API methods.
This class outlines the structure for API methods, including the HTTP method, request URI, query parameters, payload, headers, files, and response parsing.
- method¶
The HTTP method used for the API request. Defaults to HTTPMethod.GET.
- internal¶
A boolean flag indicating whether the URI follows a non-standard convention, typically used for internal APIs. Defaults to False.
- Type:
bool
- abstract property files¶
Abstract property that must return the files to be sent with the API request.
- Повертає:
A dictionary or other structure representing the files to be uploaded with the request.
- abstract property headers¶
Abstract property that must return the headers for the API request.
- Повертає:
A dictionary representing the headers for the request.
- internal: bool = False¶
- method: HTTPMethod = 1¶
- abstract parse_response(storage: SessionStorage, response: Response)¶
Abstract method that must parse the API response.
This method is responsible for processing the response from the API, extracting necessary information, and storing it in the session storage if needed.
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed response data, in a format specific to the API method.
- abstract property payload¶
Abstract property that must return the payload for the API request.
- Повертає:
A dictionary or other structure representing the JSON payload for the request.
- abstract property query¶
Abstract property that must return the query parameters for the API request.
- Повертає:
A dictionary or other structure representing the query parameters for the request.
- abstract property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.base.BaseMethod¶
Bases:
AbstractMethod,ABCBase implementation of an API method.
This class provides default implementations for the properties and methods defined in the
checkbox_sdk.methods.base.AbstractMethodclass. It is designed to be extended by specific API method classes, allowing them to override only the properties and methods that require customization.- query()¶
Returns the default query parameters for the API request as an empty dictionary.
- payload()¶
Returns the default payload for the API request as an empty dictionary.
- headers()¶
Returns the default headers for the API request as an empty dictionary.
- files()¶
Returns the default files for the API request as an empty dictionary.
- parse_response()¶
Parses the JSON response from the API and attaches the server date to the result if applicable.
- _parse_server_date()¶
Extracts and parses the «Date» header from the response to return it as a datetime object.
- property files¶
Returns the default files for the API request.
- Повертає:
An empty dictionary representing the default files to be sent with the request.
- Тип повернення:
dict
- static format_datetime_to_iso_with_ms(dt: datetime) str¶
Convert a timezone-aware datetime to an ISO 8601 formatted string with milliseconds and UTC „Z“.
- Параметри:
dt – A timezone-aware datetime object.
- Повертає:
ISO 8601 formatted string with milliseconds in UTC.
- property headers¶
Returns the default headers for the API request.
- Повертає:
An empty dictionary representing the default headers.
- Тип повернення:
dict
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- class checkbox_sdk.methods.base.HTTPMethod(value)¶
Bases:
EnumEnumeration for HTTP methods used in API requests.
This enum defines the basic HTTP methods that can be used in API calls.
- Members:
GET: Represents the HTTP GET method. POST: Represents the HTTP POST method. PUT: Represents the HTTP PUT method. DELETE: Represents the HTTP DELETE method. PATCH: Represents the HTTP PATCH method.
- DELETE = 4¶
- GET = 1¶
- PATCH = 5¶
- POST = 2¶
- PUT = 3¶
- class checkbox_sdk.methods.base.PaginationMixin(limit: int = 10, offset: int = 0)¶
Bases:
objectA mixin class to manage pagination for API requests.
This mixin provides methods and properties to handle pagination-related functionality, such as setting limits and offsets, shifting to the next or previous pages, and resolving pagination data from API responses.
- limit¶
The maximum number of items to retrieve per request. Defaults to 10.
- Type:
int
- offset¶
The starting position of the items to retrieve. Defaults to 0.
- Type:
int
- property page¶
Returns the current page number.
The page number is calculated based on the offset and limit attributes.
- Повертає:
The current page number.
- Тип повернення:
int
- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- resolve_pagination(paginated_result: Dict[str, Any])¶
Updates the pagination parameters from a paginated API result.
This method extracts the pagination metadata from the result (such as offset and limit) and updates the mixin’s attributes accordingly.
- Параметри:
paginated_result (Dict[str, Any]) – The result of a paginated API request, containing pagination metadata.
- Повертає:
The instance itself with updated pagination parameters.
- Тип повернення:
self
- set_page(page: int)¶
Sets the pagination to a specific page number.
This method updates the offset based on the specified page number and the value of limit.
- Параметри:
page (int) – The page number to set.
- shift_next_page()¶
Moves the pagination to the next page.
This method increments the offset by the value of limit, effectively moving to the next page of results.
- Повертає:
The instance itself with the updated offset.
- Тип повернення:
self
- shift_previous_page()¶
Moves the pagination to the previous page.
This method decrements the offset by the value of limit, effectively moving to the previous page of results.
- Повертає:
The instance itself with the updated offset.
- Тип повернення:
self
checkbox_sdk.methods.branches module¶
- class checkbox_sdk.methods.branches.GetAllBranches(*args, **kwargs)¶
Bases:
PaginationMixin,BaseMethodA method class for retrieving all branches with pagination support.
This class is used to fetch all branches from the «branches» endpoint, utilizing the pagination features provided by the PaginationMixin.
- uri¶
The API endpoint for retrieving branches, set to «branches».
- Type:
str
- uri = 'branches'¶
checkbox_sdk.methods.cash_register module¶
- class checkbox_sdk.methods.cash_register.AskOfflineCodes(count: int = 2000, sync: bool = False)¶
Bases:
BaseMethod- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'cash-registers/ask-offline-codes'¶
- class checkbox_sdk.methods.cash_register.GetCashRegister(cash_register_id: str)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.cash_register.GetCashRegisterInfo¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri: str = 'cash-registers/info'¶
- class checkbox_sdk.methods.cash_register.GetCashRegisterShifts(*args, statuses: List[str] | None = None, desc: bool | None = False, from_date: datetime | str | None = None, to_date: datetime | str | None = None, **kwargs)¶
Bases:
GetShifts- uri: str = 'cash-registers/shifts'¶
- class checkbox_sdk.methods.cash_register.GetCashRegisters(*args, in_use: bool | None = None, fiscal_number: str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'cash-registers'¶
- class checkbox_sdk.methods.cash_register.GetOfflineCodes(count: int = 2000)¶
Bases:
BaseMethod- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'cash-registers/get-offline-codes'¶
- class checkbox_sdk.methods.cash_register.GetOfflineCodesCount¶
Bases:
BaseMethod- uri = 'cash-registers/get-offline-codes-count'¶
- class checkbox_sdk.methods.cash_register.GetOfflineTime(*args, from_date: datetime | str | None = None, to_date: datetime | str | None = None, **kwargs)¶
Bases:
BaseMethod- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'cash-registers/get-offline-time'¶
- class checkbox_sdk.methods.cash_register.GoOffline(go_offline_date: datetime | str | None = None, fiscal_code: str | None = None)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'cash-registers/go-offline'¶
- class checkbox_sdk.methods.cash_register.GoOnline¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- uri = 'cash-registers/go-online'¶
- class checkbox_sdk.methods.cash_register.PingTaxService¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- uri: str = 'cash-registers/ping-tax-service'¶
checkbox_sdk.methods.cashier module¶
- class checkbox_sdk.methods.cashier.GetActiveShift¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'cashier/shift'¶
- class checkbox_sdk.methods.cashier.GetAllTaxesByCashier¶
Bases:
BaseMethod- uri = 'cashier/tax'¶
- class checkbox_sdk.methods.cashier.GetMe¶
Bases:
BaseMethod- method: HTTPMethod = 1¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'cashier/me'¶
- class checkbox_sdk.methods.cashier.GetSignatureKey¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'cashier/check-signature'¶
- class checkbox_sdk.methods.cashier.SignIn(login: str, password: str)¶
Bases:
_SignInMixin,BaseMethod- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'cashier/signin'¶
- class checkbox_sdk.methods.cashier.SignInPinCode(pin_code: str)¶
Bases:
_SignInMixin,BaseMethod- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'cashier/signinPinCode'¶
- class checkbox_sdk.methods.cashier.SignOut¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'cashier/signout'¶
checkbox_sdk.methods.currency module¶
- class checkbox_sdk.methods.currency.GetCurrencyRate(currency_code: str)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.currency.GetCurrencyRates(active: bool | None = True)¶
Bases:
BaseMethod- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'currency/rate'¶
- class checkbox_sdk.methods.currency.SetupCurrencyRates(rates: List[Dict] | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'currency/rate/setup'¶
checkbox_sdk.methods.extended_reports module¶
- class checkbox_sdk.methods.extended_reports.CreateActualRevenueReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/actual_revenue'¶
- class checkbox_sdk.methods.extended_reports.CreateBookkeeperZReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/bookkeeper_z_report'¶
- class checkbox_sdk.methods.extended_reports.CreateDailyCashFlowReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/daily_cash_flow'¶
- class checkbox_sdk.methods.extended_reports.CreateGoodsReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/goods'¶
- class checkbox_sdk.methods.extended_reports.CreateNetTurnoverReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/net_turnover'¶
- class checkbox_sdk.methods.extended_reports.CreateReceiptReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/receipt'¶
- class checkbox_sdk.methods.extended_reports.CreateReport(data: List[Dict] | None = None, **payload)¶
Bases:
BaseMethod,ABC- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- class checkbox_sdk.methods.extended_reports.CreateZReport(data: List[Dict] | None = None, **payload)¶
Bases:
CreateReport- uri = 'extended-reports/z'¶
- class checkbox_sdk.methods.extended_reports.GetReportJsonTaskById(report_task_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.extended_reports.GetReportTaskById(report_task_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.extended_reports.GetReportXlsxTaskById(report_task_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.goods module¶
- class checkbox_sdk.methods.goods.ExportGoods(export_extension: str)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.goods.ExportGoodsFile(task_id: str | UUID, export_extension: str)¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.goods.ExportGoodsTaskStatus(task_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.goods.GetGood(good_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.goods.GetGoods(*args, group_id: str | UUID | None = None, without_group_only: bool | None = False, query: str | None = None, order_by_name: str | None = None, order_by_code: str | None = None, order_by_position: str | None = None, load_children: bool | None = False, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'goods'¶
- class checkbox_sdk.methods.goods.GetGroups(*args, search: str | None = None, parent_groups_only: bool | None = False, parent_id: str | None = None, order_by_name: str | None = None, order_by_created_at: str | None = None, order_by_updated_at: str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'goods/groups'¶
- class checkbox_sdk.methods.goods.ImportGoodsApplyChanges(task_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.goods.ImportGoodsFromFile(*args, file: str, ignore_barcode_duplicates: bool | None = False, auto_supply: bool | None = False, **kwargs)¶
Bases:
BaseMethod- property files¶
Returns the default files for the API request.
- Повертає:
An empty dictionary representing the default files to be sent with the request.
- Тип повернення:
dict
- method: HTTPMethod = 2¶
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'goods/import/upload'¶
- class checkbox_sdk.methods.goods.ImportGoodsTaskStatus(task_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.invoices module¶
- class checkbox_sdk.methods.invoices.CancelInvoiceById(invoice_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 4¶
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.invoices.CreateAndFiscalizeInvoice(invoice: List[Dict] | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'invoices/fiscalize'¶
- class checkbox_sdk.methods.invoices.CreateInvoice(invoice: List[Dict] | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'invoices'¶
- class checkbox_sdk.methods.invoices.GetInvoiceById(invoice_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.invoices.GetInvoices(*args, status: str | None = None, from_date: datetime | str | None = None, to_date: datetime | str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'invoices'¶
- class checkbox_sdk.methods.invoices.GetTerminals¶
Bases:
BaseMethod- uri = 'terminals'¶
- class checkbox_sdk.methods.invoices.RemoveInvoiceById(invoice_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 4¶
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.nova_post module¶
- class checkbox_sdk.methods.nova_post.DeleteEttnOrder(order_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 4¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.nova_post.GetEttnOrder(order_id: str | UUID)¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.nova_post.GetEttnOrders(*args, status: str | None = None, from_date: datetime | str | None = None, to_date: datetime | str | None = None, **kwargs)¶
Bases:
GetInvoices- uri = 'np/ettn'¶
- class checkbox_sdk.methods.nova_post.PostEttnOrder(order: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'np/ettn'¶
- class checkbox_sdk.methods.nova_post.PostEttnPrepaymentOrder(order: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'np/ettn/prepayment'¶
- class checkbox_sdk.methods.nova_post.UpdateEttnOrder(order_id: str | UUID, delivery_phone: str | None = None, delivery_email: str | None = None)¶
Bases:
BaseMethod- method: HTTPMethod = 3¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.orders module¶
- class checkbox_sdk.methods.orders.AddOrders(orders: List[Dict] | Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'orders'¶
- class checkbox_sdk.methods.orders.CancelOrder(order_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 5¶
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.orders.CloseNotFiscalizeOrder(order_id: str | UUID)¶
Bases:
BaseMethod- method: HTTPMethod = 5¶
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'orders/close'¶
- class checkbox_sdk.methods.orders.DeleteIntegration¶
Bases:
BaseMethod- method: HTTPMethod = 4¶
- uri = 'orders/integration'¶
- class checkbox_sdk.methods.orders.DeleteOrder(order_id: str | UUID)¶
Bases:
BaseMethod- internal: bool = True¶
- method: HTTPMethod = 2¶
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.orders.EditOrder(order: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'orders/integration/edit-order'¶
- class checkbox_sdk.methods.orders.GetIntegration¶
Bases:
BaseMethod- uri = 'orders/integration'¶
- class checkbox_sdk.methods.orders.GetOrder(order_id: str | UUID, orders_all: bool | None = False)¶
Bases:
BaseMethod- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.orders.GetOrders(*args, desc: bool | None = True, delivery_desc: bool | None = None, orders_all: bool | None = False, delivered_from_date: datetime | str | None = None, delivered_to_date: datetime | str | None = None, status: List[str] | None = None, stock_code: str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'orders'¶
- class checkbox_sdk.methods.orders.RunOrdersSynchronization¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'orders/sync'¶
- class checkbox_sdk.methods.orders.SetIntegration(url: str)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'orders/integration'¶
- class checkbox_sdk.methods.orders.UpdateCustomOrderStatus(order_id: str | UUID, new_status: str | None = None)¶
Bases:
BaseMethod- method: HTTPMethod = 5¶
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.organization module¶
- class checkbox_sdk.methods.organization.GetOrganizationLogo¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'organization/logo.png'¶
- class checkbox_sdk.methods.organization.GetOrganizationReceiptConfig¶
Bases:
BaseMethod- uri = 'organization/receipt-config'¶
- class checkbox_sdk.methods.organization.GetOrganizationSmsBilling¶
Bases:
BaseMethod- uri = 'organization/sms-billing'¶
- class checkbox_sdk.methods.organization.GetOrganizationTextLogo¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- uri = 'organization/text_logo.png'¶
checkbox_sdk.methods.prepayment_receipts module¶
- class checkbox_sdk.methods.prepayment_receipts.CreateAfterPaymentReceipt(relation_id: str, receipt: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.prepayment_receipts.CreatePrepaymentReceipt(receipt: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'prepayment-receipts'¶
- class checkbox_sdk.methods.prepayment_receipts.GetPrepaymentReceipts(*args, from_date: datetime | str | None = None, to_date: datetime | str | None = None, desc: bool | None = False, search: str | None = None, cash_register_id: datetime | str | None = None, status: str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'prepayment-receipts/search'¶
- class checkbox_sdk.methods.prepayment_receipts.GetPrepaymentReceiptsChain(relation_id: str, data: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.prepayment_receipts.GetPrepaymentRelation(relation_id: str)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
checkbox_sdk.methods.receipts module¶
- class checkbox_sdk.methods.receipts.AddExternal(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- uri = 'receipts/add-external'¶
- class checkbox_sdk.methods.receipts.CreateBulkReceipts(receipts: List[Dict] | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'receipts/bulk-sell'¶
- class checkbox_sdk.methods.receipts.CreateCashWithdrawalReceipt(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- method: HTTPMethod = 2¶
- class checkbox_sdk.methods.receipts.CreateReceipt(receipt: Dict | None = None, **payload)¶
Bases:
BaseMethod- property headers¶
Returns the default headers for the API request.
- Повертає:
An empty dictionary representing the default headers.
- Тип повернення:
dict
- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'receipts/sell'¶
- class checkbox_sdk.methods.receipts.CreateReceiptOffline(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- uri = 'receipts/sell-offline'¶
- class checkbox_sdk.methods.receipts.CreateServiceReceipt(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- uri = 'receipts/service'¶
- class checkbox_sdk.methods.receipts.CurrencyExchange(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- uri = 'receipts/currency-exchange'¶
- class checkbox_sdk.methods.receipts.GetReceipt(receipt_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.receipts.GetReceiptVisualization(receipt_id: str | UUID, fmt: str = 'text', **query)¶
Bases:
GetReceipt- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationHtml(receipt_id: str | UUID, is_second_copy: bool | None = False, simple: bool | None = False, show_buttons: bool | None = None, x_show_buttons: bool | None = None)¶
Bases:
GetReceiptVisualization- property headers¶
Returns the default headers for the API request.
- Повертає:
An empty dictionary representing the default headers.
- Тип повернення:
dict
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationPdf(receipt_id: str | UUID, is_second_copy: bool | None = False, download: bool | None = False)¶
Bases:
GetReceiptVisualization
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationPng(receipt_id: str | UUID, is_second_copy: bool | None = False, width: int | None = 30, paper_width: int | None = 58, qrcode_scale: int | None = 75)¶
Bases:
GetReceiptVisualization
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationQrCode(receipt_id: str | UUID)¶
Bases:
GetReceiptVisualization
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationText(receipt_id: str | UUID, is_second_copy: bool | None = False, width: int | None = 42)¶
Bases:
GetReceiptVisualization- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- class checkbox_sdk.methods.receipts.GetReceiptVisualizationXml(receipt_id: str | UUID)¶
Bases:
GetReceiptVisualization- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- class checkbox_sdk.methods.receipts.GetReceipts(*args, fiscal_code: str | None = None, serial: int | None = None, desc: bool | None = False, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'receipts'¶
- class checkbox_sdk.methods.receipts.GetReceiptsSearch(*args, fiscal_code: str | None = None, barcode: str | None = None, shift_id: List[str] | None = None, branch_id: List[str] | None = None, cash_register_id: List[str] | None = None, stock_code: str | None = None, desc: bool | None = False, from_date: datetime | str | None = None, to_date: datetime | str | None = None, self_receipts: bool | None = True, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'receipts/search'¶
- class checkbox_sdk.methods.receipts.SendEmail(receipt_id: str | UUID, email: str)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.receipts.SendSMS(receipt_id: str | UUID, phone: str)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.receipts.ServiceCurrency(receipt: Dict | None = None, **payload)¶
Bases:
CreateReceipt- uri = 'receipts/service-currency'¶
checkbox_sdk.methods.reports module¶
- class checkbox_sdk.methods.reports.AddExternal(report: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'reports/add-external'¶
- class checkbox_sdk.methods.reports.CreateXReport¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- uri = 'reports'¶
- class checkbox_sdk.methods.reports.GetPeriodicalReport(from_date: datetime | str, to_date: datetime | str, width: int | None = 42, is_short: bool | None = False)¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- uri = 'reports/periodical'¶
- class checkbox_sdk.methods.reports.GetReport(report_id: str | UUID)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.reports.GetReportVisualization(report_id: str | UUID, fmt: str = 'text', **query)¶
Bases:
GetReport- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property query¶
Returns the default query parameters for the API request.
- Повертає:
An empty dictionary representing the default query parameters.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.reports.GetReportVisualizationPng(report_id: str | UUID, width: int | None = 34, paper_width: int | None = 58)¶
Bases:
GetReportVisualization- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- class checkbox_sdk.methods.reports.GetReportVisualizationText(report_id: str | UUID, width: int | None = 42)¶
Bases:
GetReportVisualization- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- class checkbox_sdk.methods.reports.GetReports(*args, from_date: datetime | str | None = None, to_date: datetime | str | None = None, shift_id: List[str] | None = None, serial: int | None = None, is_z_report: bool | None = None, desc: bool | None = False, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'reports'¶
- class checkbox_sdk.methods.reports.SearchReports(*args, from_date: datetime | str | None = None, to_date: datetime | str | None = None, shift_id: List[str] | None = None, serial: int | None = None, is_z_report: bool | None = None, desc: bool | None = False, cash_register_id: List[str] | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'reports/search'¶
checkbox_sdk.methods.shifts module¶
- class checkbox_sdk.methods.shifts.CloseShift(**payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'shifts/close'¶
- class checkbox_sdk.methods.shifts.CloseShiftBySeniorCashier(shift_id: str | UUID, shift: Dict | None = None, **payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.shifts.CreateShift(**payload)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'shifts'¶
- class checkbox_sdk.methods.shifts.GetShift(shift_id: str)¶
Bases:
BaseMethod- parse_response(storage: SessionStorage, response: Response)¶
Parses the JSON response from the API and adds the server date if available.
This method processes the response received from the API. If the response is a dictionary, it adds the server’s date (if available) to the result under the key «@date».
- Параметри:
storage – The session storage instance where parsed data may be stored.
response – The response object returned from the API request.
- Повертає:
The parsed JSON response with the server date added, if applicable.
- Тип повернення:
dict
- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.shifts.GetShifts(*args, statuses: List[str] | None = None, desc: bool | None = False, from_date: datetime | str | None = None, to_date: datetime | str | None = None, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'shifts'¶
checkbox_sdk.methods.tax module¶
- class checkbox_sdk.methods.tax.GetTax¶
Bases:
BaseMethod- uri = 'tax'¶
checkbox_sdk.methods.transactions module¶
- class checkbox_sdk.methods.transactions.GetTransaction(transaction_id: str)¶
Bases:
BaseMethod- property uri: str¶
Abstract property that must return the URI of the API endpoint.
- Повертає:
A string representing the URI of the API endpoint.
- class checkbox_sdk.methods.transactions.GetTransactions(*args, status: List[str] | None = None, type: List[str] | None = None, desc: bool | None = False, **kwargs)¶
Bases:
PaginationMixin,BaseMethod- property query¶
Returns a dictionary representing the pagination parameters.
The query dictionary contains limit and offset keys, which are used to specify the pagination for an API request.
- Повертає:
A dictionary with pagination parameters (limit and offset).
- Тип повернення:
dict
- uri = 'transactions'¶
checkbox_sdk.methods.webhook module¶
- class checkbox_sdk.methods.webhook.DeleteWebhook¶
Bases:
BaseMethod- method: HTTPMethod = 4¶
- uri = 'webhook'¶
- class checkbox_sdk.methods.webhook.GetWebhookInfo¶
Bases:
BaseMethod- uri = 'webhook'¶
- class checkbox_sdk.methods.webhook.SetWebhook(url: str)¶
Bases:
BaseMethod- method: HTTPMethod = 2¶
- property payload¶
Returns the default payload for the API request.
- Повертає:
An empty dictionary representing the default JSON payload.
- Тип повернення:
dict
- uri = 'webhook'¶