shipping-calc 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
+ === 0.1.6 / 2008-05-29
2
+
3
+ * Fixed a bug in FreightQuote where the origin and destination zip code would
4
+ some times be the same.
5
+
1
6
  === 0.1.5 / 2008-04-20
2
7
 
3
8
  * DHL quotes now throw an exception if the DHL's sytem is online (like it is
@@ -7,16 +7,18 @@ opts = {
7
7
  :api_email => "xmltest@FreightQuote.com",
8
8
  :api_password => "XML",
9
9
  :from_zip => 75042,
10
- :to_zip => 33166,
11
- :weight => 5,
12
- :dimensions => "1x1x1",
10
+ :to_zip => 75042,
11
+ :weight => 105,
12
+ :class => 92.5,
13
13
  :to_conditions => "BIZ_WITHOUT"
14
14
  }
15
15
 
16
16
  f = FreightQuote.new
17
17
  quotes = f.quote(opts)
18
+ p quotes
18
19
  quotes.each do |k,v|
19
20
  p k + " - " + v
20
21
  end
21
22
 
22
23
 
24
+
@@ -32,7 +32,7 @@ require 'shipping_calc/freight_quote'
32
32
  module ShippingCalc
33
33
  class ShippingCalcError < StandardError
34
34
  end
35
- VERSION = "0.1.5"
35
+ VERSION = "0.1.6"
36
36
 
37
37
  US_STATES = ['AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC',
38
38
  'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN',
@@ -63,8 +63,8 @@ module ShippingCalc
63
63
  params[:from_conditions] ||= "RES"
64
64
  params[:to_conditions] ||= "RES"
65
65
 
66
- @xml = xml = Document.new
67
- xml << XMLDecl.new("1.0' encoding='UTF-8")
66
+ @xml = Document.new
67
+ ## @xml << XMLDecl.new("1.0' encoding='UTF-8")
68
68
  rate_estimate(params)
69
69
  request
70
70
  end
@@ -80,7 +80,7 @@ module ShippingCalc
80
80
  # We're only getting a quote, let's pretend the shipper's paying.
81
81
  root.attributes["BILLTO"] = "SHIPPER"
82
82
 
83
- root << destination(params[:from_zip], params[:from_conditions],
83
+ root << destination(params[:to_zip], params[:to_conditions],
84
84
  params[:liftgate], params[:inside_delivery])
85
85
  root << origin(params[:from_zip], params[:from_conditions])
86
86
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipping-calc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Builes
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-20 00:00:00 -05:00
12
+ date: 2008-05-29 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.5.1
22
+ version: 1.5.3
23
23
  version:
24
24
  description: Shipping Calculator written in Ruby to get quick quotes from the major carriers (UPS, DHL, FedEX, FreightQuote).
25
25
  email: