class DocuSign_eSign::ApiError

Attributes

code[R]
response_body[R]
response_headers[R]

Public Class Methods

new(arg = nil) click to toggle source

Usage examples:

ApiError.new
ApiError.new("message")
ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
ApiError.new(:code => 404, :message => "Not Found")
Calls superclass method
# File lib/docusign_esign/client/api_error.rb, line 21
def initialize(arg = nil)
  if arg.is_a? Hash
    if arg.key?(:message) || arg.key?('message')
      super(arg[:message] || arg['message'])
    else
      super arg
    end

    arg.each do |k, v|
      instance_variable_set "@#{k}", v
    end
  else
    super arg
  end
end