lob 2.3.0 → 2.4.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
2
  SHA1:
3
- metadata.gz: ee0005ddb5d74fdf5020596fe957243f2ba804a1
4
- data.tar.gz: 49f9097b590c8f505031b4a8e76568536792922a
3
+ metadata.gz: 1a8c0c830106e832bbae29edd30ba92113856d60
4
+ data.tar.gz: cd9b46196b888da5ea9e7a4d85d692283b3c2adf
5
5
  SHA512:
6
- metadata.gz: b8a309afecbb1a006309461123c1c388be22f031ec8758a72f70e292f52d0ac604b4d2a95f7356c6f8ee3724d165b491dc3f072c6beed5cd46c8a452aa457b42
7
- data.tar.gz: 185d608f264a4c1a7e8f066b95d2cf91b3a7e2603a7851ed010894f28fda348ef954e81562cdd2b5d2f42d909b5e96d60d4c704d076ac17aac97b4e24cd95fba
6
+ metadata.gz: bed40a4effe60e29f7ab30dbac740c0fc4be8d99a170acf0349a62d053878261d7d1d823f21fc35b731ef17d4766860090390949b6bd40fb2b0bbcf5ea017e0c
7
+ data.tar.gz: 7686f7bf43a5f9ab78e08334dd072342569795d3b0c754518cf5f9dd37d5dc754ce57c3eb037e4af7de99daaca7211c8761956534fdddd14c05aa49022f2430a
@@ -11,6 +11,6 @@ rvm:
11
11
 
12
12
  env:
13
13
  JRUBY_OPTS=--2.0
14
- - LOB_API_KEY=test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc
14
+ - LOB_API_KEY=test_799ff27291c166d10ba191902ad02fb059c
15
15
 
16
16
  script: bundle exec rake test
@@ -1,3 +1,6 @@
1
+ ## [**2.4.0**](https://github.com/lob/lob-ruby/releases/tag/v2.4.0)
2
+ - [**#136**] (https://github.com/lob/lob-ruby/pull/136) Adds find to routes
3
+
1
4
  ## [**2.3.0**](https://github.com/lob/lob-ruby/releases/tag/v2.3.0)
2
5
  - [**#130**] (https://github.com/lob/lob-ruby/pull/130) Removed services endpoint support
3
6
 
data/README.md CHANGED
@@ -30,8 +30,7 @@ Here's a general overview of the Lob services available, click through to read m
30
30
  - [Postcards API](https://lob.com/services/postcards)
31
31
  - [Letters API](https://lob.com/services/letters)
32
32
  - [Checks API](https://lob.com/services/checks)
33
- - [Prints API](https://lob.com/services/sps)
34
- - [Area Mail API](https://lob.com/services/sam)
33
+ - [Area Mail API](https://lob.com/services/area)
35
34
  - [Address Verification API](https://lob.com/verification/address)
36
35
 
37
36
  ### Registration
@@ -130,19 +129,6 @@ There are simple scripts to demonstrate how to create all the core Lob products
130
129
  - [Delete a Bank Account](https://lob.com/docs/ruby#bankaccounts_delete)
131
130
  - [Verify a Bank Account](https://lob.com/docs/ruby#bankaccounts_verify)
132
131
  - [List all Bank Accounts](https://lob.com/docs/ruby#bankaccounts_list)
133
- - **Prints API**
134
- - [Jobs](https://lob.com/docs/ruby#jobs)
135
- - [Create a Job](https://lob.com/docs/ruby#jobs_create)
136
- - [Retrieve a Job](https://lob.com/docs/ruby#jobs_retrieve)
137
- - [List all Jobs](https://lob.com/docs/ruby#jobs_list)
138
- - [Objects](https://lob.com/docs/ruby#objects)
139
- - [Create an Object](https://lob.com/docs/ruby#objects_create)
140
- - [Retrieve an Object](https://lob.com/docs/ruby#objects_retrieve)
141
- - [Delete an Object](https://lob.com/docs/ruby#objects_delete)
142
- - [List all Objects](https://lob.com/docs/ruby#objects_list)
143
- - [Settings](https://lob.com/docs/ruby#settings)
144
- - [Retrieve a Setting](https://lob.com/docs/ruby#settings_retrieve)
145
- - [List all Settings](https://lob.com/docs/ruby#settings_list)
146
132
  - **Area Mail API**
147
133
  - [Areas](https://lob.com/docs/ruby#areas)
148
134
  - [Create an Area Mailing](https://lob.com/docs/ruby#areas_create)
@@ -160,7 +146,6 @@ There are simple scripts to demonstrate how to create all the core Lob products
160
146
  - [API Changelog](https://lob.com/docs/ruby#changelog)
161
147
  - [HTML Examples](https://lob.com/docs/ruby#html-examples)
162
148
  - [Image Prepping](https://lob.com/docs/ruby#prepping)
163
- - [Prints API Templates](https://lob.com/docs/ruby#prints-templates)
164
149
 
165
150
  ## Contributing
166
151
 
@@ -31,7 +31,7 @@ CSV.foreach(File.expand_path('../input.csv', __FILE__)) do |row|
31
31
  address_zip: '94185',
32
32
  address_country: 'US'
33
33
  },
34
- setting: 1002,
34
+ size: "6x11",
35
35
  front: front_html,
36
36
  back: back_html,
37
37
  data: {
@@ -5,6 +5,10 @@ module Lob
5
5
  @resource = resource
6
6
  end
7
7
 
8
+ def find(route)
9
+ Lob.submit :get, route_url(route)
10
+ end
11
+
8
12
  def list(options = {})
9
13
  if options.is_a?(String)
10
14
  Lob.submit(:get, route_url(options))
@@ -1,3 +1,3 @@
1
1
  module Lob
2
- VERSION = "2.3.0"
2
+ VERSION = "2.4.0"
3
3
  end
@@ -9,7 +9,10 @@ describe Lob::V1::Address do
9
9
  address_city: "San Francisco",
10
10
  address_state: "CA",
11
11
  address_country: "US",
12
- address_zip: 94158
12
+ address_zip: 94158,
13
+ metadata: {
14
+ test: 'stuff'
15
+ }
13
16
  }
14
17
  }
15
18
 
@@ -4,6 +4,16 @@ describe Lob::V1::Route do
4
4
 
5
5
  subject { Lob(api_key: ENV["LOB_API_KEY"]) }
6
6
 
7
+ describe "find" do
8
+
9
+ it "should fetch a route" do
10
+ zip_code = "94158"
11
+ routes = subject.routes.find(zip_code)
12
+ routes["zip_code"].must_equal(zip_code)
13
+ end
14
+
15
+ end
16
+
7
17
  describe "list" do
8
18
 
9
19
  it "should list routes" do
@@ -18,6 +28,12 @@ describe Lob::V1::Route do
18
28
  routes["zip_code"].must_equal(zip_code)
19
29
  end
20
30
 
31
+ it "should list routes given multiple zip codes" do
32
+ zip_codes = ["94107", "94158"]
33
+ routes = subject.routes.list(zip_codes: zip_codes)
34
+ routes["data"][0]["zip_code"].must_equal(zip_codes[0])
35
+ end
36
+
21
37
  end
22
38
 
23
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lob
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-23 00:00:00.000000000 Z
11
+ date: 2016-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client