Method: OpenapiClient::UsePaymentToken#valid?

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

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



119
120
121
122
123
124
125
126
# File 'lib/openapi_client/models/use_payment_token.rb', line 119

def valid?
  return false if @value.nil?
  return false if @value !~ Regexp.new(/^(?!\s*$).+/)
  return false if !@token_origin_store_id.nil? && @token_origin_store_id.to_s.length > 20
  return false if !@security_code.nil? && @security_code.to_s.length > 4
  return false if !@security_code.nil? && @security_code.to_s.length < 3
  true
end