fedex 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -248,6 +248,8 @@ Fedex::Shipment::DROP_OFF_TYPES
248
248
  - [janders223] (https://github.com/janders223) (Jim Anders)
249
249
  - [jlambert121] (https://github.com/jlambert121) (Justin Lambert)
250
250
  - [sborsje] (https://github.com/sborsje) (Stefan Borsje)
251
+ - [bradediger] (https://github.com/bradediger) (Brad Ediger)
252
+ - [yevgenko] (https://github.com/yevgenko) (Yevgeniy Viktorov)
251
253
 
252
254
  # Copyright/License:
253
255
  Copyright 2011 [Jazmin Schroeder](http://jazminschroeder.com)
@@ -14,12 +14,12 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "fedex"
16
16
 
17
- s.add_dependency 'httparty', '~> 0.10.0'
17
+ s.add_dependency 'httparty', '~> 0.11.0'
18
18
  s.add_dependency 'nokogiri', '~> 1.5.0'
19
19
 
20
20
  s.add_development_dependency "rspec", '~> 2.9.0'
21
21
  s.add_development_dependency 'vcr', '~> 2.0.0'
22
- s.add_development_dependency 'fakeweb'
22
+ s.add_development_dependency 'webmock', '~> 1.8.0'
23
23
  # s.add_runtime_dependency "rest-client"
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
@@ -0,0 +1,51 @@
1
+ module Fedex
2
+ class Document
3
+ attr_reader :tracking_number, :filenames, :response_details
4
+
5
+ # Initialize Fedex::Document Object
6
+ # @param [Hash] options
7
+ def initialize(shipment_details = {})
8
+ @response_details = shipment_details[:process_shipment_reply]
9
+ @filenames = shipment_details[:filenames]
10
+
11
+ # extract label and tracking number
12
+ package_details = @response_details[:completed_shipment_detail][:completed_package_details]
13
+ label = package_details[:label]
14
+ @tracking_number = package_details[:tracking_ids][:tracking_number]
15
+
16
+ # extract shipment documents
17
+ shipment_documents = @response_details[:completed_shipment_detail][:shipment_documents] || []
18
+
19
+ # unify iteration interface
20
+ unless shipment_documents.kind_of?(Array)
21
+ shipment_documents = [shipment_documents]
22
+ end
23
+
24
+ # keeps the filenames which actually saved
25
+ save(@filenames[:label], label)
26
+
27
+ # save shipment documents
28
+ shipment_documents.each do |doc|
29
+ doc_type = doc[:type].downcase.to_sym
30
+ save(@filenames[doc_type], doc)
31
+ end
32
+ end
33
+
34
+ def save(path, content)
35
+ return unless path && has_image?(content)
36
+
37
+ image = Base64.decode64(content[:parts][:image])
38
+ full_path = Pathname.new(path)
39
+ File.open(full_path, 'wb') do|f|
40
+ f.write(image)
41
+ end
42
+
43
+ full_path
44
+ end
45
+
46
+ def has_image?(content)
47
+ content[:parts] && content[:parts][:image]
48
+ end
49
+
50
+ end
51
+ end
@@ -23,7 +23,7 @@ module Fedex
23
23
  error_message = if response[:address_validation_reply]
24
24
  [response[:address_validation_reply][:notifications]].flatten.first[:message]
25
25
  else
26
- "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"]}"
26
+ "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n--#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"].join("\n--")}"
27
27
  end rescue $1
28
28
  raise RateError, error_message
29
29
  end
@@ -47,6 +47,10 @@ module Fedex
47
47
  @shipper, @recipient, @packages, @service_type, @customs_clearance, @debug = options[:shipper], options[:recipient], options[:packages], options[:service_type], options[:customs_clearance], options[:debug]
48
48
  @debug = ENV['DEBUG'] == 'true'
49
49
  @shipping_options = options[:shipping_options] ||={}
50
+ # Expects hash with addr and port
51
+ if options[:http_proxy]
52
+ self.class.http_proxy options[:http_proxy][:host], options[:http_proxy][:port]
53
+ end
50
54
  end
51
55
 
52
56
  # Sends post request to Fedex web service and parse the response.
@@ -78,7 +82,7 @@ module Fedex
78
82
  }
79
83
  end
80
84
 
81
- # Add Version to xml request, using the latest version V10 Sept/2011
85
+ # Add Version to xml request, using the version identified in the subclass
82
86
  def add_version(xml)
83
87
  xml.Version{
84
88
  xml.ServiceId service[:id]
@@ -149,8 +153,19 @@ module Fedex
149
153
  xml.ShippingChargesPayment{
150
154
  xml.PaymentType "SENDER"
151
155
  xml.Payor{
152
- xml.AccountNumber @credentials.account_number
153
- xml.CountryCode @shipper[:country_code]
156
+ if service[:version] >= 12
157
+ xml.ResponsibleParty {
158
+ xml.AccountNumber @credentials.account_number
159
+ xml.Contact {
160
+ xml.PersonName @shipper[:name]
161
+ xml.CompanyName @shipper[:company]
162
+ xml.PhoneNumber @shipper[:phone_number]
163
+ }
164
+ }
165
+ else
166
+ xml.AccountNumber @credentials.account_number
167
+ xml.CountryCode @shipper[:country_code]
168
+ end
154
169
  }
155
170
  }
156
171
  end
@@ -174,14 +189,7 @@ module Fedex
174
189
  xml.Units package[:dimensions][:units]
175
190
  }
176
191
  end
177
- if package[:customer_refrences]
178
- xml.CustomerReferences{
179
- package[:customer_refrences].each do |value|
180
- xml.CustomerReferenceType 'CUSTOMER_REFERENCE'
181
- xml.Value value
182
- end
183
- }
184
- end
192
+ add_customer_references(xml, package)
185
193
  if package[:special_services_requested] && package[:special_services_requested][:special_service_types]
186
194
  xml.SpecialServicesRequested{
187
195
  if package[:special_services_requested][:special_service_types].is_a? Array
@@ -231,6 +239,29 @@ module Fedex
231
239
  end
232
240
  end
233
241
 
242
+ def add_customer_references(xml, package)
243
+ # customer_refrences is a legacy misspelling
244
+ if refs = package[:customer_references] || package[:customer_refrences]
245
+ refs.each do |ref|
246
+ xml.CustomerReferences{
247
+ if ref.is_a?(Hash)
248
+ # :type can specify custom type:
249
+ #
250
+ # BILL_OF_LADING, CUSTOMER_REFERENCE, DEPARTMENT_NUMBER,
251
+ # ELECTRONIC_PRODUCT_CODE, INTRACOUNTRY_REGULATORY_REFERENCE,
252
+ # INVOICE_NUMBER, P_O_NUMBER, RMA_ASSOCIATION,
253
+ # SHIPMENT_INTEGRITY, STORE_NUMBER
254
+ xml.CustomerReferenceType ref[:type]
255
+ xml.Value ref[:value]
256
+ else
257
+ xml.CustomerReferenceType 'CUSTOMER_REFERENCE'
258
+ xml.Value ref
259
+ end
260
+ }
261
+ end
262
+ end
263
+ end
264
+
234
265
  # Add customs clearance(for international shipments)
235
266
  def add_customs_clearance(xml)
236
267
  xml.CustomsClearanceDetail{
@@ -0,0 +1,45 @@
1
+ require 'fedex/request/shipment'
2
+ require 'fedex/document'
3
+
4
+ module Fedex
5
+ module Request
6
+ class Document < Shipment
7
+
8
+ def initialize(credentials, options={})
9
+ super(credentials, options)
10
+
11
+ @shipping_document = options[:shipping_document]
12
+ @filenames = options.fetch(:filenames) { {} }
13
+ end
14
+
15
+ def add_custom_components(xml)
16
+ super
17
+
18
+ add_shipping_document(xml) if @shipping_document
19
+ end
20
+
21
+ private
22
+
23
+ # Add shipping document specification
24
+ def add_shipping_document(xml)
25
+ xml.ShippingDocumentSpecification{
26
+ Array(@shipping_document[:shipping_document_types]).each do |type|
27
+ xml.ShippingDocumentTypes type
28
+ end
29
+ hash_to_xml(xml, @shipping_document.reject{ |k| k == :shipping_document_types})
30
+ }
31
+ end
32
+
33
+ def success_response(api_response, response)
34
+ super
35
+
36
+ shipment_documents = response.merge!({
37
+ :filenames => @filenames
38
+ })
39
+
40
+ Fedex::Document.new shipment_documents
41
+ end
42
+
43
+ end
44
+ end
45
+ end
@@ -15,7 +15,7 @@ module Fedex
15
15
  error_message = if response[:rate_reply]
16
16
  [response[:rate_reply][:notifications]].flatten.first[:message]
17
17
  else
18
- "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"]}"
18
+ "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n--#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"].join("\n--")}"
19
19
  end rescue $1
