diff --git a/lago_python_client/models/fee.py b/lago_python_client/models/fee.py index 31c5d884..6f6757c8 100644 --- a/lago_python_client/models/fee.py +++ b/lago_python_client/models/fee.py @@ -37,7 +37,8 @@ class FeeResponse(BaseResponseModel): taxes_amount_cents: Optional[int] taxes_rate: Optional[float] total_amount_cents: Optional[int] - unit_amount_cents: Optional[int] + unit_amount_cents: Optional[int] # deprecated + precise_unit_amount: Optional[float] total_amount_currency: Optional[str] units: Optional[float] events_count: Optional[int] diff --git a/tests/fixtures/one_off_invoice.json b/tests/fixtures/one_off_invoice.json index 578f43d7..cb143a2f 100644 --- a/tests/fixtures/one_off_invoice.json +++ b/tests/fixtures/one_off_invoice.json @@ -102,6 +102,7 @@ "total_amount_cents": 120, "total_amount_currency": "EUR", "units": 12.6, + "precise_unit_amount": 9.52, "events_count": 4 } ] diff --git a/tests/test_invoice_client.py b/tests/test_invoice_client.py index f541cefc..a1a1f902 100644 --- a/tests/test_invoice_client.py +++ b/tests/test_invoice_client.py @@ -53,6 +53,7 @@ def test_valid_create_invoice_request(httpx_mock: HTTPXMock): assert response.lago_id == '5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba' assert response.invoice_type == 'one_off' assert response.fees.__root__[0].invoice_display_name == 'fee_invoice_display_name' + assert response.fees.__root__[0].precise_unit_amount == 9.52 assert response.fees.__root__[0].item.invoice_display_name == 'one_off_invoice_display_name'