Class: Credigy::LoginResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/credigy/login_response.rb

Instance Attribute Summary

Attributes inherited from Response

#raw_response, #requester

Instance Method Summary collapse

Methods inherited from Response

#body, #initialize, #root_key, #sub_root_key

Constructor Details

This class inherits a constructor from Credigy::Response

Instance Method Details

#authorization_tokenObject



9
10
11
12
13
# File 'lib/credigy/login_response.rb', line 9

def authorization_token
  return body[:authorization_token] if body[:authorization_token]

  raise "Token não gerado: #{raw_response.body}"
end

#nameObject



5
6
7
# File 'lib/credigy/login_response.rb', line 5

def name
  body[:name].strip
end