# GetDefaultPartnerBankAccount

## Overview

GetDefaultPartnerBankAccount retrieves the default bank account for a partner. This is used by downstream payment modules to resolve the default payment account for a given business partner.

## Business Rules

- Accepts `{ partnerId }` as input — retrieves the bank account with isDefault=true for the given partner
- Returns the PartnerBankAccount record where isDefault is true, or null if no default is set
- At most one bank account per partner can be marked as default
- Returns null when the partner has no bank accounts at all

## Process Flow

```mermaid
flowchart TD
    A[Receive input] --> B[SELECT from PartnerBankAccount where partnerId = input.partnerId AND isDefault = true]
    B --> C{Default bank account found?}
    C -->|Yes| D[Return bank account record]
    C -->|No| E[Return null]
```

## External Dependencies

- None

## Error Scenarios

- No explicit error — returns null when no default bank account exists

## Test Cases

- returns default bank account when one exists
- returns null when no default is set
- returns null when partner has no bank accounts
