Skip to content
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

New property line.TipPaymentGatewaySpecified to determine whether a l… #706

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

clement911
Copy link
Collaborator

…ine is a tip line.

@nozzlegear nozzlegear merged commit b87b8b5 into nozzlegear:master Jan 4, 2022
@clement911
Copy link
Collaborator Author

Thank @nozzlegear. Could you publish a new package?

@clement911
Copy link
Collaborator Author

@nozzlegear ?

@nozzlegear
Copy link
Owner

nozzlegear commented Jan 10, 2022 via email

@clement911
Copy link
Collaborator Author

Awesome. Thanks!

@nozzlegear
Copy link
Owner

Hey @clement911, I can't seem to find this property in the docs. Should it be nullable, and does it need a JsonProperty attribute?

nozzlegear added a commit that referenced this pull request Jan 11, 2022
Refer to #706, these changes may not be necessary.
@nozzlegear
Copy link
Owner

I've made it nullable and added the JsonProperty attribute for now. Let me know if that's wrong!

@nozzlegear
Copy link
Owner

Published in 5.14.3!

@clement911
Copy link
Collaborator Author

@nozzlegear no this is not an API property and shouldn't be annotated with JsonProperty.
It's a built-in feature of json.net. The bool property will be set to true if present in the payload, otherwise false. It is useful to differentiate between a null value (true) and the absence of value (false), since the underlying property will be null in the .net object in both cases.

See https://stackoverflow.com/a/61532883

https://dotnetfiddle.net/Iyry36

https://www.newtonsoft.com/json/help/html/P_Newtonsoft_Json_Serialization_DefaultContractResolver_IgnoreIsSpecifiedMembers.htm

@nozzlegear
Copy link
Owner

Oh neat! I don't think I've seen that before. I'll revert my changes.

nozzlegear added a commit that referenced this pull request Jan 12, 2022
@nozzlegear
Copy link
Owner

Reverted in 5.14.4!

@clement911
Copy link
Collaborator Author

Thanks 😀

@clement911
Copy link
Collaborator Author

I noticed you added a JsonIgnore attribute. I'm not sure if this will have an impact.

@clement911
Copy link
Collaborator Author

I tested and it works fine so we're all good 👍

@clement911 clement911 deleted the tip-line-check branch February 21, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants