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

Make DonateAction a TransferAction instead of a TradeAction #3338

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trentlarson
Copy link
Contributor

@trentlarson trentlarson commented Jun 18, 2023

DonateAction is explicitly "without compensation", so I propose to make it a subclass of TransferAction instead.

All the other TradeActions involve a swap of items or an intention of each party both giving something and receiving something in return. (In fact, in broader contexts, the concept of trade is intentionally separated from gifts and donations.)

There are 3 properties of TradeAction that would be lost: price, priceCurrency, and priceSpecification. To include price, one might make the object property be a MonetaryValue or TypeAndQuantityNode -- and if there's already an object then that might be turned into an array. (I posit that it does not need priceSpecification.) (EDIT: added these as properties in a later commit.)

DonateAction is explicitly "without compensation", so I propose to make it a subclass of TransferAction instead.

All the other TradeActions involve a swap of items or an intention of each party both giving something and receiving something in return. (In fact, in broader contexts, the concept of trade is intentionally separated from gifts and donations -- there's even a saying that "trade is the origin of most problems". :-)

There are 3 properties of TradeAction that would be lost: price, priceCurrency, and priceSpecification. To include price, one might make the `object` property be a MonetaryValue or TypeAndQuantityNode -- and if there's already an `object` then that might be turned into an array. (I posit that it does not need priceSpecification.)
@trentlarson
Copy link
Contributor Author

TipAction is another possible difference; it is done in return for good service so I could see an argument for it either way. I'll add that to this PR if that makes sense.

@github-actions
Copy link

This pull request is being nudged due to inactivity.

@github-actions github-actions bot added the no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Oct 13, 2023
@trentlarson
Copy link
Contributor Author

Who can I pay to look at this? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant