class Telesignature::TelesignError

Attributes

data[RW]
    • Attributes

    -

    • `data`

    • The data returned by the service, in a dictionary form.

    • `http_response`

    • The full HTTP Response object, including the HTTP status code, headers, and raw returned data.

errors[RW]
    • Attributes

    -

    • `data`

    • The data returned by the service, in a dictionary form.

    • `http_response`

    • The full HTTP Response object, including the HTTP status code, headers, and raw returned data.

headers[RW]
    • Attributes

    -

    • `data`

    • The data returned by the service, in a dictionary form.

    • `http_response`

    • The full HTTP Response object, including the HTTP status code, headers, and raw returned data.

status[RW]
    • Attributes

    -

    • `data`

    • The data returned by the service, in a dictionary form.

    • `http_response`

    • The full HTTP Response object, including the HTTP status code, headers, and raw returned data.

Public Class Methods

new(response_json, http_response) click to toggle source
Calls superclass method
# File lib/telesignature/telesign_error.rb, line 14
def initialize response_json, http_response
  @errors = response_json['errors']
  @headers = http_response.headers
  @status = http_response.status
  @data = http_response.body
  super()
end

Public Instance Methods

to_s() click to toggle source
# File lib/telesignature/telesign_error.rb, line 22
def to_s
  @errors.inject(''){|ret, x| ret += "#{x['description']}\n" }
end