feat: add of(...) convenience factory to StockQuotesRequest and OptionsQuotesRequest#18
Merged
Merged
Conversation
|
The author of this PR, MarketDataDev03, is not an activated member of this organization on Codecov. |
4 tasks
Owner
|
It looks good to me. This is what I wanted to see: // before I'll defer to @MarketDataDev01 on the code review, however. |
MarketDataDev01
approved these changes
Jun 29, 2026
974058a to
ca3704e
Compare
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.
feat: add
of(...)convenience factory to StockQuotesRequest and OptionsQuotesRequestCloses #17.
Every request type in the SDK exposes a paired construction surface —
Foo.of(required...)(convenience factory, required args only) and
Foo.builder(required...)(full builder foroptionals). Two multi-symbol request types were missing the
of(...)half and only hadbuilder(...):StockQuotesRequestOptionsQuotesRequestTheir varargs sibling
StockPricesRequestalready has both, so this was an accidental omission,not a design choice — a consumer wanting a no-options multi-symbol quote was forced into
.builder(...).build()for no reason.Changes
StockQuotesRequest.of(String first, String... rest)— mirrorsStockPricesRequest.of.OptionsQuotesRequest.of(String first, String... rest)— same.builder(first, rest...).build().RequestValidationTestcovering both factories (symbols carried, optionalsdefault to null).
Testing
./gradlew buildpasses: unit tests, Spotless, andjacocoTestCoverageVerification(100% line coverage is maintained — the new factories are exercised by the added tests).
Motivation
The API-section docs in MarketDataApp/documentation#154
add Java/Kotlin examples for every endpoint. The multi-symbol quote examples were the only ones
that couldn't use the minimal
.of(...)form because of this gap; once this ships they read ascleanly as the rest.