20
20
  raise RateError, error_message
21
21
  end
@@ -40,8 +40,9 @@ module Fedex
40
40
 
41
41
  # Build xml Fedex Web Service request
42
42
  def build_xml
43
+ ns = "http://fedex.com/ws/rate/v#{service[:version]}"
43
44
  builder = Nokogiri::XML::Builder.new do |xml|
44
- xml.RateRequest(:xmlns => "http://fedex.com/ws/rate/v10"){
45
+ xml.RateRequest(:xmlns => ns){
45
46
  add_web_authentication_detail(xml)
46
47
  add_client_detail(xml)
47
48
  add_version(xml)
@@ -44,6 +44,7 @@ module Fedex
44
44
  add_shipper(xml)
45
45
  add_recipient(xml)
46
46
  add_shipping_charges_payment(xml)
47
+ add_special_services(xml) if @shipping_options[:return_reason]
47
48
  add_customs_clearance(xml) if @customs_clearance
48
49
  add_custom_components(xml)
49
50
  xml.RateRequestTypes "ACCOUNT"
@@ -65,12 +66,24 @@ module Fedex
65
66
  }
66
67
  end
67
68
 
69
+ def add_special_services(xml)
70
+ xml.SpecialServicesRequested {
71
+ xml.SpecialServiceTypes "RETURN_SHIPMENT"
72
+ xml.ReturnShipmentDetail {
73
+ xml.ReturnType "PRINT_RETURN_LABEL"
74
+ xml.Rma {
75
+ xml.Reason "#{@shipping_options[:return_reason]}"
76
+ }
77
+ }
78
+ }
79
+ end
80
+
68
81
  # Callback used after a failed shipment response.
69
82
  def failure_response(api_response, response)
70
83
  error_message = if response[:process_shipment_reply]
71
84
  [response[:process_shipment_reply][:notifications]].flatten.first[:message]
72
85
  else
73
- "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"]}"
86
+ "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n--#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"].join("\n--")}"
74
87
  end rescue $1
