lib/unimatrix/authorization/response.rb in unimatrix-2.6.1 vs lib/unimatrix/authorization/response.rb in unimatrix-2.7.0

- old
+ new

@@ -4,17 +4,18 @@ attr_reader :code attr_reader :body attr_reader :resources - def initialize( http_response ) + def initialize( http_response, path = "" ) + @request_path = path @success = http_response.is_a?( Net::HTTPOK ) @code = http_response.code @resources = [] @body = decode_response_body( http_response ) if ( @body && @body.respond_to?( :keys ) ) - Parser.new( @body ) do | parser | + Parser.new( @body, @request_path ) do | parser | @resources = parser.resources @success = !( parser.type_name == 'error' ) end else @success = false