Skip to content

Commit

Permalink
Parametre ismini tc olarak değiştir
Browse files Browse the repository at this point in the history
  • Loading branch information
isubas committed Sep 28, 2020
1 parent 9fb3791 commit a9b415d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/kps/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(id_number)
open_timeout: Kps.configuration.open_timeout,
read_timeout: Kps.configuration.read_timeout
)
@params = { KimlikNo: id_number.to_s }
@params = { tc: id_number.to_s }
end

def identity
Expand All @@ -28,8 +28,8 @@ def address

def get(operation)
response = @client.call(operation, message: @params)
uyruk = (@params[:KimlikNo][0] == '9' ? 'yu' : 'tc')
domain = operation == :sorgula ? 'identity' : 'address'
uyruk = @params[:tc][0] == '9' ? 'yu' : 'tc'
domain = operation == :sorgula ? 'identity' : 'address'
response = Kps::Response.new(response.body, uyruk, domain)
raise Kps::InvalidResponse, 'Gecersiz data' unless response.valid?
response.standardization
Expand Down
2 changes: 1 addition & 1 deletion lib/kps/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Kps
VERSION = '0.1.0'.freeze
VERSION = '0.3.0'.freeze
end

0 comments on commit a9b415d

Please sign in to comment.