Skip to content

Final payment date correction for non-US markets - #114

Merged
jdeath merged 3 commits into
jdeath:mainfrom
AESternberg:main
Sep 7, 2026
Merged

Final payment date correction for non-US markets#114
jdeath merged 3 commits into
jdeath:mainfrom
AESternberg:main

Conversation

@AESternberg

Copy link
Copy Markdown
Contributor

Fixes #110

Reads appropriate market codes from booking fields or overrides provided in the config YAML and computes the final payment date correctly based on that information.

Unit tests added, and README and sample config updated.

@sde91ch, if you could please give this a test run in your local market, it would be very helpful.

Allow users to override the final payment deadline on a per-reservation
basis using either an explicit date (`finalPaymentDate`) or lead days
(`finalPaymentDaysBeforeSailing`).

Refactor payment override resolution in `get_voyages` to evaluate
YAML parameters prior to calling date calculations, ensuring user-defined
rules take precedence over default API payloads. Update documentation and
sample configs accordingly.
@jdeath

jdeath commented Sep 7, 2026

Copy link
Copy Markdown
Owner

thanks. I'll merge after tested. I like the date and days before override. I am thinking we should do release after this is tested.

- Separate Austrian (AUT) market rules into duration tiers (15d/14 nights, 120d/15+ nights)
- Add Australasia (AUS/NZL) duration tiers (90d/14 nights, 120d/15+ nights)
- Add 2-letter ISO country code aliases for DACH, Nordics, UK/IE, AU/NZ, and NA
- Add unit test suite covering market lead-time resolution, boundaries, and fallbacks
@AESternberg

Copy link
Copy Markdown
Contributor Author

Based on @sde91ch's feedback on the previous commit (#110 (comment)), I made corrections for Austria, added other regions that have different rules from US, and also added coverage for two-letter codes (instead of just three) as a "just-in-case"

@jdeath
jdeath merged commit 8cfd8f7 into jdeath:main Sep 7, 2026
1 check passed
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.

Final payment date is hardcoded to US policy windows, wrong for non-US markets

2 participants