avo icon indicating copy to clipboard operation
avo copied to clipboard

refactor: replace OpenStruct with Data for performance and readability improvement

Open Yash-Singh-Pathania opened this issue 4 months ago • 4 comments

Description

This PR refactors the codebase by replacing OpenStruct with Ordered Options for improved performance and immutability. The change ensures that Data is used to represent immutable objects, which provides better memory usage and execution speed compared to OpenStruct. No additional dependencies are required for this change.

Fixes # (issue) #3245

Checklist:

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

N/A (No UI changes involved)

Manual review steps

  1. Verify that the accounts method returns the correct objects using the new Data class.
  2. Ensure that perform_request correctly handles the refactored Response class in test mode.

Manual reviewer: please leave a comment with output from the test if that's the case.

Yash-Singh-Pathania avatar Oct 04 '24 10:10 Yash-Singh-Pathania