Class: AdsCommon::SavonService

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

Defined Under Namespace

Classes: NoopLogger, RequestInfo

Constant Summary collapse

FALLBACK_API_ERROR_EXCEPTION =
"ApiException"
MAX_FAULT_LOG_LENGTH =
16000
REDACTED_STR =
'REDACTED'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Creates a new service.



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

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)
  @xml_only = false
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#header_handlerObject

Returns the value of attribute header_handler.



29
30
31
# File 'lib/ads_common/savon_service.rb', line 29

def header_handler
  @header_handler
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



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

def namespace
  @namespace
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end