Class: Mernis

Inherits:
Object
  • Object
show all
Defined in:
lib/mernis.rb,
lib/mernis/version.rb

Constant Summary collapse

VERSION =
'1.0.4'.freeze

Class Method Summary collapse

Class Method Details

.sorgula(id_number, first_name, last_name, birth_year, version = 2, open_timeout = 60, read_timeout = 60, log = true, wsdl = 'https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL') ⇒ Object

Most basic usage: Mernis.sorgula(“12345”, “John”, “Doe”, “1990”) Advanced usage: Mernis.sorgula(id_number=“12345”, first_name=“John”, last_name=“Doe”, birth_year=“1990”, version = 2, log = false) Full usage: Mernis.sorgula(id_number=“12345”, first_name=“John”, last_name=“Doe”, birth_year=“1990”, version = 2, open_timeout = 60, read_timeout = 60, log = false, wsdl: ‘somecustomwsdl.com’ )



17
18
19
20
21
22
23
24
# File 'lib/mernis.rb', line 17

def self.sorgula(id_number, first_name, last_name, birth_year,
                 version = 2, open_timeout = 60, read_timeout = 60, log = true,
                 wsdl = 'https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL')
  response = Request.new(
    id_number, first_name, last_name, birth_year, version, open_timeout, read_timeout, log, wsdl
  )
  response.sorgula
end