Skip to content

goretsky-integration/canceled-orders

Repository files navigation

Canceled orders service

codecov Test


What is this service for?

This service is intended for identifying specific types of canceled orders for the previous day based on certain criteria.


Criteria for canceled orders:

  • Criteria set #1:
    • Sales channel - restaurant
    • Order canceled by any employee.
  • Criteria set #2:
    • Sales channel - delivery
    • A courier was assigned to the order.

How to understand that the order was canceled by an employee?

In the order history, the third column will indicate the employee's name. order history


What data about the order is collected?

  • Order ID.
  • Point of sale name.
  • Order number.
  • Order price.
  • Sales channel (restaurant, delivery).
  • Existence of a cancellation receipt.

Setup and run the service

****### 1. Clone the repository

git clone https://github.com/goretsky-integration/canceled-orders

2. Create poetry virtual environment

poetry env use python3.11

3. Activate it

poetry shell

4. Install dependencies

poetry install --without dev

5. Set up config file instruction

cp config.example.toml config.toml

6. Run the service

python src/main.py

Run tests

1. Clone the repository

git clone https://github.com/goretsky-integration/canceled-orders

2. Create poetry virtual environment

poetry env use python3.11

3. Activate it

poetry shell

4. Install dependencies

poetry install

5. Run the tests

pytest