Class: AdsCommon::SavonService

Inherits:
Object
  • Object
show all
Defined in:
lib/ads_common/savon_service.rb

Constant Summary collapse

HTTP_READ_TIMEOUT =

HTTP read timeout in seconds.

15 * 60

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, endpoint, namespace, version) ⇒ SavonService

Creates a new service.



38
39
40
41
42
43
44
45
# File 'lib/ads_common/savon_service.rb', line 38

def initialize(api, endpoint, namespace, version)
  if self.class() == AdsCommon::SavonService
    raise NoMethodError, 'Tried to instantiate an abstract class'
  end
  @api, @version, @namespace = api, version, namespace
  @headerhandler = []
  @client = create_savon_client(endpoint, namespace)
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



33
34
35
# File 'lib/ads_common/savon_service.rb', line 33

def api
  @api
end

#headerhandlerObject

Returns the value of attribute headerhandler.



32
33
34
# File 'lib/ads_common/savon_service.rb', line 32

def headerhandler
  @headerhandler
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



35
36
37
# File 'lib/ads_common/savon_service.rb', line 35

def namespace
  @namespace
end

#versionObject (readonly)

Returns the value of attribute version.



34
35
36
# File 'lib/ads_common/savon_service.rb', line 34

def version
  @version
end