Class: AdsCommon::SavonService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Creates a new service.



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

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

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#header_handlerObject

Returns the value of attribute header_handler.



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

def header_handler
  @header_handler
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



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

def namespace
  @namespace
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end