feat(sessions): align session endpoint with API specification#858
Open
feat(sessions): align session endpoint with API specification#858
Conversation
- Replace method/checkoutFlow parameters with lines (required) - Add optional fields: billingAddress, shippingAddress, customerId, sequenceType, metadata, payment.webhookUrl, profileId - Make cancelUrl optional - Implement SupportsTestmodeInPayload interface - Update RequestFactory to support nested payload lookup (payment.webhookUrl)
- Add clientAccessToken property (required) - Add customerId, sequenceType, metadata, payment, lines properties - Remove deprecated properties: authenticationId, nextAction, method, methodDetails, failedAt - Update status helper methods: isCreated() -> isOpen(), hasFailed() -> isExpired(), remove isReadyForProcessing()
…tFlow - Replace STATUS_CREATED, STATUS_READY_FOR_PROCESSING, STATUS_FAILED with OPEN, EXPIRED - Change STATUS_COMPLETED to COMPLETED - Remove CheckoutFlow type (no longer used)
- Update CreateSessionRequestTest to use lines parameter - Add CreateSessionRequestFactoryTest with full and minimal data tests - Update SessionEndpointCollectionTest to use new payload structure
- Add clientAccessToken (required) - Update status to 'open' (valid values: open, expired, completed) - Add redirectUrl, cancelUrl, metadata, payment, lines - Remove deprecated fields: method, methodDetails, nextAction, createdAt
Contributor
|
Can we hold off merging this into |
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.
Summary
Align the session endpoint implementation with the API specification by replacing the express checkout flow with a standard session API that supports order lines, addresses, metadata, and other fields.
Features
Refactors
Tests