Skip to content

Commit

Permalink
feat(unit-price): Add precise_unit_amount to Fee object
Browse files Browse the repository at this point in the history
  • Loading branch information
rsempe committed Nov 6, 2023
1 parent d87bbb7 commit a064ee0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lago_python_client/models/fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/one_off_invoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"total_amount_cents": 120,
"total_amount_currency": "EUR",
"units": 12.6,
"precise_unit_amount": 9.52,
"events_count": 4
}
]
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 @@ -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'


Expand Down

0 comments on commit a064ee0

Please sign in to comment.