lib/square_connect/models/employee.rb in square_connect-2.20190612.1.314 vs lib/square_connect/models/employee.rb in square_connect-2.20190710.0.321

- old
+ new

@@ -37,32 +37,11 @@ attr_accessor :created_at # A read-only timestamp in RFC 3339 format. attr_accessor :updated_at - 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 { :'id' => :'id', :'first_name' => :'first_name', @@ -147,22 +126,10 @@ end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "INACTIVE"]) - return false unless status_validator.valid?(@status) return true - end - - # Custom attribute writer method checking allowed values (enum). - # @param [Object] status Object to be assigned - def status=(status) - validator = EnumAttributeValidator.new('String', ["ACTIVE", "INACTIVE"]) - unless validator.valid?(status) - fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}." - end - @status = status end # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o)