monzo/endpoints/
who_am_i.rs

1use serde::Deserialize;
2
3use super::Endpoint;
4
5pub struct Request;
6
7impl Endpoint for Request {
8    const METHOD: reqwest::Method = reqwest::Method::GET;
9
10    fn endpoint(&self) -> &'static str {
11        "/ping/whoami"
12    }
13}
14
15/// The response returned by the [`Client::who_am_i`](crate::Client::who_am_i)
16/// method.
17#[derive(Debug, Deserialize, Clone)]
18pub struct Response {
19    /// Whether the current user is authenticated
20    pub authenticated: bool,
21
22    /// The client ID
23    pub client_id: String,
24
25    /// The unique identifier of the current user
26    pub user_id: String,
27}