lob 6.0.0 → 6.0.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
2
  SHA256:
3
- metadata.gz: adfcd43de443af0aadc3ab1e51a98edc0b68a129e7fa54c1c2978ddf171d51f4
4
- data.tar.gz: cee002ba7ff1f778fe1b3a253294229a8abe2fe2be328336a731118fd01904b2
3
+ metadata.gz: d4f01c2476862af203ea33b4bf421739470510d9fd4db35e9f897185976441e9
4
+ data.tar.gz: 35e368729b4198589a224faf3a4440daa1efda3f35aff3f5c6ffed46c3ee1948
5
5
  SHA512:
6
- metadata.gz: a0a714c5da36cd624cd65191b251b8daef07c2abc1cf20345e21db07a8dbf12363e36eafa0c1625fe7c570e0cea8366d7665a7fbe528097b503cd95c963a2723
7
- data.tar.gz: 85a62e77421354456f0292a2533b1c8e16ed5c2b501f93ec3e24d2ee031fd18cd108e0abaa738e9bf0bbfb552835fbaeee8058bed389da4bc555c4e1197dbf49
6
+ metadata.gz: 613af862e050aba7877e785ec86f03601b17b7c4884a1c2dd18e4fc191b978c192fa3d6d9b43a9816fc40c8dca61bebc9f2c4eece74035a2ec6bd7a20b38aab2
7
+ data.tar.gz: 6b9d8a1e67707a01a53f7ef6e8aa0f500cd1cd8f6b843cf2f9fb32226ac8f691d9a94b6edd5a9450c3940402f70ae7ffc6416810477ec76782a6bd39b2298442
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lob (6.0.0)
4
+ lob (6.0.2)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -17,7 +17,7 @@ GEM
17
17
  jaro_winkler (1.5.4)
18
18
  method_source (1.0.0)
19
19
  parallel (1.22.1)
20
- parser (3.2.0.0)
20
+ parser (3.2.1.0)
21
21
  ast (~> 2.4.1)
22
22
  pry (0.14.2)
23
23
  coderay (~> 1.1)
@@ -25,7 +25,7 @@ GEM
25
25
  pry-byebug (3.10.1)
26
26
  byebug (~> 11.0)
27
27
  pry (>= 0.13, < 0.15)
28
- psych (5.0.2)
28
+ psych (5.1.0)
29
29
  stringio
30
30
  rainbow (3.1.1)
31
31
  rake (13.0.6)
@@ -33,7 +33,7 @@ GEM
33
33
  rspec-core (~> 3.12.0)
34
34
  rspec-expectations (~> 3.12.0)
35
35
  rspec-mocks (~> 3.12.0)
36
- rspec-core (3.12.0)
36
+ rspec-core (3.12.1)
37
37
  rspec-support (~> 3.12.0)
38
38
  rspec-expectations (3.12.2)
39
39
  diff-lcs (>= 1.2.0, < 2.0)
@@ -51,7 +51,7 @@ GEM
51
51
  ruby-progressbar (~> 1.7)
52
52
  unicode-display_width (>= 1.4.0, < 1.6)
53
53
  ruby-progressbar (1.11.0)
54
- stringio (3.0.4)
54
+ stringio (3.0.5)
55
55
  typhoeus (1.4.0)
56
56
  ethon (>= 0.9.0)
57
57
  unicode-display_width (1.5.0)
@@ -67,4 +67,4 @@ DEPENDENCIES
67
67
  rubocop (~> 0.66.0)
68
68
 
69
69
  BUNDLED WITH
70
- 2.4.4
70
+ 2.4.7
@@ -153,10 +153,10 @@ RSpec.describe "AddressesApi" do
153
153
  addressEditable = AddressEditable.new
154
154
  fakeAddresses = Array.new(2) { Address.new }
155
155
 
156
- DATE_FILTER = { gt: "2020-01-01", lt: "2020-01-31T12" };
156
+ dateFilter = { gt: "2020-01-01", lt: "2020-01-31T12" };
157
157
  fakeAddresses[0].id = "adr_fakeid"
158
158
  allow(addressApi).to receive(:list) { fakeAddresses }
159
- response = addressApi.list(date_created: DATE_FILTER)
159
+ response = addressApi.list(date_created: dateFilter)
160
160
 
161
161
  expect(response.length()).to eq(2)
162
162
  expect(response).to eq(fakeAddresses)
@@ -169,10 +169,10 @@ RSpec.describe "AddressesApi" do
169
169
  addressEditable = AddressEditable.new
170
170
  fakeAddresses = Array.new(2) { Address.new }
