refactor: implement quick wins for code modernization#25
Merged
programmable-banking-community merged 1 commit intomasterfrom Mar 24, 2026
Merged
refactor: implement quick wins for code modernization#25programmable-banking-community merged 1 commit intomasterfrom
programmable-banking-community merged 1 commit intomasterfrom
Conversation
- Update Ruby version requirement from 2.3.0 to 2.7.0 - Add frozen string literals to all source files - Create custom exception classes (AuthenticationError, NotFoundError, ValidationError, APIError, RateLimitError) - Improve error handling with contextual error messages - Add parameter validation to all public methods - Enhance documentation with proper YARD comments - Document thread-safety limitations in connection caching - Add base64 as runtime dependency for Ruby 3.4+ compatibility - All tests passing (20/20)
87f0a0d to
e985ac1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a set of quick-win refactoring changes to modernize the codebase and improve code quality.
Changes
Ruby Version & Compatibility
Code Quality
InvestecOpenApi::AuthenticationErrorfor OAuth failuresInvestecOpenApi::NotFoundErrorfor missing resourcesInvestecOpenApi::ValidationErrorfor invalid inputsInvestecOpenApi::APIErrorfor general API errorsInvestecOpenApi::RateLimitErrorfor rate limiting scenariosError Handling & Validation
transactions(account_id, options)validates account_idpending_transactions(account_id, options)validates account_idbalance(account_id)validates account_idtransfer_multiple(account_id, transfers, profile_id)validates all inputsTransfer#initializevalidates all constructor parametersDocumentation
Testing
✅ All 20 tests passing
Breaking Changes
None - all changes are backward compatible.
Motivation
The codebase was 2-6 years old and had accumulated technical debt. These improvements modernize the code, improve error handling, and make it more maintainable without major architectural changes.