75
88
  raise RateError, error_message
76
89
  end
@@ -83,7 +96,7 @@ module Fedex
83
96
  # Build xml Fedex Web Service request
84
97
  def build_xml
85
98
  builder = Nokogiri::XML::Builder.new do |xml|
86
- xml.ProcessShipmentRequest(:xmlns => "http://fedex.com/ws/ship/v10"){
99
+ xml.ProcessShipmentRequest(:xmlns => "http://fedex.com/ws/ship/v12"){
87
100
  add_web_authentication_detail(xml)
88
101
  add_client_detail(xml)
89
102
  add_version(xml)
@@ -94,7 +107,7 @@ module Fedex
94
107
  end
95
108
 
96
109
  def service
97
- { :id => 'ship', :version => 10 }
110
+ { :id => 'ship', :version => 12 }
98
111
  end
99
112
 
100
113
  # Successful request
@@ -39,7 +39,7 @@ module Fedex
39
39
  error_message = if response[:track_reply]
40
40
  response[:track_reply][:notifications][:message]
41
41
  else
42
- "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"]}"
42
+ "#{api_response["Fault"]["detail"]["fault"]["reason"]}\n--#{api_response["Fault"]["detail"]["fault"]["details"]["ValidationFailureDetail"]["message"].join("\n--")}"
43
43
  end rescue $1
