-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update Transaction to avoid serde errors #16
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16 +/- ##
=========================================
+ Coverage 3.57% 7.29% +3.72%
=========================================
Files 17 18 +1
Lines 224 233 +9
=========================================
+ Hits 8 17 +9
Misses 216 216
Continue to review full report at Codecov.
|
is it possible to add some unit tests to show the deserialisation works? I would recommend grabbing the raw JSON from the API playground, anonymising it, and then showing that it's correctly deserialised. you would have to extract the logic in the |
Revert MerchantInfo's ID variant to be String.
Includes: - Transaction with expanded details. - Transaction with null merchant. - Multiple transactions.
I've added (anonymised) unit tests for:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm happy with these changes. so long as you promise the test data is properly anonymised. I'd hate to inadvertently share any personal information
Triple checked none of the identifying values are actual ones - just tried to keep them similar to actual values that may be returned. I essentially used ascending numbers/letters for each value, making sure the digits were in the correct location as returned by the real response. Eg:
|
brilliant work @BreD1810. Thanks again for the pull request! |
This PR:
account_balance
field onTransaction
- although this is still shown on the Monzo doc examples, it does not appear to be returned by the API any more?Category
from an enum to aString
(as suggested in transaction categories are not exhaustive #12).MerchantInfo
anOption<String>
(the API can returnnull
values, for example with a top-up).