lob 4.2.0 → 5.1.2

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: 3476691f58ba7bfaf6cbedb44a75cdbd249d51e7
4
- data.tar.gz: 9d1d4215c142196c340e4abcdc75d0a0117c1382
2
+ SHA256:
3
+ metadata.gz: 13cf985be48a2293b60d39581618b3ec1d6dd55627060e4276e0219839707dda
4
+ data.tar.gz: 0d157d5f90ab10bfae3a58959be1478adcac54606e37dbecaf8c8b8fabf6dacb
5
5
  SHA512:
6
- metadata.gz: 07ccac963f8d375d83a79434311be0a954def5a529d3cda0df193198dfe24d2a795e8e713299cf098f4129f832d06432633fa183a0fb2ca499f010790ef9e1fc
7
- data.tar.gz: 1de8c5fcae8eb8b1ddeb2e7d8235525476db6f554f53d1ab106204bac42fcdf63ee4b81c50b904670b709bd6157866eec7d0182ac854ed96bd32382e4fc1bd3c
6
+ metadata.gz: 910a721a953d8bf7a714b71e8ab47dfecd7ab294055cd57b1736f2f84aa3d71ed8b54693a9f09112c0b991f6489b23437005dc4ae146a0aff9ecb38cd2121ffc
7
+ data.tar.gz: 922c3a7b56174b13a390e7294dd3421ec9eb1305eadbdeccddf007e544ac000e8844b82d5183c5f7c9832dd8c8a4b72b735b0b141f831a95ff0280af81b3bffa
data/.travis.yml CHANGED
@@ -1,19 +1,13 @@
1
1
  language: ruby
2
2
 
3
- sudo: false
4
-
5
3
  rvm:
6
- - jruby-9.0.5.0
7
4
  - jruby-9.1.9.0
8
- - 2.1
9
- - 2.2
10
- - 2.3
5
+ - jruby-9.2.9.0
11
6
  - 2.4
12
-
7
+ - 2.5
8
+ - 2.6
9
+ - 2.7
13
10
  env:
14
11
  JRUBY_OPTS=--2.0
15
12
 
16
- before_install:
17
- - gem install bundler
18
-
19
13
  script: bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ #### 5.1.2 (2021-02-18)
