api_banking 0.1.32 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff155ae848735923c0535e66ebdeb10f084bd881
4
- data.tar.gz: bba1c2e152a2ddd9116b54d4e51a3ca5820bb515
3
+ metadata.gz: e0e8af2b7543aa53c59bf234a99ddecff092bd27
4
+ data.tar.gz: c8d57fb9319fa099c0c94b149fce5dedd5f2f1ad
5
5
  SHA512:
6
- metadata.gz: 3cbeb4881e01b058b30c5391b1fe6b6d1cdbcd9fd88a0542aa69768f38ceb649ae1a7cd3c27b46fda2b5b9a05684ede63fd58096305a7e51f5d3fcfb1b17ca2e
7
- data.tar.gz: 55f005d0effae979b86a535aaa81be7d90b01ba95fa695f5823e29144b154d1cee36f65b7b12370d05c710705c994080a4c057ddb93a8a800f9bef32045e4aeb
6
+ metadata.gz: 08aa15ab94f9c5a362cb38bd9a0605db472b3384662b70c875371db2b6d80ac92aca4dccab8e472d956085237442214942c9d7ad68ae5ad7a087f386a8317450
7
+ data.tar.gz: 6c9a26161c5703c460e3b3e2209ed16cc4bef166b12e27ac2658ff522669270d9fd40f08804fac2d5d29698cd797e7662e0dc8027f8445084696d3805a09d878
@@ -29,6 +29,7 @@ require_relative "api_banking/json/singlePayment"
29
29
  require_relative "api_banking/json/accountStatement"
30
30
  require_relative "api_banking/json/getAccountBalance"
31
31
  require_relative "api_banking/json/getPaymentStatus"
32
+ require_relative "api_banking/json/panInquiry"
32
33
 
33
34
  module ApiBanking
34
35
 
@@ -9,7 +9,8 @@ module ApiBanking
9
9
  SinglePayment: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/payments/corp/payment',
10
10
  AccountStatement: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/cas/statement',
11
11
  GetAccountBalance: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/accounts/balance/query',
12
- GetPaymentStatus: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/payments/corp/payment/query'
12
+ GetPaymentStatus: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/payments/corp/payment/query',
13
+ PanInquiry: 'https://apideveloper.rblbank.com/test/sb/rbl/v1/PAN/Without_User_ID'
13
14
  }
14
15
  end
15
16
  end
@@ -0,0 +1,63 @@
1
+ module ApiBanking
2
+ class PanInquiry < JsonClient
3
+
4
+ SERVICE_VERSION = 1
5
+
6
+ attr_accessor :request, :result
7
+
8
+ ReqHeader = Struct.new(:tranID, :corpID)
9
+ ReqBody = Struct.new(:panNumber)
10
+ Request = Struct.new(:header, :body)
11
+
12
+ Result = Struct.new(:panStatus, :lastName, :firstName, :middleName, :panTitle, :lastUpdateDate)
13
+
14
+ class << self
15
+ attr_accessor :configuration
16
+ end
17
+
18
+ def self.configure
19
+ self.configuration ||= Configuration.new
20
+ yield(configuration)
21
+ end
22
+
23
+ class Configuration
24
+ attr_accessor :environment, :proxy, :timeout
25
+ end
26
+
27
+ def self.pan_inquiry(env, request, callbacks = nil)
28
+ dataHash = {}
29
+ dataHash[:panInquiry] = {}
30
+ dataHash[:panInquiry][:Header] = {}
31
+ dataHash[:panInquiry][:Body] = {}
32
+
33
+ dataHash[:panInquiry][:Header][:TranID] = request.header.tranID
34
+ dataHash[:panInquiry][:Header][:Corp_ID] = request.header.corpID
35
+
36
+ dataHash[:panInquiry][:Body][:panNumbers] = []
37
+ dataHash[:panInquiry][:Body][:panNumbers][0] = {}
38
+
39
+ dataHash[:panInquiry][:Body][:panNumbers][0][:pan1] = request.body.panNumber
40
+
41
+ reply = do_remote_call(env, dataHash, callbacks)
42
+
43
+ parse_reply(reply)
44
+ end
45
+
46
+ private
47
+
48
+ def self.parse_reply(reply)
49
+ if reply.kind_of?Fault
50
+ reply
51
+ else
52
+ PanInquiry::Result.new(
53
+ reply['panInquiryResponse']['Body']['panDetails'][0]['panstatus'],
54
+ reply['panInquiryResponse']['Body']['panDetails'][0]['lastname'],
55
+ reply['panInquiryResponse']['Body']['panDetails'][0]['firstname'],
56
+ reply['panInquiryResponse']['Body']['panDetails'][0]['middlename'],
57
+ reply['panInquiryResponse']['Body']['panDetails'][0]['pan-title'],
58
+ reply['panInquiryResponse']['Body']['panDetails'][0]['last-update-date']
59
+ )
60
+ end
61
+ end
62
+ end
63
+ end
@@ -1,3 +1,3 @@
1
1
  module ApiBanking
2
- VERSION = "0.1.32"
2
+ VERSION = "0.1.33"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_banking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.32
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-20 00:00:00.000000000 Z
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -152,6 +152,7 @@ files:
152
152
  - lib/api_banking/json/getAccountBalance.rb
153
153
  - lib/api_banking/json/getPaymentStatus.rb
154
154
  - lib/api_banking/json/json_client.rb
155
+ - lib/api_banking/json/panInquiry.rb
155
156
  - lib/api_banking/json/singlePayment.rb
156
157
  - lib/api_banking/soap/aadhaarVerificationService.rb
157
158
  - lib/api_banking/soap/callbacks.rb