easypost 2.1.4 → 2.1.5
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 +4 -4
- data/VERSION +1 -1
- data/lib/easypost/address.rb +1 -5
- data/spec/order_spec.rb +12 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6475e6c8becd52a28072ec3676de937c4c9c6f
|
4
|
+
data.tar.gz: 779ab893d47ef3bc1e690197616ef6a135135f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faaedd53593a7436e55395e00e7c577565628ceb882f855e48f0d4b5ac93f5e72b8a12c868582f66af5cf697e29b32d2ef51741bf8aeff58605d7e6f5f9cad6d
|
7
|
+
data.tar.gz: 57410e6f1c81fa721d2757337e07e846273ac860c4102d9110509495994fd5fd33b4763eb881efdf0f33d9dcc14ba6ce6383135c0b7e3a560ee51d2180ab8662
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.5
|
data/lib/easypost/address.rb
CHANGED
@@ -26,11 +26,7 @@ module EasyPost
|
|
26
26
|
end
|
27
27
|
|
28
28
|
if response.has_key?(:address)
|
29
|
-
|
30
|
-
response[:address][:message] = response[:message]
|
31
|
-
end
|
32
|
-
verified_address = EasyPost::Util::convert_to_easypost_object(response[:address], api_key)
|
33
|
-
return verified_address
|
29
|
+
return EasyPost::Util::convert_to_easypost_object(response[:address], api_key)
|
34
30
|
else
|
35
31
|
raise_verification_failure
|
36
32
|
end
|
data/spec/order_spec.rb
CHANGED
@@ -16,10 +16,10 @@ describe EasyPost::Order do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'creates an order out of two shipments' do
|
19
|
+
|
19
20
|
order = EasyPost::Order.create(
|
20
21
|
to_address: ADDRESS[:california],
|
21
22
|
from_address: ADDRESS[:missouri],
|
22
|
-
carrier_accounts: [{id: "ca_12345678"}],
|
23
23
|
shipments: [{
|
24
24
|
parcel: {length: 8, width: 6, height: 4, weight: 12}
|
25
25
|
},{
|
@@ -31,26 +31,22 @@ describe EasyPost::Order do
|
|
31
31
|
expect(order.shipments.first).to be_an_instance_of(EasyPost::Shipment)
|
32
32
|
end
|
33
33
|
|
34
|
-
it 'creates and buys an order
|
34
|
+
it 'creates and buys an international order out of two shipments' do
|
35
|
+
|
35
36
|
order = EasyPost::Order.create(
|
36
|
-
to_address: ADDRESS[:
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
to_address: ADDRESS[:california],
|
38
|
+
from_address: ADDRESS[:missouri],
|
39
|
+
customs_info: EasyPost::CustomsInfo.create(CUSTOMS_INFO[:shirt]),
|
40
|
+
shipments: [{
|
41
|
+
parcel: {length: 8, width: 6, height: 4, weight: 12}
|
42
|
+
},{
|
43
|
+
parcel: {length: 8, width: 6, height: 4, weight: 24}
|
44
|
+
}]
|
43
45
|
)
|
44
|
-
|
45
|
-
order.pack
|
46
|
-
order.buy(max_delivery_days: 2)
|
47
|
-
# order.rates[0].buy
|
48
|
-
# order.fulfill if order.is_fulfillable # fulfilled by easypost
|
46
|
+
order.buy(carrier: "usps", service: "ParcelSelect")
|
49
47
|
|
50
48
|
expect(order).to be_an_instance_of(EasyPost::Order)
|
51
49
|
expect(order.shipments.first).to be_an_instance_of(EasyPost::Shipment)
|
52
50
|
end
|
53
|
-
|
54
51
|
end
|
55
|
-
|
56
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.5
|
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-06-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|