44
44
  raise RateError, error_message
45
45
  end
@@ -3,6 +3,7 @@ require 'fedex/request/label'
3
3
  require 'fedex/request/rate'
4
4
  require 'fedex/request/tracking_information'
5
5
  require 'fedex/request/address'
6
+ require 'fedex/request/document'
6
7
 
7
8
  module Fedex
8
9
  class Shipment
@@ -57,5 +58,16 @@ module Fedex
57
58
  Request::TrackingInformation.new(@credentials, options).process_request
58
59
  end
59
60
 
61
+ # @param [Hash] shipper, A hash containing the shipper information
62
+ # @param [Hash] recipient, A hash containing the recipient information
63
+ # @param [Array] packages, An arrary including a hash for each package being shipped
64
+ # @param [String] service_type, A valid fedex service type, to view a complete list of services Fedex::Shipment::SERVICE_TYPES
65
+ # @param [Hash] customs_clearance, A hash containing customs clearance specification
66
+ # @param [Hash] shipping_document, A hash containing shipping document specification
67
+ # @param [Array] filenames, A locations where the label and shipment documents will be saved
68
+ def document(options = {})
69
+ Request::Document.new(@credentials, options).process_request
70
+ end
71
+
60
72
  end
61
73
  end
@@ -29,7 +29,7 @@ module Fedex
29
29
  }
30
30
 
31
31
  attr_reader :tracking_number, :signature_name, :service_type, :status,
32
- :delivery_at, :events, :unique_tracking_number
32
+ :delivery_at, :events, :unique_tracking_number, :details
33
33
 
34
34
  def initialize(details = {})
35
35
  @details = details
@@ -50,4 +50,4 @@ module Fedex
50
50
  end
51
51
 
52
52
  end
