lob 1.9.1 → 2.5.0

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -2
  3. data/.travis.yml +3 -6
  4. data/CHANGELOG.md +46 -0
  5. data/README.md +125 -596
  6. data/Rakefile +0 -19
  7. data/examples/README.md +27 -0
  8. data/examples/checks.rb +22 -23
  9. data/examples/csv_postcards/create_postcards.rb +46 -0
  10. data/examples/csv_postcards/input.csv +7 -0
  11. data/examples/csv_postcards/postcard_back.html +38 -0
  12. data/examples/csv_postcards/postcard_front.html +25 -0
  13. data/examples/jobs.rb +65 -21
  14. data/examples/letters.rb +73 -0
  15. data/examples/postcards.rb +64 -12
  16. data/examples/verify/input.txt +7 -0
  17. data/examples/verify/verify.rb +38 -0
  18. data/lib/lob/errors/lob_error.rb +9 -6
  19. data/lib/lob/v1/address.rb +3 -4
  20. data/lib/lob/v1/area.rb +1 -1
  21. data/lib/lob/v1/bank_account.rb +5 -9
  22. data/lib/lob/v1/check.rb +1 -5
  23. data/lib/lob/v1/country.rb +1 -1
  24. data/lib/lob/v1/job.rb +1 -9
  25. data/lib/lob/v1/letter.rb +29 -0
  26. data/lib/lob/v1/object.rb +1 -1
  27. data/lib/lob/v1/postcard.rb +1 -9
  28. data/lib/lob/v1/resource.rb +4 -24
  29. data/lib/lob/v1/route.rb +9 -1
  30. data/lib/lob/v1/setting.rb +1 -1
  31. data/lib/lob/v1/state.rb +1 -1
  32. data/lib/lob/version.rb +1 -1
  33. data/lib/lob.rb +37 -16
  34. data/lob.gemspec +5 -7
  35. data/spec/lob/errors/lob_error_spec.rb +4 -2
  36. data/spec/lob/v1/address_spec.rb +24 -34
  37. data/spec/lob/v1/area_spec.rb +16 -38
  38. data/spec/lob/v1/bank_account_spec.rb +25 -79
  39. data/spec/lob/v1/check_spec.rb +38 -65
  40. data/spec/lob/v1/country_spec.rb +2 -4
  41. data/spec/lob/v1/job_spec.rb +116 -162
  42. data/spec/lob/v1/letter_spec.rb +75 -0
  43. data/spec/lob/v1/object_spec.rb +32 -50
  44. data/spec/lob/v1/postcard_spec.rb +66 -90
  45. data/spec/lob/v1/resource_spec.rb +0 -9
  46. data/spec/lob/v1/route_spec.rb +28 -6
  47. data/spec/lob/v1/setting_spec.rb +4 -12
  48. data/spec/lob/v1/state_spec.rb +2 -4
  49. data/spec/lob_spec.rb +25 -6
  50. data/spec/samples/8.5x11.pdf +0 -0
  51. data/spec/samples/postcardback.pdf +2288 -1
  52. data/spec/samples/postcardfront.pdf +1550 -0
  53. data/spec/spec_helper.rb +0 -6
  54. metadata +58 -62
  55. data/examples/create_pdf.rb +0 -25
  56. data/lib/lob/v1/packaging.rb +0 -21
  57. data/lib/lob/v1/service.rb +0 -21
  58. data/spec/lob/v1/packaging_spec.rb +0 -16
  59. data/spec/lob/v1/service_spec.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6b34d9959bf594d671a838b468e268e571997a8
4
- data.tar.gz: b7be3316bac82cf00da38b809dfe4f59a54d0f3a
3
+ metadata.gz: 8e9405bed02fc2ea005d649b4563639b37a2a5d5
4
+ data.tar.gz: 238e9a1101eaf3aaf8848028a350508c60358a15
5
5
  SHA512:
6
- metadata.gz: 6c3c73b4420e445290c1b6e88848b54b7497fb174e7bcfe31d34e37945471862951c85f96aa7f787b2203ae64d426e75bf507ed3dd8a1b54366d7bdf73124837
7
- data.tar.gz: 8cc569fa5a1a41b0bc6497059cf1731647028a422573545209b1072e1a2619e0657305f260a9f61c1edea1077be2e20899670bc5d8b99d5f6247efb214b4f051
6
+ metadata.gz: e762ca6ab03b0c90b578616270b7747ead4cc6152e73417656086d1cc09ff8b525118d3fbdc7e14851ee0463035d3d16c93d55c15a558088ae17993151ecf5fe
7
+ data.tar.gz: 1651326d4d44a238bbc1ff17ab4d9d4704bd80335eb298dbaad05f5f63296ab6275bb7b66d1da146c79318779955367956b6b7bfb1c64595f1f09cd2646b2b74
data/.gitignore CHANGED
@@ -16,5 +16,3 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
- spec/vcr_cassettes/
20
- spec/samples/
data/.travis.yml CHANGED
@@ -6,14 +6,11 @@ rvm:
6
6
  - 1.9.3
