Class: ApiBanking::SinglePayment
- Inherits:
-
JsonClient
- Object
- JsonClient
- ApiBanking::SinglePayment
- Defined in:
- lib/api_banking/json/singlePayment.rb
Defined Under Namespace
Classes: Beneficiary, Configuration, Remitter, ReqBody, ReqHeader, Request, Result
Constant Summary collapse
- SERVICE_VERSION =
1
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Instance Attribute Summary collapse
-
#request ⇒ Object
Returns the value of attribute request.
-
#result ⇒ Object
Returns the value of attribute result.
Class Method Summary collapse
Methods inherited from JsonClient
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
17 18 19 |
# File 'lib/api_banking/json/singlePayment.rb', line 17 def configuration @configuration end |
Instance Attribute Details
#request ⇒ Object
Returns the value of attribute request.
6 7 8 |
# File 'lib/api_banking/json/singlePayment.rb', line 6 def request @request end |
#result ⇒ Object
Returns the value of attribute result.
6 7 8 |
# File 'lib/api_banking/json/singlePayment.rb', line 6 def result @result end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
20 21 22 23 |
# File 'lib/api_banking/json/singlePayment.rb', line 20 def self.configure self.configuration ||= Configuration.new yield(configuration) end |
.transfer(env, request, callbacks = nil) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/api_banking/json/singlePayment.rb', line 29 def self.transfer(env, request, callbacks = nil) dataHash = {} dataHash[:Single_Payment_Corp_Req] = {} dataHash[:Single_Payment_Corp_Req][:Header] = {} dataHash[:Single_Payment_Corp_Req][:Body] = {} dataHash[:Single_Payment_Corp_Req][:Header][:TranID] = request.header.tranID dataHash[:Single_Payment_Corp_Req][:Header][:Corp_ID] = request.header.corpID dataHash[:Single_Payment_Corp_Req][:Header][:Maker_ID] = '' dataHash[:Single_Payment_Corp_Req][:Header][:Checker_ID] = '' dataHash[:Single_Payment_Corp_Req][:Header][:Approver_ID] = request.header.approverID dataHash[:Single_Payment_Corp_Req][:Body][:Amount] = request.body.amount dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_No] = request.body.remitter.accountNo dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Acct_Name] = request.body.remitter.accountName dataHash[:Single_Payment_Corp_Req][:Body][:Debit_IFSC] = request.body.remitter.accountIFSC dataHash[:Single_Payment_Corp_Req][:Body][:Debit_Mobile] = request.body.remitter.mobileNo dataHash[:Single_Payment_Corp_Req][:Body][:Ben_IFSC] = request.body.beneficiary.accountIFSC dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Acct_No] = request.body.beneficiary.accountNo dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Name] = request.body.beneficiary.fullName dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Address] = request.body.beneficiary.address dataHash[:Single_Payment_Corp_Req][:Body][:Ben_BankName] = request.body.beneficiary.accountIFSC[0..3] dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Email] = request.body.beneficiary.email dataHash[:Single_Payment_Corp_Req][:Body][:Ben_Mobile] = request.body.beneficiary.mobileNo dataHash[:Single_Payment_Corp_Req][:Body][:Mode_of_Pay] = request.body.modeOfPay dataHash[:Single_Payment_Corp_Req][:Body][:Remarks] = request.body.remarks reply = do_remote_call(env, dataHash, callbacks) parse_reply(reply, request.body.modeOfPay) end |