Skip to content

Conversation

spritianeja03
Copy link
Contributor

Type of Change

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

Description

This PR integrates the get plan prices endpoint for chargebee, required to be called in the respective API handler for the same (not yet implemented)

Additional Changes

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

Motivation and Context

Closes #9054

How did you test it?

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

@spritianeja03 spritianeja03 self-assigned this Sep 8, 2025
@spritianeja03 spritianeja03 requested review from a team as code owners September 8, 2025 09:22
Copy link

semanticdiff-com bot commented Sep 8, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_domain_models/src/types.rs  67% smaller
  crates/hyperswitch_interfaces/src/connector_integration_v2.rs  53% smaller
  crates/hyperswitch_connectors/src/connectors/recurly.rs  47% smaller
  crates/hyperswitch_interfaces/src/api.rs  41% smaller
  crates/hyperswitch_connectors/src/connectors/chargebee.rs  16% smaller
  crates/hyperswitch_interfaces/src/conversion_impls.rs  5% smaller
  crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs  5% smaller
  crates/hyperswitch_connectors/src/default_implementations.rs  4% smaller
  crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_flow_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_response_types.rs  0% smaller
  crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs  0% smaller
  crates/hyperswitch_interfaces/src/api/subscriptions.rs  0% smaller
  crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs  0% smaller
  crates/hyperswitch_interfaces/src/types.rs  0% smaller
  crates/router/src/services/api.rs  0% smaller

@@ -0,0 +1,4 @@
#[derive(Debug, Clone)]
pub struct GetSubscriptionPlanPricesRequest {
pub item_id: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub item_id: String,
pub plan_price_id: String,

connectors: &Connectors,
) -> CustomResult<String, errors::ConnectorError> {
let query_params = get_chargebee_plan_prices_query_params(req)?;
let metadata: chargebee::ChargebeeMetadata =
Copy link
Contributor

Choose a reason for hiding this comment

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

Add corresponding changes for ChargebeeMetadata object in crates/router/src/core/connector_validation.rs

GetSubscriptionPlanPricesResponse,
>,
) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> {
todo!()
Copy link
Contributor

Choose a reason for hiding this comment

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

Throw unimplemented error here instead of todo

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.

Get Plan prices
3 participants