api_banking 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7107dd7904bb9ed9f573ce850b9846b04510b7e3
4
- data.tar.gz: e7b33ec5f8128a88867c6c6a60a79c97e2b4568c
3
+ metadata.gz: d3321364843893705a6ce9070be44f6f3d6e513c
4
+ data.tar.gz: d3069b0863bb5b5f44927f8b67337e59205aece4
5
5
  SHA512:
6
- metadata.gz: 4e34438359c47cea02abde59f044e63955056e4d00d3d79744b70c8fc7159dd3bbaa5415701e847d53514c8069be180ffd56112a814a1cfdb8acf03fadb03c64
7
- data.tar.gz: 420f29c734c8f7edc5f2063f49e8b4425b657d5ec93c314c0ebeea714e954901b0eafc9d260bfeea5147c52e9ae26e56a33fbbbe3dd34a67dbfb859fbbe09ef7
6
+ metadata.gz: 86bc18b7ddb24115c99ad19e9fc123239e6ff55edd6da5c6b88b6f1d07a7806f8a7f9ab197081c6365640f89fdfbc466b0dd8d2ffd9b0e6531ffe4b277132fa2
7
+ data.tar.gz: c2a5db135b6ebb5733252b68e806d20afa29479afcf48fdd0916ec45414d948a1ba45e76baf367f5c680e7a35fb58da75beb8c4996ccaf22f90093f9d80aff10
data/lib/api_banking.rb CHANGED
@@ -14,6 +14,10 @@ require_relative "api_banking/soap/instantMoneyTransferService"
14
14
  require_relative "api_banking/soap/domesticRemittanceByPartnerService"
15
15
  require_relative "api_banking/soap/notificationService"
16
16
  require_relative "api_banking/soap/instantCreditService"
17
+ require_relative "api_banking/soap/prepaidCardManagementService"
18
+ require_relative "api_banking/soap/prepaidCardService"
19
+ require_relative "api_banking/soap/socialBankingService"
20
+ require_relative "api_banking/soap/virtualCardManagementService"
17
21
 
18
22
  require_relative "api_banking/json/json_client"
19
23
  require_relative "api_banking/json/singlePayment"
@@ -10,7 +10,11 @@ module ApiBanking
10
10
  InstantMoneyTransferService: 'https://api.quantiguous.com/IMTService',
11
11
  DomesticRemittanceByPartnerService: 'https://api.quantiguous.com/DomesticRemittanceByPartnerService',
12
12
  NotificationService: 'https://api.quantiguous.com/NotificationService',
13
- InstantCreditService: 'https://api.quantiguous.com/InstantCreditService'
13
+ InstantCreditService: 'https://api.quantiguous.com/InstantCreditService',
14
+ PrepaidCardManagementService: 'https://api.quantiguous.com/PrepaidCardManagementService',
15
+ PrepaidCardService: 'https://api.quantiguous.com/PrepaidCardService',
16
+ SocialBankingService: 'https://api.quantiguous.com/SocialBankingService',
17
+ VirtualCardManagementService: 'https://api.quantiguous.com/VirtualCardManagementService'
14
18
  }
15
19
  end
16
20
  end
@@ -7,7 +7,12 @@ module ApiBanking
7
7
  self.endpoints = {
8
8
  FundsTransferByCustomerService: 'https://uatsky.yesbank.in/app/uat/fundsTransferByCustomerServiceHttpService',
9
9
  FundsTransferByCustomerService2: 'https://uatsky.yesbank.in/app/uat/ssl/fundsTransferByCustomerSevice2',
10
- InstantMoneyTransferService: 'https://uatsky.yesbank.in:7081/IMTService'
10
+ InstantMoneyTransferService: 'https://uatsky.yesbank.in:7081/IMTService',
11
+ InstantCreditService: 'https://uatsky.yesbank.in/app/uat/ssl/InstantCreditService',
12
+ PrepaidCardManagementService: 'https://uatsky.yesbank.in:7081/PrepaidCardManagementService',
13
+ PrepaidCardService: 'https://uatsky.yesbank.in:7081/PrepaidCardService',
14
+ SocialBankingService: 'https://uatsky.yesbank.in/app/uat/SocialBankingServiceHttpService',
15
+ VirtualCardManagementService: 'https://uatsky.yesbank.in/app/uat/VirtualCardManagementService'
11
16
  }
12
17
  end
13
18
  end
