Class: ApiBanking::PanInquiry

Inherits:
JsonClient show all
Defined in:
lib/api_banking/json/panInquiry.rb

Defined Under Namespace

Classes: Configuration, ReqBody, ReqHeader, Request, Result

Constant Summary collapse

SERVICE_VERSION =
1

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from JsonClient

do_remote_call

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



15
16
17
# File 'lib/api_banking/json/panInquiry.rb', line 15

def configuration
  @configuration
end

Instance Attribute Details

#requestObject

Returns the value of attribute request.



6
7
8
# File 'lib/api_banking/json/panInquiry.rb', line 6

def request
  @request
end

#resultObject

Returns the value of attribute result.



6
7
8
# File 'lib/api_banking/json/panInquiry.rb', line 6

def result
  @result
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



18
19
20
21
# File 'lib/api_banking/json/panInquiry.rb', line 18

def self.configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

.pan_inquiry(env, request, callbacks = nil) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/api_banking/json/panInquiry.rb', line 27

def self.pan_inquiry(env, request, callbacks = nil)
  dataHash = {}
  dataHash[:panInquiry] = {}
  dataHash[:panInquiry][:Header] = {}
  dataHash[:panInquiry][:Body] = {}

  dataHash[:panInquiry][:Header][:TranID] = request.header.tranID
  dataHash[:panInquiry][:Header][:Corp_ID] = request.header.corpID

  dataHash[:panInquiry][:Body][:panNumbers] = []
  dataHash[:panInquiry][:Body][:panNumbers][0] = {}
  
  dataHash[:panInquiry][:Body][:panNumbers][0][:pan1] = request.body.panNumber

  reply = do_remote_call(env, dataHash, callbacks)

  parse_reply(reply)
end