Skip to content

feat(calendar): make omittable calendar members optional - #389

Merged
benbenbang merged 1 commit into
mainfrom
feat/368-cal-nullable
Sep 30, 2026
Merged

benbenbang merged 1 commit into
mainfrom
feat/368-cal-nullable

Conversation

@benbenbang

Copy link
Copy Markdown
Member

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.

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.
@benbenbang
benbenbang enabled auto-merge (rebase) September 30, 2026 13:07
@github-actions github-actions Bot added the enhancement New feature or request label Sep 30, 2026
@benbenbang
benbenbang merged commit fefb037 into main Sep 30, 2026
9 checks passed
@benbenbang
benbenbang deleted the feat/368-cal-nullable branch September 30, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant