# Darsman Invoice Service

## Requirements

- Python (== 3.10)
- grpcio-tools (>=1.62.1)

## Installation

Run the following command using pip:

```bash
    pip install dmiv
```

## Sample code

```python
import asyncio
from dmiv import Invoice


invoice = Invoice(api_key="test_api_key")


create_response = asyncio.run(
    invoice.create(
        owner_identifier="test",
        amount=2000,
        expire_date="2024-12-31",
        extra_data="test",
    )
)
print(create_response)


inquiry_response = asyncio.run(
    invoice.inquiry(tracking_code="18a4e3b5-3967-4a29-aead-5181445c4bfc")
)
print(inquiry_response)


payment_request_response = asyncio.run(
    invoice.payment_request(
        transaction_type="test type",
        invoice_id=1,
        amount=2000,
        description="pardakht anjam shod",
        order_identifier="test identifier",
        payment_type="test type",
        owner_identifier="test identifier",
        gateway_id=1,
    )
)
print(payment_request_response)

```
