Skip to content
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.

Commit

Permalink
Update changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmacaulay committed Sep 21, 2010
1 parent 25dd829 commit 5829d34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,3 +1,4 @@
* Add carrier CanadaPost [william]
* Update FedEx rates and added ability to auto-generate rate name from code that gets returned by FedEx [dennis]
* Assume test_helper is in load path when running tests [cody]
* Add support Kunaki rating service [cody]
Expand Down
45 changes: 8 additions & 37 deletions README.markdown
Expand Up @@ -16,6 +16,7 @@ Active Shipping is currently being used and improved in a production environment
* [UPS](http://www.ups.com)
* [USPS](http://www.usps.com)
* [FedEx](http://www.fedex.com)
* [Canada Post](http://www.canadapost.ca)
* more soon!

## Prerequisites
Expand Down Expand Up @@ -43,6 +44,8 @@ Active Shipping includes an init.rb file. This means that Rails will automatical

## Sample Usage

### Compare rates from different carriers

require 'active_shipping'
include ActiveMerchant::Shipping

Expand Down Expand Up @@ -91,21 +94,10 @@ Active Shipping includes an init.rb file. This means that Rails will automatical
# ["USPS Global Express Guaranteed Non-Document Rectangular", 9400],
# ["USPS Global Express Guaranteed", 9400]]

# FedEx
fdx = FedEx.new(:login => 'Your 9-digit FedEx Account #', :password => 'Your Meter Number')
response = fdx.find_rates(origin, destination, packages, :test => true)
response.rates.sort_by(&:price).collect {|rate| [rate.service_name, rate.price]}
# => [["FedEx Ground", 977],
# ["FedEx Ground Home Delivery", 1388],
# ["FedEx Express Saver", 2477],
# ["FedEx 2 Day", 2718],
# ["FedEx Standard Overnight", 4978],
# ["FedEx Priority Overnight", 8636],
# ["FedEx First Overnight", 12306]]

# FedEx Tracking
fdx = FedEx.new(:login => '999999999', :password => '7777777')
tracking_info = fdx.find_tracking_info('tracking number here', :carrier_code => 'fedex_ground') # Ground package
### Track a FedEx package

fedex = FedEx.new(:login => '999999999', :password => '7777777')
tracking_info = fedex.find_tracking_info('tracking-number', :carrier_code => 'fedex_ground') # Ground package

tracking_info.shipment_events.each do |event|
puts "#{event.name} at #{event.location.city}, #{event.location.state} on #{event.time}. #{event.message}"
Expand All @@ -117,34 +109,12 @@ Active Shipping includes an init.rb file. This means that Rails will automatical
# Arrived at FedEx sort facility at KNOXVILLE, TN on Fri Oct 24 02:45:00 UTC 2008.
# Scanned at FedEx sort facility at KNOXVILLE, TN on Fri Oct 24 05:56:00 UTC 2008.
# Delivered at Knoxville, TN on Fri Oct 24 16:45:00 UTC 2008. Signed for by: T.BAKER

tracking_info = fdx.find_tracking_info('tracking number here', :carrier_code => 'fedex_express') # Express package

tracking_info.shipment_events.each do |event|
puts "#{event.name} at #{event.location.city}, #{event.location.state} on #{event.time}. #{event.message}"
end
# => Picked up by FedEx at NASHVILLE, TN on Wed Dec 03 16:46:00 UTC 2008.
# Package status at MISSISSAUGA, ON on Wed Dec 03 18:00:00 UTC 2008.
# Left FedEx Origin Location at NASHVILLE, TN on Wed Dec 03 20:27:00 UTC 2008.
# Arrived at FedEx Ramp at NASHVILLE, TN on Wed Dec 03 20:43:00 UTC 2008.
# Left FedEx Ramp at NASHVILLE, TN on Wed Dec 03 22:30:00 UTC 2008.
# Arrived at Sort Facility at INDIANAPOLIS, IN on Thu Dec 04 00:31:00 UTC 2008.
# Left FedEx Sort Facility at INDIANAPOLIS, IN on Thu Dec 04 01:14:00 UTC 2008.
# Left FedEx Sort Facility at INDIANAPOLIS, IN on Thu Dec 04 04:48:00 UTC 2008.
# Arrived at FedEx Ramp at MISSISSAUGA, ON on Thu Dec 04 06:26:00 UTC 2008.
# Package status at MISSISSAUGA, ON on Thu Dec 04 07:03:00 UTC 2008.
# Left FedEx Ramp at MISSISSAUGA, ON on Thu Dec 04 07:37:00 UTC 2008.
# Arrived at FedEx Destination Location at TORONTO, ON on Thu Dec 04 08:42:00 UTC 2008.
# On FedEx vehicle for delivery at TORONTO, ON on Thu Dec 04 09:04:00 UTC 2008.
# Delivered to Non-FedEx clearance broker at TORONTO, ON on Thu Dec 04 10:15:00 UTC 2008.

## TODO

* proper documentation
* proper offline testing for carriers in addition to the remote tests
* carrier code template generator
* more carriers
* integrate with ActiveMerchant
* support more features for existing carriers
* bin-packing algorithm (preferably implemented in ruby)
* order tracking
Expand All @@ -164,6 +134,7 @@ The nicest way to submit changes would be to set up a GitHub account and fork th
* Tobias Luetke (<http://blog.leetsoft.com>)
* Cody Fauser (<http://codyfauser.com>)
* Jimmy Baker (<http://jimmyville.com/>)
* William Lang (<http://williamlang.net/>)

## Legal Mumbo Jumbo

Expand Down

0 comments on commit 5829d34

Please sign in to comment.