diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index c656b067c1..ec973452d8 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -2692,7 +2692,7 @@ }, "responses": { "200": { - "description": "Get the Payment Method Balance", + "description": "Apply the Payment Method Data", "content": { "application/json": { "schema": { diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index 7460ef7489..edd2206a6c 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -3150,17 +3150,20 @@ pub enum GiftCardData { BhnCardNetwork(BHNGiftCardDetails), } +#[cfg(feature = "v2")] #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] #[serde(rename_all = "snake_case")] pub enum BalanceCheckPaymentMethodData { GiftCard(GiftCardData), } +#[cfg(feature = "v2")] #[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] pub struct ApplyPaymentMethodDataRequest { pub payment_methods: Vec, } +#[cfg(feature = "v2")] #[derive(Debug, serde::Serialize, Clone, ToSchema)] pub struct ApplyPaymentMethodDataResponse { pub remaining_amount: MinorUnit, @@ -3168,6 +3171,7 @@ pub struct ApplyPaymentMethodDataResponse { pub surcharge_details: Option>, } +#[cfg(feature = "v2")] #[derive(Debug, serde::Serialize, Clone, ToSchema)] pub struct ApplyPaymentMethodDataSurchargeResponseItem { #[schema(value_type = PaymentMethod)] diff --git a/crates/openapi/src/routes/payments.rs b/crates/openapi/src/routes/payments.rs index 6d94263a4b..857c606fe1 100644 --- a/crates/openapi/src/routes/payments.rs +++ b/crates/openapi/src/routes/payments.rs @@ -1333,7 +1333,7 @@ pub fn payment_check_gift_card_balance() {} content = ApplyPaymentMethodDataRequest, ), responses( - (status = 200, description = "Get the Payment Method Balance", body = ApplyPaymentMethodDataResponse), + (status = 200, description = "Apply the Payment Method Data", body = ApplyPaymentMethodDataResponse), ), tag = "Payments", operation_id = "Apply Payment Method Data",