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

1. Created a new crate for Payment Methods 
2. Moved payment method related DB Interfaces to storage_impl and domain_models
3. Added resource handling implementations in KVRouterStore, RouterStore and MockDB, With this support all the resource handlers can now directly call these generic functions instead of handling the merchant storage scheme manually
Eg: Instead of manually handling like [this](https://github.com/juspay/hyperswitch/blob/241653bd69e3503241f7556d363c243292a4603d/crates/router/src/db/payment_method.rs#L193) below code will be enough
This can be extended to any resource which implements the respective Store Eg: PaymentAttempt, PaymentIntent, PayoutAttempt, Payouts, Customer, Address, etc
```
self.find_resource_by_id(
            state,
            key_store,
            storage_scheme,
            PaymentMethod::find_by_payment_method_id(&conn, payment_method_id),
            format!("payment_method_{}", payment_method_id),
        )
        .await
 ```
To implement this **search_filter** feature, you'll need to modify these architectural layers:


**1. Domain Models (Business Logic Types)**
   - `crates/hyperswitch_domain_models/src/errors.rs`
   - `crates/hyperswitch_domain_models/src/payment_methods.rs`

**2. Core Business Logic**
   - `crates/router/src/core/customers.rs`
   - `crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs`

**3. External Connector Integration**
   - `crates/router/src/routes/dummy_connector.rs`

**4. Utils**
   - `crates/router/src/utils/db_utils.rs`
   - `crates/storage_impl/src/utils.rs`

**5. Configuration Files**
   - `crates/payment_methods/Cargo.toml`
   - `crates/router/Cargo.toml`

**6. Other**
   - `Cargo.lock`
   - `crates/payment_methods/src/lib.rs`
   - `crates/payment_methods/src/state.rs`
   - ... and 20 more files

**Code Patterns Applied:**
- Define new data structures (5 changes)
- Implement new functions (80 changes)
- Extend existing types with new fields (388 changes)
- Add conditional logic for feature flags or filtering (5 changes)
- Modify database queries (9 changes)

**Detailed Identifier Changes:**


Commit a31d1403:
Files to modify:


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

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

**crates/payment_methods/src/lib.rs**
  Modify existing code

**crates/payment_methods/src/state.rs**
  Modify existing code

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

**crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs**
  Modify existing code

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

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

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

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

**crates/router/src/routes/api_keys.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/dummy_connector.rs**
  Modify existing code

**crates/router/src/services.rs**
  Modify existing code

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

**crates/router/src/workflows/payment_method_status_update.rs**
  Modify existing code

**crates/scheduler/src/scheduler.rs**
  Modify existing code

**crates/storage_impl/src/kv_router_store.rs**
  Modify existing code

**crates/storage_impl/src/lib.rs**
  Modify existing code

**crates/storage_impl/src/lookup.rs**
  Modify existing code

**crates/storage_impl/src/mock_db.rs**
  Modify existing code

**crates/storage_impl/src/payment_method.rs**
  Modify existing code

**crates/storage_impl/src/payments/payment_attempt.rs**
  Modify existing code

**crates/storage_impl/src/payments/payment_intent.rs**
  Modify existing code

**crates/storage_impl/src/payouts/payout_attempt.rs**
  Modify existing code

**crates/storage_impl/src/payouts/payouts.rs**
  Modify existing code

**crates/storage_impl/src/redis/kv_store.rs**
  Modify existing code

**crates/storage_impl/src/utils.rs**
  Modify existing code
{"pr_number": 7355, "pr_title": "refactor(pm): create new crate for payment methods", "merged_at": "2025-03-11T22:15:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/errors.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/customers.rs", "crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs"], "connectors": ["crates/router/src/routes/dummy_connector.rs"], "utils": ["crates/router/src/utils/db_utils.rs", "crates/storage_impl/src/utils.rs"], "config": ["crates/payment_methods/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock", "crates/payment_methods/src/lib.rs", "crates/payment_methods/src/state.rs", "crates/router/src/db.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/payment_method.rs", "crates/router/src/routes/admin.rs", "crates/router/src/routes/api_keys.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/customers.rs", "crates/router/src/services.rs", "crates/router/src/workflows/payment_method_status_update.rs", "crates/scheduler/src/scheduler.rs", "crates/storage_impl/src/kv_router_store.rs", "crates/storage_impl/src/lib.rs", "crates/storage_impl/src/lookup.rs", "crates/storage_impl/src/mock_db.rs", "crates/storage_impl/src/payment_method.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "crates/storage_impl/src/payments/payment_intent.rs", "crates/storage_impl/src/payouts/payout_attempt.rs", "crates/storage_impl/src/payouts/payouts.rs", "crates/storage_impl/src/redis/kv_store.rs"]}, "change_types": {"structs_added": 5, "functions_added": 80, "fields_added": 388, "imports_added": 44, "conditionals_added": 5, "database_queries": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}