Skip to content

feat: expose expirationDate on activate and floating checkout - #2

Merged
catsika merged 1 commit into
mainfrom
feat/expiration-date
Oct 26, 2026
Merged

catsika merged 1 commit into
mainfrom
feat/expiration-date

Conversation

@catsika

@catsika catsika commented Oct 26, 2026

Copy link
Copy Markdown
Member

What changed

  • keymint/types.py: added expirationDate: str | None to ActivateKeyResponse and FloatingCheckoutResponse, and noted that expiresAt on checkout is the seat lease.
  • keymint/__init__.py: activate_key / floating_checkout docstrings now describe the field.
  • README.md: new "License Expiry" section covering reading the expiry, computing days left, None meaning it never expires, and storing the last value.
  • CHANGELOG.md: "Unreleased" entry.
  • tests/test_contracts.py: parametrized tests for activate and checkout with a date value and None.

Responses are still the raw API dicts, so the field was already present at runtime. This change types and documents it, with no behavior change.

Contract (live in production)

  • POST /key/activate success: expirationDate is an ISO 8601 string (e.g. "2027-03-01T00:00:00.000Z") or null when the license never expires.
  • POST /key/checkout success: the same expirationDate (the license expiry), separate from expiresAt (the floating seat lease).
  • Additive only. Failure responses are unchanged. An expired license fails activation with the generic invalid-key error.

Tests

  • ruff check .: all checks passed
  • pytest -q tests/test_contracts.py: 7 passed
  • python -m build: sdist and wheel built

Run locally on Python 3.14 (CI uses 3.12).

Version

The previous release bumped the version together with its changelog entry. This PR leaves the version at 2.5.0 and files the change under "Unreleased", so bump it (e.g. 2.6.0) when you cut a release.

Add expirationDate (ISO 8601 string, or None when the license never
expires) to ActivateKeyResponse and FloatingCheckoutResponse, document it
in the method docstrings, README and CHANGELOG, and add contract tests
for a date value and None.
@catsika
catsika merged commit a6a38d0 into main Oct 26, 2026
2 checks passed
@catsika
catsika deleted the feat/expiration-date branch October 26, 2026 00:48
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