tckimlikdogrulama 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tckimlikdogrulama/version.rb +1 -1
- data/lib/tckimlikdogrulama.rb +15 -13
- metadata +5 -5
data/lib/tckimlikdogrulama.rb
CHANGED
@@ -4,7 +4,21 @@ require "tckimlikdogrulama/version"
|
|
4
4
|
|
5
5
|
module Tckimlikdogrulama
|
6
6
|
|
7
|
-
module ClassMethods
|
7
|
+
module ClassMethods
|
8
|
+
|
9
|
+
def tckimlikno_dogrula(options = {})
|
10
|
+
client = Savon::Client.new("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL")
|
11
|
+
res = client.request(:tc_kimlik_no_dogrula) {soap.body = { "TCKimlikNo" => options[:identification_number], "Ad" => UnicodeUtils.upcase(options[:first_name], :tr) , "Soyad" => UnicodeUtils.upcase(options[:last_name], :tr), "DogumYili" => options[:birth_year]}}
|
12
|
+
unless res.body[:tc_kimlik_no_dogrula_response][:tc_kimlik_no_dogrula_result]
|
13
|
+
false
|
14
|
+
else
|
15
|
+
true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
module InstanceMethods
|
8
22
|
def tckimlikno_dogrula
|
9
23
|
client = Savon::Client.new("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL")
|
10
24
|
res = client.request(:tc_kimlik_no_dogrula) {soap.body = { "TCKimlikNo" => self.identification_number, "Ad" => UnicodeUtils.upcase(self.first_name, :tr) , "Soyad" => UnicodeUtils.upcase(self.last_name, :tr), "DogumYili" => self.birth_year}}
|
@@ -16,18 +30,6 @@ module Tckimlikdogrulama
|
|
16
30
|
end
|
17
31
|
end
|
18
32
|
|
19
|
-
module InstanceMethods
|
20
|
-
def tckimlikno_dogrula(options = {})
|
21
|
-
client = Savon::Client.new("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL")
|
22
|
-
res = client.request(:tc_kimlik_no_dogrula) {soap.body = { "TCKimlikNo" => options[:identification_number], "Ad" => UnicodeUtils.upcase(options[:first_name], :tr) , "Soyad" => UnicodeUtils.upcase(options[:last_name], :tr), "DogumYili" => options[:birth_year]}}
|
23
|
-
unless res.body[:tc_kimlik_no_dogrula_response][:tc_kimlik_no_dogrula_result]
|
24
|
-
false
|
25
|
-
else
|
26
|
-
true
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
33
|
def self.included(receiver)
|
32
34
|
receiver.extend ClassMethods
|
33
35
|
receiver.send :include, InstanceMethods
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tckimlikdogrulama
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-03-12 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
16
|
-
requirement: &
|
16
|
+
requirement: &70146844606620 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70146844606620
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: unicode_utils
|
27
|
-
requirement: &
|
27
|
+
requirement: &70146844606200 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70146844606200
|
36
36
|
description: Ad, Soyad, TCKimlikNo ve DogumYili ile Dogrulama Yapar
|
37
37
|
email:
|
38
38
|
- guzelmurat@gmail.com
|