Class: ApiBanking::PrepaidCardService

Inherits:
Soap12Client show all
Defined in:
lib/api_banking/soap/prepaidCardService.rb

Defined Under Namespace

Modules: AddBeneficiary, GetBalance, GetBeneficiaries, GetCustomerDetail, GetTransactions, PayToAccount, PayToContact, TopUp, VerifyPIN Classes: Configuration

Constant Summary collapse

SERVICE_NAMESPACE =
'http://www.quantiguous.com/services'
SERVICE_VERSION =
1

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from SoapClient

do_remote_call, last_response

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



77
78
79
# File 'lib/api_banking/soap/prepaidCardService.rb', line 77

def configuration
  @configuration
end

Instance Attribute Details

#requestObject

Returns the value of attribute request.



7
8
9
# File 'lib/api_banking/soap/prepaidCardService.rb', line 7

def request
  @request
end

#resultObject

Returns the value of attribute result.



7
8
9
# File 'lib/api_banking/soap/prepaidCardService.rb', line 7

def result
  @result
end

Class Method Details

.addBeneficiary(env, request) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/api_banking/soap/prepaidCardService.rb', line 89

def self.addBeneficiary(env, request)
  reply = do_remote_call(env) do |xml|
    xml.addBeneficiary("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].uniqueRequestNo request.uniqueRequestNo
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].beneficiaryName request.beneficiaryName
      xml['ns'].beneficiaryAccountNo request.beneficiaryAccountNo
      xml['ns'].beneficiaryIFSC request.beneficiaryIFSC
    end
  end
  parse_reply(:addBeneficiary, reply)
end

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

Yields:



80
81
82
83
# File 'lib/api_banking/soap/prepaidCardService.rb', line 80

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

.getBalance(env, request) ⇒ Object



105
106
107
108
109
110
111
112
113
114
115
# File 'lib/api_banking/soap/prepaidCardService.rb', line 105

def self.getBalance(env, request)
  reply = do_remote_call(env) do |xml|
    xml.getBalance("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
    end
  end
  parse_reply(:getBalance, reply)
end

.getBeneficiaries(env, request) ⇒ Object



117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/api_banking/soap/prepaidCardService.rb', line 117

def self.getBeneficiaries(env, request)
  reply = do_remote_call(env) do |xml|
    xml.getBeneficiaries("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].numBeneficiaries request.numBeneficiaries
    end
  end
  parse_reply(:getBeneficiaries, reply)
end

.getCustomerDetail(env, request) ⇒ Object



130
131
132
133
134
135
136
137
138
139
140
# File 'lib/api_banking/soap/prepaidCardService.rb', line 130

def self.getCustomerDetail(env, request)
  reply = do_remote_call(env) do |xml|
    xml.getCustomerDetail("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
    end
  end
  parse_reply(:getCustomerDetail, reply)
end

.getTransactions(env, request) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/api_banking/soap/prepaidCardService.rb', line 142

def self.getTransactions(env, request)
  reply = do_remote_call(env) do |xml|
    xml.getTransactions("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].numTransactions request.numTransactions
    end
  end
  parse_reply(:getTransactions, reply)
end

.payToAccount(env, request) ⇒ Object



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/api_banking/soap/prepaidCardService.rb', line 155

def self.payToAccount(env, request)
  reply = do_remote_call(env) do |xml|
    xml.payToAccount("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].uniqueRequestNo request.uniqueRequestNo
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].encryptedPIN request.encryptedPIN
      xml['ns'].transferType request.transferType
      xml['ns'].beneficiaryName request.beneficiaryName
      xml['ns'].beneficiaryAccountNo request.beneficiaryAccountNo
      xml['ns'].beneficiaryIFSC request.beneficiaryIFSC
      xml['ns'].transferAmount request.transferAmount
      xml['ns'].remitterToBeneficiaryInfo request.remitterToBeneficiaryInfo
    end
  end
  parse_reply(:payToAccount, reply)
end

.payToContact(env, request) ⇒ Object



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/api_banking/soap/prepaidCardService.rb', line 175

def self.payToContact(env, request)
  reply = do_remote_call(env) do |xml|
    xml.payToContact("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].uniqueRequestNo request.uniqueRequestNo
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].encryptedPIN request.encryptedPIN
      xml['ns'].contactName request.contactName
      xml['ns'].contactMobileNo request.contactMobileNo
      xml['ns'].transferAmount request.transferAmount
    end
  end
  parse_reply(:payToContact, reply)
end

.topUp(env, request) ⇒ Object



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/api_banking/soap/prepaidCardService.rb', line 192

def self.topUp(env, request)
  reply = do_remote_call(env) do |xml|
    xml.topUp("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].uniqueRequestNo request.uniqueRequestNo
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].encryptedPIN request.encryptedPIN
      xml['ns'].billerID request.billerID
      xml['ns'].subscriberID request.subscriberID
      xml['ns'].topupAmount request.topupAmount
    end
  end
  parse_reply(:topUp, reply)
end

.verifyPIN(env, request) ⇒ Object



209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/api_banking/soap/prepaidCardService.rb', line 209

def self.verifyPIN(env, request)
  reply = do_remote_call(env) do |xml|
    xml.verifyPIN("xmlns:ns" => SERVICE_NAMESPACE ) do
      xml.parent.namespace = xml.parent.namespace_definitions.first
      xml['ns'].version SERVICE_VERSION
      xml['ns'].appID request.appID
      xml['ns'].mobileNo request.mobileNo
      xml['ns'].pinBlock request.pinBlock
    end
  end
  parse_reply(:verifyPIN, reply)
end