tckimlikdogrulama 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,15 +6,15 @@ module Tckimlikdogrulama
6
6
  module ClassMethods
7
7
  def tckimlikno_dogrula(options = {})
8
8
  begin
9
- cattr_accessor :first_name, :identification_number, :last_name, :birth_year
9
+ attr_accessor :first_name, :identification_number, :last_name, :birth_year
10
10
 
11
- first_name = options[:first_name]
12
- last_name = options[:last_name]
13
- identification_number = options[:identification_number]
14
- birth_year = options[:birth_year]
11
+ self.first_name = options[:first_name]
12
+ self.last_name = options[:last_name]
13
+ self.identification_number = options[:identification_number]
14
+ self.birth_year = options[:birth_year]
15
15
 
16
16
  client = Savon::Client.new("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL")
17
- res = client.request(:tc_kimlik_no_dogrula) {soap.body = { "TCKimlikNo" => identification_number, "Ad" => UnicodeUtils.upcase(first_name, :tr) , "Soyad" => UnicodeUtils.upcase(last_name, :tr), "DogumYili" => birth_year}}
17
+ 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}}
18
18
  unless res.body[:tc_kimlik_no_dogrula_response][:tc_kimlik_no_dogrula_result]
19
19
  self.errors.add(:identification_number, "Doğrulanamadı. Lütfen bilgilerinizi kontrol edip, tekrar deneyiniz.")
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Tckimlikdogrulama
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: