Class: PayPal::SDK::Core::OpenIDConnect::DataTypes::Userinfo

Inherits:
Base show all
Includes:
RequestDataType
Defined in:
lib/paypal-sdk/core/openid_connect.rb,
lib/paypal-sdk/core/openid_connect/data_types.rb

Constant Summary collapse

PATH =
"v1/identity/openidconnect/userinfo"

Constants inherited from API::DataTypes::Base

API::DataTypes::Base::ContentKey, API::DataTypes::Base::HashOptions

Class Method Summary collapse

Methods included from RequestDataType

#api, api, client_id, client_secret, included

Methods included from SetAPI

#client_id=, #client_secret=, #set_config

Methods inherited from API::DataTypes::Base

add_attribute, add_member, array_of, #convert_array, #convert_object, define_alias_methods, #hash_key, #initialize, #member_names, members, #members, #merge!, object_of, #set, #skip_value?, snakecase, #to_hash, #value_to_hash

Methods included from Logging

#log_event, #logger, logger, logger=

Constructor Details

This class inherits a constructor from PayPal::SDK::Core::API::DataTypes::Base

Class Method Details

.get_userinfo(options = {}, http_header = {}) ⇒ Object Also known as: get


108
109
110
111
112
# File 'lib/paypal-sdk/core/openid_connect.rb', line 108

def get_userinfo(options = {}, http_header = {})
  options = { :access_token => options } if options.is_a? String
  options = options.merge( :schema => "openid" ) unless options[:schema] or options["schema"]
  Userinfo.new(api.post(PATH, options, http_header))
end

.load_membersObject


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/paypal-sdk/core/openid_connect/data_types.rb', line 20

def self.load_members
  object_of :user_id, String
  object_of :sub, String
  object_of :name, String
  object_of :given_name, String
  object_of :family_name, String
  object_of :middle_name, String
  object_of :picture, String
  object_of :email, String
  object_of :email_verified, Boolean
  object_of :gender, String
  object_of :birthday, String
  object_of :zoneinfo, String
  object_of :locale, String
  object_of :language, String
  object_of :verified, Boolean
  object_of :phone_number, String
  object_of :address, Address
  object_of :verified_account, Boolean
  object_of :account_type, String
  object_of :account_creation_date, String
  object_of :age_range, String
  object_of :payer_id, String
end