Skip to content

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

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

  • ActivateKeyResponse.ExpirationDate *string (json:"expirationDate,omitempty")
  • FloatingCheckoutResponse.ExpirationDate *string (json:"expirationDate,omitempty")
  • README: new "Showing The Expiry Date" section with a days-left example.

Same type and tag as the existing LicenseDetails.ExpirationDate. Both null and a missing field decode to nil. Nothing else changes, and no signatures change. The /src compat package picks this up through its type aliases.

API contract (live)

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

Tests

  • New table-driven contract tests TestActivateKeyDeserializesExpirationDate and TestFloatingCheckoutDeserializesExpirationDate (date / null / absent). Their names match the CI contract-test filter.
  • gofmt -l .: clean. go vet ./...: clean. go build ./...: ok.
  • go test ./... -v: all pass. The live suite is skipped locally because no credentials are set.

No version bump. Releases are tag-only, with no version constant in the code.

Add ExpirationDate (*string) to ActivateKeyResponse and FloatingCheckoutResponse. nil means the license never expires. Additive and backward compatible.
@catsika
catsika merged commit ce409da into main Oct 26, 2026
2 checks passed
@catsika
catsika deleted the feat/expiration-date branch October 26, 2026 00:42
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