7
7
  - jruby
8
8
  - 2.0.0
9
- - 2.1.0
9
+ - 2.1
10
+ - 2.2
10
11
 
11
12
  env:
12
13
  JRUBY_OPTS=--2.0
13
- - LOB_API_KEY=test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc
14
-
15
- before_script:
16
- - bundle exec rake dev:setup
17
- - rm -rf spec/vcr_cassettes
14
+ - LOB_API_KEY=test_799ff27291c166d10ba191902ad02fb059c
18
15
 
19
16
  script: bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,3 +1,49 @@
1
+ ## [**2.5.0**](https://github.com/lob/lob-ruby/releases/tag/v2.5.0)
2
+ - [**#140**] (https://github.com/lob/lob-ruby/pull/140) Adds access to response and headers
3
+
4
+ ## [**2.4.0**](https://github.com/lob/lob-ruby/releases/tag/v2.4.0)
5
+ - [**#136**] (https://github.com/lob/lob-ruby/pull/136) Adds find to routes
6
+
7
+ ## [**2.3.0**](https://github.com/lob/lob-ruby/releases/tag/v2.3.0)
8
+ - [**#130**] (https://github.com/lob/lob-ruby/pull/130) Removed services endpoint support
9
+
10
+ ## [**2.2.0**](https://github.com/lob/lob-ruby/releases/tag/v2.2.0)
11
+ - [**#129**] (https://github.com/lob/lob-ruby/pull/129) Adds support for API version 2015-11-06
12
+
13
+ ## [**2.1.2**](https://github.com/lob/lob-ruby/releases/tag/v2.1.2)
14
+ - [**#127**] (https://github.com/lob/lob-ruby/pull/127) Ensure JSON.parse is never passes nil
15
+
16
+ ## [**2.1.1**](https://github.com/lob/lob-ruby/releases/tag/v2.1.1)
17
+ - [**#124**] (https://github.com/lob/lob-ruby/pull/124) routes#find accepts single ZIP code
18
+
19
+ ## [**2.1.0**](https://github.com/lob/lob-ruby/releases/tag/v2.1.0)
20
+ - [**#119**] (https://github.com/lob/lob-ruby/pull/119) better error messages
21
+
22
+ ## [**2.0.1**](https://github.com/lob/lob-ruby/releases/tag/v2.0.1)
23
+ - [**#118**] (https://github.com/lob/lob-ruby/pull/118) removed prawn and fixed examples
24
+
25
+ ## 2.0.0
26
+
27
+ Version 2.0.0 introduces several breaking changes. It requires a minimum API version of `2015-04-11`.
28
+
29
+ * The lob-ruby gem no longer converts `city`, `state`, etc. parameters into `address_city`, `address_state`, etc. This change was made to be more consistent with the API and other Lob wrappers, and to prevent confusion.
30
+ * The wrapper now returns the raw JSON from the API in all `list` endpoints rather than just the `data` field in the response. This will allow access to additional fields like `count` and `offset`.
31
+ * The `packagings` endpoint is not longer supporter in the API, and therefore has been taken out of lob-ruby.
32
+
33
+ In addition to these breaking changes, the test suite was cleaned up by removing the unnecessary VCR gem and committing sample upload files to the repository rather than downloading them in rake task.
34
+
35
+ ## [**1.13.0**](https://github.com/lob/lob-ruby/releases/tag/v1.13.0)
36
+ - [**#112**] (https://github.com/lob/lob-ruby/pull/112) removes Rack dependency
37
+
38
+ ## [**1.12.0**](https://github.com/lob/lob-ruby/releases/tag/v1.12.0)
39
+ - [**#110**] (https://github.com/lob/lob-ruby/pull/110) fixes metadata filter
40
+
41
+ ## [**1.10.0**](https://github.com/lob/lob-ruby/releases/tag/v1.10.0)
42
+ - [**#100**] (https://github.com/lob/lob-ruby/pull/100) adds support for Simple Letter Service
43
+
44
+ ## [**1.9.2**](https://github.com/lob/lob-ruby/releases/tag/v1.9.2)
45
+ - [**#94**] (https://github.com/lob/lob-ruby/pull/94) added bank account verify support
46
+
1
47
  ## [**1.9.1**](https://github.com/lob/lob-ruby/releases/tag/v1.9.1)
2
48
  - [**#92**] (https://github.com/lob/lob-ruby/pull/92) don't fix prawn version
3
49