Metadata-Version: 2.4
Name: cetustek
Version: 0.1.0
Summary: Python SDK for Cetustek Taiwan e-invoice API
Project-URL: Homepage, https://github.com/vincelee888/cetustek
Project-URL: Repository, https://github.com/vincelee888/cetustek
Project-URL: Issues, https://github.com/vincelee888/cetustek/issues
Author: Vince Lee
License-Expression: MIT
License-File: LICENSE
Keywords: cetustek,e-invoice,einvoice,invoice,taiwan
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: requests>=2.25.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Cetustek

Python SDK for Cetustek Taiwan e-invoice API.

## Installation

```bash
pip install cetustek
```

## Usage

```python
from cetustek import Cetustek, CreateInvoiceInput, InvoiceItem

# Initialize the client
client = Cetustek(
    endpoint="https://invoice.cetustek.com.tw/InvoiceMultiWeb/InvoiceAPI",
    rent_id="YOUR_RENT_ID",
    site_code="YOUR_SITE_CODE",
    api_password="YOUR_API_PASSWORD",
)

# Create an invoice
invoice_input = CreateInvoiceInput(
    order_id="12345678",
    order_date="2026/01/15",
    buyer_identifier="12345678",
    buyer_name="Company Name",
    buyer_email="email@example.com",
    donate_mark="0",
    invoice_type="07",
    tax_type="1",
    tax_rate=0.05,
    pay_way="1",
    items=[
        InvoiceItem(
            production_code="PROD001",
            description="Product description",
            quantity=1,
            unit_price=1000,
            unit="件",
        )
    ],
)

result = client.createInvoice(invoice_input)
```

### Query an Invoice

```python
from cetustek import QueryInvoiceInput

query_input = QueryInvoiceInput(
    invoice_number="AA12345678",
    invoice_year="2026",
)

result = client.queryInvoice(query_input)
```

### Cancel an Invoice

```python
from cetustek import CancelInvoiceInput

cancel_input = CancelInvoiceInput(
    invoice_number="AA12345678",
    invoice_year="2026",
    remark="Cancellation reason",
)

result = client.cancelInvoice(cancel_input)
# Or use no_check=True to skip validation
result = client.cancelInvoice(cancel_input, no_check=True)
```

## License

MIT
