# GetCustomerAccount

## Overview

Read the customer transaction account projection without exposing partner roles, persistence rows, or usage collections.

## Business Rules

- Accepts customerAccountId and returns account or null; partner IDs are not accepted
- Returns id, partnerId, companyId, code, accountName, partnerName, preferredCurrencyId, accountStatus, partnerStatus
- accountName is the account-specific name and remains null when unset
- partnerName is the global BusinessPartner name; the two names are returned separately without fallback
- accountStatus and partnerStatus report the respective lifecycle states without combining them into a transaction eligibility decision
- Each consuming module decides which operations those states permit
- Unavailable accounts remain readable for history; availability does not prevent lookup
- Address and bank usages are outside this projection

## Process Flow

```mermaid
flowchart TD
    A[Receive account lookup] --> B[Read account and global identity]
    B --> C[Return account context and separate lifecycle states]
    C --> D[Return projection including unavailable accounts]
```

Read CustomerAccount joined to BusinessPartner, project the public fields, and return the projection or null.

## External Dependencies

- None

## Error Scenarios

- None

## Test Cases

- returns account projection by id
- returns null for an unknown account
- returns unavailable accounts for history
