pub fn retrieve_customer(&self, phone_number: &str) -> Result<String, Error> {
        let response_json = &self
            .sign_and_send::<String>(
                ureq::get(&format!(
                    "https://authservices.satispay.com/g_business/v1/consumers/{}",
                    phone_number
                )),
                None,
            )
            .into_string()
            .map_err(|_| Error::HTTPError)?;
        let response: std::collections::HashMap<String, &str> =
            serde_json::from_str(&response_json)
                .map_err(|_| errorize(serde_json::from_str::<SatispayError>(&response_json)))?;
        Ok(response.get("id").unwrap().to_string())
    }
/// API to retrieve a customer uid from the phone number
API to retrieve a customer uid from the phone number
API to retrieve a customer uid from the phone number
pub fn retrieve_customer(&self, phone_number: &str) -> Result<String, Error> {
        let response_json = &self
            .sign_and_send::<String>(
                ureq::get(&format!(
                    "https://authservices.satispay.com/g_business/v1/consumers/{}",
                    phone_number
                )),
                None,
            )
            .into_string()
            .map_err(|_| Error::HTTPError)?;
        let response: std::collections::HashMap<String, &str> =
            serde_json::from_str(&response_json)
                .map_err(|_| errorize(serde_json::from_str::<SatispayError>(&response_json)))?;
        Ok(response.get("id").unwrap().to_string())
    }
pub fn retrieve_customer ( & self , phone_number : & str ) -> Result < String , Error > { let response_json = & self . sign_and_send :: < String > ( ureq :: get ( & format ! ( " " phone_number ) ) , None , ) . into_string ( ) . map_err ( | _ | Error :: HTTPError ) ? ; let response : std :: collections :: HashMap < String , & str > = serde_json :: from_str ( & response_json ) . map_err ( | _ | errorize ( serde_json :: from_str :: < SatispayError > ( & response_json ) ) ) ? ; Ok ( response . get ( " " ) . unwrap ( ) . to_string ( ) ) }
API to retrieve a customer uid from the phone number
API to retrieve a customer uid from the phone number
&self
phone_number
&str
&self
phone_number
&str