Class: Bluedart::Tracking

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details) ⇒ Tracking

Returns a new instance of Tracking.



8
9
10
11
12
13
# File 'lib/bluedart/tracking.rb', line 8

def initialize(details)
  @numbers = details[:numbers].join(',')
  @scans = details[:scans]
  @license_key = details[:creds][:license_key]
  @loginid = details[:creds][:login_id]
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/bluedart/tracking.rb', line 6

def response
  @response
end

Class Method Details

.request_urlObject



15
16
17
# File 'lib/bluedart/tracking.rb', line 15

def self.request_url
  'http://www.bluedart.com/servlet/RoutingServlet'
end

Instance Method Details

#requestObject



19
20
21
# File 'lib/bluedart/tracking.rb', line 19

def request
  @response = make_request
end