Module: Targetdata::Api::Requester

Included in:
Pf
Defined in:
lib/targetdata/api/requester.rb

Instance Method Summary collapse

Instance Method Details

#get_personObject



4
5
6
7
8
9
# File 'lib/targetdata/api/requester.rb', line 4

def get_person
  response = HTTP.headers(cpf_headers).post(Targetdata::BASE_URL + '/PF/CPF', body: [@cpf].to_json)
  raise Targetdata::Errors::Unauthorized if response.status.unauthorized?
  
  response
end