171
171
 
172
- METADATA = { fakeMetadata: "fakemetadata" }
172
+ metadata = { fakeMetadata: "fakemetadata" }
173
173
  fakeAddresses[0].id = "adr_fakeid"
174
174
  allow(addressApi).to receive(:list) { fakeAddresses }
175
- response = addressApi.list(metadata: METADATA)
175
+ response = addressApi.list(metadata: metadata)
176
176
 
177
177
  expect(response.length()).to eq(2)
178
178
  expect(response).to eq(fakeAddresses)
@@ -207,4 +207,4 @@ RSpec.describe "AddressesApi" do
207
207
  expect(response.deleted).to eq(true)
208
208
  end
209
209
  end
210
- end
210
+ end
@@ -155,10 +155,10 @@ RSpec.describe "BankAccountsApi" do
155
155
  bankAccountWritable = BankAccountWritable.new
156
156
  fakeBankAccounts = Array.new(2) { BankAccount.new }
157
157
 
158
- DATE_FILTER = { gt: "2020-01-01", lt: "2020-01-31T12" };
158
+ dateFilter = { gt: "2020-01-01", lt: "2020-01-31T12" };
159
159
  fakeBankAccounts[0].id = "bank_fakeId"
160
160
  allow(bankAccountApi).to receive(:list) { fakeBankAccounts }
161
- response = bankAccountApi.list(date_created: DATE_FILTER)
161
+ response = bankAccountApi.list(date_created: dateFilter)
162
162
 
163
163
  expect(response.length()).to eq(2)
164
164
  expect(bankAccountApi.list).to eq(fakeBankAccounts)
@@ -171,10 +171,10 @@ RSpec.describe "BankAccountsApi" do
171
171
  bankAccountWritable = BankAccountWritable.new
172
172
  fakeBankAccounts = Array.new(2) { BankAccount.new }
173
173
 
174
- METADATA = { fakeMetadata: "fakemetadata" }
174
+ metadata = { fakeMetadata: "fakemetadata" }
175
175
  fakeBankAccounts[0].id = "bank_fakeId"
176
176
  allow(bankAccountApi).to receive(:list) { fakeBankAccounts }
177
- response = bankAccountApi.list(metadata: METADATA)
177
+ response = bankAccountApi.list(metadata: metadata)
178
178
 
179
179
  expect(response.length()).to eq(2)
180
180
  expect(bankAccountApi.list).to eq(fakeBankAccounts)
@@ -241,4 +241,4 @@ RSpec.describe "BankAccountsApi" do
241
241
  expect(response.verified).to eq(fakeBankAccount.verified)
242
242
  end
243
243
  end
