Class: SmartId::Api::Authentication::IdentityNumber

Inherits:
Base
  • Object
show all
Defined in:
lib/smart_id/api/authentication/identity_number.rb

Constant Summary collapse

BASE_URI =
"authentication/pno"

Instance Attribute Summary

Attributes inherited from Base

#authentication_hash

Instance Method Summary collapse

Methods inherited from Base

authenticate, #call

Constructor Details

#initialize(**opts) ⇒ IdentityNumber

Returns a new instance of IdentityNumber.

Parameters:

  • country:

    2 character ISO 3166-1 alpha-2 format(for example EE, LT, LV, KZ)

  • identity_number:

    national identity number of the individuals



11
12
13
14
15
16
17
18
19
20
# 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