class GVIVE::Identity::Driver

Attributes

fullname[RW]

Public Class Methods

new(coc, fullname, photo = false, signature = false) click to toggle source

Certificate of Competence required Fullname of card holder as it appears on the card Optionally specify whether you want to return a Base64Encoded Photo Optionally specify whether you want to return a Base64Encoded signature @param [String] coc @param [String] fullname @param [Boolean] photo @param [Boolean] signature

Calls superclass method GVIVE::Identities::new
# File lib/gvive/identity/driver.rb, line 14
def initialize(coc, fullname, photo = false, signature = false)
  super(coc, photo, signature)
  @fullname = fullname
end

Public Instance Methods

valid?() click to toggle source

Implementing valid? method signature as described in Identity Class

# File lib/gvive/identity/driver.rb, line 20
def valid?
  @response = gvive_request(driver_endpoint, id_params({ coc: @id, fname: @fullname}))
  @data = @response.to_o
  @data.picture = @data.driver_image # Make API uniform
  @data.signature = @data.driver_signature # Make API Uniform
  @response.success?
end