Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.openidconnect;
  
  import java.util.HashMap;
  
Class Userinfo
 
 public class Userinfo extends PayPalResource{

Subject - Identifier for the End-User at the Issuer.
 
 	private String userId;

Subject - Identifier for the End-User at the Issuer.
 
 	private String sub;

End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
 
 	private String name;

Given name(s) or first name(s) of the End-User
 
 	private String givenName;

Surname(s) or last name(s) of the End-User.
 
 	private String familyName;

Middle name(s) of the End-User.
 
 	private String middleName;

URL of the End-User's profile picture.
 
 	private String picture;

End-User's preferred e-mail address.
 
 	private String email;

True if the End-User's e-mail address has been verified; otherwise false.
 
 	private Boolean emailVerified;

End-User's gender.
 
 	private String gender;

End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
 
 	private String birthdate;

Time zone database representing the End-User's time zone
 
 	private String zoneinfo;

End-User's locale.
 
 	private String locale;

End-User's preferred telephone number.
 
 	private String phoneNumber;

End-User's preferred address.
 
 	private Address address;

Verified account status.
 
 	private Boolean verifiedAccount;

Account type.
	private String accountType;

Account holder age range.
	private String ageRange;

Account payer identifier.
	private String payerId;

Default Constructor
	public Userinfo() {
	}

Setter for userId
	public void setUserId(String userId) {
		this. = userId;
 	}
 
 
Getter for userId
	public String getUserId() {
		return this.;
	}

Setter for sub
	public void setSub(String sub) {
		this. = sub;
 	}
 
 
Getter for sub
	public String getSub() {
		return this.;
	}

Setter for name
	public void setName(String name) {
		this. = name;
 	}
 
 
Getter for name
	public String getName() {
		return this.;
	}

Setter for givenName
	public void setGivenName(String givenName) {
		this. = givenName;
 	}
 
 
Getter for givenName
	public String getGivenName() {
		return this.;
	}

Setter for familyName
	public void setFamilyName(String familyName) {
		this. = familyName;
 	}
 
 
Getter for familyName
	public String getFamilyName() {
		return this.;
	}

Setter for middleName
	public void setMiddleName(String middleName) {
		this. = middleName;
 	}
 
 
Getter for middleName
	public String getMiddleName() {
		return this.;
	}

Setter for picture
	public void setPicture(String picture) {
		this. = picture;
 	}
 
 
Getter for picture
	public String getPicture() {
		return this.;
	}

Setter for email
	public void setEmail(String email) {
		this. = email;
 	}
 
 
Getter for email
	public String getEmail() {
		return this.;
	}

Setter for emailVerified
	public void setEmailVerified(Boolean emailVerified) {
		this. = emailVerified;
 	}
 
 
Getter for emailVerified
		return this.;
	}

Setter for gender
	public void setGender(String gender) {
		this. = gender;
 	}
 
 
Getter for gender
	public String getGender() {
		return this.;
	}

Setter for birthdate
	public void setBirthdate(String birthdate) {
		this. = birthdate;
 	}
 
 
Getter for birthdate
	public String getBirthdate() {
		return this.;
	}

Setter for zoneinfo
	public void setZoneinfo(String zoneinfo) {
		this. = zoneinfo;
 	}
 
 
Getter for zoneinfo
	public String getZoneinfo() {
		return this.;
	}

Setter for locale
	public void setLocale(String locale) {
		this. = locale;
 	}
 
 
Getter for locale
	public String getLocale() {
		return this.;
	}

Setter for phoneNumber
	public void setPhoneNumber(String phoneNumber) {
		this. = phoneNumber;
 	}
 
 
Getter for phoneNumber
	public String getPhoneNumber() {
		return this.;
	}

Setter for address
	public void setAddress(Address address) {
		this. = address;
 	}
 
 
Getter for address
	public Address getAddress() {
		return this.;
	}

Setter for verifiedAccount
	public void setVerifiedAccount(Boolean verifiedAccount) {
		this. = verifiedAccount;
 	}
 
 
Getter for verifiedAccount
		return this.;
	}

Setter for accountType

Parameters:
accountType
	public void setAccountType(String accountType) {
		this. = accountType;
 	}
 
 
Getter for accountType
	public String getAccountType() {
		return this.;
	}

Setter for ageRange
	public void setAgeRange(String ageRange) {
		this. = ageRange;
 	}
 
 
Getter for ageRange
	public String getAgeRange() {
		return this.;
	}

Setter for payerId
	public void setPayerId(String payerId) {
		this. = payerId;
 	}
 
 
Getter for payerId
	public String getPayerId() {
		return this.;
	}


Returns user details

Parameters:
accessToken access token
Returns:
Userinfo
Throws:
com.paypal.base.rest.PayPalRESTException
	public static Userinfo getUserinfo(String accessToken)
		..println("accessToken=" + accessToken);
		String resourcePath = "v1/identity/openidconnect/userinfo?schema=openid";
		String payLoad = "";
		APIContext apiContext = new APIContext(accessToken);
		HashMap<StringStringhttpHeaders = new HashMap<StringString>();
		if (!accessToken.startsWith("Bearer ")) {
			accessToken = "Bearer " + accessToken;
		}
		httpHeaders.put(.accessToken);
		apiContext.setHTTPHeaders(httpHeaders);
		return configureAndExecute(apiContext.,
				resourcePathpayLoadUserinfo.class);
	}

Returns user details

Parameters:
apiContext com.paypal.base.rest.APIContext to be used for the call.
Returns:
Userinfo
Throws:
com.paypal.base.rest.PayPalRESTException
	public static Userinfo getUserinfo(APIContext apiContextthrows PayPalRESTException {
		return getUserinfo(apiContext.getAccessToken());
	}
New to GrepCode? Check out our FAQ X