244
- end
244
+ end
@@ -0,0 +1,21 @@
1
+ # Require.unit.rb
2
+
3
+ RSpec.describe "Require" do
4
+
5
+ it "works with lob.rb" do
6
+ Object.send :remove_const, :Lob
7
+ paths = $".select do |path|
8
+ path.include?(File.expand_path("../../lib", File.dirname(__FILE__)))
9
+ end
10
+ paths.each { |path| $".delete(path) }
11
+
12
+ expect(defined?(Lob)).to eq(nil)
13
+ expect(defined?(Lob::Configuration)).to eq(nil)
14
+
15
+ require "lob"
16
+
17
+ expect(defined?(Lob)).to eq("constant")
18
+ expect(defined?(Lob::Configuration)).to eq("constant")
19
+ end
20
+
21
+ end
@@ -217,7 +217,7 @@ RSpec.describe "SelfMailersApi" do
217
217
  response = @selfMailerApi.list(args)
218
218
 
219
219
  if metadata then
220
- expect(response.data.length()).to be(0)
220
+ expect(response.data.length()).to be(1)
221
221
  else
222
222
  expect(response.data.length()).to be > 0
223
223
  end
data/lib/lob.rb ADDED
@@ -0,0 +1 @@
1
+ require 'openapi_client'
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Lob
17
17
  class BankAccount
18
- # An internal description that identifies this resource. Must be no longer than 255 characters.
18
+ # An internal description that identifies this resource. Must be no longer than 255 characters.
19
19
  attr_accessor :description
20
20
 
21
21
  # Must be a [valid US routing number](https://www.frbservices.org/index.html).
@@ -257,7 +257,7 @@ module Lob
257
257
  invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
258
258
  end
259
259
 
260
- pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
260
+ pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
261
261
  if !@signature_url.nil? && @signature_url !~ pattern
262
262
  invalid_properties.push("invalid value for \"signature_url\", must conform to the pattern #{pattern}.")
263
263
  end
@@ -293,7 +293,7 @@ module Lob
293
293
  return false if @signatory.to_s.length > 30
294
294
  return false if @id.nil?
295
295
  return false if @id !~ Regexp.new(/^bank_[a-zA-Z0-9]+$/)
296
- return false if !@signature_url.nil? && @signature_url !~ Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
296
+ return false if !@signature_url.nil? && @signature_url !~ Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
297
297
  return false if @date_created.nil?
298
298
  return false if @date_modified.nil?
299
299
  return false if @object.nil?
@@ -392,7 +392,7 @@ module Lob
392
392
  # Custom attribute writer method with validation
393
393
  # @param [Object] signature_url Value to be assigned
394
394
  def signature_url=(signature_url)
395
- pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
395
+ pattern = Regexp.new(/^https:\/\/lob-assets\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
396
396
  if !signature_url.nil? && signature_url !~ pattern
397
397
  fail ArgumentError, "invalid value for \"signature_url\", must conform to the pattern #{pattern}."
398
398
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -22,7 +22,7 @@ module Lob
22
22
 
23
23
  attr_accessor :from
24
24
 
25
- # An internal description that identifies this resource. Must be no longer than 255 characters.
25
+ # An internal description that identifies this resource. Must be no longer than 255 characters.
26
26
  attr_accessor :description
27
27
 
28
28
  # Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information.
@@ -402,7 +402,7 @@ module Lob
402
402
  invalid_properties.push('invalid value for "url", url cannot be nil.')
403
403
  end
404
404
 
405
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
405
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
406
406
  if @url !~ pattern
407
407
  invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
408
408
  end
@@ -447,7 +447,7 @@ module Lob
447
447
  return false if !@check_bottom_template_version_id.nil? && @check_bottom_template_version_id !~ Regexp.new(/^vrsn_[a-zA-Z0-9]+$/)
448
448
  return false if !@attachment_template_version_id.nil? && @attachment_template_version_id !~ Regexp.new(/^vrsn_[a-zA-Z0-9]+$/)
449
449
  return false if @url.nil?
450
- return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
450
+ return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
451
451
  return false if @carrier.nil?
452
452
  carrier_validator = EnumAttributeValidator.new('String', ["USPS"])
453
453
  return false unless carrier_validator.valid?(@carrier)
@@ -605,7 +605,7 @@ module Lob
605
605
  fail ArgumentError, 'url cannot be nil'
606
606
  end
607
607
 
608
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
608
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
609
609
  if url !~ pattern
610
610
  fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
611
611
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -49,7 +49,7 @@ module Lob
49
49
 
50
50
  attr_accessor :object
51
51
 
52
- # An internal description that identifies this resource. Must be no longer than 255 characters.
52
+ # An internal description that identifies this resource. Must be no longer than 255 characters.
53
53
  attr_accessor :description
54
54
 
55
55
  # Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information.
@@ -81,7 +81,7 @@ module Lob
81
81
  # Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`.
82
82
  attr_accessor :double_sided
83
83
 
84
- # Specifies the location of the address information that will show through the double-window envelope.
84
+ # Specifies the location of the address information that will show through the double-window envelope.
85
85
  attr_accessor :address_placement
86
86
 
87
87
  attr_accessor :return_envelope
@@ -401,7 +401,7 @@ module Lob
401
401
  invalid_properties.push("invalid value for \"template_version_id\", must conform to the pattern #{pattern}.")
402
402
  end
403
403
 
404
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
404
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
405
405
  if !@url.nil? && @url !~ pattern
406
406
  invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
407
407
  end
@@ -434,7 +434,7 @@ module Lob
434
434
  return false if @id !~ Regexp.new(/^ltr_[a-zA-Z0-9]+$/)
435
435
  return false if !@template_id.nil? && @template_id !~ Regexp.new(/^tmpl_[a-zA-Z0-9]+$/)
436
436
  return false if !@template_version_id.nil? && @template_version_id !~ Regexp.new(/^vrsn_[a-zA-Z0-9]+$/)
437
- return false if !@url.nil? && @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
437
+ return false if !@url.nil? && @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
438
438
  return false if @object.nil?
439
439
  object_validator = EnumAttributeValidator.new('String', ["letter"])
440
440
  return false unless object_validator.valid?(@object)
@@ -495,7 +495,7 @@ module Lob
495
495
  # Custom attribute writer method with validation
496
496
  # @param [Object] url Value to be assigned
497
497
  def url=(url)
498
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
498
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
499
499
  if !url.nil? && url !~ pattern
500
500
  fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
501
501
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -60,7 +60,7 @@ module Lob
60
60
  # A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated.
61
61
  attr_accessor :url
62
62
 
63
- # An internal description that identifies this resource. Must be no longer than 255 characters.
63
+ # An internal description that identifies this resource. Must be no longer than 255 characters.
64
64
  attr_accessor :description
65
65
 
66
66
  # Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information.
@@ -334,7 +334,7 @@ module Lob
334
334
  invalid_properties.push('invalid value for "url", url cannot be nil.')
335
335
  end
336
336
 
337
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
337
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
338
338
  if @url !~ pattern
339
339
  invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
340
340
  end
@@ -360,7 +360,7 @@ module Lob
360
360
  object_validator = EnumAttributeValidator.new('String', ["postcard"])
361
361
  return false unless object_validator.valid?(@object)
362
362
  return false if @url.nil?
363
- return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
363
+ return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
364
364
  return false if !@description.nil? && @description.to_s.length > 255
365
365
  true
366
366
  end
@@ -451,7 +451,7 @@ module Lob
451
451
  fail ArgumentError, 'url cannot be nil'
452
452
  end
453
453
 
454
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
454
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
455
455
  if url !~ pattern
456
456
  fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
457
457
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -24,7 +24,7 @@ module Lob
24
24
 
25
25
  attr_accessor :size
26
26
 
27
- # An internal description that identifies this resource. Must be no longer than 255 characters.
27
+ # An internal description that identifies this resource. Must be no longer than 255 characters.
28
28
  attr_accessor :description
29
29
 
30
30
  # Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information.
@@ -284,7 +284,7 @@ module Lob
284
284
  invalid_properties.push('invalid value for "url", url cannot be nil.')
285
285
  end
286
286
 
287
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
287
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
288
288
  if @url !~ pattern
289
289
  invalid_properties.push("invalid value for \"url\", must conform to the pattern #{pattern}.")
290
290
  end
@@ -305,7 +305,7 @@ module Lob
305
305
  object_validator = EnumAttributeValidator.new('String', ["self_mailer"])
306
306
  return false unless object_validator.valid?(@object)
307
307
  return false if @url.nil?
308
- return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
308
+ return false if @url !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
309
309
  true
310
310
  end
311
311
 
@@ -407,7 +407,7 @@ module Lob
407
407
  fail ArgumentError, 'url cannot be nil'
408
408
  end
409
409
 
410
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
410
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
411
411
  if url !~ pattern
412
412
  fail ArgumentError, "invalid value for \"url\", must conform to the pattern #{pattern}."
413
413
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Lob
3
3
 
4
- #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
4
+ #The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
5
5
 
6
6
  The version of the OpenAPI document: 1.3.0
7
7
  Contact: lob-openapi@lob.com
@@ -85,17 +85,17 @@ module Lob
85
85
  # @return Array for valid properties with the reasons
86
86
  def list_invalid_properties
87
87
  invalid_properties = Array.new
88
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
88
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
89
89
  if !@small.nil? && @small !~ pattern
90
90
  invalid_properties.push("invalid value for \"small\", must conform to the pattern #{pattern}.")
91
91
  end
92
92
 
93
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
93
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
94
94
  if !@medium.nil? && @medium !~ pattern
95
95
  invalid_properties.push("invalid value for \"medium\", must conform to the pattern #{pattern}.")
96
96
  end
97
97
 
98
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
98
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
99
99
  if !@large.nil? && @large !~ pattern
100
100
  invalid_properties.push("invalid value for \"large\", must conform to the pattern #{pattern}.")
101
101
  end
@@ -106,16 +106,16 @@ module Lob
106
106
  # Check to see if the all the properties in the model are valid
107
107
  # @return true if the model is valid
108
108
  def valid?
109
- return false if !@small.nil? && @small !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
110
- return false if !@medium.nil? && @medium !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
111
- return false if !@large.nil? && @large !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
109
+ return false if !@small.nil? && @small !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
110
+ return false if !@medium.nil? && @medium !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
111
+ return false if !@large.nil? && @large !~ Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
112
112
  true
113
113
  end
114
114
 
115
115
  # Custom attribute writer method with validation
116
116
  # @param [Object] small Value to be assigned
117
117
  def small=(small)
118
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
118
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
119
119
  if !small.nil? && small !~ pattern
120
120
  fail ArgumentError, "invalid value for \"small\", must conform to the pattern #{pattern}."
121
121
  end
@@ -126,7 +126,7 @@ module Lob
126
126
  # Custom attribute writer method with validation
127
127
  # @param [Object] medium Value to be assigned
128
128
  def medium=(medium)
129
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
129
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
130
130
  if !medium.nil? && medium !~ pattern
131
131
  fail ArgumentError, "invalid value for \"medium\", must conform to the pattern #{pattern}."
132
132
  end
@@ -137,7 +137,7 @@ module Lob
137
137
  # Custom attribute writer method with validation
138
138
  # @param [Object] large Value to be assigned
139
139
  def large=(large)
140
- pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+$/)
140
+ pattern = Regexp.new(/^https:\/\/(lob-assets|lob-assets-staging)\.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(\.pdf|_thumb_[a-z]+_[0-9]+\.png)\?(version=[a-z0-9-]*&)?expires=[0-9]{10}&signature=[a-zA-Z0-9_-]+$/)
141
141
  if !large.nil? && large !~ pattern
142
142
  fail ArgumentError, "invalid value for \"large\", must conform to the pattern #{pattern}."
143
143
  end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.2.1
11
11
  =end
12
12
 
13
13
  module Lob
14
- VERSION = '6.0.0'
14
+ VERSION = '6.0.2'
15
15
  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: 6.0.0
4
+ version: 6.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2023-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -74,6 +74,7 @@ files:
74
74
  - __tests__/Api/IntlVerification.unit.rb
75
75
  - __tests__/Api/Letter.unit.rb
76
76
  - __tests__/Api/Postcard.unit.rb
77
+ - __tests__/Api/Require.unit.rb
77
78
  - __tests__/Api/ReverseGeocodeLookup.unit.rb
78
79
  - __tests__/Api/SelfMailer.unit.rb
79
80
  - __tests__/Api/Template.unit.rb
@@ -266,6 +267,7 @@ files:
266
267
  - docs/ZipLookupCity.md
267
268
  - docs/ZipLookupsApi.md
268
269
  - git_push.sh
270
+ - lib/lob.rb
269
271
  - lib/openapi_client.rb
270
272
  - lib/openapi_client/api/addresses_api.rb
271
273
  - lib/openapi_client/api/bank_accounts_api.rb
@@ -494,28 +496,28 @@ signing_key:
494
496
  specification_version: 4
495
497
  summary: Ruby wrapper for Lob.com API with ActiveRecord-style syntax
496
498
  test_files:
497
- - spec/api/billing_groups_api_spec.rb
498
- - spec/api/postcards_api_spec.rb
499
- - spec/api/us_verifications_api_spec.rb
500
- - spec/api/default_api_spec.rb
499
+ - spec/api/cards_api_spec.rb
500
+ - spec/api/checks_api_spec.rb
501
+ - spec/api/intl_autocompletions_api_spec.rb
501
502
  - spec/api/us_autocompletions_api_spec.rb
502
- - spec/api/bank_accounts_api_spec.rb
503
+ - spec/api/template_versions_api_spec.rb
503
504
  - spec/api/intl_verifications_api_spec.rb
504
- - spec/api/self_mailers_api_spec.rb
505
- - spec/api/cards_api_spec.rb
505
+ - spec/api/zip_lookups_api_spec.rb
506
506
  - spec/api/creatives_api_spec.rb
507
- - spec/api/checks_api_spec.rb
507
+ - spec/api/self_mailers_api_spec.rb
508
+ - spec/api/billing_groups_api_spec.rb
508
509
  - spec/api/letters_api_spec.rb
509
- - spec/api/zip_lookups_api_spec.rb
510
- - spec/api/template_versions_api_spec.rb
510
+ - spec/api/templates_api_spec.rb
511
+ - spec/api/uploads_api_spec.rb
511
512
  - spec/api/addresses_api_spec.rb
512
- - spec/api/campaigns_api_spec.rb
513
+ - spec/api/bank_accounts_api_spec.rb
513
514
  - spec/api/card_orders_api_spec.rb
514
- - spec/api/identity_validation_api_spec.rb
515
- - spec/api/intl_autocompletions_api_spec.rb
516
- - spec/api/uploads_api_spec.rb
517
- - spec/api/templates_api_spec.rb
518
515
  - spec/api/reverse_geocode_lookups_api_spec.rb
516
+ - spec/api/campaigns_api_spec.rb
517
+ - spec/api/identity_validation_api_spec.rb
518
+ - spec/api/us_verifications_api_spec.rb
519
+ - spec/api/postcards_api_spec.rb
520
+ - spec/api/default_api_spec.rb
519
521
  - spec/api_client_spec.rb
520
522
  - spec/configuration_spec.rb
521
523
  - spec/spec_helper.rb