53
- end
53
+ end
@@ -1,3 +1,3 @@
1
1
  module Fedex
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -0,0 +1,177 @@
1
+ require 'spec_helper'
2
+ require 'tmpdir'
3
+
4
+ module Fedex
5
+ describe Document do
6
+ let(:fedex) { Shipment.new(fedex_credentials) }
7
+ let(:shipper) do
8
+ {:name => "Sender", :company => "Company", :phone_number => "555-555-5555", :address => "King Street", :city => "Ashbourne", :postal_code => "DE6 1EA", :country_code => "GB"}
9
+ end
10
+ let(:recipient) do
11
+ {:name => "Recipient", :company => "Company", :phone_number => "555-555-5555", :address => "Main Street", :city => "Frankin Park", :state => "IL", :postal_code => "60131", :country_code => "US", :residential => true }
12
+ end
13
+ let(:packages) do
14
+ [
15
+ {
16
+ :weight => {:units => "LB", :value => 2},
17
+ :dimensions => {:length => 10, :width => 5, :height => 4, :units => "IN" }
18
+ }
19
+ ]
20
+ end
21
+ let(:shipping_options) do
22
+ { :packaging_type => "YOUR_PACKAGING", :drop_off_type => "REGULAR_PICKUP" }
23
+ end
24
+ let(:customs) do
25
+ {
26
+ :duties_payment => {
27
+ :payment_type => 'SENDER',
28
+ :payor => {
29
+ :responsible_party => {
30
+ :account_number => fedex_credentials[:account_number],
31
+ :contact => {
32
+ :person_name => 'Mr. Test',
33
+ :phone_number => '12345678'
34
+ }
35
+ }
36
+ }
37
+ },
38
+ :document_content => 'NON_DOCUMENTS',
39
+ :customs_value => {
40
+ :currency => 'UKL', # UK Pounds Sterling
41
+ :amount => 155.79
42
+ },
43
+ :commercial_invoice => {
44
+ :terms_of_sale => 'DDU'
45
+ },
46
+ :commodities => [
47
+ {
48
+ :number_of_pieces => 1,
49
+ :description => 'Pink Toy',
50
+ :country_of_manufacture => 'GB',
51
+ :weight => {
52
+ :units => 'LB',
53
+ :value => 2
54
+ },
55
+ :quantity => 1,
56
+ :quantity_units => 'EA',
57
+ :unit_price => {
58
+ :currency => 'UKL',
59
+ :amount => 155.79
60
+ },
61
+ :customs_value => {
62
+ :currency => 'UKL', # UK Pounds Sterling
63
+ :amount => 155.79
64
+ }
65
+ }
66
+ ]
67
+ }
68
+ end
69
+ let(:document) do
70
+ {
71
+ :shipping_document_types => 'COMMERCIAL_INVOICE',
72
+ :commercial_invoice_detail => {
73
+ :format => {
74
+ :image_type => 'PDF',
75
+ :stock_type => 'PAPER_LETTER'
76
+ }
77
+ }
78
+ }
79
+ end
80
+
81
+ let(:filenames) {
82
+ require 'tmpdir'
83
+ {
84
+ :label => File.join(Dir.tmpdir, "label#{rand(15000)}.pdf"),
85
+ :commercial_invoice => File.join(Dir.tmpdir, "invoice#{rand(15000)}.pdf")
86
+ }
87
+ }
88
+
89
+ let(:options) do
90
+ {
91
+ :shipper => shipper,
92
+ :recipient => recipient,
93
+ :packages => packages,
94
+ :service_type => "INTERNATIONAL_PRIORITY",
95
+ :shipping_details => shipping_options,
96
+ :customs_clearance => customs,
97
+ :shipping_document => document,
98
+ :filenames => filenames
99
+ }
100
+ end
101
+
102
+ describe 'document service', :vcr do
103
+
104
+ context 'with document specification' do
105
+
106
+ before do
107
+ @document = fedex.document(options)
108
+ end
109
+
110
+ it "saves a label to file" do
111
+ File.should exist(filenames[:label])
112
+ end
113
+
114
+ it "saves invoice to file" do
115
+ File.should exist(filenames[:commercial_invoice])
116
+ end
117
+
118
+ it "returns tracking number" do
119
+ @document.should respond_to('tracking_number')
120
+ end
121
+
122
+ it "exposes complete response" do
123
+ @document.should respond_to('response_details')
124
+ end
125
+
126
+ it "exposes the filenames" do
127
+ @document.should respond_to('filenames')
128
+ end
129
+
130
+ end
131
+
132
+ context 'without document specification' do
133
+
134
+ before do
135
+ @document = fedex.document(
136
+ options.reject{|k| k == :shipping_document}
137
+ )
138
+ end
139
+
140
+ it "saves a label to file" do
141
+ File.should exist(filenames[:label])
142
+ end
143
+
144
+ it "has no others files" do
145
+ File.should_not exist(filenames[:commercial_invoice])
146
+ end
147
+
148
+ end
149
+
150
+ context 'filename missed' do
151
+ context 'for label' do
152
+ before do
153
+ filenames.delete(:label)
154
+ @document = fedex.document(options)
155
+ end
156
+
157
+ it "saves invoice to file" do
158
+ File.should exist(filenames[:commercial_invoice])
159
+ end
160
+ end
161
+
162
+ context 'for invoice' do
163
+ before do
164
+ filenames.delete(:commercial_invoice)
165
+ @document = fedex.document(options)
166
+ end
167
+
168
+ it "saves label to file" do
169
+ File.should exist(filenames[:label])
170
+ end
171
+ end
172
+ end
173
+
174
+ end
175
+
176
+ end
177
+ end
@@ -12,7 +12,7 @@ module Fedex
12
12
  }
13
13
  end
14
14
 
15
- let(:uuid) { "12012~123456789012~FDEG" }
15
+ let(:uuid) { fedex.track(options).first.unique_tracking_number }
16
16
 
17
17
  it "returns an array of tracking information results" do
18
18
  results = fedex.track(options)
@@ -20,9 +20,7 @@ module Fedex
20
20
  end
21
21
 
22
22
  it "returns events with tracking information" do
23
- options[:uuid] = uuid
24
-
25
- tracking_info = fedex.track(options).first
23
+ tracking_info = fedex.track(options.merge(:uuid => uuid)).first
26
24
 
27
25
  tracking_info.events.should_not be_empty
28
26
  end
@@ -44,13 +42,11 @@ module Fedex
44
42
  end
