easypost 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 77a7386297f189954ea974f3704cd7b61317f680
4
- data.tar.gz: 3f2f2a129f9413f73910743c64a9d1b957998814
2
+ SHA256:
3
+ metadata.gz: db8276b780ceb6bde1e8b72185385da6458cb152babd4bccf3b1f75e5da4af93
4
+ data.tar.gz: 103f3173ab91f5521204aee15694a31a7bb61875a955967049342ca250f04813
5
5
  SHA512:
6
- metadata.gz: 73d59ca7ab531ee6bd6b5bae9d5d8cb862501ba1e3a41d3a218c3853f9a7c96dc69fb5c0a67a94fd068c123f76037aaa8bd64ab0ddff01fe80e446aac254100c
7
- data.tar.gz: 77174452488594f5b154548a784c9e294aa66e3a54b1267d1d3a7076475ed41fa6027db1af2a4b2b0b869588853982770e0d43bd797755fe68ed5bbd5f124487
6
+ metadata.gz: 3b4bff8f08265b7821605dec9ea8ee2b8de3261975dbe860ee33aa0746bfb2238c615d527a8db9b51716886845229437f535e8d41e541285e04cf97102120f20
7
+ data.tar.gz: e0828a81e8c006ba589fe899cff31d3fe67bbf6e77577c44224224bf818d4650ebe8c76fe6f014fd3d00330c4f9974d8f9dda5fe79ee90dadc45ceefb3cd6a10
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ === 3.3.0 2021-06-10
2
+
3
+ * Adds `SmartRate` functionality to the `Shipments` object (available by calling `get_smartrates` on a shipment)
4
+ * Fix bug where `EasyPost::CarrierAccount.types` was hitting the wrong endpoint
5
+
1
6
  === 3.2.0 2021-01-14
2
7
 
3
8
  * Replace Travis CI with Github Actions
@@ -38,17 +43,17 @@
38
43
 
39
44
  * Enforce TLS certificate validity by default
40
45
 
41
- === 3.0.0 2018-02-09
46
+ === 3.0.0 2018-02-15
42
47
 
43
48
  * Require use of ruby ~> 2.0 and TLSv1.2
44
49
 
45
50
 
46
- === 2.7.3 2017-05-25
51
+ === 2.7.3 2018-02-05
47
52
 
48
53
  * Fix bug with introduced around certain JSON objects with IDs (thanks vladvinnikov!)
49
54
 
50
55
 
51
- === 2.7.2 2018-01-31
56
+ === 2.7.2 2018-02-01
52
57
 
53
58
  * Removed unused and unsupported code paths for Container model
54
59
  * Removed unused and unsupported code path for Stamp and Barcode methods on the Shipment model
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.3.0
data/lib/easypost.rb CHANGED
@@ -26,6 +26,7 @@ require "easypost/pickup"
26
26
  require "easypost/pickup_rate"
27
27
  require "easypost/printer"
28
28
  require "easypost/print_job"
29
+ require "easypost/carrier_type"
29
30
  require "easypost/carrier_account"
30
31
  require "easypost/user"
31
32
  require "easypost/report"
@@ -1,6 +1,5 @@
1
1
  class EasyPost::CarrierAccount < EasyPost::Resource
2
2
  def self.types
3
- response = EasyPost.make_request(:get, "/carrier_types", @api_key)
4
- return EasyPost::Util.convert_to_easypost_object(response, api_key)
3
+ EasyPost::CarrierType.all
5
4
  end
6
5
  end
@@ -0,0 +1,2 @@
1
+ class EasyPost::CarrierType < EasyPost::Resource
2
+ end
@@ -6,6 +6,12 @@ class EasyPost::Shipment < EasyPost::Resource
6
6
  return self
7
7
  end
8
8
 
9
+ def get_smartrates
10
+ response = EasyPost.make_request(:get, url + '/smartrate', @api_key)
11
+
12
+ return response.fetch('result', [])
13
+ end
14
+
9
15
  def buy(params={})
10
16
  if params.instance_of?(EasyPost::Rate)
11
17
  temp = params.clone
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: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Epstein
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-01-14 00:00:00.000000000 Z
13
+ date: 2021-06-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pry
@@ -103,6 +103,7 @@ files:
103
103
  - lib/easypost/address.rb
104
104
  - lib/easypost/batch.rb
105
105
  - lib/easypost/carrier_account.rb
106
+ - lib/easypost/carrier_type.rb
106
107
  - lib/easypost/customs_info.rb
107
108
  - lib/easypost/customs_item.rb
108
109
  - lib/easypost/error.rb
@@ -147,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
148
  - !ruby/object:Gem::Version
148
149
  version: '0'
149
150
  requirements: []
150
- rubyforge_project:
151
- rubygems_version: 2.2.2
151
+ rubygems_version: 3.0.3
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: EasyPost Ruby Client Library