Class: TrackingMore::Courier

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

Constant Summary collapse

@@api_module =
'couriers'

Class Method Summary collapse

Class Method Details

.detect(params = {}) ⇒ Object



9
10
11
12
13
14
# File 'lib/trackingmore/courier.rb', line 9

def self.detect(params = {})
  if params["tracking_number"].to_s.empty?
    raise TrackingMore::TrackingMoreException.new(TrackingMore::Consts::ErrMissingTrackingNumber)
  end
  TrackingMore::Request.make_request('post',"#@@api_module/detect",params)
end

.get_all_couriersObject



6
7
8
# File 'lib/trackingmore/courier.rb', line 6

def self.get_all_couriers
  TrackingMore::Request.make_request('get',"#@@api_module/all")
end