refactor(router): Remove refunds_v2 feature flag (#8310)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Prasunna Soppa
2025-06-25 15:50:42 +05:30
committed by GitHub
parent ecd05d53c9
commit c5c0e677f2
24 changed files with 362 additions and 482 deletions

View File

@ -11,7 +11,7 @@ use super::payments::AmountFilter;
use crate::admin;
use crate::{admin::MerchantConnectorInfo, enums};
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "refunds_v2")))]
#[cfg(feature = "v1")]
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct RefundRequest {
@ -61,7 +61,7 @@ pub struct RefundRequest {
pub split_refunds: Option<common_types::refunds::SplitRefund>,
}
#[cfg(all(feature = "v2", feature = "refunds_v2"))]
#[cfg(feature = "v2")]
#[derive(Debug, ToSchema, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct RefundsCreateRequest {
@ -104,19 +104,19 @@ pub struct RefundsCreateRequest {
pub metadata: Option<pii::SecretSerdeValue>,
}
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "refunds_v2")))]
#[cfg(feature = "v1")]
#[derive(Default, Debug, Clone, Deserialize)]
pub struct RefundsRetrieveBody {
pub force_sync: Option<bool>,
}
#[cfg(all(feature = "v2", feature = "refunds_v2"))]
#[cfg(feature = "v2")]
#[derive(Default, Debug, Clone, Deserialize)]
pub struct RefundsRetrieveBody {
pub force_sync: Option<bool>,
}
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "refunds_v2")))]
#[cfg(feature = "v1")]
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
pub struct RefundsRetrieveRequest {
/// Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refund initiated against the same payment. If the identifiers is not defined by the merchant, this filed shall be auto generated and provide in the API response. It is recommended to generate uuid(v4) as the refund_id.
@ -135,7 +135,7 @@ pub struct RefundsRetrieveRequest {
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
}
#[cfg(all(feature = "v2", feature = "refunds_v2"))]
#[cfg(feature = "v2")]
#[derive(Debug, ToSchema, Clone, Deserialize, Serialize)]
pub struct RefundsRetrieveRequest {
/// Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refund initiated against the same payment. If the identifiers is not defined by the merchant, this filed shall be auto generated and provide in the API response. It is recommended to generate uuid(v4) as the refund_id.
@ -165,7 +165,7 @@ pub struct RefundUpdateRequest {
pub metadata: Option<pii::SecretSerdeValue>,
}
#[cfg(all(feature = "v2", feature = "refunds_v2"))]
#[cfg(feature = "v2")]
#[derive(Default, Debug, ToSchema, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct RefundMetadataUpdateRequest {