Class: ApiBanking::FundsTransferByCustomerService2
- Inherits:
-
SoapClient
- Object
- SoapClient
- ApiBanking::FundsTransferByCustomerService2
- Defined in:
- lib/api_banking/soap/fundsTransferByCustomerService2.rb
Defined Under Namespace
Modules: GetBalance, GetStatus, Transfer Classes: Configuration
Constant Summary collapse
- SERVICE_NAMESPACE =
'http://www.quantiguous.com/services'- 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
- .configure {|configuration| ... } ⇒ Object
- .get_balance(request) ⇒ Object
- .get_status(request) ⇒ Object
- .transfer(request) ⇒ Object
Methods inherited from SoapClient
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
33 34 35 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 33 def configuration @configuration end |
Instance Attribute Details
#request ⇒ Object
Returns the value of attribute request.
7 8 9 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 7 def request @request end |
#result ⇒ Object
Returns the value of attribute result.
7 8 9 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 7 def result @result end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
36 37 38 39 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 36 def self.configure self.configuration ||= Configuration.new yield(configuration) end |
.get_balance(request) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 103 def self.get_balance(request) reply = do_remote_call 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'].customerID request.customerID xml['ns'].AccountNumber request.AccountNumber end end parse_reply(:getBalance, reply) end |
.get_status(request) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 90 def self.get_status(request) reply = do_remote_call do |xml| xml.getStatus("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'].customerID request.customerID xml['ns'].requestReferenceNo request.requestReferenceNo end end parse_reply(:getStatus, reply) end |
.transfer(request) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/api_banking/soap/fundsTransferByCustomerService2.rb', line 45 def self.transfer(request) reply = do_remote_call do |xml| xml.transfer("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'].purposeCode request.purposeCode xml['ns'].customerID request.customerID xml['ns'].debitAccountNo request.debitAccountNo xml['ns'].beneficiary do |xml| xml.beneficiaryDetail do |xml| xml.beneficiaryName do |xml| xml.fullName request.beneficiary.fullName end xml.beneficiaryAddress do |xml| if request.beneficiary.address.kind_of? Transfer::Address xml.address1 request.beneficiary.address.address1 xml.address2 request.beneficiary.address.address2 unless request.beneficiary.address.address2.nil? xml.address3 request.beneficiary.address.address3 unless request.beneficiary.address.address3.nil? xml.postalCode request.beneficiary.address.postalCode unless request.beneficiary.address.postalCode.nil? xml.city request.beneficiary.address.city unless request.beneficiary.address.city.nil? xml.stateOrProvince request.beneficiary.address.stateOrProvince unless request.beneficiary.address.stateOrProvince.nil? xml.country request.beneficiary.address.country unless request.beneficiary.address.country.nil? else xml.address1 request.beneficiary.address end end xml.beneficiaryContact do |xml| end xml.beneficiaryAccountNo request.beneficiary.accountNo xml.beneficiaryIFSC request.beneficiary.accountIFSC end end xml.transferType request.transferType xml.transferCurrencyCode 'INR' xml.transferAmount request.transferAmount xml.remitterToBeneficiaryInfo request.remitterToBeneficiaryInfo end end parse_reply(:transfer, reply) end |