Class: G4sClient::Tracking

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

Direct Known Subclasses

TrackingLive, TrackingTest

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint = nil) ⇒ Tracking

Returns a new instance of Tracking.



52
53
54
55
56
# File 'lib/g4s_client.rb', line 52

def initialize(endpoint=nil)
  @endpoint = endpoint || ENV['G4S_TRACKING_ENDPOINT_URL']
  @service = ::Tracking::IPSTrackingSoap.new(@endpoint)
  @service.headerhandler << G4SIAuthHeader.new(auth.username, auth.password, auth.accessKey)  # Add the Authentication to the handler
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



51
52
53
# File 'lib/g4s_client.rb', line 51

def service
  @service
end