Class: Altcha::ServerSignatureVerificationData

Inherits:
Object
  • Object
show all
Defined in:
lib/altcha.rb

Overview

Class for verifying server signatures, containing various data points.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#classificationObject

Returns the value of attribute classification.



144
145
146
# File 'lib/altcha.rb', line 144

def classification
  @classification
end

#countryObject

Returns the value of attribute country.



144
145
146
# File 'lib/altcha.rb', line 144

def country
  @country
end

#detected_languageObject

Returns the value of attribute detected_language.



144
145
146
# File 'lib/altcha.rb', line 144

def detected_language
  @detected_language
end

#emailObject

Returns the value of attribute email.



144
145
146
# File 'lib/altcha.rb', line 144

def email
  @email
end

#expireObject

Returns the value of attribute expire.



144
145
146
# File 'lib/altcha.rb', line 144

def expire
  @expire
end

#fieldsObject

Returns the value of attribute fields.



144
145
146
# File 'lib/altcha.rb', line 144

def fields
  @fields
end

#fields_hashObject

Returns the value of attribute fields_hash.



144
145
146
# File 'lib/altcha.rb', line 144

def fields_hash
  @fields_hash
end

#ip_addressObject

Returns the value of attribute ip_address.



144
145
146
# File 'lib/altcha.rb', line 144

def ip_address
  @ip_address
end

#reasonsObject

Returns the value of attribute reasons.



144
145
146
# File 'lib/altcha.rb', line 144

def reasons
  @reasons
end

#scoreObject

Returns the value of attribute score.



144
145
146
# File 'lib/altcha.rb', line 144

def score
  @score
end

#timeObject

Returns the value of attribute time.



144
145
146
# File 'lib/altcha.rb', line 144

def time
  @time
end

#verifiedObject

Returns the value of attribute verified.



144
145
146
# File 'lib/altcha.rb', line 144

def verified
  @verified
end

Instance Method Details

#to_json(options = {}) ⇒ String

Converts the ServerSignatureVerificationData object to a JSON string.

Parameters:

  • options (Hash) (defaults to: {})

    options to customize JSON encoding.

Returns:

  • (String)

    JSON representation of the ServerSignatureVerificationData object.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/altcha.rb', line 150

def to_json(options = {})
  {
    classification: @classification,
    country: @country,
    detectedLanguage: @detected_language,
    email: @email,
    expire: @expire,
    fields: @fields,
    fieldsHash: @fields_hash,
    ipAddress: @ip_address,
    reasons: @reasons,
    score: @score,
    time: @time,
    verified: @verified
  }.to_json(options)
end