-
Notifications
You must be signed in to change notification settings - Fork 13
Generate from server version 1.74.0 #85
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
bradymholt
commented
Mar 10, 2025
- New PUT and DELETE (update and delete) endpoints for scheduled_transactions.
- payee_name and category_name fields have been added to subtransactions objects in scheduled transaction responses.
- The goal_target amount for a category can now be updated.
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.
Hello @bradymholt, 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!
Summary of Changes
This pull request updates the YNAB API client for Ruby to version 1.74.0. It introduces new PUT and DELETE endpoints for scheduled transactions, allowing for updating and deleting scheduled transactions. It also adds payee_name and category_name fields to subtransaction objects in scheduled transaction responses. Additionally, the goal_target amount for a category can now be updated.
Highlights
- Scheduled Transactions API: Added PUT and DELETE endpoints to the Scheduled Transactions API, enabling update and delete operations.
- Scheduled Subtransactions: Added
payee_nameandcategory_namefields to scheduled subtransaction objects in API responses. - Category Goals: Enabled updating the
goal_targetamount for a category. - Dependencies: Updated the Ruby version to 3.4.1 and the ynab gem to 3.6.0.
Changelog
Click here to see the changelog
- .gemini/config.yaml
- Disabled code review and set have_fun to false.
- .openapi-generator/FILES
- Added
PutScheduledTransactionWrapper.mdto the list of generated documentation files. - Added
put_scheduled_transaction_wrapper.rbto the list of generated model files.
- Added
- .openapi-generator/VERSION
- Updated the OpenAPI Generator version from 7.7.0 to 7.12.0.
- .tool-versions
- Updated the Ruby version from 3.3.1 to 3.4.1.
- Gemfile.lock
- Updated the ynab gem version from 3.5.0 to 3.6.0.
- docs/PutScheduledTransactionWrapper.md
- Added documentation for the
PutScheduledTransactionWrappermodel.
- Added documentation for the
- docs/SaveCategory.md
- Added documentation for the
goal_targetproperty in theSaveCategorymodel.
- Added documentation for the
- docs/ScheduledSubTransaction.md
- Added documentation for the
payee_nameandcategory_nameproperties in theScheduledSubTransactionmodel.
- Added documentation for the
- docs/ScheduledTransactionsApi.md
- Added documentation for the
delete_scheduled_transactionandupdate_scheduled_transactionendpoints.
- Added documentation for the
- lib/ynab.rb
- Added require statement for
put_scheduled_transaction_wrappermodel.
- Added require statement for
- lib/ynab/api/scheduled_transactions_api.rb
- Added methods for
delete_scheduled_transactionandupdate_scheduled_transactionAPI calls.
- Added methods for
- lib/ynab/models/category.rb
- Removed 'null' from the allowed values for the
goal_typeenum.
- Removed 'null' from the allowed values for the
- lib/ynab/models/hybrid_transaction.rb
- Removed 'null' from the allowed values for the
debt_transaction_typeenum.
- Removed 'null' from the allowed values for the
- lib/ynab/models/put_scheduled_transaction_wrapper.rb
- Added the
PutScheduledTransactionWrappermodel.
- Added the
- lib/ynab/models/save_category.rb
- Added the
goal_targetattribute to theSaveCategorymodel.
- Added the
- lib/ynab/models/scheduled_sub_transaction.rb
- Added the
payee_nameandcategory_nameattributes to theScheduledSubTransactionmodel.
- Added the
- lib/ynab/models/transaction_detail.rb
- Removed 'null' from the allowed values for the
debt_transaction_typeenum.
- Removed 'null' from the allowed values for the
- lib/ynab/models/transaction_flag_color.rb
- Removed 'NULL' from the allowed values for the
TransactionFlagColorenum.
- Removed 'NULL' from the allowed values for the
- lib/ynab/models/transaction_summary.rb
- Removed 'null' from the allowed values for the
debt_transaction_typeenum.
- Removed 'null' from the allowed values for the
- open_api_spec.yaml
- Updated the API version to 1.74.0.
- Added PUT and DELETE paths for scheduled transactions.
- Added
goal_targetto the SaveCategory schema. - Added
PutScheduledTransactionWrapperschema. - Added
payee_nameandcategory_nameto the ScheduledSubTransaction schema.
- templates/gemspec.mustache
- Removed the default value for
gemDescription.
- Removed the default value for
- ynab.gemspec
- Updated the gem description and the OpenAPI Generator version.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and 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 to provide feedback.
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.
A scheduled task, now freed to change,
No longer fixed, within its range.
With PUT and DELETE, control we seize,
And bend the future to our ease.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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 introduces new PUT and DELETE endpoints for scheduled transactions, adds payee_name and category_name fields to subtransactions, and allows updating the goal_target amount for a category. The changes seem well-structured and address the intended functionalities. However, some potential issues need to be addressed before merging.
Summary of Findings
- Enum Validation: The
nullvalue has been removed from thegoal_typeanddebt_transaction_typeenums inlib/ynab/models/category.rb,lib/ynab/models/hybrid_transaction.rb, andlib/ynab/models/transaction_summary.rb. Ensure that the API handles cases where these fields might be null, as the removal ofnullfrom the enum could lead to validation errors if a null value is received from the API. I did not comment on these changes due to the review settings. - Missing Error Handling: The new
delete_scheduled_transactionandupdate_scheduled_transactionmethods inlib/ynab/api/scheduled_transactions_api.rblack specific error handling for different HTTP status codes (e.g., 404, 500). Implementing robust error handling is crucial for providing informative feedback to the user and ensuring the application's stability. I did not comment on these changes due to the review settings.
Merge Readiness
The pull request introduces important new features and API endpoints. However, the identified issues regarding error handling and enum validation need to be addressed before merging to ensure the stability and reliability of the API. I am unable to directly approve this pull request, and recommend that another reviewer also approves this code before merging. I recommend that this pull request not be merged until the identified issues are addressed.
| fail ArgumentError, "Missing the required parameter 'scheduled_transaction_id' when calling ScheduledTransactionsApi.delete_scheduled_transaction" | ||
| end | ||
| # resource path | ||
| local_var_path = '/budgets/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s)) |
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.
The scheduled_transaction_id is being used in the path, but it's not actually being used in the path substitution. It should be /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} to properly delete a specific scheduled transaction.
local_var_path = '/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))-New PUT and DELETE (update and delete) endpoints for scheduled_transactions. -payee_name and category_name fields have been added to subtransactions objects in scheduled transaction responses. -The goal_target amount for a category can now be updated.
|
The changes in this PR were just released in 3.7.0 🎉. |