0.0
No commit activity in last 3 years
No release in over 3 years
Track parcels sent via CollectPlus
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0
>= 0

Runtime

 Project Readme

collect_plus

A simple gem to retrieve the status of parcels sent via CollectPlus.

Installation

Add this line to your application's Gemfile:

gem 'collect_plus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install collect_plus

Usage

# Initialise a new CollectPlus::Tracker by passing in the tracking number
tracker = CollectPlus::Tracker.new("ABC123")

# Get the current tracking status
tracker.current_status
=> "Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014"

# Get previous tracking statuses
# Returns an array of status strings
tracker.status_history
=> ["Loaded onto VAN - 06:35, Wed, 09 Jul 2014", 
"Processed at National Hub - 11:45, Tue, 08 Jul 2014", 
"Processed at National Hub - 11:39, Tue, 08 Jul 2014", 
"Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014", 
"Parcel collected - 11:46, Mon, 07 Jul 2014", 
"Received at SPAR, LDN - 08:21, Mon, 07 Jul 2014", 
"Delivery booked - 13:25, Sun, 06 Jul 2014"]

# Get a print-friendly summary of all tracking statuses so far
puts tracker.status_summary
=> CURRENT STATUS
Loaded onto VAN - 06:35, Wed, 09 Jul 2014

STATUS HISTORY
Processed at National Hub - 11:45, Tue, 08 Jul 2014

Processed at National Hub - 11:39, Tue, 08 Jul 2014

Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014

Parcel collected - 11:46, Mon, 07 Jul 2014

Received at SPAR, LDN - 08:21, Mon, 07 Jul 2014

Delivery booked - 13:25, Sun, 06 Jul 2014

# Update tracking info
tracker.track
tracker.current_status
=> "Delivered to Customer at 11:14, Wed, 09 Jul 2014"