Skip to content

Conversation

jagan-jaya
Copy link
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Make the RevenueRecoveryRecordBack functionality generic to make it usable by subscription after making a successful payment.
This pull request refactors the "record back" functionality in the revenue recovery flow by renaming types and data structures from RevenueRecoveryRecordBack* and RecoveryRecordBack to InvoiceRecordBack* and InvoiceRecordBack. This change is applied consistently across domain models, connector implementations, interfaces, and transformers, improving clarity and aligning naming with their purpose (handling invoice record backs).

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Only removing the feature flag and renamed it. compilation and PR checks should be sufficient

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

Copy link

semanticdiff-com bot commented Sep 9, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_interfaces/src/conversion_impls.rs  90% smaller
  crates/hyperswitch_connectors/src/connectors/stripebilling.rs  66% smaller
  crates/hyperswitch_connectors/src/connectors/recurly.rs  59% smaller
  crates/hyperswitch_connectors/src/connectors/chargebee.rs  45% smaller
  crates/router/src/core/revenue_recovery/types.rs  20% smaller
  crates/hyperswitch_interfaces/src/api/revenue_recovery.rs  9% smaller
  crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs  0% smaller
  crates/hyperswitch_connectors/src/default_implementations.rs  0% smaller
  crates/hyperswitch_connectors/src/default_implementations_v2.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs  0% smaller
  crates/hyperswitch_domain_models/src/types.rs  0% smaller
  crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs  0% smaller
  crates/hyperswitch_interfaces/src/types.rs  0% smaller
  crates/router/src/core/payments/flows.rs  0% smaller
  crates/router/src/services/api.rs  0% smaller
  crates/router/src/types.rs  0% smaller

@jagan-jaya jagan-jaya linked an issue Sep 9, 2025 that may be closed by this pull request
@jagan-jaya jagan-jaya marked this pull request as ready for review September 9, 2025 10:57
@jagan-jaya jagan-jaya requested review from a team as code owners September 9, 2025 10:57
@jagan-jaya jagan-jaya self-assigned this Sep 9, 2025
@jagan-jaya jagan-jaya added A-connector-integration Area: Connector integration C-refactor Category: Refactor labels Sep 9, 2025
deepanshu-iiitu
deepanshu-iiitu previously approved these changes Sep 9, 2025
ShankarSinghC
ShankarSinghC previously approved these changes Sep 9, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit ea2fd1d Sep 10, 2025
21 of 25 checks passed
@Gnanasundari24 Gnanasundari24 deleted the invoice_record_back branch September 10, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename existing RevenueRecoveryRecordBack trait to InvoiceRecordBack
5 participants