Parent

Methods

Simplify::BadRequestException::FieldError

A single error on a field of an API request.

Attributes

errorCode[R]

The code for the field error.

fieldName[R]

The name of the field with the error.

message[R]

Description of the error.

Public Class Methods

new(errorData) click to toggle source
# File lib/simplify/apiexception.rb, line 99
def initialize(errorData)
    @fieldName = errorData['field']
    @errorCode = errorData['code']
    @message = errorData['message']        
end

Public Instance Methods

to_s() click to toggle source

Returns string representation of the error.

# File lib/simplify/apiexception.rb, line 106
def to_s()
    return "Field error: #{@fieldName} \"#{@message}\" (#{@errorCode})"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.