2
+
3
+ ##### Chores and Bug Fixes
4
+
5
+ -[**185**](https://github.com/lob/lob-ruby/pull/185) Bumps rake to 12.3.3, adds Ruby 2.7, update example asset links, other cleanup.
6
+ #### 5.1.1 (2020-05-21)
7
+
8
+ ##### Chores
9
+
10
+ * **intl-verification:** update international verifications test mode fix ([#179](https://github.com/lob/lob-ruby/pull/179)) ([4ab7e7e2](https://github.com/lob/lob-ruby/commit/4ab7e7e2852706c37b00bd8f2df58207897bc0a3))
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **merge-variables:** convert to json ([fa93885f](https://github.com/lob/lob-ruby/commit/fa93885f2aab4537e100b82d8a9f53cdec042f2e))
15
+
16
+ ## [**5.1.0**](https://github.com/lob/lob-ruby/releases/tag/v5.1.0)
17
+ - [**176**](https://github.com/lob/lob-ruby/pull/176) Adds support for Group Members (beta feature)
18
+ - [**175**](https://github.com/lob/lob-ruby/pull/175) Adds support for Groups (beta feature)
19
+ - [**174**](https://github.com/lob/lob-ruby/pull/174) Add Ruby 2.5-6, remove API keys, other cleanup
20
+ - [**173**](https://github.com/lob/lob-ruby/pull/173) Update example asset links
21
+
22
+ ## 5.0.0
23
+
24
+ Version 5.0.0 introduces a breaking change. It removes support for the area mail resources (`Areas` and `Routes`).
25
+
26
+ * Removes `Lob.areas`.
27
+ * Removes `Lob.routes`.
28
+
29
+ ## [**4.3.0**](https://github.com/lob/lob-ruby/releases/tag/v4.3.0)
30
+ - [**171**](https://github.com/lob/lob-ruby/pull/171) add USAutocompletions
31
+ - [**170**](https://github.com/lob/lob-ruby/pull/170) Fix test name
32
+
1
33
  ## [**4.2.0**](https://github.com/lob/lob-ruby/releases/tag/v4.2.0)
2
34
  - [**169**](https://github.com/lob/lob-ruby/pull/169) Support 'case' param for us_verifications
3
35
  - [**168**](https://github.com/lob/lob-ruby/pull/168) tweak wording around handling numbers with leading zeros
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # lob-ruby
2
2
 
3
3
  [![Build Status](https://travis-ci.org/lob/lob-ruby.svg?branch=master)](https://travis-ci.org/lob/lob-ruby)
4
- [![Gem Version](https://badge.fury.io/rb/lob.svg)](http://badge.fury.io/rb/lob)
5
- [![Dependency Status](https://gemnasium.com/lob/lob-ruby.svg)](https://gemnasium.com/lob/lob-ruby)
4
+ [![Gem Version](https://badge.fury.io/rb/lob.svg)](https://badge.fury.io/rb/lob)
6
5
  [![Coverage Status](https://coveralls.io/repos/lob/lob-ruby/badge.svg?branch=master)](https://coveralls.io/r/lob/lob-ruby?branch=master)
7
- [![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/lob?color=green&type=total)](https://rubygems.org/gems/lob)
6
+ [![Downloads](https://ruby-gem-downloads-badge.herokuapp.com/lob?color=green&type=total)](https://rubygems.org/gems/lob)
8
7
 
9
- Ruby wrapper for the [Lob.com](http://lob.com) API. See the full Lob.com [API Documentation](https://lob.com/docs/ruby). For best results, be sure that you're using [the latest version](https://lob.com/docs/ruby#version) of the Lob API and the latest version of the ruby wrapper. This gem gives you an ActiveRecord-style syntax to use the Lob.com API.
8
+ Ruby wrapper for the [Lob.com](https://lob.com) API. See the full Lob.com [API Documentation](https://lob.com/docs/ruby). For best results, be sure that you're using [the latest version](https://lob.com/docs/ruby#version) of the Lob API and the latest version of the ruby wrapper. This gem gives you an ActiveRecord-style syntax to use the Lob.com API.
10
9
 
11
10
  Supports Ruby 2.0.0 and greater.
12
11
 
@@ -25,11 +24,10 @@ Supports Ruby 2.0.0 and greater.
25
24
 
26
25
  Here's a general overview of the Lob services available, click through to read more.
27
26
 
28
- - [Postcards API](https://lob.com/services/postcards)
29
- - [Letters API](https://lob.com/services/letters)
30
- - [Checks API](https://lob.com/services/checks)
31
- - [Area Mail API](https://lob.com/services/area)
32
- - [Address Verification API](https://lob.com/services/verifications)
27
+ - [Postcards API](https://lob.com/products/print-mail/postcards)
28
+ - [Letters API](https://lob.com/products/print-mail/letters)
29
+ - [Checks API](https://lob.com/products/print-mail/checks)
30
+ - [Address Verification API](https://lob.com/products/address-verification)
33
31
 
34
32
  Please read through the official [API Documentation](#api-documentation) to get a complete sense of what to expect from each endpoint.
35
33
 
@@ -96,7 +94,7 @@ You can also access headers from `Lob::InvalidRequestError`s.
96
94
 
97
95
  ```ruby
98
96
  begin
99
- lob.objects.create(name: "Test", file: "https://lob.com/test.pdf", bad_param: "bad_value")
97
+ lob.objects.create(name: "Test", file: "https://s3-us-west-2.amazonaws.com/public.lob.com/assets/incorrect_size.pdf", bad_param: "bad_value")
100
98
  rescue Lob::InvalidRequestError => e
101
99
  e._response.headers[:content_type]
102
100
  # => "application/json; charset=utf-8"
@@ -122,66 +120,60 @@ There are simple scripts to demonstrate how to create all the core Lob objects (
122
120
  - [HTML Templates](https://lob.com/docs/ruby#templates)
123
121
  - [Asset URLs](https://lob.com/docs/ruby#urls)
124
122
  - **Addresses**
125
- - [Address Book](https://lob.com/docs/ruby#addresses)
126
- - [The Address Object](https://lob.com/docs/ruby#addresses_object)
127
- - [Create an Address](https://lob.com/docs/ruby#addresses_create)
128
- - [Retrieve an Address](https://lob.com/docs/ruby#addresses_retrieve)
129
- - [Delete an Address](https://lob.com/docs/ruby#addresses_delete)
130
- - [List all Addresses](https://lob.com/docs/ruby#addresses_list)
123
+ - [Address Book](https://lob.com/docs/ruby#addresses)
124
+ - [The Address Object](https://lob.com/docs/ruby#addresses_object)
125
+ - [Create an Address](https://lob.com/docs/ruby#addresses_create)
126
+ - [Retrieve an Address](https://lob.com/docs/ruby#addresses_retrieve)
127
+ - [Delete an Address](https://lob.com/docs/ruby#addresses_delete)
128
+ - [List all Addresses](https://lob.com/docs/ruby#addresses_list)
131
129
  - **US Verification API**
132
- - [US Verification API](https://lob.com/docs/ruby#us_verifications)
133
- - [The US Verification Object](https://lob.com/docs/ruby#us_verifications_object)
134
- - [Verify a US Address](https://lob.com/docs/ruby#us_verifications_create)
135
- - [The US Zip Lookup Object](https://lob.com/docs/ruby#us_zip_lookups_object)
136
- - [Lookup a US Zip Code](https://lob.com/docs/ruby#us_zip_lookups_create)
130
+ - [US Verification API](https://lob.com/docs/ruby#us_verifications)
131
+ - [The US Verification Object](https://lob.com/docs/ruby#us_verifications_object)
132
+ - [Verify a US Address](https://lob.com/docs/ruby#us_verifications_create)
133
+ - [The US Zip Lookup Object](https://lob.com/docs/ruby#us_zip_lookups_object)
134
+ - [Lookup a US Zip Code](https://lob.com/docs/ruby#us_zip_lookups_create)
135
+ - [US Autocompletion API](https://lob.com/docs/ruby#us_autocompletions)
136
+ - [The US Autocompletion Object](https://lob.com/docs/ruby#us_autocompletions_object)
137
+ - [Autocomplete a US Address](https://lob.com/docs/ruby#us_autocompletions_create)
138
+ - [The US Autocompletion Test Environment](https://lob.com/docs/ruby#us-autocompletions-test-environment)
137
139
  - **Int'l Verification API**
138
- - [International Verifications](https://lob.com/docs/ruby#intl_verifications)
139
- - [Verify an International Address](https://lob.com/docs/ruby#intl_verifications_create)
140
+ - [International Verifications](https://lob.com/docs/ruby#intl_verifications)
141
+ - [Verify an International Address](https://lob.com/docs/ruby#intl_verifications_create)
140
142
  - **Postcards API**
141
- - [Postcards](https://lob.com/docs/ruby#postcards)
142
- - [The Postcard Object](https://lob.com/docs/ruby#postcards_object)
143
- - [Create a Postcard](https://lob.com/docs/ruby#postcards_create)
144
- - [Retrieve a Postcard](https://lob.com/docs/ruby#postcards_retrieve)
145
- - [Cancel a Postcard](https://lob.com/docs/ruby#postcards_delete)
146
- - [List all Postcards](https://lob.com/docs/ruby#postcards_list)
143
+ - [Postcards](https://lob.com/docs/ruby#postcards)
144
+ - [The Postcard Object](https://lob.com/docs/ruby#postcards_object)
145
+ - [Create a Postcard](https://lob.com/docs/ruby#postcards_create)
146
+ - [Retrieve a Postcard](https://lob.com/docs/ruby#postcards_retrieve)
147
+ - [Cancel a Postcard](https://lob.com/docs/ruby#postcards_delete)
148
+ - [List all Postcards](https://lob.com/docs/ruby#postcards_list)
147
149
  - **Letters API**
148
- - [Letters](https://lob.com/docs/ruby#letters)
149
- - [The Letter Object](https://lob.com/docs/ruby#letters_object)
150
- - [Create a Letter](https://lob.com/docs/ruby#letters_create)
151
- - [Retrieve a Letter](https://lob.com/docs/ruby#letters_retrieve)
152
- - [Cancel a Letter](https://lob.com/docs/ruby#letters_delete)
153
- - [List all Letters](https://lob.com/docs/ruby#letters_list)
150
+ - [Letters](https://lob.com/docs/ruby#letters)
151
+ - [The Letter Object](https://lob.com/docs/ruby#letters_object)
152
+ - [Create a Letter](https://lob.com/docs/ruby#letters_create)
153
+ - [Retrieve a Letter](https://lob.com/docs/ruby#letters_retrieve)
154
+ - [Cancel a Letter](https://lob.com/docs/ruby#letters_delete)
155
+ - [List all Letters](https://lob.com/docs/ruby#letters_list)
154
156
  - **Checks API**
155
- - [Checks](https://lob.com/docs/ruby#checks)
156
- - [The Check Object](https://lob.com/docs/ruby#checks_object)
157
- - [Create a Check](https://lob.com/docs/ruby#checks_create)
158
- - [Retrieve a Check](https://lob.com/docs/ruby#checks_retrieve)
159
- - [Cancel a Check](https://lob.com/docs/ruby#checks_delete)
160
- - [List all Checks](https://lob.com/docs/ruby#checks_list)
161
- - [Bank Accounts](https://lob.com/docs/ruby#bank-accounts)
162
- - [The Bank Account Object](https://lob.com/docs/ruby#bankaccounts_object)
163
- - [Create a Bank Account](https://lob.com/docs/ruby#bankaccounts_create)
164
- - [Retrieve a Bank Account](https://lob.com/docs/ruby#bankaccounts_retrieve)
165
- - [Delete a Bank Account](https://lob.com/docs/ruby#bankaccounts_delete)
166
- - [Verify a Bank Account](https://lob.com/docs/ruby#bankaccounts_verify)
167
- - [List all Bank Accounts](https://lob.com/docs/ruby#bankaccounts_list)
168
- - **Area Mail API**
169
- - [Areas](https://lob.com/docs/ruby#areas)
170
- - [The Area Object](https://lob.com/docs/ruby#areas_object)
171
- - [Create an Area Mailing](https://lob.com/docs/ruby#areas_create)
172
- - [Retrieve an Area Mailing](https://lob.com/docs/ruby#areas_retrieve)
173
- - [List all Area Mailings](https://lob.com/docs/ruby#areas_list)
174
- - [Routes](https://lob.com/docs/ruby#routes)
175
- - [The Routes Object](https://lob.com/docs/ruby#routes_object)
176
- - [Retrieve Routes](https://lob.com/docs/ruby#routes_retrieve)
177
- - [List all Routes](https://lob.com/docs/ruby#routes_list)
157
+ - [Checks](https://lob.com/docs/ruby#checks)
158
+ - [The Check Object](https://lob.com/docs/ruby#checks_object)
159
+ - [Create a Check](https://lob.com/docs/ruby#checks_create)
160
+ - [Retrieve a Check](https://lob.com/docs/ruby#checks_retrieve)
161
+ - [Cancel a Check](https://lob.com/docs/ruby#checks_delete)
162
+ - [List all Checks](https://lob.com/docs/ruby#checks_list)
163
+ - [Bank Accounts](https://lob.com/docs/ruby#bank-accounts)
164
+ - [The Bank Account Object](https://lob.com/docs/ruby#bankaccounts_object)
165
+ - [Create a Bank Account](https://lob.com/docs/ruby#bankaccounts_create)
166
+ - [Retrieve a Bank Account](https://lob.com/docs/ruby#bankaccounts_retrieve)
167
+ - [Delete a Bank Account](https://lob.com/docs/ruby#bankaccounts_delete)
168
+ - [Verify a Bank Account](https://lob.com/docs/ruby#bankaccounts_verify)
169
+ - [List all Bank Accounts](https://lob.com/docs/ruby#bankaccounts_list)
178
170
  - **Appendix**
179
- - [API Changelog](https://lob.com/docs/ruby#changelog)
180
- - [The Tracking Event Object](https://lob.com/docs/ruby#tracking_event_object)
181
- - [Events](https://lob.com/docs/ruby#events)
182
- - [HTML Examples](https://lob.com/docs/ruby#html-examples)
183
- - [Image Prepping](https://lob.com/docs/ruby#prepping)
184
- - [US Verification Details](https://lob.com/docs/ruby#us_verification_details)
171
+ - [API Changelog](https://lob.com/docs/ruby#changelog)
172
+ - [The Tracking Event Object](https://lob.com/docs/ruby#tracking_event_object)
173
+ - [Events](https://lob.com/docs/ruby#events)
174
+ - [HTML Examples](https://lob.com/docs/ruby#html-examples)
175
+ - [Image Prepping](https://lob.com/docs/ruby#prepping)
176
+ - [US Verification Details](https://lob.com/docs/ruby#us_verification_details)
185
177
 
186
178
  ## Contributing
187
179
 
data/examples/checks.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift File.expand_path("../lib", File.dirname(__FILE__))
2
2
  require 'lob'
3
3
 
4
4
  # initialize Lob object
5
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
5
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
6
6
 
7
7
  # create an address
8
8
  to_address = lob.addresses.create(
@@ -3,7 +3,7 @@ require 'lob'
3
3
  require 'csv'
4
4
 
5
5
  # Initialize Lob object
6
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
6
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
7
7
 
8
8
  # Create a bank account
9
9
  bank_account = lob.bank_accounts.create(
@@ -3,7 +3,7 @@ require 'lob'
3
3
  require 'csv'
4
4
 
5
5
  # Initialize Lob object
6
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
6
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
7
7
 
8
8
  # Load the HTML from letter_template.html
9
9
  letter_html = File.open(File.expand_path('../letter_template.html', __FILE__)).read
@@ -11,7 +11,7 @@
11
11
  font-family: 'Loved by the King';
12
12
  font-style: normal;
13
13
  font-weight: 400;
14
- src: url('https://s3-us-west-2.amazonaws.com/lob-assets/LovedbytheKing.ttf') format('truetype');
14
+ src: url('https://s3-us-west-2.amazonaws.com/public.lob.com/fonts/lovedByTheKing/LovedbytheKing.ttf') format('truetype');
15
15
  }
16
16
 
17
17
  .text {
@@ -3,7 +3,7 @@ require 'lob'
3
3
  require 'csv'
4
4
 
5
5
  # Initialize Lob object
6
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
6
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
7
7
 
8
8
  # Load the HTML from postcard_front.html and postcard_back.html.
9
9
  front_html = File.open(File.expand_path('../postcard_front.html', __FILE__)).read
@@ -1,7 +1,7 @@
1
- Peter,https://s3-us-west-2.amazonaws.com/lob-assets/df-car2.jpg,LightBlue,Jeep Wrangler,65000,Peter,123 Main Street,Apt. 101,San Francisco,CA,94107,US
2
- Marcus,https://s3-us-west-2.amazonaws.com/lob-assets/df-car.jpg,Bisque,Honda Pilot,65000,Marcus,456 Oak Street ,Apt. 102,San Francisco,CA,94185,US
3
- Leore,https://s3-us-west-2.amazonaws.com/lob-assets/df-car2.jpg,PaleGreen,Jeep Wrangler,50000,Leore,123 Test Street,Apt. 101,San Francisco,CA,94105,US
4
- Harry,https://s3-us-west-2.amazonaws.com/lob-assets/df-car.jpg,Thistle,Jeep Wrangler,50000,Harry,789 Elm Street,Apt. 101,San Francisco,CA,94107,US
5
- Elnaz,https://s3-us-west-2.amazonaws.com/lob-assets/df-car2.jpg,PaleTurqoise,Jeep Wrangler,35000,Elnaz,111 Washington Street,Apt. 101,San Francisco,CA,94112,US
6
- Robin,https://s3-us-west-2.amazonaws.com/lob-assets/df-car.jpg,Wheat,Jeep Wrangler,35000,Robin,888 Jefferson Street,Apt. 101,San Francisco,CA,94197,US
7
- Russell,https://s3-us-west-2.amazonaws.com/lob-assets/df-car2.jpg,WhiteSmoke,Jeep Wrangler,15000,Russell,1212 Fourth Street,Apt. 101,San Francisco,CA,94166,US
1
+ Peter,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car2.jpg,LightBlue,Jeep Wrangler,65000,Peter,123 Main Street,Apt. 101,San Francisco,CA,94107,US
2
+ Marcus,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car.jpg,Bisque,Honda Pilot,65000,Marcus,456 Oak Street ,Apt. 102,San Francisco,CA,94185,US
3
+ Leore,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car2.jpg,PaleGreen,Jeep Wrangler,50000,Leore,123 Test Street,Apt. 101,San Francisco,CA,94105,US
4
+ Harry,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car.jpg,Thistle,Jeep Wrangler,50000,Harry,789 Elm Street,Apt. 101,San Francisco,CA,94107,US
5
+ Elnaz,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car2.jpg,PaleTurqoise,Jeep Wrangler,35000,Elnaz,111 Washington Street,Apt. 101,San Francisco,CA,94112,US
6
+ Robin,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car.jpg,Wheat,Jeep Wrangler,35000,Robin,888 Jefferson Street,Apt. 101,San Francisco,CA,94197,US
7
+ Russell,https://s3-us-west-2.amazonaws.com/public.lob.com/assets/example_companies/df-car2.jpg,WhiteSmoke,Jeep Wrangler,15000,Russell,1212 Fourth Street,Apt. 101,San Francisco,CA,94166,US
@@ -6,7 +6,7 @@
6
6
  font-family: 'Arimo';
7
7
  font-style: normal;
8
8
  font-weight: 400;
9
- src: url('https://s3-us-west-2.amazonaws.com/lob-assets/Arimo-Regular.ttf') format('truetype');
9
+ src: url('https://s3-us-west-2.amazonaws.com/public.lob.com/fonts/arimo/Arimo-Regular.ttf') format('truetype');
10
10
  }
11
11
  body {
12
12
  width:11.25in;
@@ -4,7 +4,7 @@ require 'csv'
4
4
  require 'lob'
5
5
 
6
6
  # Initialize Lob object
7
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
7
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
8
8
 
9
9
  output = File.open(File.expand_path('../output.csv', __FILE__), 'w')
10
10
 
data/examples/letters.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift File.expand_path("../lib", File.dirname(__FILE__))
2
2
  require 'lob'
3
3
 
4
4
  # initialize Lob object
5
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
5
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
6
6
 
7
7
  html = %{
8
8
  <html>
@@ -18,7 +18,7 @@ html = %{
18
18
  font-family: 'Loved by the King';
19
19
  font-style: normal;
20
20
  font-weight: 400;
21
- src: url('https://s3-us-west-2.amazonaws.com/lob-assets/LovedbytheKing.ttf') format('truetype');
21
+ src: url('https://s3-us-west-2.amazonaws.com/public.lob.com/fonts/lovedByTheKing/LovedbytheKing.ttf') format('truetype');
22
22
  }
23
23
 
24
24
  .text {
@@ -2,7 +2,7 @@ $:.unshift File.expand_path("../lib", File.dirname(__FILE__))
2
2
  require 'lob'
3
3
 
4
4
  # initialize Lob object
5
- lob = Lob::Client.new(api_key: 'test_799ff27291c166d10ba191902ad02fb059c')
5
+ lob = Lob::Client.new(api_key: 'YOUR_API_KEY_HERE')
6
6
 
7
7
  # HTML to send to the server
8
8
  html = %{
@@ -20,7 +20,7 @@ html = %{
20
20
  font-family: 'Loved by the King';
21
21
  font-style: normal;
22
22
  font-weight: 400;
23
- src: url('https://s3-us-west-2.amazonaws.com/lob-assets/LovedbytheKing.ttf') format('truetype');
23
+ src: url('https://s3-us-west-2.amazonaws.com/public.lob.com/fonts/lovedByTheKing/LovedbytheKing.ttf') format('truetype');
24
24
  }
25
25
 
26
26
  body {
@@ -29,7 +29,7 @@ html = %{
29
29
  margin: 0;
30
30
  padding: 0;
31
31
  /* If using an image, the background image should have dimensions of 1875x1275 pixels. */
32
- background-image: url(https://s3-us-west-2.amazonaws.com/lob-assets/beach.jpg);
32
+ background-image: url(https://s3-us-west-2.amazonaws.com/public.lob.com/assets/beach.jpg);
33
33
  background-size: 6.25in 4.25in;
34
34
  background-repeat: no-repeat;
35
35
  }
data/lib/lob/client.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  require "lob/resources/address"
2
- require "lob/resources/area"
3
2
  require "lob/resources/bank_account"
4
3
  require "lob/resources/check"
4
+ require "lob/resources/group"
5
+ require "lob/resources/groups_member"
5
6
  require "lob/resources/intl_verifications"
6
7
  require "lob/resources/letter"
7
8
  require "lob/resources/postcard"
8
- require "lob/resources/route"
9
+ require "lob/resources/us_autocompletions"
9
10
  require "lob/resources/us_verifications"
10
11
  require "lob/resources/us_zip_lookups"
11
12
 
@@ -22,10 +23,6 @@ module Lob
22
23
  @config = config
23
24
  end
24
25
 
25
- def areas
26
- Lob::Resources::Area.new(config)
27
- end
28
-
29
26
  def addresses
30
27
  Lob::Resources::Address.new(config)
31
28
  end
@@ -37,6 +34,14 @@ module Lob
37
34
  def checks
38
35
  Lob::Resources::Check.new(config)
39
36
  end
37
+
38
+ def groups
39
+ Lob::Resources::Group.new(config)
40
+ end
41
+
42
+ def groups_members
43
+ Lob::Resources::GroupsMember.new(config)
44
+ end
40
45
 
41
46
  def intl_verifications
42
47
  Lob::Resources::IntlVerifications.new(config)
@@ -50,8 +55,8 @@ module Lob
50
55
  Lob::Resources::Postcard.new(config)
51
56
  end
52
57
 
53
- def routes
54
- Lob::Resources::Route.new(config)
58
+ def us_autocompletions
59
+ Lob::Resources::USAutocompletions.new(config)
55
60
  end
56
61
 
57
62
  def us_verifications
@@ -2,13 +2,11 @@ require "lob/resources/resource_base"
2
2
 
3
3
  module Lob
4
4
  module Resources
5
- class Area < Lob::Resources::ResourceBase
6
-
7
- undef_method :destroy
5
+ class Group < Lob::Resources::ResourceBase
8
6
 
9
7
  def initialize(config)
10
8
  super(config)
11
- @endpoint = "areas"
9
+ @endpoint = "groups"
12
10
  end
13
11
 
14
12
  end
@@ -0,0 +1,66 @@
1
+ require "rest-client"
2
+ require "json"
3
+ require "uri"
4
+
5
+ module Lob
6
+ module Resources
7
+ class GroupsMember < Lob::Resources::ResourceBase
8
+
9
+ attr_reader :config, :endpoint
10
+
11
+ def initialize(config)
12
+ super(config)
13
+ @endpoint = "members"
14
+ end
15
+
16
+ def list(group_id, query={})
17
+ request = {
18
+ method: :get,
19
+ url: endpoint_url(group_id),
20
+ query: query
21
+ }
22
+
23
+ submit request
24
+ end
25
+
26
+ def find(group_id, resource_id)
27
+ request = {
28
+ method: :get,
29
+ url: resource_url(group_id, resource_id)
30
+ }
31
+
32
+ submit request
33
+ end
34
+
35
+ def create(group_id, body={}, headers={}, query={})
36
+ request = {
37
+ method: :post,
38
+ url: endpoint_url(group_id),
39
+ body: body,
40
+ headers: headers,
41
+ query: query
42
+ }
43
+
44
+ submit request
45
+ end
46
+
47
+ def destroy(group_id, resource_id)
48
+ request = {
49
+ method: :delete,
50
+ url: resource_url(group_id, resource_id)
51
+ }
52
+
53
+ submit request
54
+ end
55
+
56
+ def endpoint_url(group_id)
57
+ "#{base_url}/groups/#{group_id}/#{endpoint}"
58
+ end
59
+
60
+ def resource_url(group_id, resource_id)
61
+ "#{endpoint_url(group_id)}/#{resource_id}"
62
+ end
63
+
64
+ end
65
+ end
66
+ end