lib/plaid/models/activity.rb in plaid-24.0.0 vs lib/plaid/models/activity.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' @@ -31,9 +31,31 @@ # This field will map to the application ID that is returned from /item/application/list, or provided to the institution in an oauth redirect. attr_accessor :target_application_id attr_accessor :scopes + + 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 { :'activity' => :'activity',