Final payment date correction for non-US markets - #114
Merged
Conversation
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.
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
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" |
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.
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.