Skip to content

Commit

Permalink
Increase companies identifier validation to 30 char length
Browse files Browse the repository at this point in the history
Connectwise documentation is incorrect. It allows up to 30 chars.

Fixes sowderca#17
  • Loading branch information
NickSchimek committed Nov 30, 2022
1 parent 0495cbe commit 29774b1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/connectwise-ruby-sdk/models/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ def list_invalid_properties
invalid_properties.push("invalid value for 'identifier', identifier cannot be nil.")
end

if @identifier.to_s.length > 25
invalid_properties.push("invalid value for 'identifier', the character length must be smaller than or equal to 25.")
if @identifier.to_s.length > 30
invalid_properties.push("invalid value for 'identifier', the character length must be smaller than or equal to 30.")
end

if @name.nil?
Expand Down Expand Up @@ -654,7 +654,7 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
return false if @identifier.nil?
return false if @identifier.to_s.length > 25
return false if @identifier.to_s.length > 30
return false if @name.nil?
return false if @name.to_s.length > 50
return false if !@address_line1.nil? && @address_line1.to_s.length > 50
Expand Down Expand Up @@ -688,8 +688,8 @@ def identifier=(identifier)
fail ArgumentError, "identifier cannot be nil"
end

if identifier.to_s.length > 25
fail ArgumentError, "invalid value for 'identifier', the character length must be smaller than or equal to 25."
if identifier.to_s.length > 30
fail ArgumentError, "invalid value for 'identifier', the character length must be smaller than or equal to 30."
end

@identifier = identifier
Expand Down

0 comments on commit 29774b1

Please sign in to comment.