easypost 2.0.12 → 2.1.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.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/easypost.gemspec +9 -7
- data/lib/easypost/address.rb +5 -4
- data/lib/easypost/batch.rb +2 -2
- data/lib/easypost/item.rb +2 -2
- data/lib/easypost/pickup.rb +19 -0
- data/lib/easypost/pickup_rate.rb +5 -0
- data/lib/easypost/shipment.rb +2 -6
- data/lib/easypost/util.rb +4 -0
- data/lib/easypost.rb +24 -10
- data/spec/address_spec.rb +17 -1
- data/spec/fedex/domestic_spec.rb +10 -0
- data/spec/pickup_spec.rb +69 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/ups/domestic_spec.rb +15 -0
- metadata +52 -15
- data/Gemfile.lock +0 -30
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
ZDRiZmUzZDYxMmEzNmNlNWRhNjMxNzZkYjdhMzQ4MGZjZTMxOTM5Mw==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
ZTcxNzNjN2ZhMzYxODA3NmFhMGY5NzQ4NTg2ZTk5NmNjOTAwODI5ZA==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
MzlmYzQ1YjZkMjQ0YWMzYTVjMzU5ZDI4NzJhYzAzODcxYmQ0MDBiMDVjYTAw
|
|
10
|
+
OTQ2NjE0YjQwMzcyZmY4ZTkyMzcwYjMxODBjM2I3Y2ZhMmQ0NzAzMThhOWNm
|
|
11
|
+
OTEzYjVkNzMzNmFmZTMyNmMyODBjNjJiYzRkZmM3N2Q0NDcxNjU=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
NjNlMmY0ZmI5MDdjNWI1ODM0MDBkZTBhMjQ0OTk3NDhkMjIxNTNlMTZhOWQ0
|
|
14
|
+
OGVlYjVlYjRkMjhkMThiMDZlMmRhZmM4NTIxMWJmMWI4NTc1ODRmMDNjMzk1
|
|
15
|
+
ODExMzE1MmE0OWMxOTY4ZWRmMTg3YThiOWE4NGE2NWY1Mzk5ZGU=
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0
|
|
1
|
+
2.1.0
|
data/easypost.gemspec
CHANGED
|
@@ -13,12 +13,14 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.email = 'contact@easypost.com'
|
|
14
14
|
spec.homepage = 'https://www.easypost.com/docs'
|
|
15
15
|
|
|
16
|
-
spec.files = `git ls-files`.split("\
|
|
17
|
-
spec.
|
|
18
|
-
spec.
|
|
19
|
-
spec.
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
20
|
|
|
21
|
-
spec.add_dependency
|
|
22
|
-
spec.add_dependency
|
|
23
|
-
spec.add_development_dependency
|
|
21
|
+
spec.add_dependency 'rest-client', '~> 1.4'
|
|
22
|
+
spec.add_dependency 'multi_json', '>= 1.0.4', '< 2'
|
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
25
|
+
spec.add_development_dependency 'rspec', '~> 2.13.0'
|
|
24
26
|
end
|
data/lib/easypost/address.rb
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
module EasyPost
|
|
2
2
|
class Address < Resource
|
|
3
3
|
|
|
4
|
-
def self.create_and_verify(params={})
|
|
4
|
+
def self.create_and_verify(params={}, carrier=nil, api_key=nil)
|
|
5
5
|
wrapped_params = {}
|
|
6
6
|
wrapped_params[self.class_name().to_sym] = params
|
|
7
|
-
|
|
7
|
+
wrapped_params[:carrier] = carrier
|
|
8
|
+
response, api_key = EasyPost.request(:post, url + '/create_and_verify', api_key, wrapped_params)
|
|
8
9
|
|
|
9
10
|
if response.has_key?(:address)
|
|
10
11
|
if response.has_key?(:message)
|
|
@@ -17,8 +18,8 @@ module EasyPost
|
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
def verify(params={})
|
|
21
|
-
response, api_key = EasyPost.request(:get, url + '/verify', @api_key, params)
|
|
21
|
+
def verify(params={}, carrier=nil)
|
|
22
|
+
response, api_key = EasyPost.request(:get, url + '/verify?carrier=' + String(carrier), @api_key, params)
|
|
22
23
|
|
|
23
24
|
if response.has_key?(:address)
|
|
24
25
|
if response.has_key?(:message)
|
data/lib/easypost/batch.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module EasyPost
|
|
2
2
|
class Batch < Resource
|
|
3
3
|
|
|
4
|
-
def self.create_and_buy(params={})
|
|
4
|
+
def self.create_and_buy(params={}, api_key=nil)
|
|
5
5
|
wrapped_params = {}
|
|
6
6
|
wrapped_params[self.class_name().to_sym] = params
|
|
7
|
-
response, api_key = EasyPost.request(:post, url + '/create_and_buy',
|
|
7
|
+
response, api_key = EasyPost.request(:post, url + '/create_and_buy', api_key, wrapped_params)
|
|
8
8
|
|
|
9
9
|
return Util.convert_to_easypost_object(response, api_key)
|
|
10
10
|
end
|
data/lib/easypost/item.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module EasyPost
|
|
2
2
|
class Item < Resource
|
|
3
3
|
|
|
4
|
-
def self.retrieve_reference(params={})
|
|
5
|
-
response, api_key = EasyPost.request(:get, url + '/retrieve_reference',
|
|
4
|
+
def self.retrieve_reference(params={}, api_key=nil)
|
|
5
|
+
response, api_key = EasyPost.request(:get, url + '/retrieve_reference', api_key, params)
|
|
6
6
|
return EasyPost::Util::convert_to_easypost_object(response, api_key) if response
|
|
7
7
|
end
|
|
8
8
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module EasyPost
|
|
2
|
+
class Pickup < Resource
|
|
3
|
+
|
|
4
|
+
def buy(params={})
|
|
5
|
+
if params.instance_of?(EasyPost::PickupRate)
|
|
6
|
+
temp = params.clone
|
|
7
|
+
params = {}
|
|
8
|
+
params[:carrier] = temp.carrier
|
|
9
|
+
params[:service] = temp.service
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
response, api_key = EasyPost.request(:post, url + '/buy', @api_key, params)
|
|
13
|
+
self.refresh_from(response, @api_key, true)
|
|
14
|
+
|
|
15
|
+
return self
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/easypost/shipment.rb
CHANGED
|
@@ -71,9 +71,7 @@ module EasyPost
|
|
|
71
71
|
|
|
72
72
|
self.get_rates unless self.rates
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
carriers = carriers.split(',')
|
|
76
|
-
end
|
|
74
|
+
carriers = carriers.is_a?(String) ? carriers.split(',') : Array(carriers)
|
|
77
75
|
carriers.map!(&:downcase)
|
|
78
76
|
carriers.map!(&:strip)
|
|
79
77
|
|
|
@@ -86,9 +84,7 @@ module EasyPost
|
|
|
86
84
|
end
|
|
87
85
|
end
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
services = services.split(',')
|
|
91
|
-
end
|
|
87
|
+
services = services.is_a?(String) ? services.split(',') : Array(services)
|
|
92
88
|
services.map!(&:downcase)
|
|
93
89
|
services.map!(&:strip)
|
|
94
90
|
|
data/lib/easypost/util.rb
CHANGED
|
@@ -30,6 +30,8 @@ module EasyPost
|
|
|
30
30
|
'Item' => Item,
|
|
31
31
|
'Container' => Container,
|
|
32
32
|
'Order' => Order,
|
|
33
|
+
'Pickup' => Pickup,
|
|
34
|
+
'PickupRate' => PickupRate,
|
|
33
35
|
'PostageLabel' => PostageLabel }
|
|
34
36
|
|
|
35
37
|
prefixes = { 'adr' => Address,
|
|
@@ -46,6 +48,8 @@ module EasyPost
|
|
|
46
48
|
'item' => Item,
|
|
47
49
|
'container' => Container,
|
|
48
50
|
'order' => Order,
|
|
51
|
+
'pickup' => Pickup,
|
|
52
|
+
'pickuprate' => PickupRate,
|
|
49
53
|
'pl' => PostageLabel }
|
|
50
54
|
|
|
51
55
|
case response
|
data/lib/easypost.rb
CHANGED
|
@@ -24,6 +24,8 @@ require 'easypost/tracker'
|
|
|
24
24
|
require 'easypost/item'
|
|
25
25
|
require 'easypost/container'
|
|
26
26
|
require 'easypost/order'
|
|
27
|
+
require 'easypost/pickup'
|
|
28
|
+
require 'easypost/pickup_rate'
|
|
27
29
|
|
|
28
30
|
require 'easypost/error'
|
|
29
31
|
|
|
@@ -31,6 +33,8 @@ module EasyPost
|
|
|
31
33
|
@@api_key = nil
|
|
32
34
|
@@api_base = 'https://api.easypost.com/v2'
|
|
33
35
|
@@api_version = nil
|
|
36
|
+
@@open_timeout = 30
|
|
37
|
+
@@timeout = 60
|
|
34
38
|
|
|
35
39
|
def self.api_url(url='')
|
|
36
40
|
@@api_base + url
|
|
@@ -60,12 +64,22 @@ module EasyPost
|
|
|
60
64
|
@@api_version
|
|
61
65
|
end
|
|
62
66
|
|
|
67
|
+
def self.http_config
|
|
68
|
+
@@http_config ||= {
|
|
69
|
+
timeout: 60,
|
|
70
|
+
open_timeout: 30,
|
|
71
|
+
verify_ssl: false
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def self.http_config=(http_config_params)
|
|
76
|
+
self.http_config.merge!(http_config_params)
|
|
77
|
+
end
|
|
78
|
+
|
|
63
79
|
def self.request(method, url, api_key, params={}, headers={})
|
|
64
80
|
api_key ||= @@api_key
|
|
65
81
|
raise Error.new('No API key provided.') unless api_key
|
|
66
82
|
|
|
67
|
-
ssl_opts = { :verify_ssl => false }
|
|
68
|
-
|
|
69
83
|
params = Util.objects_to_ids(params)
|
|
70
84
|
url = self.api_url(url)
|
|
71
85
|
case method.to_s.downcase.to_sym
|
|
@@ -86,14 +100,14 @@ module EasyPost
|
|
|
86
100
|
:content_type => 'application/x-www-form-urlencoded'
|
|
87
101
|
}.merge(headers)
|
|
88
102
|
|
|
89
|
-
opts =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
opts = http_config.merge(
|
|
104
|
+
{
|
|
105
|
+
:method => method,
|
|
106
|
+
:url => url,
|
|
107
|
+
:headers => headers,
|
|
108
|
+
:payload => payload
|
|
109
|
+
}
|
|
110
|
+
)
|
|
97
111
|
|
|
98
112
|
begin
|
|
99
113
|
response = execute_request(opts)
|
data/spec/address_spec.rb
CHANGED
|
@@ -37,6 +37,22 @@ describe EasyPost::Address do
|
|
|
37
37
|
expect(verified_address[:message]).to be_nil
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
it 'verifies an address using fedex' do
|
|
41
|
+
address = EasyPost::Address.create(ADDRESS[:california].reject {|k,v| k == :street2})
|
|
42
|
+
|
|
43
|
+
expect(address.company).to eq('EasyPost')
|
|
44
|
+
expect(address.street1).to eq('164 Townsend Street')
|
|
45
|
+
expect(address.city).to eq('San Francisco')
|
|
46
|
+
expect(address.state).to eq('CA')
|
|
47
|
+
expect(address.zip).to eq('94107')
|
|
48
|
+
expect(address.country).to eq('US')
|
|
49
|
+
expect(address.street2).to be_nil
|
|
50
|
+
|
|
51
|
+
verified_address = address.verify(carrier: :fedex)
|
|
52
|
+
expect(verified_address).to be_an_instance_of(EasyPost::Address)
|
|
53
|
+
expect(verified_address[:message].length).to be > 0
|
|
54
|
+
end
|
|
55
|
+
|
|
40
56
|
it 'is not able to verify address' do
|
|
41
57
|
address = EasyPost::Address.create(
|
|
42
58
|
:company => 'Simpler Postage Inc',
|
|
@@ -47,7 +63,7 @@ describe EasyPost::Address do
|
|
|
47
63
|
:zip => '941abc07'
|
|
48
64
|
)
|
|
49
65
|
|
|
50
|
-
expect { verified_address = address.verify() }.to raise_error(EasyPost::Error, /
|
|
66
|
+
expect { verified_address = address.verify() }.to raise_error(EasyPost::Error, /Unable to verify address./)
|
|
51
67
|
end
|
|
52
68
|
end
|
|
53
69
|
end
|
data/spec/fedex/domestic_spec.rb
CHANGED
|
@@ -159,6 +159,16 @@ describe 'fedex domestic' do
|
|
|
159
159
|
expect(order.shipments[1].postage_label.label_url).to be
|
|
160
160
|
end
|
|
161
161
|
|
|
162
|
+
it 'buys a label using a thid party account number' do
|
|
163
|
+
shipment = EasyPost::Shipment.create(
|
|
164
|
+
:to_address => ADDRESS[:california],
|
|
165
|
+
:from_address => ADDRESS[:missouri],
|
|
166
|
+
:parcel => PARCEL[:dimensions],
|
|
167
|
+
:options => {:bill_third_party_account => "12345678"}
|
|
168
|
+
)
|
|
169
|
+
expect { shipment.buy(rate: shipment.lowest_rate("fedex")) }.to raise_error(EasyPost::Error, /ShippingChargesPayment Payor - The payor's account number is invalid/)
|
|
170
|
+
end
|
|
171
|
+
|
|
162
172
|
after(:all) do
|
|
163
173
|
begin
|
|
164
174
|
expect(@rates[:residential_evening].rate.to_i).to be > @rates[:residential].rate.to_i
|
data/spec/pickup_spec.rb
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe EasyPost::Pickup do
|
|
4
|
+
|
|
5
|
+
describe '#create' do
|
|
6
|
+
it 'creates a pickup and returns rates' do
|
|
7
|
+
shipment = EasyPost::Shipment.create(
|
|
8
|
+
:to_address => ADDRESS[:california],
|
|
9
|
+
:from_address => ADDRESS[:missouri],
|
|
10
|
+
:parcel => PARCEL[:dimensions]
|
|
11
|
+
)
|
|
12
|
+
shipment.buy(:rate => shipment.lowest_rate("ups", "ground"))
|
|
13
|
+
pickup = EasyPost::Pickup.create(
|
|
14
|
+
address: ADDRESS[:missouri],
|
|
15
|
+
reference: "12345678",
|
|
16
|
+
min_datetime: DateTime.now(),
|
|
17
|
+
max_datetime: DateTime.now() + 14400,
|
|
18
|
+
is_account_address: false,
|
|
19
|
+
instructions: "",
|
|
20
|
+
shipment: shipment
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
expect(pickup).to be_an_instance_of(EasyPost::Pickup)
|
|
24
|
+
expect(pickup.pickup_rates.first).to be_an_instance_of(EasyPost::PickupRate)
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it 'fails to create a pickup' do
|
|
29
|
+
shipment = EasyPost::Shipment.create(
|
|
30
|
+
:to_address => ADDRESS[:california],
|
|
31
|
+
:from_address => ADDRESS[:missouri],
|
|
32
|
+
:parcel => PARCEL[:dimensions]
|
|
33
|
+
)
|
|
34
|
+
shipment.buy(:rate => shipment.lowest_rate("ups", "ground"))
|
|
35
|
+
expect { pickup = EasyPost::Pickup.create(
|
|
36
|
+
address: ADDRESS[:california],
|
|
37
|
+
reference: "12345678",
|
|
38
|
+
max_datetime: DateTime.now() + 14400,
|
|
39
|
+
is_account_address: false,
|
|
40
|
+
instructions: "",
|
|
41
|
+
shipment: shipment
|
|
42
|
+
) }.to raise_exception(EasyPost::Error, /Invalid request, 'min_datetime' is required./)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe '#buy' do
|
|
47
|
+
it 'buys a pickup rate' do
|
|
48
|
+
shipment = EasyPost::Shipment.create(
|
|
49
|
+
:to_address => ADDRESS[:california],
|
|
50
|
+
:from_address => ADDRESS[:missouri],
|
|
51
|
+
:parcel => PARCEL[:dimensions]
|
|
52
|
+
)
|
|
53
|
+
shipment.buy(:rate => shipment.lowest_rate("ups", "ground"))
|
|
54
|
+
pickup = EasyPost::Pickup.create(
|
|
55
|
+
address: ADDRESS[:california],
|
|
56
|
+
reference: "buy12345678",
|
|
57
|
+
min_datetime: DateTime.now(),
|
|
58
|
+
max_datetime: DateTime.now() + 14400,
|
|
59
|
+
is_account_address: false,
|
|
60
|
+
instructions: "",
|
|
61
|
+
shipment: shipment
|
|
62
|
+
)
|
|
63
|
+
pickup.buy(pickup.pickup_rates.first)
|
|
64
|
+
|
|
65
|
+
expect(pickup.confirmation).not_to be_empty
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/ups/domestic_spec.rb
CHANGED
|
@@ -54,6 +54,21 @@ describe 'ups domestic' do
|
|
|
54
54
|
expect(shipment.postage_label.label_url).to end_with(".epl2")
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
# it 'buys an order with shipment level cod', focus: true do
|
|
58
|
+
# order = EasyPost::Order.create(
|
|
59
|
+
# to_address: ADDRESS[:california],
|
|
60
|
+
# from_address: ADDRESS[:missouri],
|
|
61
|
+
# options: {cod_amount: 19.99},
|
|
62
|
+
# shipments: [{
|
|
63
|
+
# parcel: {length: 8, width: 6, height: 4, weight: 12}
|
|
64
|
+
# },{
|
|
65
|
+
# parcel: {length: 8, width: 6, height: 4, weight: 12}
|
|
66
|
+
# }]
|
|
67
|
+
# )
|
|
68
|
+
# p order
|
|
69
|
+
# # order.buy(carrier: "ups", service: "Ground")
|
|
70
|
+
# end
|
|
71
|
+
|
|
57
72
|
after(:all) do
|
|
58
73
|
begin
|
|
59
74
|
expect(@rates[:next_day_air].rate.to_i).to be > @rates[:ground].rate.to_i
|
metadata
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easypost
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 2.1.0
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Sawyer Bateman
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rest-client
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
17
|
- - ~>
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
@@ -22,7 +20,6 @@ dependencies:
|
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
24
|
- - ~>
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
@@ -30,7 +27,6 @@ dependencies:
|
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: multi_json
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
31
|
- - ! '>='
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
@@ -41,7 +37,6 @@ dependencies:
|
|
|
41
37
|
type: :runtime
|
|
42
38
|
prerelease: false
|
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
44
|
-
none: false
|
|
45
40
|
requirements:
|
|
46
41
|
- - ! '>='
|
|
47
42
|
- !ruby/object:Gem::Version
|
|
@@ -49,10 +44,37 @@ dependencies:
|
|
|
49
44
|
- - <
|
|
50
45
|
- !ruby/object:Gem::Version
|
|
51
46
|
version: '2'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: bundler
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ~>
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '1.7'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ~>
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '1.7'
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: rake
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ~>
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '10.0'
|
|
68
|
+
type: :development
|
|
69
|
+
prerelease: false
|
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ~>
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '10.0'
|
|
52
75
|
- !ruby/object:Gem::Dependency
|
|
53
76
|
name: rspec
|
|
54
77
|
requirement: !ruby/object:Gem::Requirement
|
|
55
|
-
none: false
|
|
56
78
|
requirements:
|
|
57
79
|
- - ~>
|
|
58
80
|
- !ruby/object:Gem::Version
|
|
@@ -60,7 +82,6 @@ dependencies:
|
|
|
60
82
|
type: :development
|
|
61
83
|
prerelease: false
|
|
62
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
63
|
-
none: false
|
|
64
85
|
requirements:
|
|
65
86
|
- - ~>
|
|
66
87
|
- !ruby/object:Gem::Version
|
|
@@ -75,7 +96,6 @@ files:
|
|
|
75
96
|
- .gitignore
|
|
76
97
|
- CHANGELOG
|
|
77
98
|
- Gemfile
|
|
78
|
-
- Gemfile.lock
|
|
79
99
|
- LICENSE
|
|
80
100
|
- README.md
|
|
81
101
|
- Rakefile
|
|
@@ -94,6 +114,8 @@ files:
|
|
|
94
114
|
- lib/easypost/object.rb
|
|
95
115
|
- lib/easypost/order.rb
|
|
96
116
|
- lib/easypost/parcel.rb
|
|
117
|
+
- lib/easypost/pickup.rb
|
|
118
|
+
- lib/easypost/pickup_rate.rb
|
|
97
119
|
- lib/easypost/postage_label.rb
|
|
98
120
|
- lib/easypost/rate.rb
|
|
99
121
|
- lib/easypost/refund.rb
|
|
@@ -110,6 +132,7 @@ files:
|
|
|
110
132
|
- spec/fedex/international_spec.rb
|
|
111
133
|
- spec/item_spec.rb
|
|
112
134
|
- spec/order_spec.rb
|
|
135
|
+
- spec/pickup_spec.rb
|
|
113
136
|
- spec/shipment_spec.rb
|
|
114
137
|
- spec/spec_helper.rb
|
|
115
138
|
- spec/ups/domestic_spec.rb
|
|
@@ -119,26 +142,40 @@ files:
|
|
|
119
142
|
- spec/usps/merchant_returns.rb
|
|
120
143
|
homepage: https://www.easypost.com/docs
|
|
121
144
|
licenses: []
|
|
145
|
+
metadata: {}
|
|
122
146
|
post_install_message:
|
|
123
147
|
rdoc_options: []
|
|
124
148
|
require_paths:
|
|
125
149
|
- lib
|
|
126
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
|
-
none: false
|
|
128
151
|
requirements:
|
|
129
152
|
- - ! '>='
|
|
130
153
|
- !ruby/object:Gem::Version
|
|
131
154
|
version: '0'
|
|
132
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
|
-
none: false
|
|
134
156
|
requirements:
|
|
135
157
|
- - ! '>='
|
|
136
158
|
- !ruby/object:Gem::Version
|
|
137
159
|
version: '0'
|
|
138
160
|
requirements: []
|
|
139
161
|
rubyforge_project:
|
|
140
|
-
rubygems_version:
|
|
162
|
+
rubygems_version: 2.2.2
|
|
141
163
|
signing_key:
|
|
142
|
-
specification_version:
|
|
164
|
+
specification_version: 4
|
|
143
165
|
summary: EasyPost Ruby Client Library
|
|
144
|
-
test_files:
|
|
166
|
+
test_files:
|
|
167
|
+
- spec/address_spec.rb
|
|
168
|
+
- spec/batch_spec.rb
|
|
169
|
+
- spec/container_spec.rb
|
|
170
|
+
- spec/fedex/domestic_spec.rb
|
|
171
|
+
- spec/fedex/international_spec.rb
|
|
172
|
+
- spec/item_spec.rb
|
|
173
|
+
- spec/order_spec.rb
|
|
174
|
+
- spec/pickup_spec.rb
|
|
175
|
+
- spec/shipment_spec.rb
|
|
176
|
+
- spec/spec_helper.rb
|
|
177
|
+
- spec/ups/domestic_spec.rb
|
|
178
|
+
- spec/ups/international_spec.rb
|
|
179
|
+
- spec/usps/domestic_spec.rb
|
|
180
|
+
- spec/usps/electronic_merchandise_returns.rb
|
|
181
|
+
- spec/usps/merchant_returns.rb
|
data/Gemfile.lock
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
easypost (2.0.11)
|
|
5
|
-
multi_json (>= 1.0.4, < 2)
|
|
6
|
-
rest-client (~> 1.4)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
diff-lcs (1.2.4)
|
|
12
|
-
mime-types (1.25.1)
|
|
13
|
-
multi_json (1.8.4)
|
|
14
|
-
rest-client (1.6.7)
|
|
15
|
-
mime-types (>= 1.16)
|
|
16
|
-
rspec (2.13.0)
|
|
17
|
-
rspec-core (~> 2.13.0)
|
|
18
|
-
rspec-expectations (~> 2.13.0)
|
|
19
|
-
rspec-mocks (~> 2.13.0)
|
|
20
|
-
rspec-core (2.13.1)
|
|
21
|
-
rspec-expectations (2.13.0)
|
|
22
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
|
23
|
-
rspec-mocks (2.13.1)
|
|
24
|
-
|
|
25
|
-
PLATFORMS
|
|
26
|
-
ruby
|
|
27
|
-
|
|
28
|
-
DEPENDENCIES
|
|
29
|
-
easypost!
|
|
30
|
-
rspec (~> 2.13.0)
|