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

@ -77,11 +77,20 @@ pub enum QrCodeError {
}
/// Api Models construction error
#[derive(Debug, Clone, thiserror::Error, PartialEq, Eq)]
pub enum ApiModelsError {
#[derive(Debug, Clone, thiserror::Error, PartialEq)]
pub enum PercentageError {
/// Percentage Value provided was invalid
#[error("Invalid Percentage value")]
InvalidPercentageValue,
/// Error occurred while calculating percentage
#[error("Failed apply percentage of {percentage} on {amount}")]
UnableToApplyPercentage {
/// percentage value
percentage: f32,
/// amount value
amount: i64,
},
}
/// Allows [error_stack::Report] to change between error contexts