45
43
 
46
44
  it "reports the status of the package" do
47
- options[:uuid] = uuid
48
-
49
- tracking_info = fedex.track(options).first
45
+ tracking_info = fedex.track(options.merge(:uuid => uuid)).first
50
46
 
51
- tracking_info.status.should == "In transit"
47
+ tracking_info.status.should == "Shipment cancelled by sender"
52
48
  end
53
49
 
54
50
  end
55
51
  end
56
- end
52
+ end
@@ -2,7 +2,7 @@ require 'vcr'
2
2
 
3
3
  VCR.configure do |c|
4
4
  c.cassette_library_dir = File.expand_path('../../vcr', __FILE__)
5
- c.hook_into :fakeweb
5
+ c.hook_into :webmock
6
6
  end
7
7
 
8
8
  RSpec.configure do |c|
@@ -12,4 +12,4 @@ RSpec.configure do |c|
12
12
  name = underscorize(example.metadata[:full_description].split(/\s+/, 2).join("/")).gsub(/[^\w\/]+/, "_")
13
13
  VCR.use_cassette(name) { example.call }
14
14
  end
15
- end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedex
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-02 00:00:00.000000000 Z
12
+ date: 2013-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &70168051584480 !ruby/object:Gem::Requirement
16
+ requirement: &70277283362620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.10.0
21
+ version: 0.11.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70168051584480
24
+ version_requirements: *70277283362620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70168051583980 !ruby/object:Gem::Requirement
27
+ requirement: &70277283377800 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70168051583980
35
+ version_requirements: *70277283377800
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70168051583460 !ruby/object:Gem::Requirement
38
+ requirement: &70277283377140 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.9.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70168051583460
46
+ version_requirements: *70277283377140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: vcr
49
- requirement: &70168051582920 !ruby/object:Gem::Requirement
49
+ requirement: &70277283376280 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,18 +54,18 @@ dependencies:
54
54
  version: 2.0.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70168051582920
57
+ version_requirements: *70277283376280
58
58
  - !ruby/object:Gem::Dependency
59
- name: fakeweb
60
- requirement: &70168051582460 !ruby/object:Gem::Requirement
59
+ name: webmock
60
+ requirement: &70277283375680 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
- - - ! '>='
63
+ - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: '0'
65
+ version: 1.8.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70168051582460
68
+ version_requirements: *70277283375680
69
69
  description: Provides an interface to Fedex Web Services(version 10) - shipping rates,
70
70
  generate labels and address validation
71
71
  email:
@@ -83,11 +83,13 @@ files:
83
83
  - lib/fedex.rb
84
84
  - lib/fedex/address.rb
85
85
  - lib/fedex/credentials.rb
86
+ - lib/fedex/document.rb
86
87
  - lib/fedex/helpers.rb
87
88
  - lib/fedex/label.rb
88
89
  - lib/fedex/rate.rb
89
90
  - lib/fedex/request/address.rb
90
91
  - lib/fedex/request/base.rb
92
+ - lib/fedex/request/document.rb
91
93
  - lib/fedex/request/label.rb
92
94
  - lib/fedex/request/rate.rb
93
95
  - lib/fedex/request/shipment.rb
@@ -98,6 +100,7 @@ files:
98
100
  - lib/fedex/version.rb
99
101
  - spec/config/fedex_credentials.example.yml
100
102
  - spec/lib/fedex/address_spec.rb
103
+ - spec/lib/fedex/document_spec.rb
101
104
  - spec/lib/fedex/label_spec.rb
102
105
  - spec/lib/fedex/rate_spec.rb
103
106
  - spec/lib/fedex/shipment_spec.rb
@@ -132,6 +135,7 @@ summary: Fedex Web Services
132
135
  test_files:
133
136
  - spec/config/fedex_credentials.example.yml
134
137
  - spec/lib/fedex/address_spec.rb
138
+ - spec/lib/fedex/document_spec.rb
135
139
  - spec/lib/fedex/label_spec.rb
136
140
  - spec/lib/fedex/rate_spec.rb
137
141
  - spec/lib/fedex/shipment_spec.rb