refactor(stripe): return all the missing fields in a request (#935)

Co-authored-by: jeeva <jeeva.ramu@codurance.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
Co-authored-by: ItsMeShashank <sattarde9913@gmail.com>
This commit is contained in:
Jeeva
2023-05-02 21:26:52 +01:00
committed by GitHub
parent 4e0489cf1c
commit e9fc34ff62
9 changed files with 315 additions and 28 deletions

View File

@ -51,3 +51,18 @@ macro_rules! async_spawn {
tokio::spawn(async move { $t });
};
}
#[macro_export]
macro_rules! collect_missing_value_keys {
[$(($key:literal, $option:expr)),+] => {
{
let mut keys: Vec<&'static str> = Vec::new();
$(
if $option.is_none() {
keys.push($key);
}
)*
keys
}
};
}