use std::collections::HashMap;
use crate::error::TombaError;
use crate::tomba::{Tomba, TombaResponse};
impl Tomba {
pub fn phone_finder(
&self,
email: &str,
webhook_url: Option<&str>,
) -> Result<TombaResponse, TombaError> {
let mut params = HashMap::new();
params.insert("email".into(), email.into());
if let Some(v) = webhook_url {
params.insert("webhook_url".into(), v.into());
}
self.call("GET", "phone-finder", ¶ms)
}
pub fn phone_validator(
&self,
phone: &str,
) -> Result<TombaResponse, TombaError> {
let mut params = HashMap::new();
params.insert("phone".into(), phone.into());
self.call("GET", "phone-validator", ¶ms)
}
}