class AfterShip::V4::Courier
Public Class Methods
detect(tracking = nil)
click to toggle source
POST /couriers/detect Return a list of matched couriers based on tracking number format and selected couriers or a list of couriers.
# File lib/aftership/v4/courier.rb, line 20 def self.detect(tracking = nil) if tracking.nil? raise ArgumentError, 'tracking object is required.' else new(:post, 'couriers/detect', {}, { tracking: tracking }).call end end
get()
click to toggle source
GET /couriers Return a list of couriers activated at your AfterShip
account.
# File lib/aftership/v4/courier.rb, line 8 def self.get new(:get, 'couriers').call end
get_all()
click to toggle source
GET /couriers/all Return a list of all couriers.
# File lib/aftership/v4/courier.rb, line 14 def self.get_all new(:get, 'couriers/all').call end