Skip to content

Version 0.8.0: the spec at API 1.20.9, top-up cancel and cover check - #15

Merged
bensynapse merged 3 commits into
mainfrom
api-1.20.8
Nov 15, 2026
Merged

bensynapse merged 3 commits into
mainfrom
api-1.20.8

Conversation

@bensynapse

@bensynapse bensynapse commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The client follows API 1.20.9, released on 2026-11-15. The saved spec was merged from the public document of faxforagents/openapi#14, which is not merged yet.

What a caller can notice

  • Two new methods on both clients, one per new operation. billing.cancel_topup_session(topup_session_id) closes the hosted Checkout of an open top-up. one_time_sends.check_cover(...) says whether a cover message fits on its page, with no key.
  • billing.statement, billing.iter_statement and billing.statement_csv take type. kind keeps working, and two different types in both raise InvalidRequestError.
  • Five fields the saved spec declared itself are in the public document now, and its declarations replace them. Quote.policy_evaluation is a PolicyVerdict and PolicyEvaluation.usage a PolicyUsage, where both were dicts. Quote.pricing is per_page or one_time. FaxJob.approval_id and FaxJob.policy_version_id keep their type.
  • New models OneTimeCoverCheck, OneTimeCoverRoom, PolicyVerdict and PolicyUsage, the new field FaxJob.route_paused and the new descriptions of the public document.
  • Docstrings: rotate_api_key raises ConflictError for an expired key, with details["reason"] key_expired. pdf_url is None on the receipt of an automatic top-up. one_time_sends.checkout says the card is held. It states the payment rule of 1.20.9. A failed fax costs nothing. A fax that stops part way costs the price of the pages the carrier confirms.

Two operations and a parameter are new, so the version is 0.8.0. The two dicts that became models are a change a caller can see, and the CHANGELOG says so under Changed.

How the spec was refreshed

The public document at 1.20.6 was the base of a three-way merge with the saved spec, done on the parsed documents. A text merge was tried first. It gave one conflict in FaxJob. It also left two declarations each of Quote.pricing, Quote.policy_evaluation and PolicyEvaluation.usage with no conflict at all. PyYAML reads the last of two equal keys and says nothing.

The local declarations (x-sdk-route) of those three fields and of FaxJob.approval_id and FaxJob.policy_version_id gave way to the public ones. Every other local declaration and every earlier schema is kept, and the paths equal the public document. python scripts/gen_models.py wrote the models.

1.20.9 changed only the checkout's wording. A second three-way merge, based on the public document at 1.20.8, took it with no conflict.

There are no new error classes. Errors map to classes by status here.

Checked

  • pytest -q -m "not live": 179 pass, 8 of them new.
  • ruff check, ruff format --check, mypy src.
  • python scripts/gen_models.py --check and sh scripts/truthcheck.sh.
  • uv build, twine check, and the wheel installed in a clean venv: faxforagents version prints 0.8.0.

No workflow file changed. Nothing is published by this pull request.

The saved spec follows the public document at API 1.20.8.
It was merged three ways, with the public document at 1.20.6 as the base.
Five fields the spec declared itself are now in the public document, whose declarations replace them.
billing.cancel_topup_session and one_time_sends.check_cover are new on both clients.
The statement methods take type, and kind keeps working.
The rotate_api_key docstring names the ConflictError of an expired key.
Tests cover each new method and parameter.
one_time_sends.checkout said the card is authorized at checkout.
API 1.20.8 says it is held and charged only for the pages that arrive.
The saved spec follows the public document at API 1.20.9, which changed only wording.
The checkout docstring says a failed fax costs nothing.
A fax that stops part way costs the price of the pages the carrier confirms.
The README and the CHANGELOG say the same. The version stays 0.8.0.
@bensynapse bensynapse changed the title Version 0.8.0: the spec at API 1.20.8, top-up cancel and cover check Version 0.8.0: the spec at API 1.20.9, top-up cancel and cover check Nov 15, 2026
@bensynapse
bensynapse merged commit eba6cca into main Nov 15, 2026
12 checks passed
@bensynapse
bensynapse deleted the api-1.20.8 branch November 15, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant