text stringlengths 70 351k | source stringclasses 4
values |
|---|---|
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types.rs | crate: router
use hyperswitch_domain_models::router_flow_types::{
self,
access_token_auth::AccessTokenAuth,
dispute::{Accept, Defend, Evidence},
files::{Retrieve, Upload},
mandate_revoke::MandateRevoke,
payments::{
Approve,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types.rs | crate: router
use hyperswitch_domain_models::router_flow_types::{
self,
access_token_auth::AccessTokenAuth,
dispute::{Accept, Defend, Evidence},
files::{Retrieve, Upload},
mandate_revoke::MandateRevoke,
payments::{
Approve,... | ast_fragments |
// file: hyperswitch/crates/router/src/types.rs | crate: router
use hyperswitch_domain_models::router_flow_types::{
self,
access_token_auth::AccessTokenAuth,
dispute::{Accept, Defend, Evidence},
files::{Retrieve, Upload},
mandate_revoke::MandateRevoke,
payments::{
Approve, Authorize, Aut... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types.rs | crate: router
use hyperswitch_domain_models::router_flow_types::{
self,
access_token_auth::AccessTokenAuth,
dispute::{Accept, Defend, Evidence},
files::{Retrieve, Upload},
mandate_revoke::MandateRevoke,
payments::{
Approve,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/types.rs | crate: router
use hyperswitch_domain_models::router_flow_types::{
self,
access_token_auth::AccessTokenAuth,
dispute::{Accept, Defend, Evidence},
files::{Retrieve, Upload},
mandate_revoke::MandateRevoke,
payments::{
Approve,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use std::collections::HashMap;
use error_stack::ResultExt;
use events::{EventsError, Message, MessagingInterface};
use masking::ErasedMaskSerialize;
use time::PrimitiveDateTime;
fn send_message<T>(
&self,
data: T,
me... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use storage_impl::{
config::TenantConfig,
errors::{ApplicationError, StorageError, StorageResult},
};
use crate::{
db::KafkaProducer,
services::kafka::{KafkaMessage, KafkaSettings},
};
pub async fn get_event_handler(&self) -... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use std::collections::HashMap;
use error_stack::ResultExt;
use events::{EventsError, Message, MessagingInterface};
use masking::ErasedMaskSerialize;
use time::PrimitiveDateTime;
fn send_message<T>(
&self,
data: T,
me... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use storage_impl::{
config::TenantConfig,
errors::{ApplicationError, StorageError, StorageResult},
};
pub fn add_tenant(&mut self, tenant_config: &dyn TenantConfig) {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use router_env::logger;
use crate::{
db::KafkaProducer,
services::kafka::{KafkaMessage, KafkaSettings},
};
pub fn log_event<T: KafkaMessage>(&self, event: &T) {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use storage_impl::{
config::TenantConfig,
errors::{ApplicationError, StorageError, StorageResult},
};
use crate::{
db::KafkaProducer,
services::kafka::{KafkaMessage, KafkaSettings},
};
pub fn validate(&self) -> Result<(), Ap... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/events.rs | crate: router
use storage_impl::{
config::TenantConfig,
errors::{ApplicationError, StorageError, StorageResult},
};
use crate::{
db::KafkaProducer,
services::kafka::{KafkaMessage, KafkaSettings},
};
pub async fn get_event_handler(&self) -... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use actix_web::{
body::MessageBody,
dev::{Server, ServerHandle, ServiceFactory, ServiceRequest},
middleware::ErrorHandlers,
};
use http::StatusCode;
use router_env::tracing::Instrument;
use storage_impl::errors::ApplicationResult;
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use actix_web::{
body::MessageBody,
dev::{Server, ServerHandle, ServiceFactory, ServiceRequest},
middleware::ErrorHandlers,
};
use hyperswitch_interfaces::secrets_interface::secret_state::SecuredSecret;
use routes::{AppState, Sessi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use tokio::sync::{mpsc, oneshot};
pub use self::env::logger;
pub(crate) use self::macros::*;
pub async fn receiver_for_error(rx: oneshot::Receiver<()>, mut server: impl Stop) {
{
Ok(_) => {
logger::error!("The redis server failed "... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use actix_web::{
body::MessageBody,
dev::{Server, ServerHandle, ServiceFactory, ServiceRequest},
middleware::ErrorHandlers,
};
use hyperswitch_interfaces::secrets_interface::secret_state::SecuredSecret;
use routes::{AppState, Sessi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
pub use self::env::logger;
pub(crate) use self::macros::*;
async fn stop_server(&mut self) {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use tokio::sync::{mpsc, oneshot};
pub use self::env::logger;
pub(crate) use self::macros::*;
pub async fn receiver_for_error(rx: oneshot::Receiver<()>, mut server: impl Stop) {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
// file: hyperswitch/crates/router/src/lib.rs | crate: router
use actix_web::{
body::MessageBody,
dev::{Server, ServerHandle, ServiceFactory, ServiceRequest},
middleware::ErrorHandlers,
};
use http::StatusCode;
use hyperswitch_interfaces::secrets_interface::secret_state::SecuredSecret;
use router_env::traci... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
use crate::headers;
fn call(&self, mut req: actix_web::dev::ServiceRequest) -> Self::Future {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
use router_env::{
logger,
tracing::{field::Empty, Instrument},
};
use crate::headers;
fn call(&self, mut req: actix_web::dev::ServiceRequest) -> Self::Future {
{
Ok(value) => {
logger::info!(
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
fn get_request_details_from_value(json_value: &serde_json::Value, parent_key: &str) -> String {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
fn get_request_details_from_value(json_value: &serde_json::Value, parent_key: &str) -> String {
{
serde_json::Value::Null => format!("{}: null", parent_key),<|fim_suffix|>
<|fim_middle|>
serde_json::Value::Object(obj) => {
l... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
fn new_transform(&self, service: S) -> Self::Future {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
use common_utils::consts::TENANT_HEADER;
use futures::StreamExt;
use router_env::{
logger,
tracing::{field::Empty, Instrument},
};
use crate::headers;
/// Middleware for attaching default response headers. Headers with the same ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/middleware.rs | crate: router
use router_env::{
logger,
tracing::{field::Empty, Instrument},
};
use crate::headers;
fn call(&self, req: actix_web::dev::ServiceRequest) -> Self::Future {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::valid... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
logger::warn!(
"Outgoing webhook not sent because of missing event type status mapping"
);
}
}
}
Ok(())
}
type Handle<T> = tokio::task::JoinHandle<RouterResult... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
(
"connector",
connector.to_owned().unwrap_or("null".to_string()),
),
("merchant_id", merchant_id.clone()),
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::valid... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use std::fmt::Debug;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch... | ast_fragments |
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::QrImage;
use ser... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use std::fmt::Debug;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::validate_email,
};
pub use hyperswitch_connectors::utils::Q... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
}))
.as_deref()
.unwrap_or("Invalid Json Error"),
)
}
}
impl ResponseError for CustomJsonError {
fn status_code(&self) -> StatusCode {
StatusCod... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
val... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use api_models::{
enums,
payments::{self},
webhooks,
};
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, Va... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/utils.rs | crate: router
use common_utils::types::keymanager::KeyManagerState;
pub use common_utils::{
crypto::{self, Encryptable},
ext_traits::{ByteSliceExt, BytesExt, Encode, StringExt, ValueExt},
fp_utils::when,
id_type, pii,
validation::valid... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibil... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibil... | ast_fragments |
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{stripe::e... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{stripe::errors,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{stripe::errors,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{stripe::errors,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibil... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibil... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{stripe::errors,... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::Tag;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibil... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
logger, routes,
servi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
logger, routes,
servi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use error_stack::report;
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use error_stack::report;
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use error_stack::report;
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/refunds.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use error_stack::report;
use router_env::{instrument, tracing, Flow, Tag};
use crate::{
compatibility::{stripe::errors, wrap},
core::{api_locking, refunds},
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::payouts as payout_models;
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
use super::{
payment_intents::types::StripePaymentIntentResponse, re... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::payouts as payout_models;
fn from(res: payout_models::PayoutCreateResponse) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
use common_utils::pii::{self, Email};
use common_utils::{crypto::SignMessage, date_time, ext_traits::Encode};
use ... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
use common_utils::{crypto::SignMessage, date_time, ext_traits::Encode};
use router_env::logger;
fn from(value: api... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(status: DisputeStatus) -> Self {
{
DisputeStatus::DisputeOpened => Self::WarningNeedsResponse,<|fim_suffix... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::payouts as payout_models;
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(value: api::OutgoingWebhookContent) -> Self {
{<|fim_suffix|>
<|... | ast_fragments |
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
use common_utils::{crypto::SignMessage, date_time, ext_traits::Encode};
use router_env::logger;
fn from(value: api::OutgoingWebho... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(status: DisputeStatus) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(status: MandateStatus) -> Self {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::payouts as payout_models;
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(res: api_models::mandates::MandateResponse) -> Self {
<|fim_suff... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
use api_models::payouts as payout_models;
use api_models::{
enums::{Currency, DisputeStatus, MandateStatus},
webhooks::{self as api},
};
fn from(res: api_models::disputes::DisputeResponse) -> Self {
<|fim_suff... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/webhooks.rs | crate: router
fn from(status: common_enums::PayoutStatus) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
fn from(item: serde_qs::Error) -> Self {
<|fim_suffix|>
<|fim_middle|>
}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
fn from(item: serde_qs::Error) -> Self {
{
serde_qs::Error::Custom(s) => Self::SerdeQsError {
error_message: s,
param: None,
},<|fim_suffix|>
<|fim_middle|>
serde_qs::Error::U... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
use common_utils::errors::ErrorSwitch;
use hyperswitch_domain_models::errors::api_error_response as errors;
use crate::core::errors::CustomersErrorResponse;
fn status_code(&self) -> reqwest::StatusCode {
{
Self::Unautho... | ast_fragments |
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
use common_utils::errors::ErrorSwitch;
use hyperswitch_domain_models::errors::api_error_response as errors;
use crate::core::errors::CustomersErrorResponse;
fn switch(&self) -> StripeErrorCode {
use StripeErrorCode as SC;
... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
fn switch(&self) -> StripeErrorCode {
{<|fim_suffix|>
<|fim_middle|>
}}
| ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/errors.rs | crate: router
use common_utils::errors::ErrorSwitch;
use hyperswitch_domain_models::errors::api_error_response as errors;
use crate::core::errors::CustomersErrorResponse;
fn from(value: errors::ApiErrorResponse) -> Self {
<|fim_suffi... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/setup_intents.rs | crate: router
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::payments as payment_types;
use error_stack::report;
use router_env::{instrument, tracing, Flow};
use crate::{
compatibility::{
stripe::... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use api_models::payments;
use crate::{
compatibility::stripe::refunds::types as stripe_refunds,
connector::utils::AddressData,
consts,
core::errors,
pii::{Email, PeekInterface},
ty... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use api_models::payments;
use crate::{
compatibility::stripe::refunds::types as stripe_refunds,
connector::utils::AddressData,
consts,
core::errors,
pii::{Email, PeekInterface},
ty... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use api_models::payments;
use common_utils::{
crypto::Encryptable,
date_time,
ext_traits::StringExt,
id_type,
pii::{IpAddress, SecretSerdeValue, UpiVpaMaskingStrategy},
types::Mino... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use api_models::payments;
use common_utils::{
crypto::Encryptable,
date_time,
ext_traits::StringExt,
id_type,
pii::{IpAddress, SecretSerdeValue, UpiVpaMaskingStrategy},
types::Mino... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use api_models::payments;
use crate::{
compatibility::stripe::refunds::types as stripe_refunds,
connector::utils::AddressData,
consts,
core::errors,
pii::{Email, PeekInterface},
ty... | ast_fragments |
<|fim_prefix|>
// file: hyperswitch/crates/router/src/compatibility/stripe/payment_intents/types.rs | crate: router
use crate::{
compatibility::stripe::refunds::types as stripe_refunds,
connector::utils::AddressData,
consts,
core::errors,
pii::{Email, PeekInterface},
types::{
api::{admin... | ast_fragments |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.