Method: OpenapiClient::Address#valid?

Defined in:
lib/openapi_client/models/address.rb

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



146
147
148
149
150
151
152
153
154
155
# File 'lib/openapi_client/models/address.rb', line 146

def valid?
  return false if !@company.nil? && @company.to_s.length > 96
  return false if !@address1.nil? && @address1.to_s.length > 96
  return false if !@address2.nil? && @address2.to_s.length > 96
  return false if !@city.nil? && @city.to_s.length > 96
  return false if !@region.nil? && @region.to_s.length > 96
  return false if !@postal_code.nil? && @postal_code.to_s.length > 24
  return false if !@country.nil? && @country.to_s.length > 32
  true
end