<!-- Describe your changes in detail -->
- Made `payment_method_subtype` mandatory in API endpoints and `payment_attempt` table
- Added `card` as an enum variant to `payment_method_subtype`
To implement this **search_filter** feature, you'll need to modify these architectural layers:


**1. API Request/Response Models**
   - `crates/api_models/src/payment_methods.rs`
   - `crates/api_models/src/payments.rs`

**2. Database Layer (Queries & Schema)**
   - `crates/diesel_models/src/payment_attempt.rs`
   - `crates/diesel_models/src/schema_v2.rs`
   - `crates/diesel_models/src/types.rs`

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

**4. Core Business Logic**
   - `crates/router/src/core/payment_methods.rs`
   - `crates/router/src/core/payments/routing.rs`
   - `crates/router/src/core/payments/transformers.rs`
   - ... and 1 more files

**5. External Connector Integration**
   - `crates/hyperswitch_connectors/src/connectors/adyen.rs`
   - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs`
   - `crates/hyperswitch_connectors/src/connectors/klarna.rs`
   - ... and 2 more files

**6. Type Definitions**
   - `crates/router/src/types/api/payment_methods.rs`
   - `crates/router/src/types/transformers.rs`

**7. Utils**
   - `crates/kgraph_utils/Cargo.toml`
   - `crates/kgraph_utils/src/mca.rs`
   - `crates/kgraph_utils/src/transformers.rs`

**8. Configuration Files**
   - `crates/common_enums/Cargo.toml`
   - `crates/euclid/Cargo.toml`
   - `crates/router/Cargo.toml`

**9. Other**
   - `api-reference-v2/openapi_spec.json`
   - `crates/common_enums/src/enums.rs`
   - `crates/common_enums/src/transformers.rs`
   - ... and 5 more files

**Code Patterns Applied:**
- Extend existing types with new fields (26 changes)

**Detailed Identifier Changes:**


Commit 187cceb3:
Files to modify:


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

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

**crates/common_enums/src/enums.rs**
  Modify existing code

**crates/common_enums/src/transformers.rs**
  Modify existing code

**crates/diesel_models/src/payment_attempt.rs**
  Modify existing code

**crates/diesel_models/src/schema_v2.rs**
  Modify existing code

**crates/diesel_models/src/types.rs**
  Modify existing code

**crates/euclid/src/frontend/dir/enums.rs**
  Modify existing code

**crates/euclid/src/frontend/dir/lowering.rs**
  Modify existing code

**crates/euclid/src/frontend/dir/transformers.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/adyen.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/klarna.rs**
  Modify existing code

**crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs**
  Modify existing code

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

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

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

**crates/kgraph_utils/src/mca.rs**
  Modify existing code

**crates/kgraph_utils/src/transformers.rs**
  Modify existing code

**crates/router/src/connector/stripe/transformers.rs**
  Modify existing code

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

**crates/router/src/core/payments/routing.rs**
  Modify existing code

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

**crates/router/src/core/revenue_recovery/types.rs**
  Modify existing code

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

**crates/router/src/types/transformers.rs**
  Modify existing code
{"pr_number": 7662, "pr_title": "feat(router): Support `card` in `payment_method_subtype` [V2]", "merged_at": "2025-04-08T10:20:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/types.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/revenue_recovery.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/revenue_recovery/types.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/router/src/connector/stripe/transformers.rs"], "types": ["crates/router/src/types/api/payment_methods.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/Cargo.toml", "crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs"], "config": ["crates/common_enums/Cargo.toml", "crates/euclid/Cargo.toml", "crates/router/Cargo.toml"], "other": ["api-reference-v2/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs", "v2_migrations/2025-03-25-074512_payment-method-subtype-mandatory/down.sql", "v2_migrations/2025-03-25-074512_payment-method-subtype-mandatory/up.sql"]}, "change_types": {"fields_added": 26}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}