diff --git a/lago_python_client/models/payment.py b/lago_python_client/models/payment.py index 0335055..869b209 100644 --- a/lago_python_client/models/payment.py +++ b/lago_python_client/models/payment.py @@ -13,6 +13,7 @@ class Payment(BaseModel): class PaymentResponse(BaseResponseModel): lago_id: str invoice_ids: List[str] + invoice_numbers: List[str] amount_cents: int amount_currency: str payment_status: str diff --git a/tests/fixtures/payment.json b/tests/fixtures/payment.json index 9b006c5..9ab94a4 100644 --- a/tests/fixtures/payment.json +++ b/tests/fixtures/payment.json @@ -2,6 +2,7 @@ "payment": { "lago_id": "8e5d5ec2-bdc7-4c43-a944-5ababae775d4", "invoice_ids": ["f8e194df-5d90-4382-b146-c881d2c67f28"], + "invoice_numbers": ["LAG-1234-567-890"], "amount_cents": 100, "amount_currency": "USD", "payment_status": "succeeded", diff --git a/tests/fixtures/payment_index.json b/tests/fixtures/payment_index.json index e13679a..71ba597 100644 --- a/tests/fixtures/payment_index.json +++ b/tests/fixtures/payment_index.json @@ -5,6 +5,9 @@ "invoice_ids": [ "ed267c66-8170-4d23-83e8-6d6e4fc735ef" ], + "invoice_numbers": [ + "LAG-1234-567-891" + ], "amount_cents": 100, "amount_currency": "USD", "payment_status": "succeeded", diff --git a/tests/fixtures/payment_receipt.json b/tests/fixtures/payment_receipt.json index dcd9ac9..d56abf1 100644 --- a/tests/fixtures/payment_receipt.json +++ b/tests/fixtures/payment_receipt.json @@ -8,6 +8,9 @@ "invoice_ids": [ "ed267c66-8170-4d23-83e8-6d6e4fc735ef" ], + "invoice_numbers": [ + "LAG-1234-567-891" + ], "amount_cents": 100, "amount_currency": "USD", "payment_status": "succeeded", diff --git a/tests/fixtures/payment_receipt_index.json b/tests/fixtures/payment_receipt_index.json index ef1b93c..83b8246 100644 --- a/tests/fixtures/payment_receipt_index.json +++ b/tests/fixtures/payment_receipt_index.json @@ -9,6 +9,9 @@ "invoice_ids": [ "ed267c66-8170-4d23-83e8-6d6e4fc735ef" ], + "invoice_numbers": [ + "LAG-1234-567-891" + ], "amount_cents": 100, "amount_currency": "USD", "payment_status": "succeeded", diff --git a/tests/test_payment_client.py b/tests/test_payment_client.py index 5b2e287..6daf6f7 100644 --- a/tests/test_payment_client.py +++ b/tests/test_payment_client.py @@ -92,6 +92,8 @@ def test_valid_create_payment_request(httpx_mock: HTTPXMock): assert response.payment_status == "succeeded" assert len(response.invoice_ids) == 1 assert response.invoice_ids[0] == "f8e194df-5d90-4382-b146-c881d2c67f28" + assert len(response.invoice_numbers) == 1 + assert response.invoice_numbers[0] == "LAG-1234-567-890" def test_invalid_create_payment_request(httpx_mock: HTTPXMock):