@@ -0,0 +1,150 @@
1
+ module ApiBanking
2
+ class PrepaidCardManagementService < SoapClient
3
+
4
+ SERVICE_NAMESPACE = 'http://www.quantiguous.com/services'
5
+ SERVICE_VERSION = 1
6
+
7
+ attr_accessor :request, :result
8
+
9
+ #blockCard
10
+ module BlockCard
11
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :mobileNo)
12
+
13
+ Result = Struct.new(:version, :uniqueResponseNo)
14
+ end
15
+
16
+ #loadCard
17
+ module LoadCard
18
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :customerID, :debitAccountNo, :mobileNo, :loadAmount)
19
+
20
+ Result = Struct.new(:version, :uniqueResponseNo)
21
+ end
22
+
23
+ #registerCard
24
+ module RegisterCard
25
+ IDDocument = Struct.new(:documentType, :documentNo, :countryOfIssue)
26
+ Address = Struct.new(:addressLine1, :addressLine2, :city, :state, :country, :postalCode)
27
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :title, :firstName, :lastName, :preferredName, :mobileNo, :gender, :nationality, :birthDate, :idDocument, :address, :proxyCardNumber, :productCode)
28
+
29
+ Result = Struct.new(:version, :uniqueResponseNo)
30
+ end
31
+
32
+ class << self
33
+ attr_accessor :configuration
34
+ end
35
+
36
+ def self.configure
37
+ self.configuration ||= Configuration.new
38
+ yield(configuration)
39
+ end
40
+
41
+ class Configuration
42
+ attr_accessor :environment, :proxy, :timeout
43
+ end
44
+
45
+ def self.registerCard(request)
46
+ reply = do_remote_call do |xml|
47
+ xml.registerCard("xmlns:ns" => SERVICE_NAMESPACE ) do
48
+ xml.parent.namespace = xml.parent.namespace_definitions.first
49
+ xml['ns'].version SERVICE_VERSION
50
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
51
+ xml['ns'].appID request.appID
52
+ xml['ns'].title request.title
53
+ xml['ns'].firstName request.firstName
54
+ xml['ns'].lastName request.lastName
55
+ xml['ns'].preferredName request.preferredName
56
+ xml['ns'].mobileNo request.mobileNo
57
+ xml['ns'].gender request.gender
58
+ xml['ns'].nationality request.nationality
59
+ xml['ns'].birthDate request.birthDate if Date.parse(request.birthDate).is_a?(Date)
60
+ xml['ns'].idDocument do |xml|
61
+ xml.documentType request.idDocument.documentType
62
+ xml.documentNo request.idDocument.documentNo
63
+ xml.countryOfIssue request.idDocument.countryOfIssue
64
+ end
65
+ xml['ns'].address do |xml|
66
+ if request.address.kind_of? RegisterCard::Address
67
+ xml.addressLine1 request.address.addressLine1
68
+ xml.addressLine2 request.address.addressLine2
69
+ xml.city request.address.city
70
+ xml.state request.address.state
71
+ xml.country request.address.country
72
+ xml.postalCode request.address.postalCode
73
+ else
74
+ xml.address1 request.address
75
+ end
76
+ end
77
+ xml['ns'].proxyCardNumber request.proxyCardNumber
78
+ xml['ns'].productCode request.productCode unless request.productCode.nil?
79
+ end
80
+ end
81
+
82
+ parse_reply(:registerCard, reply)
83
+ end
84
+
85
+
86
+ def self.loadCard(request)
87
+ reply = do_remote_call do |xml|
88
+ xml.loadCard("xmlns:ns" => SERVICE_NAMESPACE ) do
89
+ xml.parent.namespace = xml.parent.namespace_definitions.first
90
+ xml['ns'].version SERVICE_VERSION
91
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
92
+ xml['ns'].appID request.appID
93
+ xml['ns'].customerID request.customerID
94
+ xml['ns'].debitAccountNo request.debitAccountNo
95
+ xml['ns'].mobileNo request.mobileNo
96
+ xml['ns'].loadAmount request.loadAmount
97
+ end
98
+ end
99
+ parse_reply(:loadCard, reply)
100
+ end
101
+
102
+ def self.blockCard(request)
103
+ reply = do_remote_call do |xml|
104
+ xml.blockCard("xmlns:ns" => SERVICE_NAMESPACE ) do
105
+ xml.parent.namespace = xml.parent.namespace_definitions.first
106
+ xml['ns'].version SERVICE_VERSION
107
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
108
+ xml['ns'].appID request.appID
109
+ xml['ns'].mobileNo request.mobileNo
110
+ end
111
+ end
112
+ parse_reply(:blockCard, reply)
113
+ end
114
+
115
+ private
116
+
117
+ def self.uri()
118
+ return '/PrepaidCardManagementService'
119
+ end
120
+
121
+ def self.parse_reply(operationName, reply)
122
+ if reply.kind_of?Fault
123
+ return reply
124
+ else
125
+ case operationName
126
+ when :registerCard
127
+ return RegisterCard::Result.new(
128
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
129
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE))
130
+ )
131
+ when :loadCard
132
+ return LoadCard::Result.new(
133
+ content_at(reply.at_xpath('//ns:loadCardResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
134
+ content_at(reply.at_xpath('//ns:loadCardResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE))
135
+ )
136
+ when :blockCard
137
+ return BlockCard::Result.new(
138
+ content_at(reply.at_xpath('//ns:blockCardResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
139
+ content_at(reply.at_xpath('//ns:blockCardResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE))
140
+ )
141
+ end
142
+ end
143
+ end
144
+
145
+ def url
146
+ return '/PrepaidCardManagementService'
147
+ end
148
+
149
+ end
150
+ end
@@ -0,0 +1,331 @@
1
+ module ApiBanking
2
+ class PrepaidCardService < SoapClient
3
+
4
+ SERVICE_NAMESPACE = 'http://www.quantiguous.com/services'
5
+ SERVICE_VERSION = 1
6
+
7
+ attr_accessor :request, :result
8
+
9
+ #addBeneficiary
10
+ module AddBeneficiary
11
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :mobileNo, :beneficiaryName, :beneficiaryAccountNo, :beneficiaryIFSC)
12
+
13
+ Result = Struct.new(:version, :uniqueResponseNo, :beneficiaryID)
14
+ end
15
+
16
+ #getBalance
17
+ module GetBalance
18
+ Request = Struct.new(:version, :appID, :mobileNo)
19
+
20
+ Result = Struct.new(:version, :currencyCode, :cardBalance)
21
+ end
22
+
23
+ #getBeneficiaries
24
+ module GetBeneficiaries
25
+ Request = Struct.new(:version, :appID, :mobileNo, :numBeneficiaries)
26
+
27
+ Beneficiary = Struct.new(:beneficiaryName, :beneficiaryAccountNo, :beneficiaryIFSC)
28
+ BeneficiariesArray = Struct.new(:beneficiary)
29
+ Result = Struct.new(:version, :numBeneficiaries, :beneficiariesArray)
30
+ end
31
+
32
+ #getCustomerDetail
33
+ module GetCustomerDetail
34
+ Request = Struct.new(:version, :appID, :mobileNo)
35
+
36
+ Result = Struct.new(:version, :customerEmail, :customerPrefferedName, :programCode, :productCode, :productDisplayName, :productCustomerCareNo)
37
+ end
38
+
39
+ #getTransactions
40
+ module GetTransactions
41
+ Request = Struct.new(:version, :appID, :mobileNo, :numTransactions)
42
+
43
+ Transaction = Struct.new(:transactionID, :recordDate, :transactionCode, :transactionType, :currencyCode, :amount, :narrative)
44
+ TransactionsArray = Struct.new(:transaction)
45
+ Result = Struct.new(:version, :numTransactions, :transactionsArray)
46
+ end
47
+
48
+ #payToAccount
49
+ module PayToAccount
50
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :mobileNo, :encryptedPIN, :transferType, :beneficiaryName, :beneficiaryAccountNo, :beneficiaryIFSC, :transferAmount, :remitterToBeneficiaryInfo)
51
+
52
+ Result = Struct.new(:version, :uniqueResponseNo, :transferType, :bankReferenceNo, :serviceCharge)
53
+ end
54
+
55
+ #payToContact
56
+ module PayToContact
57
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :mobileNo, :encryptedPIN, :contactName, :contactMobileNo, :transferAmount)
58
+
59
+ Result = Struct.new(:version, :appID, :uniqueResponseNo, :serviceCharge)
60
+ end
61
+
62
+ #topUp
63
+ module TopUp
64
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :mobileNo, :encryptedPIN, :billerID, :subscriberID, :topupAmount)
65
+
66
+ Result = Struct.new(:version, :uniqueResponseNo, :serviceCharge, :debitReferenceNo, :billerReferenceNo)
67
+ end
68
+
69
+ #verifyPIN
70
+ module VerifyPIN
71
+ Request = Struct.new(:version, :appID, :mobileNo, :pinBlock)
72
+
73
+ Result = Struct.new(:version)
74
+ end
75
+
76
+ class << self
77
+ attr_accessor :configuration
78
+ end
79
+
80
+ def self.configure
81
+ self.configuration ||= Configuration.new
82
+ yield(configuration)
83
+ end
84
+
85
+ class Configuration
86
+ attr_accessor :environment, :proxy, :timeout
87
+ end
88
+
89
+ def self.addBeneficiary(request)
90
+ reply = do_remote_call do |xml|
91
+ xml.addBeneficiary("xmlns:ns" => SERVICE_NAMESPACE ) do
92
+ xml.parent.namespace = xml.parent.namespace_definitions.first
93
+ xml['ns'].version SERVICE_VERSION
94
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
95
+ xml['ns'].appID request.appID
96
+ xml['ns'].mobileNo request.mobileNo
97
+ xml['ns'].beneficiaryName request.beneficiaryName
98
+ xml['ns'].beneficiaryAccountNo request.beneficiaryAccountNo
99
+ xml['ns'].beneficiaryIFSC request.beneficiaryIFSC
100
+ end
101
+ end
102
+ parse_reply(:addBeneficiary, reply)
103
+ end
104
+
105
+ def self.getBalance(request)
106
+ reply = do_remote_call do |xml|
107
+ xml.getBalance("xmlns:ns" => SERVICE_NAMESPACE ) do
108
+ xml.parent.namespace = xml.parent.namespace_definitions.first
109
+ xml['ns'].version SERVICE_VERSION
110
+ xml['ns'].appID request.appID
111
+ xml['ns'].mobileNo request.mobileNo
112
+ end
113
+ end
114
+ parse_reply(:getBalance, reply)
115
+ end
116
+
117
+ def self.getBeneficiaries(request)
118
+ reply = do_remote_call do |xml|
119
+ xml.getBeneficiaries("xmlns:ns" => SERVICE_NAMESPACE ) do
120
+ xml.parent.namespace = xml.parent.namespace_definitions.first
121
+ xml['ns'].version SERVICE_VERSION
122
+ xml['ns'].appID request.appID
123
+ xml['ns'].mobileNo request.mobileNo
124
+ xml['ns'].numBeneficiaries request.numBeneficiaries
125
+ end
126
+ end
127
+ parse_reply(:getBeneficiaries, reply)
128
+ end
129
+
130
+ def self.getCustomerDetail(request)
131
+ reply = do_remote_call do |xml|
132
+ xml.getCustomerDetail("xmlns:ns" => SERVICE_NAMESPACE ) do
133
+ xml.parent.namespace = xml.parent.namespace_definitions.first
134
+ xml['ns'].version SERVICE_VERSION
135
+ xml['ns'].appID request.appID
136
+ xml['ns'].mobileNo request.mobileNo
137
+ end
138
+ end
139
+ parse_reply(:getCustomerDetail, reply)
140
+ end
141
+
142
+ def self.getTransactions(request)
143
+ reply = do_remote_call do |xml|
144
+ xml.getTransactions("xmlns:ns" => SERVICE_NAMESPACE ) do
145
+ xml.parent.namespace = xml.parent.namespace_definitions.first
146
+ xml['ns'].version SERVICE_VERSION
147
+ xml['ns'].appID request.appID
148
+ xml['ns'].mobileNo request.mobileNo
149
+ xml['ns'].numTransactions request.numTransactions
150
+ end
151
+ end
152
+ parse_reply(:getTransactions, reply)
153
+ end
154
+
155
+ def self.payToAccount(request)
156
+ reply = do_remote_call do |xml|
157
+ xml.payToAccount("xmlns:ns" => SERVICE_NAMESPACE ) do
158
+ xml.parent.namespace = xml.parent.namespace_definitions.first
159
+ xml['ns'].version SERVICE_VERSION
160
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
161
+ xml['ns'].appID request.appID
162
+ xml['ns'].mobileNo request.mobileNo
163
+ xml['ns'].encryptedPIN request.encryptedPIN
164
+ xml['ns'].transferType request.transferType
165
+ xml['ns'].beneficiaryName request.beneficiaryName
166
+ xml['ns'].beneficiaryAccountNo request.beneficiaryAccountNo
167
+ xml['ns'].beneficiaryIFSC request.beneficiaryIFSC
168
+ xml['ns'].transferAmount request.transferAmount
169
+ xml['ns'].remitterToBeneficiaryInfo request.remitterToBeneficiaryInfo
170
+ end
171
+ end
172
+ parse_reply(:payToAccount, reply)
173
+ end
174
+
175
+ def self.payToContact(request)
176
+ reply = do_remote_call do |xml|
177
+ xml.payToContact("xmlns:ns" => SERVICE_NAMESPACE ) do
178
+ xml.parent.namespace = xml.parent.namespace_definitions.first
179
+ xml['ns'].version SERVICE_VERSION
180
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
181
+ xml['ns'].appID request.appID
182
+ xml['ns'].mobileNo request.mobileNo
183
+ xml['ns'].encryptedPIN request.encryptedPIN
184
+ xml['ns'].contactName request.contactName
185
+ xml['ns'].contactMobileNo request.contactMobileNo
186
+ xml['ns'].transferAmount request.transferAmount
187
+ end
188
+ end
189
+ parse_reply(:payToContact, reply)
190
+ end
191
+
192
+ def self.topUp(request)
193
+ reply = do_remote_call do |xml|
194
+ xml.topUp("xmlns:ns" => SERVICE_NAMESPACE ) do
195
+ xml.parent.namespace = xml.parent.namespace_definitions.first
196
+ xml['ns'].version SERVICE_VERSION
197
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
198
+ xml['ns'].appID request.appID
199
+ xml['ns'].mobileNo request.mobileNo
200
+ xml['ns'].encryptedPIN request.encryptedPIN
201
+ xml['ns'].billerID request.billerID
202
+ xml['ns'].subscriberID request.subscriberID
203
+ xml['ns'].topupAmount request.topupAmount
204
+ end
205
+ end
206
+ parse_reply(:topUp, reply)
207
+ end
208
+
209
+ def self.verifyPIN(request)
210
+ reply = do_remote_call do |xml|
211
+ xml.verifyPIN("xmlns:ns" => SERVICE_NAMESPACE ) do
212
+ xml.parent.namespace = xml.parent.namespace_definitions.first
213
+ xml['ns'].version SERVICE_VERSION
214
+ xml['ns'].appID request.appID
215
+ xml['ns'].mobileNo request.mobileNo
216
+ xml['ns'].pinBlock request.pinBlock
217
+ end
218
+ end
219
+ parse_reply(:verifyPIN, reply)
220
+ end
221
+
222
+ private
223
+
224
+ def self.uri()
225
+ return '/PrepaidCardService'
226
+ end
227
+
228
+ def self.parse_reply(operationName, reply)
229
+ if reply.kind_of?Fault
230
+ return reply
231
+ else
232
+ case operationName
233
+ when :addBeneficiary
234
+ return AddBeneficiary::Result.new(
235
+ content_at(reply.at_xpath('//ns:addBeneficiaryResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
236
+ content_at(reply.at_xpath('//ns:addBeneficiaryResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE)),
237
+ content_at(reply.at_xpath('//ns:addBeneficiaryResponse/ns:beneficiaryID', 'ns' => SERVICE_NAMESPACE)),
238
+ )
239
+ when :getBalance
240
+ return GetBalance::Result.new(
241
+ content_at(reply.at_xpath('//ns:getBalanceResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
242
+ content_at(reply.at_xpath('//ns:getBalanceResponse/ns:currencyCode', 'ns' => SERVICE_NAMESPACE)),
243
+ content_at(reply.at_xpath('//ns:getBalanceResponse/ns:cardBalance', 'ns' => SERVICE_NAMESPACE))
244
+ )
245
+ when :getBeneficiaries
246
+ beneArray = Array.new
247
+ i = 1
248
+ numBene = content_at(reply.xpath('//ns:getBeneficiariesResponse/ns:numBeneficiaries', 'ns' => SERVICE_NAMESPACE)).to_i
249
+ until i > numBene
250
+ beneArray << GetBeneficiaries::Beneficiary.new(
251
+ content_at(reply.at_xpath("//ns:getBeneficiariesResponse/ns:beneficiariesArray/ns:beneficiary[#{i}]/ns:beneficiaryName", 'ns' => SERVICE_NAMESPACE)),
252
+ content_at(reply.at_xpath("//ns:getBeneficiariesResponse/ns:beneficiariesArray/ns:beneficiary[#{i}]/ns:beneficiaryAccountNo", 'ns' => SERVICE_NAMESPACE)),
253
+ content_at(reply.at_xpath("//ns:getBeneficiariesResponse/ns:beneficiariesArray/ns:beneficiary[#{i}]/ns:beneficiaryIFSC", 'ns' => SERVICE_NAMESPACE))
254
+ )
255
+ i = i + 1;
256
+ end
257
+ beneficiariesArray = GetBeneficiaries::BeneficiariesArray.new(beneArray)
258
+ return GetBeneficiaries::Result.new(
259
+ content_at(reply.at_xpath('//ns:getBeneficiariesResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
260
+ content_at(reply.at_xpath('//ns:getBeneficiariesResponse/ns:numBeneficiaries', 'ns' => SERVICE_NAMESPACE)),
261
+ beneficiariesArray
262
+ )
263
+ when :getCustomerDetail
264
+ return GetCustomerDetail::Result.new(
265
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
266
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:customerEmail', 'ns' => SERVICE_NAMESPACE)),
267
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:customerPrefferedName', 'ns' => SERVICE_NAMESPACE)),
268
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:programCode', 'ns' => SERVICE_NAMESPACE)),
269
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:productCode', 'ns' => SERVICE_NAMESPACE)),
270
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:productDisplayName', 'ns' => SERVICE_NAMESPACE)),
271
+ content_at(reply.at_xpath('//ns:getCustomerDetailResponse/ns:productCustomerCareNo', 'ns' => SERVICE_NAMESPACE))
272
+ )
273
+ when :getTransactions
274
+ txnArray = Array.new
275
+ i = 1
276
+ numTxns = content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:numTransactions", 'ns' => SERVICE_NAMESPACE)).to_i
277
+ until i > numTxns
278
+ txnArray << GetTransactions::Transaction.new(
279
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:transactionID", 'ns' => SERVICE_NAMESPACE)),
280
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:recordDate", 'ns' => SERVICE_NAMESPACE)),
281
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:transactionCode", 'ns' => SERVICE_NAMESPACE)),
282
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:transactionType", 'ns' => SERVICE_NAMESPACE)),
283
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:currencyCode", 'ns' => SERVICE_NAMESPACE)),
284
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:amount", 'ns' => SERVICE_NAMESPACE)),
285
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:narrative", 'ns' => SERVICE_NAMESPACE))
286
+ )
287
+ i = i + 1;
288
+ end
289
+ transactionsArray = GetTransactions::TransactionsArray.new(txnArray)
290
+ return GetTransactions::Result.new(
291
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
292
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:numTransactions', 'ns' => SERVICE_NAMESPACE)),
293
+ transactionsArray
294
+ )
295
+ when :payToAccount
296
+ return PayToAccount::Result.new(
297
+ content_at(reply.at_xpath('//ns:payToAccountResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
298
+ content_at(reply.at_xpath('//ns:payToAccountResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE)),
299
+ content_at(reply.at_xpath('//ns:payToAccountResponse/ns:transferType', 'ns' => SERVICE_NAMESPACE)),
300
+ content_at(reply.at_xpath('//ns:payToAccountResponse/ns:bankReferenceNo', 'ns' => SERVICE_NAMESPACE)),
301
+ content_at(reply.at_xpath('//ns:payToAccountResponse/ns:serviceCharge', 'ns' => SERVICE_NAMESPACE))
302
+ )
303
+ when :payToContact
304
+ return PayToContact::Result.new(
305
+ content_at(reply.at_xpath('//ns:payToContactResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
306
+ content_at(reply.at_xpath('//ns:payToContactResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE)),
307
+ content_at(reply.at_xpath('//ns:payToContactResponse/ns:appID', 'ns' => SERVICE_NAMESPACE)),
308
+ content_at(reply.at_xpath('//ns:payToContactResponse/ns:serviceCharge', 'ns' => SERVICE_NAMESPACE))
309
+ )
310
+ when :topUp
311
+ return TopUp::Result.new(
312
+ content_at(reply.at_xpath('//ns:topUpResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
313
+ content_at(reply.at_xpath('//ns:topUpResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE)),
314
+ content_at(reply.at_xpath('//ns:topUpResponse/ns:serviceCharge', 'ns' => SERVICE_NAMESPACE)),
315
+ content_at(reply.at_xpath('//ns:topUpResponse/ns:debitReferenceNo', 'ns' => SERVICE_NAMESPACE)),
316
+ content_at(reply.at_xpath('//ns:topUpResponse/ns:billerReferenceNo', 'ns' => SERVICE_NAMESPACE))
317
+ )
318
+ when :verifyPIN
319
+ return VerifyPIN::Result.new(
320
+ content_at(reply.at_xpath('//ns:verifyPINResponse/ns:version', 'ns' => SERVICE_NAMESPACE))
321
+ )
322
+ end
323
+ end
324
+ end
325
+
326
+ def url
327
+ return '/PrepaidCardService'
328
+ end
329
+
330
+ end
331
+ end
@@ -0,0 +1,111 @@
1
+ module ApiBanking
2
+ class SocialBankingService < SoapClient
3
+
4
+ SERVICE_NAMESPACE = 'http://www.quantiguous.com/services'
5
+ SERVICE_VERSION = 1
6
+
7
+ attr_accessor :request, :result
8
+
9
+ #getTransactions
10
+ module GetTransactions
11
+ Request = Struct.new(:version, :appID, :customerIdentity, :deviceID, :accountIdentity, :numTransactions)
12
+ CustomerIdentity = Struct.new(:customerID, :customerAlternateID)
13
+ CustomerAlternateID = Struct.new(:mobileNo, :emailID, :twitterID, :genericID)
14
+ GenericID = Struct.new(:idType, :idValue)
15
+ AccountIdentity = Struct.new(:accountNo, :registeredAccount)
16
+
17
+ TransactionsArray = Struct.new(:transaction)
18
+ Transaction = Struct.new(:transactionID, :recordDate, :transactionType, :currencyCode, :amount, :narrative)
19
+ Result = Struct.new(:version, :customerID, :accountNo, :numTransactions, :transactionsArray)
20
+ end
21
+
22
+ class << self
23
+ attr_accessor :configuration
24
+ end
25
+
26
+ def self.configure
27
+ self.configuration ||= Configuration.new
28
+ yield(configuration)
29
+ end
30
+
31
+ class Configuration
32
+ attr_accessor :environment, :proxy, :timeout
33
+ end
34
+
35
+ def self.getTransactions(request)
36
+ reply = do_remote_call do |xml|
37
+ xml.getTransactions("xmlns:ns" => SERVICE_NAMESPACE ) do
38
+ xml.parent.namespace = xml.parent.namespace_definitions.first
39
+ xml['ns'].version SERVICE_VERSION
40
+ xml['ns'].appID request.appID
41
+ xml['ns'].customerIdentity do |xml|
42
+ xml.customerID request.customerIdentity.customerID unless request.customerIdentity.customerID.nil?
43
+ unless request.customerIdentity.customerAlternateID.nil?
44
+ xml.customerAlternateID do |xml|
45
+ xml.mobileNo request.customerIdentity.customerAlternateID.mobileNo unless request.customerIdentity.customerAlternateID.mobileNo.nil?
46
+ xml.emailID request.customerIdentity.customerAlternateID.emailID unless request.customerIdentity.customerAlternateID.emailID.nil?
47
+ xml.twitterID request.customerIdentity.customerAlternateID.twitterID unless request.customerIdentity.customerAlternateID.twitterID.nil?
48
+ unless request.customerIdentity.customerAlternateID.genericID.nil?
49
+ xml.genericID do |xml|
50
+ xml.idType request.customerIdentity.customerAlternateID.genericID.idType
51
+ xml.idValue request.customerIdentity.customerAlternateID.genericID.idValue
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ xml['ns'].deviceID request.deviceID
58
+ xml['ns'].accountIdentity do |xml|
59
+ xml.accountNo request.accountIdentity.accountNo unless request.accountIdentity.accountNo.nil?
60
+ xml.registeredAccount request.accountIdentity.registeredAccount unless request.accountIdentity.registeredAccount.nil?
61
+ end
62
+ xml['ns'].numTransactions request.numTransactions
63
+ end
64
+ end
65
+ parse_reply(:getTransactions, reply)
66
+ end
67
+
68
+ private
69
+
70
+ def self.uri()
71
+ return '/SocialBankingService'
72
+ end
73
+
74
+ def self.parse_reply(operationName, reply)
75
+ if reply.kind_of?Fault
76
+ return reply
77
+ else
78
+ case operationName
79
+ when :getTransactions
80
+ txnArray = Array.new
81
+ i = 1
82
+ numTxns = content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:numTransactions", 'ns' => SERVICE_NAMESPACE)).to_i
83
+ until i > numTxns
84
+ txnArray << GetTransactions::Transaction.new(
85
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:transactionID", 'ns' => SERVICE_NAMESPACE)),
86
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:recordDate", 'ns' => SERVICE_NAMESPACE)),
87
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:transactionType", 'ns' => SERVICE_NAMESPACE)),
88
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:currencyCode", 'ns' => SERVICE_NAMESPACE)),
89
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:amount", 'ns' => SERVICE_NAMESPACE)),
90
+ content_at(reply.at_xpath("//ns:getTransactionsResponse/ns:transactionsArray/ns:transaction[#{i}]/ns:narrative", 'ns' => SERVICE_NAMESPACE))
91
+ )
92
+ i = i + 1;
93
+ end
94
+ transactionsArray = GetTransactions::TransactionsArray.new(txnArray)
95
+ return GetTransactions::Result.new(
96
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
97
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:customerID', 'ns' => SERVICE_NAMESPACE)),
98
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:accountNo', 'ns' => SERVICE_NAMESPACE)),
99
+ content_at(reply.at_xpath('//ns:getTransactionsResponse/ns:numTransactions', 'ns' => SERVICE_NAMESPACE)),
100
+ transactionsArray
101
+ )
102
+ end
103
+ end
104
+ end
105
+
106
+ def url
107
+ return '/PrepaidCardService'
108
+ end
109
+
110
+ end
111
+ end
@@ -0,0 +1,167 @@
1
+ module ApiBanking
2
+ class VirtualCardManagementService < SoapClient
3
+
4
+ SERVICE_NAMESPACE = 'http://www.quantiguous.com/services'
5
+ SERVICE_VERSION = 1
6
+
7
+ attr_accessor :request, :result
8
+
9
+ #blockCard
10
+ module BlockCard
11
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :userUID, :emailID, :password)
12
+
13
+ Result = Struct.new(:version, :uniqueResponseNo)
14
+ end
15
+
16
+ #getCardDetail
17
+ module GetCardDetail
18
+ Request = Struct.new(:version, :appID, :cardUID, :emailID, :password)
19
+
20
+ Result = Struct.new(:cardUID, :cardNo, :issueDate, :expiryMonth, :expiryYear, :cardHolderName, :cardKind, :cardName, :cardDescription, :cardImageSmall, :cardImageMedium, :cardImageLarge, :securePasscode)
21
+ end
22
+
23
+ #registerCard
24
+ module RegisterCard
25
+ Address = Struct.new(:addressLine1, :addressLine2, :city, :state, :country, :postalCode)
26
+ Request = Struct.new(:version, :uniqueRequestNo, :appID, :title, :firstName, :lastName, :preferredName, :mobileNo, :gender, :nationality, :birthDate, :address, :emailID, :password)
27
+
28
+ Result = Struct.new(:version, :uniqueResponseNo, :userUID, :cardUID, :cardNo, :issueDate, :expiryMonth, :expiryYear, :cardHolderName, :cardKind, :cardName, :cardDescription, :cardImageSmall, :cardImageMedium, :cardImageLarge)
29
+ end
30
+
31
+ class << self
32
+ attr_accessor :configuration
33
+ end
34
+
35
+ def self.configure
36
+ self.configuration ||= Configuration.new
37
+ yield(configuration)
38
+ end
39
+
40
+ class Configuration
41
+ attr_accessor :environment, :proxy, :timeout
42
+ end
43
+
44
+ def self.registerCard(request)
45
+ reply = do_remote_call do |xml|
46
+ xml.registerCard("xmlns:ns" => SERVICE_NAMESPACE ) do
47
+ xml.parent.namespace = xml.parent.namespace_definitions.first
48
+ xml['ns'].version SERVICE_VERSION
49
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
50
+ xml['ns'].appID request.appID
51
+ xml['ns'].title request.title
52
+ xml['ns'].firstName request.firstName
53
+ xml['ns'].lastName request.lastName
54
+ xml['ns'].preferredName request.preferredName
55
+ xml['ns'].mobileNo request.mobileNo
56
+ xml['ns'].gender request.gender
57
+ xml['ns'].nationality request.nationality
58
+ xml['ns'].birthDate request.birthDate
59
+ xml['ns'].address do |xml|
60
+ if request.address.kind_of? RegisterCard::Address
61
+ xml.addressLine1 request.address.addressLine1
62
+ xml.addressLine2 request.address.addressLine2
63
+ xml.city request.address.city
64
+ xml.state request.address.state
65
+ xml.country request.address.country
66
+ xml.postalCode request.address.postalCode
67
+ else
68
+ xml.address1 request.address
69
+ end
70
+ end
71
+ xml['ns'].emailID request.emailID
72
+ xml['ns'].password request.password
73
+ end
74
+ end
75
+
76
+ parse_reply(:registerCard, reply)
77
+ end
78
+
79
+ def self.blockCard(request)
80
+ reply = do_remote_call do |xml|
81
+ xml.blockCard("xmlns:ns" => SERVICE_NAMESPACE ) do
82
+ xml.parent.namespace = xml.parent.namespace_definitions.first
83
+ xml['ns'].version SERVICE_VERSION
84
+ xml['ns'].uniqueRequestNo request.uniqueRequestNo
85
+ xml['ns'].appID request.appID
86
+ xml['ns'].userUID request.userUID
87
+ xml['ns'].emailID request.emailID
88
+ xml['ns'].password request.password
89
+ end
90
+ end
91
+ parse_reply(:blockCard, reply)
92
+ end
93
+
94
+ def self.getCardDetail(request)
95
+ reply = do_remote_call do |xml|
96
+ xml.getCardDetail("xmlns:ns" => SERVICE_NAMESPACE ) do
97
+ xml.parent.namespace = xml.parent.namespace_definitions.first
98
+ xml['ns'].version SERVICE_VERSION
99
+ xml['ns'].appID request.appID
100
+ xml['ns'].cardUID request.cardUID
101
+ xml['ns'].emailID request.emailID
102
+ xml['ns'].password request.password
103
+ end
104
+ end
105
+ parse_reply(:getCardDetail, reply)
106
+ end
107
+
108
+ private
109
+
110
+ def self.uri()
111
+ return '/VirtualCardManagementService'
112
+ end
113
+
114
+ def self.parse_reply(operationName, reply)
115
+ if reply.kind_of?Fault
116
+ return reply
117
+ else
118
+ case operationName
119
+ when :registerCard
120
+ return RegisterCard::Result.new(
121
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
122
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE)),
123
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:userUID', 'ns' => SERVICE_NAMESPACE)),
124
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardUID', 'ns' => SERVICE_NAMESPACE)),
125
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardNo', 'ns' => SERVICE_NAMESPACE)),
126
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:issueDate', 'ns' => SERVICE_NAMESPACE)),
127
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:expiryMonth', 'ns' => SERVICE_NAMESPACE)),
128
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:expiryYear', 'ns' => SERVICE_NAMESPACE)),
129
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardHolderName', 'ns' => SERVICE_NAMESPACE)),
130
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardKind', 'ns' => SERVICE_NAMESPACE)),
131
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardName', 'ns' => SERVICE_NAMESPACE)),
132
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardDescription', 'ns' => SERVICE_NAMESPACE)),
133
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardImageSmall', 'ns' => SERVICE_NAMESPACE)),
134
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardImageMedium', 'ns' => SERVICE_NAMESPACE)),
135
+ content_at(reply.at_xpath('//ns:registerCardResponse/ns:cardImageLarge', 'ns' => SERVICE_NAMESPACE))
136
+ )
137
+ when :blockCard
138
+ return LoadCard::Result.new(
139
+ content_at(reply.at_xpath('//ns:loadCardResponse/ns:version', 'ns' => SERVICE_NAMESPACE)),
140
+ content_at(reply.at_xpath('//ns:loadCardResponse/ns:uniqueResponseNo', 'ns' => SERVICE_NAMESPACE))
141
+ )
142
+ when :getCardDetail
143
+ return GetCardDetail::Result.new(
144
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardUID', 'ns' => SERVICE_NAMESPACE)),
145
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardNo', 'ns' => SERVICE_NAMESPACE)),
146
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:issueDate', 'ns' => SERVICE_NAMESPACE)),
147
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:expiryMonth', 'ns' => SERVICE_NAMESPACE)),
148
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:expiryYear', 'ns' => SERVICE_NAMESPACE)),
149
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardHolderName', 'ns' => SERVICE_NAMESPACE)),
150
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardKind', 'ns' => SERVICE_NAMESPACE)),
151
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardName', 'ns' => SERVICE_NAMESPACE)),
152
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardDescription', 'ns' => SERVICE_NAMESPACE)),
153
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardImageSmall', 'ns' => SERVICE_NAMESPACE)),
154
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardImageMedium', 'ns' => SERVICE_NAMESPACE)),
155
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:cardImageLarge', 'ns' => SERVICE_NAMESPACE)),
156
+ content_at(reply.at_xpath('//ns:getCardDetailResponse/ns:securePasscode', 'ns' => SERVICE_NAMESPACE))
157
+ )
158
+ end
159
+ end
160
+ end
161
+
162
+ def url
163
+ return '/VirtualCardManagementService'
164
+ end
165
+
166
+ end
167
+ end
@@ -1,3 +1,3 @@
1
1
  module ApiBanking
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
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.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - akil
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-01 00:00:00.000000000 Z
11
+ date: 2016-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,11 @@ files:
141
141
  - lib/api_banking/soap/instantCreditService.rb
142
142
  - lib/api_banking/soap/instantMoneyTransferService.rb
143
143
  - lib/api_banking/soap/notificationService.rb
144
+ - lib/api_banking/soap/prepaidCardManagementService.rb
145
+ - lib/api_banking/soap/prepaidCardService.rb
144
146
  - lib/api_banking/soap/soap_client.rb
147
+ - lib/api_banking/soap/socialBankingService.rb
148
+ - lib/api_banking/soap/virtualCardManagementService.rb
145
149
  - lib/api_banking/version.rb
146
150
  homepage: http://apibanking.com
147
151
  licenses:
@@ -163,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
167
  version: '0'
164
168
  requirements: []
165
169
  rubyforge_project:
166
- rubygems_version: 2.4.7
170
+ rubygems_version: 2.4.6
167
171
  signing_key:
168
172
  specification_version: 4
169
173
  summary: Ruby SDK to Connect to Banks