feat: add support for updating surcharge_applicable field intent (#2647)

This commit is contained in:
Hrithikesh
2023-10-20 15:17:10 +05:30
committed by GitHub
parent 4b64c56355
commit 949937e364
6 changed files with 76 additions and 14 deletions

View File

@ -178,6 +178,10 @@ pub enum PaymentIntentUpdate {
merchant_decision: Option<String>,
updated_by: String,
},
SurchargeApplicableUpdate {
surcharge_applicable: bool,
updated_by: String,
},
}
#[derive(Clone, Debug, Default)]
@ -386,6 +390,14 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
updated_by,
..Default::default()
},
PaymentIntentUpdate::SurchargeApplicableUpdate {
surcharge_applicable,
updated_by,
} => Self {
surcharge_applicable: Some(surcharge_applicable),
updated_by,
..Default::default()
},
}
}
}