Command: grep -A 5 -B 5 "PaymentSucceeded\ PaymentFailed\ InvoiceDeleted"…
- User
Command: grep -A 5 -B 5 "PaymentSucceeded|PaymentFailed|InvoiceDeleted" crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs Output: pub next_billing_at: Option, } #[derive(Serialize, Deserialize, Debug)] #[serde(rename_all = "snake_case")] pub enum ChargebeeEventType { PaymentSucceeded, PaymentFailed, InvoiceDeleted, }
#[derive(Serialize, Deserialize, Clone, Debug)] pub struct ChargebeeInvoiceData { // invoice id
} #[cfg(all(feature = "revenue_recovery", feature = "v2"))] impl From for api_models::webhooks::IncomingWebhookEvent { fn from(event: ChargebeeEventType) -> Self { match event { ChargebeeEventType::PaymentSucceeded => Self::RecoveryPaymentSuccess, ChargebeeEventType::PaymentFailed => Self::RecoveryPaymentFailure, ChargebeeEventType::InvoiceDeleted => Self::RecoveryInvoiceCancel, } } }
#[cfg(all(feature = "revenue_recovery", feature = "v2"))]
codefn from(status: ChargebeeInvoiceStatus) -> Self { match status { ChargebeeInvoiceStatus::Paid => Self::InvoicePaid, ChargebeeInvoiceStatus::Posted => Self::PaymentPendingTimeout, ChargebeeInvoiceStatus::PaymentDue => Self::PaymentPending, ChargebeeInvoiceStatus::NotPaid => Self::PaymentFailed, ChargebeeInvoiceStatus::Voided => Self::Voided, ChargebeeInvoiceStatus::Pending => Self::InvoiceCreated, } }}
Assistant
<is_displaying_contents> true </is_displaying_contents>