Skip to content

Commit

Permalink
#3 - Removed country validation
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarrega committed Oct 19, 2020
1 parent ace8979 commit 7d4a898
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
lemonway-ruby (1.0.4)
lemonway-ruby (1.0.5)
json (~> 2.1, >= 2.1.0)
typhoeus (~> 1.0, >= 1.0.1)

Expand Down
12 changes: 6 additions & 6 deletions lib/lemonway-ruby/models/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ def list_invalid_properties
invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 3.')
end

if @country.to_s.length < 3
invalid_properties.push('invalid value for "country", the character length must be great than or equal to 3.')
end
# if @country.to_s.length < 3
# invalid_properties.push('invalid value for "country", the character length must be great than or equal to 3.')
# end

invalid_properties
end
Expand Down Expand Up @@ -182,9 +182,9 @@ def country=(country)
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 3.'
end

if country.to_s.length < 3
fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 3.'
end
# if country.to_s.length < 3
# fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 3.'
# end

@country = country
end
Expand Down
12 changes: 6 additions & 6 deletions lib/lemonway-ruby/models/birth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def list_invalid_properties
invalid_properties.push('invalid value for "country", the character length must be smaller than or equal to 3.')
end

if !@country.nil? && @country.to_s.length < 3
invalid_properties.push('invalid value for "country", the character length must be great than or equal to 3.')
end
# if [email protected]? && @country.to_s.length < 3
# invalid_properties.push('invalid value for "country", the character length must be great than or equal to 3.')
# end

invalid_properties
end
Expand Down Expand Up @@ -140,9 +140,9 @@ def country=(country)
fail ArgumentError, 'invalid value for "country", the character length must be smaller than or equal to 3.'
end

if !country.nil? && country.to_s.length < 3
fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 3.'
end
# if !country.nil? && country.to_s.length < 3
# fail ArgumentError, 'invalid value for "country", the character length must be great than or equal to 3.'
# end

@country = country
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lemonway-ruby/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module LemonWayClient
VERSION = '1.0.4'
VERSION = '1.0.5'
end

0 comments on commit 7d4a898

Please sign in to comment.