-
Notifications
You must be signed in to change notification settings - Fork 55
feat(capital): Add test coverage and client integration for Capital API #343
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
Conversation
Summary of ChangesHello @jeandersonbc, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the Adyen Ruby API library by introducing full support for the Capital API. It enables users to programmatically interact with Capital services, such as managing grant accounts, offers, and grants, through a well-defined client interface. The integration is backed by a comprehensive set of RSpec tests and mock responses, ensuring reliability and ease of use for developers. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request effectively integrates the Adyen Capital API into the client and adds a comprehensive RSpec test suite to ensure its functionality. The implementation is clean and follows the existing patterns in the codebase. My review includes several suggestions for the new test files, focusing on improving maintainability by adhering to RSpec best practices, enhancing code style, and fixing minor formatting issues in the mock JSON responses. Overall, this is a solid contribution.
spec/mocks/responses/Capital/get-grant-disbursement-success.json
Outdated
Show resolved
Hide resolved
spec/mocks/responses/Capital/update-grant-disbursement-success.json
Outdated
Show resolved
Hide resolved
Added comprehensive RSpec test suite for `Adyen::Capital` services (`GrantAccountsApi`, `GrantOffersApi`, `GrantsApi`). Integrated the Capital API into the main client by: - Exposing `Adyen::Capital` via the `client.capital` accessor. - Configuring the service URL (`balanceplatform-api`) in `Adyen::Client#service_url_base`. - Requiring the `adyen/services/capital` module in `adyen-ruby-api-library.rb`. Created necessary JSON mock response fixtures under `spec/mocks/responses/Capital` to facilitate isolated testing. Tests cover all primary API endpoints for retrieving grant accounts, offers, and grants, as well as making grant requests and managing disbursements, ensuring functionality and correct integration.
dbf9a17 to
3d028aa
Compare
|
|
removed the label since this PR is test-related. |



Description
Added comprehensive RSpec test suite for
Adyen::Capitalservices (GrantAccountsApi,GrantOffersApi,GrantsApi).Integrated the Capital API into the main client by:
Adyen::Capitalvia theclient.capitalaccessor.balanceplatform-api) inAdyen::Client#service_url_base.adyen/services/capitalmodule inadyen-ruby-api-library.rb.Tested scenarios
Created necessary JSON mock response fixtures under
spec/mocks/responses/Capitalto facilitate isolated testing. Tests cover all primary API endpoints for retrieving grant accounts, offers, and grants, as well as making grant requests and managing disbursements, ensuring functionality and correct integration.Fixed issue: