easypost 2.1.9 → 2.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -0
- data/VERSION +1 -1
- data/lib/easypost/address.rb +20 -0
- data/lib/easypost/tracker.rb +10 -0
- data/spec/spec_helper.rb +1 -0
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd5cf919f93399db7eb981bdf495b560410b9173
|
4
|
+
data.tar.gz: 64da74374aa96f9f0919538476b33d15e4d06440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c01785be20060a94f0c6da1d69148784a8bb9ddc687b3dc67ae339759bb3eb51c1fc8cadf630c82fc5fc7741663e2fecc03b204e484728f2cf01dd9211349496
|
7
|
+
data.tar.gz: 9f9b22fd4be1a89dad04a988ebcfc11672a32f0b63918eb30c40dabbcacc169db1e5e420e9abf50cd10fdc04644e207c93d2262db72f2ba298e005db149ad684
|
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.10
|
data/lib/easypost/address.rb
CHANGED
@@ -2,6 +2,26 @@ module EasyPost
|
|
2
2
|
class Address < Resource
|
3
3
|
attr_accessor :message # Backwards compatibility
|
4
4
|
|
5
|
+
def self.create(params={}, api_key=nil)
|
6
|
+
url = self.url
|
7
|
+
|
8
|
+
if params[:verify] || params[:verify_strict]
|
9
|
+
verify = params.delete(:verify) || []
|
10
|
+
verify_strict = params.delete(:verify_strict) || []
|
11
|
+
|
12
|
+
url += "?"
|
13
|
+
verify.each do |verification|
|
14
|
+
url += "verify[]=#{verification}&"
|
15
|
+
end
|
16
|
+
verify_strict.each do |verification|
|
17
|
+
url += "verify_strict[]=#{verification}&"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
response, api_key = EasyPost.request(:post, url, api_key, {address: params})
|
22
|
+
return Util.convert_to_easypost_object(response, api_key)
|
23
|
+
end
|
24
|
+
|
5
25
|
def self.create_and_verify(params={}, carrier=nil, api_key=nil)
|
6
26
|
wrapped_params = {}
|
7
27
|
wrapped_params[self.class_name().to_sym] = params
|
data/lib/easypost/tracker.rb
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
module EasyPost
|
2
2
|
class Tracker < Resource
|
3
|
+
def self.create_list(params={}, api_key=nil)
|
4
|
+
url = self.url + '/create_list'
|
5
|
+
response, api_key = EasyPost.request(:post, url, api_key, params)
|
6
|
+
return true
|
7
|
+
end
|
3
8
|
|
9
|
+
def self.all_updated(params={}, api_key=nil)
|
10
|
+
url = self.url + '/all_updated'
|
11
|
+
response, api_key = EasyPost.request(:get, url, api_key, params)
|
12
|
+
return Util.convert_to_easypost_object(response, api_key)
|
13
|
+
end
|
4
14
|
end
|
5
15
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sawyer Bateman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: multi_json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.7'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.13'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.13'
|
83
83
|
description: Client library for accessing the EasyPost shipping API via Ruby.
|
@@ -87,7 +87,7 @@ executables:
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
-
|
90
|
+
- .gitignore
|
91
91
|
- CHANGELOG
|
92
92
|
- Gemfile
|
93
93
|
- LICENSE
|
@@ -144,17 +144,17 @@ require_paths:
|
|
144
144
|
- lib
|
145
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
|
-
- -
|
152
|
+
- - '>='
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.0.14
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: EasyPost Ruby Client Library
|