diff --git a/README.md b/README.md index e9558bf..0dee91b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Projekt odwzorowuje oficjalne przepływy KSeF i zapewnia spójny model pracy w d ## 🔄 Kompatybilność -Aktualna kompatybilność: **KSeF API `v2.2.0`** ([api-changelog.md](https://github.com/CIRFMF/ksef-docs/blob/2.2.0/api-changelog.md)). +Aktualna kompatybilność: **KSeF API `v2.2.1`** ([api-changelog.md](https://github.com/CIRFMF/ksef-docs/blob/2.2.1/api-changelog.md)). ## 🧭 Spis treści diff --git a/docs/README.md b/docs/README.md index 328bcc9..08b8cba 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ Dokumentacja opisuje **publiczne API** biblioteki `ksef-client-python` (import: Opis kontraktu API (OpenAPI) oraz dokumenty procesowe i ograniczenia systemu znajdują się w `ksef-docs/`. -Kompatybilność SDK: **KSeF API `v2.2.0`**. +Kompatybilność SDK: **KSeF API `v2.2.1`**. ## Wymagania diff --git a/tests/cli/integration/test_send_batch.py b/tests/cli/integration/test_send_batch.py index c6511a2..a9fd302 100644 --- a/tests/cli/integration/test_send_batch.py +++ b/tests/cli/integration/test_send_batch.py @@ -50,6 +50,39 @@ def _fake_send(**kwargs): assert seen["save_upo_overwrite"] is False +def test_send_batch_rr_form_code_override(runner, monkeypatch, tmp_path) -> None: + seen: dict[str, object] = {} + + def _fake_send(**kwargs): + seen.update(kwargs) + return {"session_ref": "BATCH-RR"} + + monkeypatch.setattr(send_cmd, "send_batch_invoices", _fake_send) + batch_dir = tmp_path / "batch" + batch_dir.mkdir() + + result = runner.invoke( + app, + [ + "send", + "batch", + "--dir", + str(batch_dir), + "--system-code", + "FA_RR (1)", + "--schema-version", + "1-1E", + "--form-value", + "RR", + ], + ) + + assert result.exit_code == 0 + assert seen["system_code"] == "FA_RR (1)" + assert seen["schema_version"] == "1-1E" + assert seen["form_value"] == "RR" + + def test_send_batch_save_upo_overwrite_flag(runner, monkeypatch, tmp_path) -> None: seen: dict[str, object] = {} diff --git a/tests/cli/integration/test_send_online.py b/tests/cli/integration/test_send_online.py index 8e26051..02e5ed0 100644 --- a/tests/cli/integration/test_send_online.py +++ b/tests/cli/integration/test_send_online.py @@ -54,6 +54,40 @@ def _fake_send(**kwargs): assert seen["save_upo_overwrite"] is False +def test_send_online_rr_form_code_override(runner, monkeypatch, tmp_path) -> None: + seen: dict[str, object] = {} + + def _fake_send(**kwargs): + seen.update(kwargs) + return {"session_ref": "SES-RR", "invoice_ref": "INV-RR"} + + monkeypatch.setattr(send_cmd, "send_online_invoice", _fake_send) + + invoice_path = tmp_path / "rr.xml" + invoice_path.write_text("", encoding="utf-8") + + result = runner.invoke( + app, + [ + "send", + "online", + "--invoice", + str(invoice_path), + "--system-code", + "FA_RR (1)", + "--schema-version", + "1-1E", + "--form-value", + "RR", + ], + ) + + assert result.exit_code == 0 + assert seen["system_code"] == "FA_RR (1)" + assert seen["schema_version"] == "1-1E" + assert seen["form_value"] == "RR" + + def test_send_online_save_upo_overwrite_flag(runner, monkeypatch, tmp_path) -> None: seen: dict[str, object] = {}