-
Notifications
You must be signed in to change notification settings - Fork 149
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 Function to Retrieve Currency Code by Numeric Code #152
base: master
Are you sure you want to change the base?
Add Function to Retrieve Currency Code by Numeric Code #152
Conversation
Reviewer's Guide by SourceryThis PR introduces a new function Class diagram for the new GetCurrencyByNumericCode functionclassDiagram
class Currency {
+Formatter() *Formatter
}
class Currencies {
+CurrencyByCode(code string) *Currency
+CurrencyByNumericCode(code string) *Currency
}
class CurrencyUtils {
+GetCurrency(code string) *Currency
+GetCurrencyByNumericCode(code string) *Currency
}
CurrencyUtils --> Currencies: uses
Currency --> Formatter
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @rbenatti8 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding error handling tests for invalid numeric codes (e.g., non-existent codes, malformed inputs)
- Please document the expected format of the numeric code parameter (number of digits, zero-padding requirements, etc.)
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@Rhymond please take a look on that when you have time. |
This PR adds a static function, GetCurrencyCodeByNumericCode, to allow retrieval of a currency code based on its ISO-4217 numeric code.
Purpose:
Simplifies the process of finding a currency code without manually iterating through the currency list.
Provides a more efficient and straightforward method for users needing to convert numeric codes to currency codes.
This function will help streamline workflows that rely on numeric codes for currency identification
Summary by Sourcery
Add a new function GetCurrencyByNumericCode to facilitate retrieving currency codes by their numeric ISO-4217 codes, and include a corresponding test to verify its functionality.
New Features:
Tests: