Skip to content

Commit

Permalink
feat(unit-price): Add amount_details to Fee fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Nov 29, 2023
1 parent 9232a90 commit 6e02411
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lago_python_client/models/fee.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import Any, Dict, List, Optional

from .invoice_item import InvoiceItemResponse
from ..base_model import BaseModel, BaseResponseModel
Expand Down Expand Up @@ -53,6 +53,7 @@ class FeeResponse(BaseResponseModel):
refunded_at: Optional[str]
from_date: Optional[str]
to_date: Optional[str]
amount_details: Optional[Dict[str, Any]]

item: Optional[InvoiceItemResponse]
applied_taxes: Optional[FeeAppliedTaxes]
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/one_off_invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
"total_amount_currency": "EUR",
"units": 12.6,
"precise_unit_amount": 9.52,
"events_count": 4
"events_count": 4,
"amount_details": {}
}
]
}
Expand Down
1 change: 1 addition & 0 deletions tests/test_invoice_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_valid_create_invoice_request(httpx_mock: HTTPXMock):
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'
assert response.fees.__root__[0].amount_details == {}


def test_invalid_create_invoice_request(httpx_mock: HTTPXMock):
Expand Down

0 comments on commit 6e02411

Please sign in to comment.