easypost 2.0.1 → 2.0.2
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.
- data/CHANGELOG +5 -0
- data/VERSION +1 -1
- data/easypost.gemspec +2 -2
- data/lib/easypost/shipment.rb +6 -0
- data/lib/easypost/version.rb +1 -1
- data/spec/shipment_spec.rb +13 -0
- metadata +3 -3
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/easypost.gemspec
CHANGED
@@ -6,12 +6,12 @@ require 'easypost/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'easypost'
|
8
8
|
spec.version = EasyPost::VERSION
|
9
|
-
spec.date = '2013-07-
|
9
|
+
spec.date = '2013-07-23'
|
10
10
|
spec.summary = 'EasyPost Ruby Client Library'
|
11
11
|
spec.description = 'Client library for accessing the EasyPost shipping API via Ruby.'
|
12
12
|
spec.authors = ['Jon Calhoun', 'Sawyer Bateman']
|
13
13
|
spec.email = 'contact@easypost.com'
|
14
|
-
spec.homepage = 'https://easypost.com/docs'
|
14
|
+
spec.homepage = 'https://www.easypost.com/docs'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split("\n")
|
17
17
|
spec.test_files = `git ls-files -- test/*`.split("\n")
|
data/lib/easypost/shipment.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
module EasyPost
|
2
2
|
class Shipment < Resource
|
3
3
|
|
4
|
+
def self.track_with_code(params={})
|
5
|
+
response, api_key = EasyPost.request(:get, url + '/track', @api_key, params)
|
6
|
+
|
7
|
+
return response
|
8
|
+
end
|
9
|
+
|
4
10
|
def get_rates(params={})
|
5
11
|
response, api_key = EasyPost.request(:get, url + '/rates', @api_key, params)
|
6
12
|
self.refresh_from(response, @api_key, true)
|
data/lib/easypost/version.rb
CHANGED
data/spec/shipment_spec.rb
CHANGED
@@ -155,4 +155,17 @@ describe EasyPost::Shipment do
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
end
|
158
|
+
|
159
|
+
describe '#track_with_code' do
|
160
|
+
it 'returns tracking information' do
|
161
|
+
tracking = EasyPost::Shipment.track_with_code({
|
162
|
+
:carrier => 'usps',
|
163
|
+
:tracking_code => '9499907123456123456781'
|
164
|
+
})
|
165
|
+
|
166
|
+
expect(tracking).to be_an_instance_of(Hash)
|
167
|
+
expect(tracking[:tracking_details].length).to be > 0
|
168
|
+
expect(tracking[:status].length).to be > 0
|
169
|
+
end
|
170
|
+
end
|
158
171
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-07-
|
13
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- spec/scan_form_spec.rb
|
106
106
|
- spec/shipment_spec.rb
|
107
107
|
- spec/spec_helper.rb
|
108
|
-
homepage: https://easypost.com/docs
|
108
|
+
homepage: https://www.easypost.com/docs
|
109
109
|
licenses: []
|
110
110
|
post_install_message:
|
111
111
|
rdoc_options: []
|