deps(api_models): put the errors module behind a feature flag (#815)

This commit is contained in:
ItsMeShashank
2023-03-30 15:13:34 +05:30
committed by GitHub
parent 324df4de8c
commit f14f87a106
8 changed files with 23 additions and 18 deletions

View File

@ -4,14 +4,19 @@ version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
errors = [
"dep:actix-web",
"dep:reqwest",
]
[dependencies]
actix-web = "4.3.1"
actix-web = { version = "4.3.1", optional = true }
error-stack = "0.3.1"
frunk = "0.4.1"
frunk_core = "0.4.1"
mime = "0.3.16"
reqwest = "0.11.14"
reqwest = { version = "0.11.14", optional = true }
serde = { version = "1.0.155", features = ["derive"] }
serde_json = "1.0.94"
strum = { version = "0.24.1", features = ["derive"] }

View File

@ -6,6 +6,7 @@ pub mod cards_info;
pub mod customers;
pub mod disputes;
pub mod enums;
#[cfg(feature = "errors")]
pub mod errors;
pub mod files;
pub mod mandates;

View File

@ -50,14 +50,6 @@ impl From<IncomingWebhookEvent> for WebhookFlow {
}
}
pub struct IncomingWebhookRequestDetails<'a> {
pub method: actix_web::http::Method,
pub headers: &'a actix_web::http::header::HeaderMap,
pub body: &'a [u8],
pub query_params: String,
pub query_params_json: &'a [u8],
}
pub type MerchantWebhookConfig = std::collections::HashSet<IncomingWebhookEvent>;
pub enum RefundIdType {