Fixed de/serialization of Charge struct. "refunds" attribute is expandable and is not sent in webhook events as the most minimum size is sent so deserialization fails. This can be seen by running stripe trigger charge.succeeded in the stripe-cli. Implemented #[serde(default)]on attribute. Also added missing attribute stripe_reportfor fraud_details object.
This is my first pull request ever so I am not sure whether I have done things correctly so feel free to give any suggestions for improvement.
Summary
Fixed de/serialization of Charge struct.
"refunds"
attribute is expandable and is not sent in webhook events as the most minimum size is sent so deserialization fails. This can be seen by runningstripe trigger charge.succeeded
in the stripe-cli. Implemented#[serde(default)]
on attribute. Also added missing attributestripe_report
forfraud_details
object.This is my first pull request ever so I am not sure whether I have done things correctly so feel free to give any suggestions for improvement.
Thanks!
Checklist
cargo make fmt