class Myparcel::API::Tracktraces

Class for managing tracktraces

Public Instance Methods

find(options = {}) click to toggle source
# File lib/myparcel/api/tracktraces.rb, line 5
def find(options = {})
  shipment_ids = options.fetch(:shipment_ids, [])
  raise 'options[:shipment_ids] cannot be empty' if shipment_ids.empty?
  shipment_ids = shipment_ids.join(';')
  full_path = [path, shipment_ids].join('/')
  response = request :get, full_path, options
  response['data']['tracktraces']
end
path() click to toggle source
# File lib/myparcel/api/tracktraces.rb, line 14
def path
  'tracktraces'
end