Method: OpenapiClient::RecurringPaymentDetails#valid?

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

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



211
212
213
214
215
216
217
218
219
220
# File 'lib/openapi_client/models/recurring_payment_details.rb', line 211

def valid?
  return false if !@store_id.nil? && @store_id.to_s.length > 20
  return false if !@number_of_payments.nil? && @number_of_payments > 999
  return false if !@number_of_payments.nil? && @number_of_payments < 1
  return false if !@run_count.nil? && @run_count > 999
  return false if !@run_count.nil? && @run_count < 0
  state_validator = EnumAttributeValidator.new('String', ["Installed", "Inactivated", "Cancelled"])
  return false unless state_validator.valid?(@state)
  true
end