lib/onfido/models/document.rb in onfido-3.1.0 vs lib/onfido/models/document.rb in onfido-3.2.0

- old
+ new

@@ -199,21 +199,21 @@ # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - file_type_validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"]) + file_type_validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"]) return false unless file_type_validator.valid?(@file_type) side_validator = EnumAttributeValidator.new('String', ["front", "back", "unknown_default_open_api"]) return false unless side_validator.valid?(@side) return false if @id.nil? true end # Custom attribute writer method checking allowed values (enum). # @param [Object] file_type Object to be assigned def file_type=(file_type) - validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"]) + validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"]) unless validator.valid?(file_type) fail ArgumentError, "invalid value for \"file_type\", must be one of #{validator.allowable_values}." end @file_type = file_type end