<!-- Describe your changes in detail -->

- Added time range filter support in the customer list API to fetch customers based on created_at between start_time and end_time.
- Implemented count functionality to return both the filtered customer list and total count for pagination.
- If customer_id is provided, the time range filter is skipped — only one filter applies at a time.
To implement this **search_filter** feature, you'll need to modify these architectural layers:


**1. API Request/Response Models**
   - `crates/api_models/src/customers.rs`
   - `crates/api_models/src/events/customer.rs`

**2. Database Layer (Queries & Schema)**
   - `crates/diesel_models/src/query/customers.rs`
   - `crates/diesel_models/src/query/generics.rs`

**3. Domain Models (Business Logic Types)**
   - `crates/hyperswitch_domain_models/src/customer.rs`

**4. Core Business Logic**
   - `crates/router/src/core/customers.rs`
   - `crates/router/src/core/errors/customers_error_response.rs`
   - `crates/router/src/core/errors/transformers.rs`
   - ... and 3 more files

**5. Type Definitions**
   - `crates/router/src/types/api/customers.rs`
   - `crates/router_env/src/logger/types.rs`

**6. Utils**
   - `crates/router/src/routes/lock_utils.rs`

**7. Other**
   - `crates/router/src/compatibility/stripe/errors.rs`
   - `crates/router/src/db/kafka_store.rs`
   - `crates/router/src/routes/app.rs`
   - ... and 2 more files

**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (20 changes)
- Extend existing types with new fields (70 changes)
- Add conditional logic for feature flags or filtering (2 changes)
- Modify database queries (15 changes)

**Detailed Identifier Changes:**


Commit 587588f8:
Files to modify:


**crates/api_models/src/customers.rs**
  Modify existing code

**crates/api_models/src/events/customer.rs**
  Modify existing code

**crates/diesel_models/src/query/customers.rs**
  Modify existing code

**crates/diesel_models/src/query/generics.rs**
  Modify existing code

**crates/hyperswitch_domain_models/src/customer.rs**
  Modify existing code

**crates/router/src/compatibility/stripe/errors.rs**
  Modify existing code

**crates/router/src/core/customers.rs**
  Modify existing code

**crates/router/src/core/errors/customers_error_response.rs**
  Modify existing code

**crates/router/src/core/errors/transformers.rs**
  Modify existing code

**crates/router/src/core/locker_migration.rs**
  Modify existing code

**crates/router/src/core/utils.rs**
  Modify existing code

**crates/router/src/core/utils/customer_validation.rs**
  Modify existing code

**crates/router/src/db/kafka_store.rs**
  Modify existing code

**crates/router/src/routes/app.rs**
  Modify existing code

**crates/router/src/routes/customers.rs**
  Modify existing code

**crates/router/src/routes/lock_utils.rs**
  Modify existing code

**crates/router/src/types/api/customers.rs**
  Modify existing code

**crates/router_env/src/logger/types.rs**
  Modify existing code

**crates/storage_impl/src/customers.rs**
  Modify existing code
{"pr_number": 9767, "pr_title": "feat(customers): add time range filtering and count functionality to customer list endpoints", "merged_at": "2025-10-16T08:13:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/customers.rs", "crates/api_models/src/events/customer.rs"], "database": ["crates/diesel_models/src/query/customers.rs", "crates/diesel_models/src/query/generics.rs"], "domain": ["crates/hyperswitch_domain_models/src/customer.rs"], "core_business": ["crates/router/src/core/customers.rs", "crates/router/src/core/errors/customers_error_response.rs", "crates/router/src/core/errors/transformers.rs", "crates/router/src/core/locker_migration.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/utils/customer_validation.rs"], "types": ["crates/router/src/types/api/customers.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/compatibility/stripe/errors.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/customers.rs", "crates/storage_impl/src/customers.rs"]}, "change_types": {"structs_added": 2, "functions_added": 20, "fields_added": 70, "imports_added": 1, "conditionals_added": 2, "database_queries": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}