Commit 8d55288
authored
Release 4.2.1 (#238)
This release updates the `OAuthScopes` enum and its usage to synchronize with the current Checkout.com API specification, remove deprecated scopes, and improve test coverage. The main focus is on aligning the SDK's OAuth scope definitions with the official API spec, removing outdated values, adding missing ones, and ensuring correctness through comprehensive tests.
**OAuth scope enum updates:**
* Added missing scopes to `OAuthScopes`, including `COMPLIANCE_REQUESTS`, `COMPLIANCE_REQUESTS_READ`, `COMPLIANCE_REQUESTS_RESPOND`, and `VAULT_TOKENS_METADATA`, which are required by some API operations but were not previously declared. [[1]](diffhunk://#diff-334464a74fa02005eb60f222093e6b4f0cfc8277eee087652c742ab854ff77e9R7-R28) [[2]](diffhunk://#diff-334464a74fa02005eb60f222093e6b4f0cfc8277eee087652c742ab854ff77e9R90)
* Removed deprecated or retired scopes such as `ISSUING_CARD_MGMT`, `ISSUING_CLIENT`, `MARKETPLACE`, `MIDDLEWARE_GATEWAY`, `MIDDLEWARE_PAYMENT_CONTEXT`, and ensured remaining scopes are alphabetically ordered for maintainability.
* Added a detailed docstring to the `OAuthScopes` enum explaining its correspondence to the API spec and clarifying subtle differences between similar scopes.
**Test improvements and validation:**
* Added new tests to `tests/oauth_scopes_test.py` to verify that all documented and newly added scopes are present, distinguish between similar but distinct scopes, and ensure every enum member has a unique, non-blank wire value.
* Introduced checks to guarantee that enum members remain alphabetically ordered and no duplicate wire values exist, preventing subtle bugs and improving maintainability.
**Integration test updates:**
* Updated integration tests to use the correct, non-retired scopes (`ACCOUNTS` instead of `MARKETPLACE` for payout schedules, and `ISSUING_CARD_MANAGEMENT_READ`/`WRITE` instead of retired issuing scopes), with comments explaining the changes and referencing the API spec. [[1]](diffhunk://#diff-fd77327b4e0a674dcc26dd48155dde66bef0360848b9a86e59e876e6aa30413cL23-R25) [[2]](diffhunk://#diff-0c4506a4ecc986a5626d8807837d6aac0a38a0ad9cc2f6660332963b17b59bceL24-R28)1 parent 6228338 commit 8d55288
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments