Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested snake serialization & payroll MS date parse fix #166

Merged
merged 7 commits into from
May 11, 2021

Conversation

SerKnight
Copy link
Contributor

@SerKnight SerKnight commented May 11, 2021

Fixes edge cases around MS dates that are stored as a negative epoch

Fixes nested serialization issues for objects returned using the to_attributes method. This will lookup any nested models such as Invoices -> LineItems and ensure all the values are returned as the snake case.

to_attributes calls to_hash(downcase: true) but the default to_hash still Pascal cases everything properly so that the POST's to the XeroAPI function as expected.

@SerKnight SerKnight self-assigned this May 11, 2021
@SerKnight
Copy link
Contributor Author

A small but technically breaking change for anyone depending on the to_attributes method. This fixes any nested objects to be properly deserialize, that were previously being left as PascalCase`

@SerKnight SerKnight merged commit a0a7c98 into master May 11, 2021
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.

#to_hash downcase does not downcase nested values Birth date interpretation issue in Ruby model
1 participant