mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +08:00
feat(router): implement PaymentMethodInterface for MockDB (#1535)
This commit is contained in:
committed by
GitHub
parent
0bc1e043fe
commit
772fc84577
@ -105,6 +105,14 @@ pub struct PaymentMethodUpdateInternal {
|
||||
metadata: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl PaymentMethodUpdateInternal {
|
||||
pub fn create_payment_method(self, source: PaymentMethod) -> PaymentMethod {
|
||||
let metadata = self.metadata.map(Secret::new);
|
||||
|
||||
PaymentMethod { metadata, ..source }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PaymentMethodUpdate> for PaymentMethodUpdateInternal {
|
||||
fn from(payment_method_update: PaymentMethodUpdate) -> Self {
|
||||
match payment_method_update {
|
||||
|
||||
Reference in New Issue
Block a user