-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add correct TS interface for charge.dispute
#7311
base: develop
Are you sure you want to change the base?
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.42 MB ℹ️ View Unchanged
|
Is that the only difference between the two types? Are they two variations of the same type ("Dispute") or are they distinct types? At first glance, I'd look at two options:
Curious where the difference comes from too. Is this how Stripe structures this data (and it transparently passes through WCPay Server), or is this defined in our local data structures? |
Yes, the dispute that is part of the This is due to our use of Stripe's
This is the current situation ( I'd prefer us to aim for accurate TS interfaces so we can trust and rely on them and not have to find workarounds for them (e.g.
This could be the best solution, and we can introduce this change server-side. |
Changes proposed in this Pull Request
Our interfaces for Disputes are not 100% accurate:
charge.dispute.charge: string
dispute.charge: Charge
Currently, we use
Dispute
as the interface for both of these response types.This PR introduces a
ChargeDispute
interface forcharge.dispute
objects.Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge