Testability ddd repository (#55)

This commit is contained in:
kos-for-juspay
2022-12-03 07:18:51 +02:00
committed by GitHub
parent 35289df715
commit 200a085fd0
116 changed files with 3551 additions and 1653 deletions

View File

@ -34,7 +34,7 @@ pub async fn customer_create(
&req,
create_cust_req,
|state, merchant_account, req| {
customers::create_customer(&state.store, merchant_account, req)
customers::create_customer(&*state.store, merchant_account, req)
},
api::MerchantAuthentication::ApiKey,
)
@ -57,7 +57,7 @@ pub async fn customer_retrieve(
&req,
payload,
|state, merchant_account, req| {
customers::retrieve_customer(&state.store, merchant_account, req)
customers::retrieve_customer(&*state.store, merchant_account, req)
},
api::MerchantAuthentication::ApiKey,
)
@ -89,7 +89,7 @@ pub async fn customer_update(
&req,
cust_update_req,
|state, merchant_account, req| {
customers::update_customer(&state.store, merchant_account, req)
customers::update_customer(&*state.store, merchant_account, req)
},
api::MerchantAuthentication::ApiKey,
)
@ -112,7 +112,7 @@ pub async fn customer_delete(
&req,
payload,
|state, merchant_account, req| {
customers::delete_customer(&state.store, merchant_account, req)
customers::delete_customer(&*state.store, merchant_account, req)
},
api::MerchantAuthentication::ApiKey,
)

View File

@ -341,7 +341,9 @@ pub async fn payment_intent_list(
&state,
&req,
payload,
|state, merchant_account, req| payments::list_payments(&state.store, merchant_account, req),
|state, merchant_account, req| {
payments::list_payments(&*state.store, merchant_account, req)
},
api::MerchantAuthentication::ApiKey,
)
.await

View File

@ -1,4 +1,3 @@
use common_utils::custom_serde;
use serde::{Deserialize, Serialize};
use serde_json::Value;
@ -257,7 +256,7 @@ pub(crate) struct StripePaymentIntentResponse {
pub(crate) currency: String,
pub(crate) status: StripePaymentStatus,
pub(crate) client_secret: Option<Secret<String>>,
#[serde(with = "custom_serde::iso8601::option")]
#[serde(with = "common_utils::custom_serde::iso8601::option")]
pub(crate) created: Option<time::PrimitiveDateTime>,
pub(crate) customer: Option<String>,
pub(crate) refunds: Option<Vec<RefundResponse>>,

View File

@ -92,7 +92,7 @@ pub(crate) async fn refund_update(
&req,
create_refund_update_req,
|state, merchant_account, req| {
refunds::refund_update_core(&state.store, merchant_account, &refund_id, req)
refunds::refund_update_core(&*state.store, merchant_account, &refund_id, req)
},
api::MerchantAuthentication::ApiKey,
)