fix clippy

This commit is contained in:
Anurag Thakur
2025-10-16 14:34:48 +05:30
parent b85f94bfe3
commit b6f3e5e28e
3 changed files with 6 additions and 2 deletions

View File

@ -2692,7 +2692,7 @@
}, },
"responses": { "responses": {
"200": { "200": {
"description": "Get the Payment Method Balance", "description": "Apply the Payment Method Data",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

View File

@ -3150,17 +3150,20 @@ pub enum GiftCardData {
BhnCardNetwork(BHNGiftCardDetails), BhnCardNetwork(BHNGiftCardDetails),
} }
#[cfg(feature = "v2")]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
#[serde(rename_all = "snake_case")] #[serde(rename_all = "snake_case")]
pub enum BalanceCheckPaymentMethodData { pub enum BalanceCheckPaymentMethodData {
GiftCard(GiftCardData), GiftCard(GiftCardData),
} }
#[cfg(feature = "v2")]
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] #[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
pub struct ApplyPaymentMethodDataRequest { pub struct ApplyPaymentMethodDataRequest {
pub payment_methods: Vec<BalanceCheckPaymentMethodData>, pub payment_methods: Vec<BalanceCheckPaymentMethodData>,
} }
#[cfg(feature = "v2")]
#[derive(Debug, serde::Serialize, Clone, ToSchema)] #[derive(Debug, serde::Serialize, Clone, ToSchema)]
pub struct ApplyPaymentMethodDataResponse { pub struct ApplyPaymentMethodDataResponse {
pub remaining_amount: MinorUnit, pub remaining_amount: MinorUnit,
@ -3168,6 +3171,7 @@ pub struct ApplyPaymentMethodDataResponse {
pub surcharge_details: Option<Vec<ApplyPaymentMethodDataSurchargeResponseItem>>, pub surcharge_details: Option<Vec<ApplyPaymentMethodDataSurchargeResponseItem>>,
} }
#[cfg(feature = "v2")]
#[derive(Debug, serde::Serialize, Clone, ToSchema)] #[derive(Debug, serde::Serialize, Clone, ToSchema)]
pub struct ApplyPaymentMethodDataSurchargeResponseItem { pub struct ApplyPaymentMethodDataSurchargeResponseItem {
#[schema(value_type = PaymentMethod)] #[schema(value_type = PaymentMethod)]

View File

@ -1333,7 +1333,7 @@ pub fn payment_check_gift_card_balance() {}
content = ApplyPaymentMethodDataRequest, content = ApplyPaymentMethodDataRequest,
), ),
responses( responses(
(status = 200, description = "Get the Payment Method Balance", body = ApplyPaymentMethodDataResponse), (status = 200, description = "Apply the Payment Method Data", body = ApplyPaymentMethodDataResponse),
), ),
tag = "Payments", tag = "Payments",
operation_id = "Apply Payment Method Data", operation_id = "Apply Payment Method Data",