paypal_rust/resources/
user_info.rs

1use crate::resources::address::Address;
2use crate::resources::email::Email;
3use serde::{Deserialize, Serialize};
4
5#[derive(Clone, Debug, Default, Deserialize, Serialize)]
6pub struct UserInfo {
7    /// The Private Personal Identifier (PPID) that is unique for the end user and Relying Party.
8    pub user_id: String,
9
10    /// The full name of the user. Includes all name parts, including titles and suffixes.
11    /// The user's locale and preferences determine the syntax.
12    pub name: String,
13
14    /// The given, or first, name of the user.
15    pub given_name: String,
16
17    /// The surname or family name of the user. Also known as the last name. Used also to store multiple surnames including the matronymic,
18    /// or mother's, surname.+
19    pub family_name: String,
20
21    /// The end user's external PayPal account ID. Returned only if the access_token
22    /// has the https://uri.paypal.com/services/paypalattributes scope.
23    pub payer_id: String,
24
25    /// The end-user's preferred address.
26    pub address: Address,
27
28    /// The end user’s PayPal account status. Indicates whether the account is verified or not.
29    pub verified_account: String,
30
31    /// An array of email addresses for the user.
32    pub emails: Vec<Email>,
33}