Exception: PandaDoc::FailureResult

Inherits:
StandardError
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/panda_doc/failure_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ FailureResult

Returns a new instance of FailureResult.



13
14
15
16
# File 'lib/panda_doc/failure_result.rb', line 13

def initialize(response)
  @response = response
  @error = Objects::Error.new(response.body)
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



9
10
11
# File 'lib/panda_doc/failure_result.rb', line 9

def error
  @error
end

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/panda_doc/failure_result.rb', line 11

def response
  @response
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/panda_doc/failure_result.rb', line 18

def to_s
  "#{status} #{type}: #{detail}"
end