mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
24 lines
655 B
Rust
24 lines
655 B
Rust
mod app;
|
|
mod customers;
|
|
mod payment_intents;
|
|
mod refunds;
|
|
use actix_web::{web, Scope};
|
|
mod errors;
|
|
pub(crate) use errors::ErrorCode;
|
|
|
|
pub(crate) use self::app::{Customers, PaymentIntents, Refunds};
|
|
use crate::routes::AppState;
|
|
pub struct StripeApis;
|
|
|
|
impl StripeApis {
|
|
pub(crate) fn server(state: AppState) -> Scope {
|
|
let max_depth = 10;
|
|
let strict = false;
|
|
web::scope("/vs/v1")
|
|
.app_data(web::Data::new(serde_qs::Config::new(max_depth, strict)))
|
|
.service(PaymentIntents::server(state.clone()))
|
|
.service(Refunds::server(state.clone()))
|
|
.service(Customers::server(state))
|
|
}
|
|
}
|