Method: FormAPI::Submission#valid?

Defined in:
lib/form_api/models/submission.rb

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



201
202
203
204
205
206
207
208
209
# File 'lib/form_api/models/submission.rb', line 201

def valid?
  return false if @id.nil?
  return false if @test.nil?
  return false if @expired.nil?
  return false if @state.nil?
  state_validator = EnumAttributeValidator.new('String', ['pending', 'processed', 'invalid_data', 'error', 'image_download_failed', 'image_processing_failed', 'waiting_for_data_requests', 'syntax_error', 'account_suspended', 'license_revoked'])
  return false unless state_validator.valid?(@state)
  true
end