Class: Google::Apis::Oauth2V2::Userinfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/oauth2_v2/classes.rb,
generated/google/apis/oauth2_v2/representations.rb,
generated/google/apis/oauth2_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Userinfo

Returns a new instance of Userinfo.



144
145
146
# File 'generated/google/apis/oauth2_v2/classes.rb', line 144

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#emailString

The user's email address. Corresponds to the JSON property email

Returns:

  • (String)


90
91
92
# File 'generated/google/apis/oauth2_v2/classes.rb', line 90

def email
  @email
end

#family_nameString

The user's last name. Corresponds to the JSON property family_name

Returns:

  • (String)


95
96
97
# File 'generated/google/apis/oauth2_v2/classes.rb', line 95

def family_name
  @family_name
end

#genderString

The user's gender. Corresponds to the JSON property gender

Returns:

  • (String)


100
101
102
# File 'generated/google/apis/oauth2_v2/classes.rb', line 100

def gender
  @gender
end

#given_nameString

The user's first name. Corresponds to the JSON property given_name

Returns:

  • (String)


105
106
107
# File 'generated/google/apis/oauth2_v2/classes.rb', line 105

def given_name
  @given_name
end

#hdString

The hosted domain e.g. example.com if the user is Google apps user. Corresponds to the JSON property hd

Returns:

  • (String)


110
111
112
# File 'generated/google/apis/oauth2_v2/classes.rb', line 110

def hd
  @hd
end

#idString

The obfuscated ID of the user. Corresponds to the JSON property id

Returns:

  • (String)


115
116
117
# File 'generated/google/apis/oauth2_v2/classes.rb', line 115

def id
  @id
end

URL of the profile page. Corresponds to the JSON property link

Returns:

  • (String)


120
121
122
# File 'generated/google/apis/oauth2_v2/classes.rb', line 120

def link
  @link
end

#localeString

The user's preferred locale. Corresponds to the JSON property locale

Returns:

  • (String)


125
126
127
# File 'generated/google/apis/oauth2_v2/classes.rb', line 125

def locale
  @locale
end

#nameString

The user's full name. Corresponds to the JSON property name

Returns:

  • (String)


130
131
132
# File 'generated/google/apis/oauth2_v2/classes.rb', line 130

def name
  @name
end

#pictureString

URL of the user's picture image. Corresponds to the JSON property picture

Returns:

  • (String)


135
136
137
# File 'generated/google/apis/oauth2_v2/classes.rb', line 135

def picture
  @picture
end

#verified_emailBoolean Also known as: verified_email?

Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address. Corresponds to the JSON property verified_email

Returns:

  • (Boolean)


141
142
143
# File 'generated/google/apis/oauth2_v2/classes.rb', line 141

def verified_email
  @verified_email
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'generated/google/apis/oauth2_v2/classes.rb', line 149

def update!(**args)
  @email = args[:email] if args.key?(:email)
  @family_name = args[:family_name] if args.key?(:family_name)
  @gender = args[:gender] if args.key?(:gender)
  @given_name = args[:given_name] if args.key?(:given_name)
  @hd = args[:hd] if args.key?(:hd)
  @id = args[:id] if args.key?(:id)
  @link = args[:link] if args.key?(:link)
  @locale = args[:locale] if args.key?(:locale)
  @name = args[:name] if args.key?(:name)
  @picture = args[:picture] if args.key?(:picture)
  @verified_email = args[:verified_email] if args.key?(:verified_email)
end