Skip to content

refactor: Define API key enums in Entities and return ApiKeyRotation from create - #186

Merged
davidgrayston-paddle merged 2 commits into
mainfrom
refactor/api-key-entities
Nov 20, 2026
Merged

davidgrayston-paddle merged 2 commits into
mainfrom
refactor/api-key-entities

Conversation

@davidgrayston-paddle

Copy link
Copy Markdown
Contributor

Tidies the API key types added in #178 before they're released.

  • Enums: ApiKeyPermission, ApiKeyStatus and ApiKeyRotationStatus are now defined in paddle_billing.Entities.ApiKeys instead of being re-exported from paddle_billing.Notifications.Entities.ApiKeys. This matches the other enums shared by API entities and notification entities, which each namespace defines separately.
  • Creating a rotation: create_rotation_for_current_key now returns ApiKeyRotation, and the separate paddle_billing.Entities.ApiKeyRotationCreated entity is removed. The two had the same fields, and the entity shared its name with the api_key_rotation.created event class. ApiKeyRotation.new_key is now kept out of repr, as it holds the full key in the create response.

These types haven't been released, so there's no changelog entry and nothing breaks for users.

@davidgrayston-paddle
davidgrayston-paddle merged commit eef427d into main Nov 20, 2026
7 checks passed
@davidgrayston-paddle
davidgrayston-paddle deleted the refactor/api-key-entities branch November 20, 2026 15:47

This branch was successfully deployed

1 active deployment
dev — f5f07709 Deployed Nov 20, 2026 by davidgrayston-paddle via Package stability #519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants