Metadata-Version: 2.4
Name: entirius-django-checkout-export-to-magento-api
Version: 2.0.0
Summary: Export of Volkanos checkout orders, payments and shipments to the Magento 2 API
Project-URL: Repository, https://github.com/entirius/entirius-django-checkout-export-to-magento-api
Author: Entirius
License-Expression: MPL-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: django>=5.0
Requires-Dist: entirius-django-checkout>=9.0.0
Requires-Dist: entirius-py-bievents>=2.0.0
Requires-Dist: entirius-py-idx-normalizator>=2.0.0
Requires-Dist: entirius-py-magento2-sdk>=2.0.0
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: test
Requires-Dist: dj-database-url; extra == 'test'
Requires-Dist: psycopg[binary]; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-django; extra == 'test'
Description-Content-Type: text/markdown

# entirius-django-checkout-export-to-magento-api

Exports `django_checkout` orders, payments (as invoices) and shipments to a Magento 2 instance
via its REST API. Part of the Volkanos e-commerce module family.

## Installation

```shell
pip install entirius-django-checkout-export-to-magento-api
```

## Configuration

```python
MAGENTO2_URL_FOR_CHECKOUT_EXPORT = "https://your-magento-host/rest/"
MAGENTO2_TOKEN_FOR_CHECKOUT_EXPORT = "<api-token>"
```

Optional mappings (see `src/django_checkout_export_to_magento_api/settings.py` for defaults):
`MAPPING_PAYMENT_METHODS`, `MAPPING_SHIPPING_METHODS`, `SEND_FIELD_EXTENSION_ATTRIBUTES`,
`MAGENTO2_EXPORT_GROUND_DATETIME`.

## Development

```shell
make install   # uv sync (incl. extras)
make test      # run tests
make check     # ruff lint + format-check
```

## Process Logging

Commands can save logs into process.log. Add the following to the host service `settings.py`
(assuming a `process` handler with a JSON formatter is already configured):

```python
LOGGING["loggers"]["django_checkout_export_to_magento_api"] = {
    "handlers": ["process"],
    "level": "DEBUG",
    "propagate": False,
}
```

## Commands

See `docs/commands/` for the management command reference.

## License

MPL-2.0
