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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb1fd9b143d731f928003c3e8d5b7c9148c6a2e0
4
- data.tar.gz: 87ab4ab775c449fd77c4bb1ef00c8a4319235016
3
+ metadata.gz: 0d6475e6c8becd52a28072ec3676de937c4c9c6f
4
+ data.tar.gz: 779ab893d47ef3bc1e690197616ef6a135135f92
5
5
  SHA512:
6
- metadata.gz: d4f1f8bcb1ba006d7c503efded834fcb02f65fb3378ce401c54df501b4d73d9270669a37f86f6223811f69b1f6117e7bd97638981e9a69aec790d2a045595e4c
7
- data.tar.gz: a5e2a9f7c11378ec681da69edb05e7a701d8a666fb15182abf10691c7ea3c9bcabc255e709718d0921b2d0f77dcc217dd91379f028c5b667b3e3f78044586b9b
6
+ metadata.gz: faaedd53593a7436e55395e00e7c577565628ceb882f855e48f0d4b5ac93f5e72b8a12c868582f66af5cf697e29b32d2ef51741bf8aeff58605d7e6f5f9cad6d
7
+ data.tar.gz: 57410e6f1c81fa721d2757337e07e846273ac860c4102d9110509495994fd5fd33b4763eb881efdf0f33d9dcc14ba6ce6383135c0b7e3a560ee51d2180ab8662
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.4
1
+ 2.1.5
@@ -26,11 +26,7 @@ module EasyPost
26
26
  end
27
27
 
28
28
  if response.has_key?(:address)
29
- if response.has_key?(:message)
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
@@ -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 using magic' do
34
+ it 'creates and buys an international order out of two shipments' do
35
+
35
36
  order = EasyPost::Order.create(
36
- to_address: ADDRESS[:canada],
37
- customs_info: CUSTOMS_INFO[:merchandise],
38
- containers: "*",
39
- items: [{sku: "V4C3D5R2Z6", value: 89.65}],
40
- #items: ["item_12345678"],
41
- # auto_pack: false,
42
- # auto_buy: false
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
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-03 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client