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 currency details to transaction.rb #73

Conversation

tomekcieslar
Copy link
Contributor

@tomekcieslar tomekcieslar commented Jan 13, 2025

Hello

We need this for handling original currency, original currency amount and exchange rate.
Thanks for considering my PR.

You can find the definition in the XSD.
Screenshot 2025-01-13 at 09 45 41
Screenshot 2025-01-13 at 09 46 26

Thank you in advance

@tobischo
Copy link
Member

Thank you for providing an MR to address #72

One thing I am wondering about: the MR is correct in adding a comment about the original amount and currency possibly being empty, e.g. in case InstdAmt is not set - as it is optional in the CAMT specification.
Semantically, when calling it original amount, it is not just mapping the field, but rather represents the amount that was used when triggering the transfer. For same currency transfers that would still be applicable though even if InstdAmt is empty.

I guess we could add that later though should it become necessary as long as the returned value is semantically correct.

@frantisekrokusek
Copy link
Contributor

frantisekrokusek commented Jan 15, 2025

You mean when original_currency == currency, then we would not have original_amount nor original currency supplied because they are both the same with amount and currency right ?

I think indeed it can be handled in a separate PR if someone sees the necessity to do so. Personally I prefer having nil values so there is no potential bank logic in the gem.

@tobischo tobischo merged commit 68121e3 into viafintech:master Jan 15, 2025
4 checks passed
@tobischo
Copy link
Member

Released as v2.18.0 and closes #72

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.

3 participants