arlyon / async-stripe

Async (and blocking!) Rust bindings for the Stripe API
https://payments.rs
Apache License 2.0
445 stars 128 forks source link

Update Charge struct #403

Closed hzargar2 closed 1 year ago

hzargar2 commented 1 year ago

Summary

Repost of #398 using different branch instead of master.

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_report for 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.

Thanks!

Checklist