Repository navigation
feat: expose expirationDate on activate and floating checkout - #4
Merged
Merged
Conversation
ActivateKeyResponse and FloatingCheckoutResponse gain a nullable ExpirationDate (DateTimeOffset?) for the license expiry returned by POST /key/activate and POST /key/checkout; null means the license never expires. On checkout it is separate from ExpiresAt, the floating seat lease. Additive, no breaking changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
ActivateKeyResponse.ExpirationDateandFloatingCheckoutResponse.ExpirationDate, typedDateTimeOffset?, mapped with[JsonPropertyName("expirationDate")](System.Text.Json, like the rest of the SDK).null, missing field, checkoutExpirationDatevsExpiresAt, and a System.Text.Json round-trip.null= never expires, and storing the last value. CHANGELOG entry under Unreleased.Contract (already live)
POST /key/activateandPOST /key/checkoutsuccess responses includeexpirationDate: an ISO 8601 string (e.g."2027-03-01T00:00:00.000Z") ornullwhen the license never expires. On checkout it is separate fromexpiresAt, the floating seat lease. Additive only; failure responses are unchanged.Why
DateTimeOffset?System.Text.Json's default converter parses the ISO 8601
...Zstring into aDateTimeOffsetwith a zero offset, so there is noDateTimeKindambiguity and callers can subtractDateTimeOffset.UtcNowdirectly. The tests check the parsed value and offset. The olderExpirationDatefields onLicenseDetailsandCustomerLicenseKeyareDateTime?and are left alone (changing them would break callers).DateTimeconverts implicitly toDateTimeOffset, so the two can be compared. The property is nullable and optional, so a missing field also givesnull, the same as the Go, Node and Python SDKs.Build and tests
.NET isn't installed locally, and the Docker
dotnet/sdk:9.0image pull stalled, so I couldn't compile or run anything locally. This PR relies on the repo's CI (build plus non-live contract tests). No version bump:<Version>is bumped at release time, not per PR.