Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIRC-2051 Add ecsRequestRouting parameter to allowed-service-points #1451

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

roman-barannyk
Copy link
Contributor

Purpose

Add a non-required boolean parameter ecsRequestRouting to an endpoint GET /circulation/requests/allowed-service-points. Default value is false.
When set to true, it should change the behavior:
Instead of returning service points with pickupLocation=true we need to only return service points with ecsRequestRouting=true

Resolves: CIRC-2051

@@ -99,6 +100,13 @@ private static Result<AllowedServicePointsRequest> buildRequest(RoutingContext r
useStubItem);
errors.add(String.format("useStubItem is not a valid boolean: %s.", useStubItem));
}
if (ecsRequestRouting != null && !"true".equals(ecsRequestRouting)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are validating boolean string twice now, do you think this check deserves a separate method? Something like isIvalidBooleanString(String boolean)

Comment on lines 149 to 150
? "ecsRequestRouting"
: "pickupLocation";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we are now searching either by ecsRequestRouting or pickupLocation. Do we not care about the value of pickupLocation when fetching ECS routing service points?

Copy link

@alexanderkurash alexanderkurash self-requested a review April 12, 2024 15:32
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.

3 participants