Method: OpenapiClient::UsePaymentToken#list_invalid_properties

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

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/openapi_client/models/use_payment_token.rb', line 91

def list_invalid_properties
  invalid_properties = Array.new
  if @value.nil?
    invalid_properties.push('invalid value for "value", value cannot be nil.')
  end

  pattern = Regexp.new(/^(?!\s*$).+/)
  if @value !~ pattern
    invalid_properties.push("invalid value for \"value\", must conform to the pattern #{pattern}.")
  end

  if !@token_origin_store_id.nil? && @token_origin_store_id.to_s.length > 20
    invalid_properties.push('invalid value for "token_origin_store_id", the character length must be smaller than or equal to 20.')
  end

  if !@security_code.nil? && @security_code.to_s.length > 4
    invalid_properties.push('invalid value for "security_code", the character length must be smaller than or equal to 4.')
  end

  if !@security_code.nil? && @security_code.to_s.length < 3
    invalid_properties.push('invalid value for "security_code", the character length must be great than or equal to 3.')
  end

  invalid_properties
end