Skip to content

fix: Fix JSON encoding of undefined notification entities#99

Merged
davidgrayston-paddle merged 1 commit intomainfrom
fix/notification-json-encoding
Jun 10, 2025
Merged

fix: Fix JSON encoding of undefined notification entities#99
davidgrayston-paddle merged 1 commit intomainfrom
fix/notification-json-encoding

Conversation

@davidgrayston-paddle
Copy link
Copy Markdown
Contributor

@davidgrayston-paddle davidgrayston-paddle commented Jun 9, 2025

Fixed

  • Fixed JSON encoding of undefined notification entities
    • paddle_billing.Notifications.Entities.UndefinedEntity now implements to_json and can be encoded using paddle_billing.Json.PayloadEncoder

@davidgrayston-paddle davidgrayston-paddle self-assigned this Jun 9, 2025
@davidgrayston-paddle davidgrayston-paddle force-pushed the fix/notification-json-encoding branch from cf6c99a to f985cd0 Compare June 9, 2025 23:40
@davidgrayston-paddle davidgrayston-paddle force-pushed the fix/notification-json-encoding branch from f985cd0 to 545ad31 Compare June 9, 2025 23:53
"region": "NY",
"status": "active",
"created_at": "2024-04-12T06:42:58.785Z",
"created_at": "2024-04-12T06:42:58.785000Z",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixtures updated to have consistent timestamp precision so that they can be compared with JSON encoded entities in tests.

Comment on lines +44 to +45
"tax_rates_used": null,
"type": null
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added default nullable properties so that the fixtures can be compared with JSON encoded entities in tests.

@davidgrayston-paddle davidgrayston-paddle merged commit 3cb62db into main Jun 10, 2025
6 checks passed
@davidgrayston-paddle davidgrayston-paddle deleted the fix/notification-json-encoding branch June 10, 2025 09:35
@davidgrayston-paddle davidgrayston-paddle changed the title fix: Fix JSON encoding of notification custom data and undefined entities fix: Fix JSON encoding of undefined notification entities Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants