Skip to content

Conversation

@bradymholt
Copy link
Member

  • 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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_name and category_name fields to scheduled subtransaction objects in API responses.
  • Category Goals: Enabled updating the goal_target amount 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.md to the list of generated documentation files.
    • Added put_scheduled_transaction_wrapper.rb to the list of generated model files.
  • .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 PutScheduledTransactionWrapper model.
  • docs/SaveCategory.md
    • Added documentation for the goal_target property in the SaveCategory model.
  • docs/ScheduledSubTransaction.md
    • Added documentation for the payee_name and category_name properties in the ScheduledSubTransaction model.
  • docs/ScheduledTransactionsApi.md
    • Added documentation for the delete_scheduled_transaction and update_scheduled_transaction endpoints.
  • lib/ynab.rb
    • Added require statement for put_scheduled_transaction_wrapper model.
  • lib/ynab/api/scheduled_transactions_api.rb
    • Added methods for delete_scheduled_transaction and update_scheduled_transaction API calls.
  • lib/ynab/models/category.rb
    • Removed 'null' from the allowed values for the goal_type enum.
  • lib/ynab/models/hybrid_transaction.rb
    • Removed 'null' from the allowed values for the debt_transaction_type enum.
  • lib/ynab/models/put_scheduled_transaction_wrapper.rb
    • Added the PutScheduledTransactionWrapper model.
  • lib/ynab/models/save_category.rb
    • Added the goal_target attribute to the SaveCategory model.
  • lib/ynab/models/scheduled_sub_transaction.rb
    • Added the payee_name and category_name attributes to the ScheduledSubTransaction model.
  • lib/ynab/models/transaction_detail.rb
    • Removed 'null' from the allowed values for the debt_transaction_type enum.
  • lib/ynab/models/transaction_flag_color.rb
    • Removed 'NULL' from the allowed values for the TransactionFlagColor enum.
  • lib/ynab/models/transaction_summary.rb
    • Removed 'null' from the allowed values for the debt_transaction_type enum.
  • open_api_spec.yaml
    • Updated the API version to 1.74.0.
    • Added PUT and DELETE paths for scheduled transactions.
    • Added goal_target to the SaveCategory schema.
    • Added PutScheduledTransactionWrapper schema.
    • Added payee_name and category_name to the ScheduledSubTransaction schema.
  • templates/gemspec.mustache
    • Removed the default value for gemDescription.
  • 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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 null value has been removed from the goal_type and debt_transaction_type enums in lib/ynab/models/category.rb, lib/ynab/models/hybrid_transaction.rb, and lib/ynab/models/transaction_summary.rb. Ensure that the API handles cases where these fields might be null, as the removal of null from 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_transaction and update_scheduled_transaction methods in lib/ynab/api/scheduled_transactions_api.rb lack 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))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.
@bradymholt bradymholt merged commit 32a888d into main Mar 10, 2025
1 check passed
@bradymholt bradymholt deleted the server-1-74 branch March 10, 2025 18:05
@github-actions
Copy link

The changes in this PR were just released in 3.7.0 🎉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants