diff --git a/lib/openapi_client/models/bank_account.rb b/lib/openapi_client/models/bank_account.rb index 9554792..77d08ac 100755 --- a/lib/openapi_client/models/bank_account.rb +++ b/lib/openapi_client/models/bank_account.rb @@ -257,7 +257,7 @@ def list_invalid_properties invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.") end - 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-_]+$/) + pattern = Regexp.new(/^https:\/\/lob-assets.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(''|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)\?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+/) if !@signature_url.nil? && @signature_url !~ pattern invalid_properties.push("invalid value for \"signature_url\", must conform to the pattern #{pattern}.") end @@ -293,7 +293,7 @@ def valid? return false if @signatory.to_s.length > 30 return false if @id.nil? return false if @id !~ Regexp.new(/^bank_[a-zA-Z0-9]+$/) - 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-_]+$/) + 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}(''|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)\?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+/) return false if @date_created.nil? return false if @date_modified.nil? return false if @object.nil? @@ -392,7 +392,7 @@ def id=(id) # Custom attribute writer method with validation # @param [Object] signature_url Value to be assigned def signature_url=(signature_url) - 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-_]+$/) + pattern = Regexp.new(/^https:\/\/lob-assets.com\/(letters|postcards|bank-accounts|checks|self-mailers|cards)\/[a-z]{3,4}_[a-z0-9]{15,16}(''|_signature)(.pdf|_thumb_[a-z]+_[0-9]+.png|.png)\?(version=[a-z0-9]*&)expires=[0-9]{10}&signature=[a-zA-Z0-9-_]+/) if !signature_url.nil? && signature_url !~ pattern fail ArgumentError, "invalid value for \"signature_url\", must conform to the pattern #{pattern}." end diff --git a/lib/openapi_client/version.rb b/lib/openapi_client/version.rb index ed23215..e2bce6a 100755 --- a/lib/openapi_client/version.rb +++ b/lib/openapi_client/version.rb @@ -11,5 +11,5 @@ =end module Lob - VERSION = '6.0.3' + VERSION = '6.0.4' end