class SmartId::Api::Authentication::IdentityNumber

Constants

BASE_URI

Public Class Methods

new(**opts) click to toggle source

@param country: 2 character ISO 3166-1 alpha-2 format(for example EE, LT, LV, KZ) @param identity_number: national identity number of the individuals

Calls superclass method SmartId::Api::Authentication::Base::new
# File lib/smart_id/api/authentication/identity_number.rb, line 11
def initialize(**opts)
  @country = opts[:country].upcase
  @identity_number = opts[:identity_number]

  unless @country && @identity_number
    raise InvalidParamsError
  end

  super(**opts)
end

Private Instance Methods

api_uri() click to toggle source
# File lib/smart_id/api/authentication/identity_number.rb, line 24
def api_uri
  "#{BASE_URI}/#{@country}/#{@identity_number}"
end