Skip to content

Commit 236b784

Browse files
chore: run formatter
1 parent 2b63245 commit 236b784

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

crates/payment_methods/src/client/list.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
use api_models::payment_methods::{
2-
CustomerPaymentMethodsListResponse as ListCustomerPaymentMethodsV1Response,
32
CustomerPaymentMethod,
3+
CustomerPaymentMethodsListResponse as ListCustomerPaymentMethodsV1Response,
44
};
55
use common_utils::{id_type, request::Method};
66
use hyperswitch_interfaces::micro_service::{MicroserviceClientError, MicroserviceClientErrorKind};
7-
use crate::types::{ModularListCustomerPaymentMethodsRequest, ModularListCustomerPaymentMethodsResponse,PaymentMethodResponseData};
7+
8+
use crate::types::{
9+
ModularListCustomerPaymentMethodsRequest, ModularListCustomerPaymentMethodsResponse,
10+
PaymentMethodResponseData,
11+
};
812

913
/// V1-facing retrieve flow type.
1014
#[derive(Debug)]
@@ -28,15 +32,16 @@ impl TryFrom<&ListCustomerPaymentMethodsV1Request> for ModularListCustomerPaymen
2832
impl TryFrom<ModularListCustomerPaymentMethodsResponse> for ListCustomerPaymentMethodsV1Response {
2933
type Error = MicroserviceClientError;
3034

31-
fn try_from(v2_response: ModularListCustomerPaymentMethodsResponse) -> Result<Self, Self::Error> {
35+
fn try_from(
36+
v2_response: ModularListCustomerPaymentMethodsResponse,
37+
) -> Result<Self, Self::Error> {
3238
let customer_payment_methods = v2_response
3339
.customer_payment_methods
3440
.into_iter()
3541
.map(|pm| CustomerPaymentMethod {
3642
payment_token: pm.id.clone(),
3743
payment_method_id: pm.id,
38-
customer_id: pm
39-
.customer_id,
44+
customer_id: pm.customer_id,
4045
payment_method: pm.payment_method_type,
4146
payment_method_type: Some(pm.payment_method_subtype),
4247
payment_method_issuer: None,

crates/payment_methods/src/types.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
use api_models::payment_methods::{
2-
CardDetailFromLocker,
3-
};
4-
use hyperswitch_domain_models::payment_method_data::NetworkTokenDetailsPaymentMethod;
1+
use api_models::payment_methods::CardDetailFromLocker;
52
use common_enums::{PaymentMethod, PaymentMethodType};
6-
use common_utils::{id_type};
3+
use common_utils::id_type;
4+
use hyperswitch_domain_models::payment_method_data::NetworkTokenDetailsPaymentMethod;
75
use serde::Deserialize;
86
use time::PrimitiveDateTime;
97
#[derive(Clone, Debug)]
@@ -43,4 +41,4 @@ pub enum PaymentMethodResponseData {
4341
#[derive(Clone, Debug, Deserialize)]
4442
pub struct NetworkTokenResponse {
4543
pub payment_method_data: NetworkTokenDetailsPaymentMethod,
46-
}
44+
}

0 commit comments

Comments
 (0)