initial commit

This commit is contained in:
Sampras Lopes
2022-11-16 20:37:50 +05:30
commit 430dcd1967
320 changed files with 64760 additions and 0 deletions

View File

@ -0,0 +1,23 @@
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))
}
}