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

Add/Improve financial_transaction_* endpoints #818

Merged
merged 3 commits into from
Feb 12, 2021
Merged

Conversation

paroga
Copy link
Member

@paroga paroga commented Feb 8, 2021

No description provided.

Copy link
Member

@wvengen wvengen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see this expanded.
Part of me doubts between having separate classes and types endpoints vs. a single classes endpoint with embedded types. I don't use these features enough to be able to judge, but the current approach is the most basic / KISS approach, so let's do it (albeit in many cases one would get them both and do the joining client-side).

def financial_transaction_type_name
object.financial_transaction_type.name
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should add a nested financial_transaction_type object here, or keep it with id and name?
Indeed account name and IBAN wouldn't really make sense here, so then we'd need separate serialization variants, so perhaps this approach is the best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had the same thoughts, end ended with the current code 😉

@paroga paroga merged commit 8822802 into foodcoops:master Feb 12, 2021
@paroga paroga deleted the fapi branch February 12, 2021 14:17
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