Method: Propertyware::OwnerDraw#valid?

Defined in:
lib/propertyware/models/owner_draw.rb

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



227
228
229
230
231
232
233
234
# File 'lib/propertyware/models/owner_draw.rb', line 227

def valid?
  return false if @amount.nil?
  return false if @date.nil?
  return false if .nil?
  payment_type_validator = EnumAttributeValidator.new('String', ["CHECK", "CHECK21", "CASHIERS_CHECK", "CREDIT_CARD", "CASH", "MONEY_ORDER", "OTHER", "CLICKPAY", "SECTION8", "EPAY", "ECHECK", "NACHA", "RENTMONEY", "PUBLIC_ASSISTANCE"])
  return false unless payment_type_validator.valid?(@payment_type)
  true
end