Repository navigation
feat(calendar): make omittable calendar members optional - #389
Merged
Merged
Conversation
Members that FMP can omit or send as null are now optional across the calendar models so consumers observe None instead of receiving a wrong or missing value. **Optional member changes:** * `DividendEvent.record_date` and `payment_date` are now `Option` / pointer / `Optional`, decoded with `empty_or_null_date` so both `""` and `null` become None. * `EarningsEvent.eps_estimated` and `revenue_estimated` are now optional and decode null as None. * `IpoCalendarEvent.exchange` is now optional. * `IpoProspectus.discounts_and_commissions_per_share` and `discounts_and_commissions_total` are now optional. * `StockSplitEvent.split_type` is now optional. **Cross-language parity:** * Updated the Rust `libfmp` responses, the PyO3 models and stubs, and the Go SDK shadow decoders to expose these members as nullable. **Tests:** * Added Rust, Python, and Go cases asserting the newly optional members decode as None, and updated existing assertions to the optional shapes. BREAKING CHANGE: DividendEvent, EarningsEvent, IpoCalendarEvent, IpoProspectus and StockSplitEvent members FMP can omit are now optional (Option / pointer / Optional); handle None.
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.
Members that FMP can omit or send as null are now optional across the calendar models so consumers observe None instead of receiving a wrong or missing value.
Optional member changes:
DividendEvent.record_dateandpayment_dateare nowOption/ pointer /Optional, decoded withempty_or_null_dateso both""andnullbecome None.EarningsEvent.eps_estimatedandrevenue_estimatedare now optional and decode null as None.IpoCalendarEvent.exchangeis now optional.IpoProspectus.discounts_and_commissions_per_shareanddiscounts_and_commissions_totalare now optional.StockSplitEvent.split_typeis now optional.Cross-language parity:
libfmpresponses, the PyO3 models and stubs, and the Go SDK shadow decoders to expose these members as nullable.Tests:
BREAKING CHANGE: DividendEvent, EarningsEvent, IpoCalendarEvent, IpoProspectus and StockSplitEvent members FMP can omit are now optional (Option / pointer / Optional); handle None.