Skip to content
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

feat(routing): Enable volume split for dynamic routing #6662

Open
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

Sarthak1799
Copy link
Contributor

@Sarthak1799 Sarthak1799 commented Nov 26, 2024

Type of Change

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

Description

Have added a new API for enabling volume split for dynamic routing service

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?

curl --location --request POST 'http://localhost:8080/account/sarthak1/business_profile/pro_WlO7KCOeDRB8kWk7MSy1/dynamic_routing/set_volume_split?split=20' \
--header 'api-key: dev_iricUDSeFis6RzTGCcYkOt4wmuBcRfjbVbWXbOUO5996boAgztmtfTKN6HNqerjM'

Status in DB -
image

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

prajjwalkumar17 and others added 30 commits November 14, 2024 01:37
@Sarthak1799 Sarthak1799 changed the base branch from main to feat_elimination_routing November 27, 2024 13:01
@Sarthak1799 Sarthak1799 requested review from a team as code owners November 27, 2024 13:01
@hyperswitch-bot hyperswitch-bot bot added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Nov 27, 2024
@Sarthak1799 Sarthak1799 removed request for a team November 27, 2024 13:07
@hyperswitch-bot hyperswitch-bot bot removed M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Nov 27, 2024
Base automatically changed from feat_elimination_routing to main December 2, 2024 15:10
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Dec 2, 2024
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Dec 3, 2024
crates/router/src/core/payments.rs Outdated Show resolved Hide resolved
crates/router_env/src/logger/types.rs Outdated Show resolved Hide resolved
@@ -1776,6 +1776,10 @@ impl Profile {
web::resource("/toggle")
.route(web::post().to(routing::toggle_elimination_routing)),
),
)
.service(
web::resource("/set_volume_split")
Copy link
Contributor

Choose a reason for hiding this comment

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

By just looking at the api-contract, client won't be aware that he is setting volume split for dynamic routing type right? Even the query param is just split

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is scoped under /dynamic_routing

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.

Volume Split for Intelligent Routing
3 participants