Exception: SyncwiseApi::Errors::ApiErrorCode

Inherits:
SyncwiseError show all
Defined in:
lib/syncwise_api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resp, request, header, body) ⇒ ApiErrorCode

Returns a new instance of ApiErrorCode.



81
82
83
84
85
86
87
# File 'lib/syncwise_api/errors.rb', line 81

def initialize(resp, request, header, body)
  @resp = resp
  @request = request
  @header = header
  @body = body
  super("Api call returned a Syncwise Error Code. Response: #{@resp}, request: #{@request}, header: #{@header}, body: #{@body}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



89
90
91
# File 'lib/syncwise_api/errors.rb', line 89

def body
  @body
end

#headerObject (readonly)

Returns the value of attribute header.



89
90
91
# File 'lib/syncwise_api/errors.rb', line 89

def header
  @header
end

#requestObject (readonly)

Returns the value of attribute request.



89
90
91
# File 'lib/syncwise_api/errors.rb', line 89

def request
  @request
end

#respObject (readonly)

Returns the value of attribute resp.



89
90
91
# File 'lib/syncwise_api/errors.rb', line 89

def resp
  @resp
end