mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(enums): move enums from storage_models and api_models crates to common_enums crate (#1265)
This commit is contained in:
@ -266,7 +266,7 @@ pub async fn get_or_update_dispute_object(
|
||||
dispute_id,
|
||||
amount: dispute_details.amount,
|
||||
currency: dispute_details.currency,
|
||||
dispute_stage: dispute_details.dispute_stage.foreign_into(),
|
||||
dispute_stage: dispute_details.dispute_stage,
|
||||
dispute_status: event_type
|
||||
.foreign_try_into()
|
||||
.into_report()
|
||||
@ -300,15 +300,15 @@ pub async fn get_or_update_dispute_object(
|
||||
.change_context(errors::ApiErrorResponse::WebhookProcessingFailure)
|
||||
.attach_printable("event type to dispute state conversion failure")?;
|
||||
crate::core::utils::validate_dispute_stage_and_dispute_status(
|
||||
dispute.dispute_stage.foreign_into(),
|
||||
dispute.dispute_status.foreign_into(),
|
||||
dispute_details.dispute_stage.clone(),
|
||||
dispute_status.foreign_into(),
|
||||
dispute.dispute_stage,
|
||||
dispute.dispute_status,
|
||||
dispute_details.dispute_stage,
|
||||
dispute_status,
|
||||
)
|
||||
.change_context(errors::ApiErrorResponse::WebhookProcessingFailure)
|
||||
.attach_printable("dispute stage and status validation failed")?;
|
||||
let update_dispute = diesel_models::dispute::DisputeUpdate::Update {
|
||||
dispute_stage: dispute_details.dispute_stage.foreign_into(),
|
||||
dispute_stage: dispute_details.dispute_stage,
|
||||
dispute_status,
|
||||
connector_status: dispute_details.connector_status,
|
||||
connector_reason: dispute_details.connector_reason,
|
||||
@ -500,7 +500,7 @@ pub async fn create_event_and_trigger_outgoing_webhook<W: api::OutgoingWebhookTy
|
||||
let outgoing_webhook = api::OutgoingWebhook {
|
||||
merchant_id: merchant_account.merchant_id.clone(),
|
||||
event_id: event.event_id,
|
||||
event_type: event.event_type.foreign_into(),
|
||||
event_type: event.event_type,
|
||||
content,
|
||||
timestamp: event.created_at,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user