Class: IdentityApiClient::Member

Inherits:
Base
  • Object
show all
Defined in:
lib/identity-api-client/member.rb

Instance Method Summary collapse

Instance Method Details

#details(guid: nil, email: nil, load_current_consents: false) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/identity-api-client/member.rb', line 3

def details(guid: nil, email: nil, load_current_consents: false)
  if guid.present?
    params = {'guid' => guid, 'api_token' => client.connection.configuration.options[:api_token]}
  elsif email.present?
    params = {'email' => email, 'api_token' => client.connection.configuration.options[:api_token]}
  else
    raise "Must have one of guid or email"
  end

  if load_current_consents
    params['load_current_consents'] = true
  end

  resp = client.post_request('/api/member/details', params)
  resp.body
end