def fields_to_validate
      required_fields = to_hash opts[:required]
      optional_fields = to_hash opts[:optional]
      required_fields.keys.each { |key| required_fields[key][:required] = true }
      optional_fields.merge(required_fields)
    end
def fields_to_validate
      required_fields = to_hash opts[:required]
      optional_fields = to_hash opts[:optional]
      required_fields.keys.each { |key| required_fields[key][:required] = true }
      optional_fields.merge(required_fields)
    end
Gets fields to validate
 @return [Hash] Fields to validate.