Skip to content

Conversation

@J-ad
Copy link
Contributor

@J-ad J-ad commented Oct 28, 2025

  1. Supporting handle_as_user_edit for the customer_invoices resource.
  2. add update! method
  3. tests

@J-ad J-ad marked this pull request as ready for review October 28, 2025 11:41
@J-ad J-ad requested a review from Copilot October 28, 2025 11:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for data editing of customer invoices through the handle_as_user_edit query parameter. The main changes enable both creating and updating customer invoices with this parameter, which can be passed either during object initialization or as a method argument.

Key Changes:

  • Added handle_as_user_edit as a writeable query parameter for CustomerInvoices
  • Implemented custom create! and update! methods that properly handle query parameters
  • Enhanced query parameter extraction logic to support both nested and top-level parameters

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
spec/chartmogul/customer_invoices_spec.rb Added comprehensive test coverage for handle_as_user_edit parameter in both create and update operations
lib/chartmogul/customer_invoices.rb Implemented create! and update! methods with query parameter support and added handle_as_user_edit as writeable query param
lib/chartmogul/api_resource.rb Enhanced query parameter extraction to handle both nested (resource_key) and top-level parameters
Comments suppressed due to low confidence (1)

lib/chartmogul/customer_invoices.rb:1

  • The create! methods override the included API::Actions::Create functionality but the old include statement was removed. This creates potential confusion about which create implementation is being used. Consider adding a comment explaining why a custom implementation is needed instead of using the standard API::Actions::Create module.
# frozen_string_literal: true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@J-ad J-ad requested a review from Copilot October 28, 2025 12:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@J-ad J-ad requested a review from Copilot October 28, 2025 12:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@J-ad J-ad merged commit 857aec9 into main Oct 29, 2025
6 checks passed
@J-ad J-ad deleted the jan/ome-21-support-data-editing-more-resources branch October 29, 2025 08:56
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