lib/plaid/models/entity_document.rb in plaid-24.0.0 vs lib/plaid/models/entity_document.rb in plaid-24.2.0

- old
+ new

@@ -1,14 +1,14 @@ =begin #The Plaid API #The Plaid REST API. Please see https://plaid.com/docs/api for more details. -The version of the OpenAPI document: 2020-09-14_1.470.1 +The version of the OpenAPI document: 2020-09-14_1.474.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.1.0 +OpenAPI Generator version: 6.3.0 =end require 'date' require 'time' @@ -18,9 +18,31 @@ class EntityDocument attr_accessor :type # The numeric or alphanumeric identifier associated with this document. attr_accessor :number + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'type' => :'type',