mc-fedex 0.1.0 → 0.2.0

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/mc-fedex.rb +3 -1
  3. data/mc-fedex.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -127,6 +127,7 @@ module McFedex
127
127
  count = options[:count] || 1
128
128
  weight = options[:weight]
129
129
  rma = options[:rma] || ""
130
+ tracking_number = options[:tracking_number] || 0
130
131
 
131
132
  time = options[:time] || Time.now
132
133
  puts time.class
@@ -213,7 +214,8 @@ module McFedex
213
214
  if successful && msg !~ /There are no valid services available/
214
215
  if @use_smart_post
215
216
  charge = 0
216
- tracking_number = result.completedShipmentDetail.completedPackageDetails.trackingIds[1].trackingNumber
217
+ # trackingIds[0] - this is the 22 digit tracking number, trackingIds[1] is the shorter tracking number
218
+ tracking_number = result.completedShipmentDetail.completedPackageDetails.trackingIds[tracking_number].trackingNumber
217
219
  else
218
220
  pre = result.completedShipmentDetail.shipmentRating.shipmentRateDetails
219
221
  charge = ((pre.class == Array ? pre[0].totalNetCharge.amount.to_f : pre.totalNetCharge.amount.to_f) * 100).to_i
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mc-fedex}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Edwin & Adam & Eric"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mc-fedex
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Edwin & Adam & Eric