Add support for ot_info_v2 structure in WeChat Work attendance rules API #3658
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.
The WeChat Work API for getting enterprise attendance rules (
getCropCheckinOption
) has been updated to return overtime information in a newot_info_v2
structure instead of the previousot_info
format.Issue
The existing implementation only supported the old
ot_info
structure, causing the overtime information to be lost when the API returns the new format:Solution
Added support for the new
ot_info_v2
structure while maintaining backward compatibility:New OtInfoV2 class with nested configuration classes:
WorkdayConf
- workday overtime settingsRestdayConf
- rest day overtime settingsHolidayConf
- holiday overtime settingsEnhanced WxCpCropCheckinOption with new field:
otInfoV2
field with@SerializedName("ot_info_v2")
annotationotInfo
field for backward compatibilityComprehensive testing to ensure:
Usage
The new field will be automatically populated when the API returns the
ot_info_v2
structure:Fixes #3567.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.