Permalink
Browse files

Raise an Exception when rates are not available for a shipment request.

Removed the "Credentials" class name from Fedex::WebServices::Service::Base::Credentials (to prevent polluting the the "namespace" in Struct)
  • Loading branch information...
1 parent d9f9eb3 commit e8f80f253262cdb8eac6bb5c5d575ce312edf471 @brewski committed Oct 12, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 lib/fedex/version.rb
  2. +1 −1 lib/fedex/web_services/service/base.rb
  3. +2 −0 lib/fedex/web_services/service/ship.rb
View
2 lib/fedex/version.rb
@@ -1,3 +1,3 @@
module Fedex
- VERSION = "1.1.50"
+ VERSION = "1.1.51"
end
View
2 lib/fedex/web_services/service/base.rb
@@ -10,7 +10,7 @@ class Base
include Fedex::WebServices::Definitions
include Fedex::WebServices::Request
- Credentials = Struct.new("Credentials",
+ Credentials = Struct.new(
:account_number, :meter_number, :key, :password, :environment
)
View
2 lib/fedex/web_services/service/ship.rb
@@ -72,6 +72,8 @@ def self.package_rate_for(response)
acc + BigDecimal.new(rate.netCharge.amount) :
acc
end
+ rescue
+ raise "Unable to extract rate information from response"
end
protected

0 comments on commit e8f80f2

Please sign in to comment.