Sha256: 1b622184a0716e238321f3ff5297027711557b5a4e2c7e46ad31c22f725ac219

Contents?: true

Size: 914 Bytes

Versions: 1

Compression:

Stored size: 914 Bytes

Contents

# encoding: utf-8

require 'mernis/version'
require 'mernis/request'

class Mernis
  # 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: 'https://somecustomwsdl.com' )

  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mernis-1.0.5 lib/mernis.rb