Class: Sunspot4R::BaseSunspotServiceClient

Inherits:
Savon::Client
  • Object
show all
Defined in:
lib/sunspot4r/base_sunspot_service_client.rb

Overview

Sunspot4R::BaseSunspotServiceClient

Sunspot4R::BaseSunspotServiceClient is service class client that all other Sunspot services extend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url, options = {}) ⇒ BaseSunspotServiceClient

Optionally pass in the session_guid which will then be placed in the soap package header for each request.



18
19
20
21
22
23
24
# File 'lib/sunspot4r/base_sunspot_service_client.rb', line 18

def initialize(base_url, options = {})
  @session_guid = options.delete(:session_guid)
  endpoint = "#{base_url}/Partner/#{service_name}"
  
  super endpoint, options
  #super endpoint, :proxy => 'http://127.0.0.1:8888'
end

Instance Attribute Details

#base_uriObject

Returns the value of attribute base_uri.



14
15
16
# File 'lib/sunspot4r/base_sunspot_service_client.rb', line 14

def base_uri
  @base_uri
end

Instance Method Details

#service_nameObject

Name of the Sunspot service. Used to build SOAPAction URLs dynamically.



10
11
12
# File 'lib/sunspot4r/base_sunspot_service_client.rb', line 10

def service_name
  '<add service_name>'
end