Class: ApiBanking::SocialBankingService

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

Defined Under Namespace

Modules: GetTransactions 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.



23
24
25
# File 'lib/api_banking/soap/socialBankingService.rb', line 23

def configuration
  @configuration
end

Instance Attribute Details

#requestObject

Returns the value of attribute request.



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

def request
  @request
end

#resultObject

Returns the value of attribute result.



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

def result
  @result
end

Class Method Details

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

Yields:



26
27
28
29
# File 'lib/api_banking/soap/socialBankingService.rb', line 26

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

.getTransactions(request) ⇒ Object



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
61
62
63
64
65
66
# File 'lib/api_banking/soap/socialBankingService.rb', line 35

def self.getTransactions(request)
  reply = do_remote_call 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'].customerIdentity do  |xml|
        xml.customerID request.customerIdentity.customerID unless request.customerIdentity.customerID.nil?
        unless request.customerIdentity.customerAlternateID.nil?
          xml.customerAlternateID do  |xml|
            xml.mobileNo request.customerIdentity.customerAlternateID.mobileNo unless request.customerIdentity.customerAlternateID.mobileNo.nil?
            xml.emailID request.customerIdentity.customerAlternateID.emailID unless request.customerIdentity.customerAlternateID.emailID.nil?
            xml.twitterID request.customerIdentity.customerAlternateID.twitterID unless request.customerIdentity.customerAlternateID.twitterID.nil?
            unless request.customerIdentity.customerAlternateID.genericID.nil?
              xml.genericID do |xml|
                xml.idType request.customerIdentity.customerAlternateID.genericID.idType
                xml.idValue request.customerIdentity.customerAlternateID.genericID.idValue
              end
            end
          end
        end
      end
      xml['ns'].deviceID request.deviceID
      xml['ns'].accountIdentity do |xml|
        xml.accountNo request.accountIdentity.accountNo unless request.accountIdentity.accountNo.nil?
        xml.registeredAccount request.accountIdentity.registeredAccount unless request.accountIdentity.registeredAccount.nil?
      end
      xml['ns'].numTransactions request.numTransactions
    end
  end
  parse_reply(:getTransactions, reply)
end