Class: ApiBanking::SoapClient
- Inherits:
-
Object
- Object
- ApiBanking::SoapClient
show all
- Defined in:
- lib/api_banking/soap/soap_client.rb
Direct Known Subclasses
DomesticRemittanceByPartnerService, FundsTransferByCustomerService, FundsTransferByCustomerService2, InstantCreditService, InstantMoneyTransferService, InwardRemittanceByPartnerService, NotificationService, PrepaidCardManagementService, PrepaidCardService, SocialBankingService, VirtualCardManagementService
Constant Summary
collapse
- @@last_response =
nil
Class Method Summary
collapse
Class Method Details
.do_remote_call(&block) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/api_banking/soap/soap_client.rb', line 10
def self.do_remote_call(&block)
data = construct_envelope(&block)
options = {}
options[:method] = :post
options[:body] = data.to_xml
options[:headers] = {'Content-Type' => "application/xml; charset=utf-8"}
options[:proxy] = self.configuration.proxy
options[:timeout] = self.configuration.timeout
set_options_for_environment(options)
options[:headers]['User-Agent'] = "Quantiguous; API Banking, Ruby Gem #{ApiBanking::VERSION}"
request = Typhoeus::Request.new(self.configuration.environment.endpoints[self.name.split('::').last.to_sym], options)
response = request.run
@@last_response = response
parse_response(response)
end
|
.last_response ⇒ Object
6
7
8
|
# File 'lib/api_banking/soap/soap_client.rb', line 6
def self.last_response
@@last_response
end
|