mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
refactor: Fix typos (#4277)
This commit is contained in:
@ -423,8 +423,9 @@ impl From<api_enums::IntentStatus> for StripePaymentStatus {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, strum::Display)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum CancellationReason {
|
||||
Duplicate,
|
||||
Fraudulent,
|
||||
@ -432,17 +433,6 @@ pub enum CancellationReason {
|
||||
Abandoned,
|
||||
}
|
||||
|
||||
impl ToString for CancellationReason {
|
||||
fn to_string(&self) -> String {
|
||||
String::from(match self {
|
||||
Self::Duplicate => "duplicate",
|
||||
Self::Fraudulent => "fradulent",
|
||||
Self::RequestedByCustomer => "requested_by_customer",
|
||||
Self::Abandoned => "abandoned",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Copy, Clone)]
|
||||
pub struct StripePaymentCancelRequest {
|
||||
cancellation_reason: Option<CancellationReason>,
|
||||
|
||||
@ -334,8 +334,9 @@ impl From<api_enums::IntentStatus> for StripeSetupStatus {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, strum::Display)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum CancellationReason {
|
||||
Duplicate,
|
||||
Fraudulent,
|
||||
@ -343,17 +344,6 @@ pub enum CancellationReason {
|
||||
Abandoned,
|
||||
}
|
||||
|
||||
impl ToString for CancellationReason {
|
||||
fn to_string(&self) -> String {
|
||||
String::from(match self {
|
||||
Self::Duplicate => "duplicate",
|
||||
Self::Fraudulent => "fradulent",
|
||||
Self::RequestedByCustomer => "requested_by_customer",
|
||||
Self::Abandoned => "abandoned",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Copy, Clone)]
|
||||
pub struct StripePaymentCancelRequest {
|
||||
cancellation_reason: Option<CancellationReason>,
|
||||
|
||||
Reference in New Issue
Block a user